maliang пре 4 недеља
родитељ
комит
b491a77b7e
45 измењених фајлова са 1121 додато и 786 уклоњено
  1. BIN
      jshERP-web/public/doc/goods_template.xls
  2. BIN
      jshERP-web/public/doc/goods_template.xlsx
  3. 7 3
      jshERP-web/src/components/menu/index.js
  4. 1 1
      jshERP-web/src/components/tools/ImportFileModal.vue
  5. 1 0
      jshERP-web/src/permission.js
  6. 2 0
      jshERP-web/src/store/index.js
  7. 26 0
      jshERP-web/src/store/modules/approval.js
  8. 2 2
      jshERP-web/src/views/bill/AllocationOutList.vue
  9. 2 2
      jshERP-web/src/views/bill/AssembleList.vue
  10. 2 2
      jshERP-web/src/views/bill/DisassembleList.vue
  11. 0 6
      jshERP-web/src/views/bill/OtherInList.vue
  12. 0 6
      jshERP-web/src/views/bill/OtherOutList.vue
  13. 3 3
      jshERP-web/src/views/bill/PurchaseApplyList.vue
  14. 2 2
      jshERP-web/src/views/bill/PurchaseBackList.vue
  15. 2 8
      jshERP-web/src/views/bill/PurchaseInList.vue
  16. 1 7
      jshERP-web/src/views/bill/PurchaseOrderList.vue
  17. 2 2
      jshERP-web/src/views/bill/RetailBackList.vue
  18. 2 2
      jshERP-web/src/views/bill/RetailOutList.vue
  19. 2 2
      jshERP-web/src/views/bill/SaleBackList.vue
  20. 1 7
      jshERP-web/src/views/bill/SaleOrderList.vue
  21. 1 7
      jshERP-web/src/views/bill/SaleOutList.vue
  22. 4 7
      jshERP-web/src/views/bill/dialog/BillDetail.vue
  23. 2 3
      jshERP-web/src/views/bill/mixins/BillListMixin.js
  24. 1 3
      jshERP-web/src/views/bill/modules/OtherInModal.vue
  25. 1 3
      jshERP-web/src/views/bill/modules/OtherOutModal.vue
  26. 1 3
      jshERP-web/src/views/bill/modules/PurchaseInModal.vue
  27. 1 3
      jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue
  28. 1 3
      jshERP-web/src/views/bill/modules/SaleOrderModal.vue
  29. 1 3
      jshERP-web/src/views/bill/modules/SaleOutModal.vue
  30. 1 1
      jshERP-web/src/views/material/MaterialList.vue
  31. 2 2
      jshERP-web/src/views/material/modules/MaterialModal.vue
  32. 175 66
      jshERP-web/src/views/stock/CheckList.vue
  33. 227 138
      jshERP-web/src/views/stock/TaskList.vue
  34. 0 99
      jshERP-web/src/views/stock/components/FilterForm.vue
  35. 13 5
      jshERP-web/src/views/stock/components/checkModal.vue
  36. 8 4
      jshERP-web/src/views/stock/components/editForm.vue
  37. 0 343
      jshERP-web/src/views/stock/components/stockModal.vue
  38. 525 0
      jshERP-web/src/views/stock/modules/InventoryCheckModal.vue
  39. 13 3
      jshERP-web/src/views/stock/utils/table.js
  40. 21 4
      jshERP-web/src/views/task/ApprovalList.vue
  41. 6 4
      jshERP-web/src/views/task/FlowList.vue
  42. 13 4
      jshERP-web/src/views/task/HandledList.vue
  43. 32 17
      jshERP-web/src/views/task/InitiateList.vue
  44. 10 2
      jshERP-web/src/views/task/mixin/approvalMixin.js
  45. 4 4
      jshERP-web/src/views/task/utils/flow.js

BIN
jshERP-web/public/doc/goods_template.xls


BIN
jshERP-web/public/doc/goods_template.xlsx


+ 7 - 3
jshERP-web/src/components/menu/index.js

@@ -1,6 +1,5 @@
-import Menu from 'ant-design-vue/es/menu'
-import Icon from 'ant-design-vue/es/icon'
-
+import { Menu, Icon, Badge} from 'ant-design-vue'
+import { mapState } from 'vuex'
 const { Item, SubMenu } = Menu
 
 export default {
@@ -39,6 +38,9 @@ export default {
       vm.menu.forEach((item) => keys.push(item.url))
       return keys
     },
+    ...mapState({
+      approvalCount: state => state.approval.approvalCount,
+    })
   },
   mounted() {
     this.updateMenu()
@@ -102,6 +104,7 @@ export default {
       return null
     },
     renderMenuItem(menu) {
+      const approvalCount = this.approvalCount
       const target = null
       const tag = (target && 'a') || 'router-link'
       let props = { to: { name: menu.name } }
@@ -124,6 +127,7 @@ export default {
           <tag {...{ props, attrs }} title={menu.text}>
             {this.renderIcon(menu.icon)}
             <span>{menu.text}</span>
+            {menu.text=='待我审批'?(<Badge count={approvalCount} offset={[5,-5]}></Badge>):''}
           </tag>
         </Item>
       )

+ 1 - 1
jshERP-web/src/components/tools/ImportFileModal.vue

@@ -93,7 +93,7 @@ export default {
     },
     importTemplate() {
       let link = this.$refs.myLink
-      link.setAttribute('download', this.templateDownloadName + '.xls')
+      link.setAttribute('download', this.templateDownloadName + '.xlsx')
     },
     close() {
       this.$emit('close')

+ 1 - 0
jshERP-web/src/permission.js

@@ -32,6 +32,7 @@ router.beforeEach((to, from, next) => {
             })
             let constRoutes = []
             constRoutes = generateIndexRouter(menuData)
+            store.dispatch('updateApprovalStat')
             // 添加主界面路由
             store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
               // 根据roles权限生成可访问的路由表

+ 2 - 0
jshERP-web/src/store/index.js

@@ -5,6 +5,7 @@ import app from './modules/app'
 import user from './modules/user'
 import permission from './modules/permission'
 import enhance from './modules/enhance'
+import approval from './modules/approval'
 import getters from './getters'
 
 Vue.use(Vuex)
@@ -15,6 +16,7 @@ export default new Vuex.Store({
     user,
     permission,
     enhance,
+    approval
   },
   state: {},
   mutations: {},

+ 26 - 0
jshERP-web/src/store/modules/approval.js

@@ -0,0 +1,26 @@
+import { getAction } from '@/api/manage'
+
+const approval = {
+  state: {
+    approvalCount: 0, // 待我审批数量
+  },
+  mutations: {
+    SET_APPROVAL_COUNT: (state, count) => {
+      state.approvalCount = count
+    },
+  },
+  actions: {
+    async updateApprovalStat({ commit }, record) {
+      try {
+        const res = await getAction('/audit/pendingApprovalCount')
+        console.log('res-----',res)
+        if(res.code===200){
+          commit('SET_APPROVAL_COUNT',res.data)
+        }
+      } catch (error) {
+        
+      }
+    },
+  },
+}
+export default approval

+ 2 - 2
jshERP-web/src/views/bill/AllocationOutList.vue

@@ -95,12 +95,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/bill/AssembleList.vue

@@ -95,12 +95,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/bill/DisassembleList.vue

@@ -95,12 +95,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 0 - 6
jshERP-web/src/views/bill/OtherInList.vue

@@ -118,12 +118,6 @@
             >待入库({{ waitTotal }})</a-button
           >
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 0 - 6
jshERP-web/src/views/bill/OtherOutList.vue

@@ -118,12 +118,6 @@
             >待出库({{ waitTotal }})</a-button
           >
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 3 - 3
jshERP-web/src/views/bill/PurchaseApplyList.vue

@@ -83,12 +83,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >
@@ -118,7 +118,7 @@
           <a-tooltip
             placement="left"
             title="请购单只涉及数量,请购单可以转采购订单,但需要先对请购单进行审核。
-          勾选单据之后可以进行批量操作(删除、审核、反审核)"
+          勾选单据之后可以进行批量操作(删除)"
             slot="action"
           >
             <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />

+ 2 - 2
jshERP-web/src/views/bill/PurchaseBackList.vue

@@ -130,12 +130,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 8
jshERP-web/src/views/bill/PurchaseInList.vue

@@ -139,12 +139,6 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >
@@ -175,7 +169,7 @@
             placement="left"
             title="采购入库单可以由采购订单转过来,也可以单独创建。
           采购入库单据中的仓库列表只显示当前用户有权限的仓库。采购入库单可以使用多账户付款。
-          勾选单据之后可以进行批量操作(删除、审核、反审核)"
+          勾选单据之后可以进行批量操作(删除)"
             slot="action"
           >
             <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />
@@ -326,7 +320,7 @@ export default {
         { title: '商品信息', dataIndex: 'materialsList', width: 220, ellipsis: true },
         { title: '单据日期', dataIndex: 'operTimeStr', width: 145 },
         { title: '操作员', dataIndex: 'userName', width: 80, ellipsis: true },
-        { title: '复核人员', dataIndex: 'auditorName;', width: 80, ellipsis: true },
+        { title: '复核人员', dataIndex: 'auditorName;', width: 80 },
         { title: '数量', dataIndex: 'materialCount', width: 60 },
         { title: '金额合计', dataIndex: 'totalPrice', width: 80 },
         {

+ 1 - 7
jshERP-web/src/views/bill/PurchaseOrderList.vue

@@ -109,12 +109,6 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >
@@ -149,7 +143,7 @@
           <a-tooltip
             placement="left"
             title="采购订单不涉及付款金额,采购订单可以转采购入库单,但需要先对采购订单进行审核。
-          勾选单据之后可以进行批量操作(删除、审核、反审核)"
+          勾选单据之后可以进行批量操作(删除)"
             slot="action"
           >
             <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />

+ 2 - 2
jshERP-web/src/views/bill/RetailBackList.vue

@@ -128,12 +128,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/bill/RetailOutList.vue

@@ -123,12 +123,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/bill/SaleBackList.vue

@@ -131,12 +131,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 1 - 7
jshERP-web/src/views/bill/SaleOrderList.vue

@@ -99,12 +99,6 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >
@@ -134,7 +128,7 @@
           <a-tooltip
             placement="left"
             title="销售订单不涉及收款金额,销售订单可以转销售出库单,但需要先对销售订单进行审核。
-          勾选单据之后可以进行批量操作(删除、审核、反审核)"
+          勾选单据之后可以进行批量操作(删除)"
             slot="action"
           >
             <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />

+ 1 - 7
jshERP-web/src/views/bill/SaleOutList.vue

@@ -140,12 +140,6 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
-            >审核</a-button
-          >
-          <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
-            >反审核</a-button
-          >
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >
@@ -176,7 +170,7 @@
             placement="left"
             title="销售出库单可以由销售订单转过来,也可以单独创建。
           销售出库单据中的仓库列表只显示当前用户有权限的仓库。销售出库单可以使用多账户收款。
-          勾选单据之后可以进行批量操作(删除、审核、反审核)"
+          勾选单据之后可以进行批量操作(删除)"
             slot="action"
           >
             <a-icon v-if="btnEnableList.indexOf(1) > -1" type="question-circle" style="font-size: 20px; float: right" />

+ 4 - 7
jshERP-web/src/views/bill/dialog/BillDetail.vue

@@ -53,8 +53,6 @@
       <a-button v-if="billType === '调拨出库'" @click="allocationOutExportExcel()">导出</a-button>
       <a-button v-if="billType === '组装单' || billType === '拆卸单'" @click="assembleExportExcel()">导出</a-button>
       <a-button v-if="billType === '盘点复盘'" @click="stockCheckReplayExportExcel()">导出</a-button> -->
-      <!--反审核-->
-      <!-- <a-button v-if="checkFlag && isCanBackCheck && model.status === '1'" @click="handleBackCheck()">反审核</a-button> -->
     </template>
     <template slot="footer" v-else>
       <a-button v-if="!approvalIsReadonly" :loading="confirmLoading" @click="submitApproval(2)">审核不通过</a-button>
@@ -2647,10 +2645,8 @@ export default {
       return ''
     },
     show(record, type, prefixNo, approvalRow=null) {
-      console.log('this.username',this.username)
       //查询单条单据信息
       findBillDetailByNumber({ number: record.number }).then((res) => {
-        console.log('findBillDetailByNumber-----------',res)
         if (res && res.code === 200) {
           let item = res.data
           this.billType = type
@@ -2717,7 +2713,6 @@ export default {
             auditComment: '',
           })
           this.approval.dataSource = list
-          console.log('approvalRow=====',approvalRow)
         })
       }
     },
@@ -2767,6 +2762,7 @@ export default {
       this.approvalId = null
       this.approvalIsReadonly = false
       this.approval.dataSource = []
+      this.auditComment = ''
     },
     myHandleDetail(billNumber) {
       findBillDetailByNumber({ number: billNumber }).then((res) => {
@@ -3130,11 +3126,12 @@ export default {
       this.confirmLoading = true
       postAction('/audit/setStatus',params).then(res => {
         console.log(res)
-        if(res.code==200&&res.data){
+        if(res.code===200){
           this.$message.success(res.msg)
           this.handleCancel()
+          this.$emit('ok')
         }else{
-          this.$message.error(res.msg||'操作失败')
+          this.$message.error(res.data.message)
         }
       }).finally(() => {
        this.confirmLoading = false

+ 2 - 3
jshERP-web/src/views/bill/mixins/BillListMixin.js

@@ -83,11 +83,10 @@ export const BillListMixin = {
       this.$refs.modalForm.disableSubmit = false
       //开启明细的编辑模式
       this.$refs.modalForm.rowCanEdit = true
-      let columnIndex = record.subType === '组装单' || record.subType === '拆卸单' ? 2 : 0
-      this.$refs.modalForm.materialTable.columns[columnIndex].type = FormTypes.popupJsh
     },
     myHandleEdit(record) {
-      if (record.status === '0') {
+      // 未审核、不通过可编辑
+      if (record.status === '0'||record.status === '8') {
         this.$refs.modalForm.action = 'edit'
         if (this.btnEnableList.indexOf(2) === -1) {
           this.$refs.modalForm.isCanCheck = false

+ 1 - 3
jshERP-web/src/views/bill/modules/OtherInModal.vue

@@ -16,10 +16,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('其它入库')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 3
jshERP-web/src/views/bill/modules/OtherOutModal.vue

@@ -16,10 +16,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('其它出库')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 3
jshERP-web/src/views/bill/modules/PurchaseInModal.vue

@@ -17,10 +17,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('采购入库')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 3
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue

@@ -17,10 +17,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('采购订单')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 3
jshERP-web/src/views/bill/modules/SaleOrderModal.vue

@@ -17,10 +17,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('销售订单')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 3
jshERP-web/src/views/bill/modules/SaleOutModal.vue

@@ -17,10 +17,8 @@
     <template slot="footer">
       <a-button @click="handleCancel">取消</a-button>
       <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('销售出库')">三联打印预览</a-button>
-      <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
+      <a-button :loading="confirmLoading" @click="handleOkAndCheck">保存并申请审核</a-button>
       <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
-      <!--发起多级审核-->
-      <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
     </template>
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">

+ 1 - 1
jshERP-web/src/views/material/MaterialList.vue

@@ -510,7 +510,7 @@ export default {
     },
     handleImportXls() {
       let importExcelUrl = this.url.importExcelUrl
-      let templateUrl = '/doc/goods_template.xls'
+      let templateUrl = '/doc/goods_template.xlsx'
       let templateName = '商品信息导入模版[下载]'
       this.$refs.modalImportForm.initModal(importExcelUrl, templateUrl, templateName, '商品信息导入模版')
       this.$refs.modalImportForm.title = '商品导入'

+ 2 - 2
jshERP-web/src/views/material/modules/MaterialModal.vue

@@ -213,7 +213,7 @@
               </a-col>
             </a-row>
           </a-tab-pane>
-          <a-tab-pane key="2" tab="商品条码" forceRender>
+          <a-tab-pane key="2" tab="商品SKU" forceRender>
             <j-editable-table
               ref="editableProBarCodeTable"
               :loading="mbTable.loading"
@@ -792,7 +792,7 @@ export default {
     requestAddOrEdit(formData) {
       console.log('formData------------', formData)
       if (formData.meList.length === 0) {
-        this.$message.warning('抱歉,请输入条码信息!')
+        this.$message.warning('抱歉,必须填一条SKU信息!')
         return
       }
       //对最低和最高安全库存进行校验

+ 175 - 66
jshERP-web/src/views/stock/CheckList.vue

@@ -3,14 +3,48 @@
     <a-col :md="24">
       <a-card :bordered="false" :style="cardStyle">
         <!-- 查询区域 -->
-        <filter-form
-          @search="onSearch"
-          @reset="onReset"
-          :queryParam="queryParam"
-          :spinnerList="spinnerList"
-          :deoptData="deoptData"
-        ></filter-form>
-        <div style="margin-bottom: 6px">
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-select placeholder="请选择盘点状态" showSearch :options="taskStatusList" v-model="queryParam.taskStatus">
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-input placeholder="请输入任务编号、名称" v-model="queryParam.number"></a-input>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点仓库" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-select placeholder="请选择盘点仓库" showSearch :options="deoptData" v-model="queryParam.depotId">
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="searchQuery">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+                  <a @click="handleToggleSearch" style="margin-left: 8px">
+                    {{ toggleSearchStatus ? '收起' : '展开' }}
+                    <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                  </a>
+                </span>
+              </a-col>
+              <template v-if="toggleSearchStatus">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-select placeholder="请选择创建人" showSearch :options="spinnerList" v-model="queryParam.createBy">
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+              </template>
+            </a-row>
+          </a-form>
+        </div>
+        <div class="table-operator" style="margin-top: 5px">
           <a-button :disabled="!selectedRowKeys.length" type="primary" @click="onStartTask">开始盘点</a-button>
         </div>
         <a-table
@@ -40,9 +74,6 @@
             <a @click="addTask('detail', record)">查看</a>
             <a-divider type="vertical" />
             <a :disabled="record.taskStatus > 3" @click="addTask('edit', record)">编辑</a>
-            <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-              <a :disabled="record.taskStatus !== 1 || record.taskStatus !== 4">删除</a>
-            </a-popconfirm> -->
           </span>
         </a-table>
       </a-card>
@@ -61,58 +92,122 @@
 </template>
 
 <script>
-// import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import FilterForm from './components/FilterForm.vue'
-import table from './utils/table'
-// import StockModal from './components/stockModal.vue'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { getAction, postAction } from '@/api/manage'
-import { newTableMixin } from '@/mixins/newTableMixin'
 import CheckModal from './components/checkModal.vue'
-import { mixinDevice } from '@/utils/mixin.js'
 
 export default {
-  components: { FilterForm, CheckModal },
-  mixins: [newTableMixin,mixinDevice],
+  components: { CheckModal },
+  mixins: [JeecgListMixin],
   data() {
     return {
-      description: '盘点任务列表',
-      cardStyle: '',
-      // 表头
-      scroll: { x: 1500 },
-      // 权限按钮集合
-      btnEnableList: [1, 1, 1],
-      queryParam: {
-        taskStatus: undefined,
-        number: '',
-        depotId: undefined,
-        createBy: undefined,
+      labelCol: {
+        span: 4,
+      },
+      wrapperCol: {
+        span: 19,
+        offset: 1,
       },
-      // stockTable: {
-      //   loading: false,
-      //   dataSource: [],
-      //   columns: table.taskColumns,
-      // },
-      columns: table.taskColumns,
+      taskStatusList: [
+        { value: 0, label: '未审核' },
+        { value: 1, label: '已审核' },
+        { value: 2, label: '进行中' },
+        { value: 3, label: '已完成' },
+        { value: 4, label: '已取消' },
+        { value: 5, label: '已更新' },
+        { value: 8, label: '审核未通过' },
+        { value: 9, label: '审核中' },
+      ],
+      queryParam: {},
+      columns: [
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          width: 150,
+          scopedSlots: { customRender: 'action' },
+        },
+        {
+          title: '盘点任务编号',
+          dataIndex: 'number',
+          align: 'left',
+          width: 170,
+        },
+        {
+          title: '盘点任务名称',
+          dataIndex: 'taskName',
+          align: 'left',
+          width: 140,
+        },
+        {
+          title: '盘点类型',
+          dataIndex: 'taskType',
+          align: 'left',
+          width: 100,
+          scopedSlots: { customRender: 'taskType' },
+        },
+        {
+          title: '盘点仓库',
+          dataIndex: 'depotName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '商品数量',
+          dataIndex: 'materialCount',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点库位范围',
+          dataIndex: 'positionRange',
+          align: 'left',
+          width: 120,
+        },
+        {
+          title: '创建人',
+          dataIndex: 'createByName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点负责人',
+          dataIndex: 'creatorName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点状态',
+          dataIndex: 'taskStatus',
+          align: 'left',
+          width: 100,
+          scopedSlots: { customRender: 'taskStatus' },
+        },
+        {
+          title: '完成时间',
+          dataIndex: 'operTime',
+          align: 'left',
+          width: 100,
+        },
+      ],
       dataSource: [],
       loading: false,
-
       rules: {
         taskType: { rules: [{ required: true, message: '请选择盘点类型' }] },
         depotId: { rules: [{ required: true, message: '请选择盘点仓库' }] },
         taskName: { rules: [{ required: true, message: '请输入盘点任务名称' }] },
       },
-
-      // rules: {
-      //   number: { rules: [{ required: true, message: '请输入盘点编号' }] },
-      // },
-
       url: {
         list: '/stocktaking/list',
         add: '/stocktaking/add',
-        detailList: '/stocktaking/detail',
         spinnerList: '/stocktaking/creatorSpinnerList',
         depotList: '/depot/findDepotByCurrentUser',
-        detailByItemList: '/stocktaking/detailByItemList',
         delete: '/stocktaking/taskDelete/',
         cancel: '/stocktaking/taskCancel/',
         startTask: '/stocktaking/startTask/',
@@ -128,16 +223,13 @@ export default {
   watch: {
     stockVisible(val) {
       if (!val) {
-        this.getList()
+        this.loadData()
       }
     },
   },
   created() {
-    if (this.isDesktop()) {
-      this.cardStyle = 'min-height:' + (document.documentElement.clientHeight - 100) + 'px'
-    }
-    this.getList()
-    this.getSpinnerList(), this.getDepotList()
+    this.getSpinnerList()
+    this.getDepotList()
   },
   methods: {
     addTask(type, data) {
@@ -149,20 +241,28 @@ export default {
       }
       this.stockVisible = true
     },
-    getList(type) {
-      if (type === 'search') this.ipagination.current = 1 // 重新加载数据时,重置当前页为第一页
-      if (type === 'reset') {
-        for (let i in this.queryParam) {
-          this.$set(this.queryParam, i, null)
-        }
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error('请设置url.list属性!')
+        return
+      }
+      //加载数据 若传入参数1则加载第一页的内容
+      if (arg === 1) {
+        this.ipagination.current = 1
       }
-      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
       this.loading = true
-      const params = { ...this.queryParam }
-      postAction(url, params).then((res) => {
-        this.dataSource = res.data.rows
-        this.ipagination.total = Number(res.data.total)
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      postAction(url, {
+        ...this.queryParam
+      }).then((res) => {
+        if (res.code === 200) {
+          this.dataSource = res.data.rows
+          this.ipagination.total = Number(res.data.total)
+        }else {
+          this.$message.warning(res.msg)
+        }
         this.loading = false
+        this.onClearSelected()
       })
     },
     getDetailList(id) {
@@ -192,7 +292,7 @@ export default {
       getAction(url)
         .then((res) => {
           this.$message.success('删除成功')
-          this.getList()
+          this.loadData()
         })
         .catch((err) => {
           this.$message.error('删除失败')
@@ -204,7 +304,7 @@ export default {
       getAction(url)
         .then((res) => {
           this.$message.success('取消成功')
-          this.getList()
+          this.loadData()
         })
         .catch((err) => {
           this.$message.error('取消失败')
@@ -214,18 +314,27 @@ export default {
     onStartTask() {
       const ids = this.selectedRowKeys
       const url = this.url.startTask + ids
-      // this.$refs.table.clearSelection()
 
       getAction(url)
         .then((res) => {
           this.$message.success('盘点成功')
-          this.getList()
-          this.selectedRowKeys = []
+          this.loadData()
         })
         .catch((err) => {
           this.$message.error('盘点失败')
         })
     },
+    formateTaskStatus(type) {
+      const target = this.taskStatusList.find(item => item.value == type)
+      return target?target.label:''
+    },
+    getCheckboxProps(record) {
+      return {
+        props: {
+          disabled: record.taskStatus !== 1,
+        },
+      }
+    },
   },
 }
 </script>

+ 227 - 138
jshERP-web/src/views/stock/TaskList.vue

@@ -3,16 +3,50 @@
     <a-col :md="24">
       <a-card :bordered="false" :style="cardStyle">
         <!-- 查询区域 -->
-        <filter-form
-          @search="onSearch"
-          @reset="onReset"
-          :queryParam="queryParam"
-          :spinnerList="spinnerList"
-          :deoptData="deoptData"
-        ></filter-form>
-        <div style="margin-bottom: 6px">
-          <a-button type="primary" icon="plus" @click="addTask('add')">新增盘点任务</a-button>
-
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-select placeholder="请选择盘点状态" showSearch :options="taskStatusList" v-model="queryParam.taskStatus">
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-input placeholder="请输入任务编号、名称" v-model="queryParam.number"></a-input>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="盘点仓库" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                  <a-select placeholder="请选择盘点仓库" showSearch :options="deoptData" v-model="queryParam.depotId">
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="searchQuery">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
+                  <a @click="handleToggleSearch" style="margin-left: 8px">
+                    {{ toggleSearchStatus ? '收起' : '展开' }}
+                    <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                  </a>
+                </span>
+              </a-col>
+              <template v-if="toggleSearchStatus">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-select placeholder="请选择创建人" showSearch :options="spinnerList" v-model="queryParam.createBy">
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+              </template>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 操作按钮区域 -->
+        <div class="table-operator" style="margin-top: 5px">
+          <a-button type="primary" icon="plus" @click="onAdd">新增盘点任务</a-button>
           <a-popconfirm
             :disabled="!selectedRowKeys.length"
             style="margin: 0 6px"
@@ -28,180 +62,229 @@
           >
             <a-button :disabled="!selectedRowKeys.length">批量删除</a-button>
           </a-popconfirm>
-          <!-- <a-button style="margin-left: 6px">导出任务</a-button> -->
         </div>
-        <a-table
-          ref="table"
-          size="middle"
-          bordered
-          rowKey="id"
-          :columns="columns"
-          :dataSource="dataSource"
-          :pagination="ipagination"
-          :scroll="scroll"
-          :loading="loading"
-          :rowSelection="{
-            selectedRowKeys: selectedRowKeys,
-            onChange: onSelectChange,
-          }"
-          @change="handleTableChange"
-        >
-          <template slot="taskType" slot-scope="value">
-            {{ value === 1 ? '全盘' : '抽盘' }}
-          </template>
-          <template slot="taskStatus" slot-scope="value">
-            {{ formateTaskStatus(value) }}
-          </template>
-          <span slot="action" slot-scope="text, record">
-            <a @click="addTask('detail', record)">查看</a>
-            <a-divider type="vertical" />
-            <a :disabled="record.taskStatus !== 1" @click="addTask('edit', record)">编辑</a>
-            <a-divider type="vertical" />
-            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-              <a :disabled="record.taskStatus !== 1 && record.taskStatus !== 4">删除</a>
-            </a-popconfirm>
-          </span>
-        </a-table>
+        <!-- table区域-begin -->
+        <div>
+          <a-table
+            ref="table"
+            size="middle"
+            bordered
+            rowKey="id"
+            :columns="columns"
+            :dataSource="dataSource"
+            :pagination="ipagination"
+            :scroll="scroll"
+            :loading="loading"
+            :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            @change="handleTableChange"
+          >
+            <template slot="taskType" slot-scope="value">
+              {{ value === 1 ? '全盘' : '抽盘' }}
+            </template>
+            <template slot="taskStatus" slot-scope="value">
+              {{ formateTaskStatus(value) }}
+            </template>
+            <span slot="action" slot-scope="text, record">
+              <a @click="onDetail(record)">查看</a>
+              <a-divider type="vertical" />
+              <a @click="onEdit(record)">编辑</a>
+              <a-divider type="vertical" />
+              <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record)">
+                <a>删除</a>
+              </a-popconfirm>
+            </span>
+          </a-table>
+        </div>
+        <!-- table区域-end -->
       </a-card>
     </a-col>
-    <stock-modal
-      :spinnerList="spinnerList"
-      :deoptData="deoptData"
-      :stockVisible.sync="stockVisible"
-      :title="title"
-      :rules="rules"
-      :taskId="taskId"
-      :openType="openType"
-      ref="stockF"
-    ></stock-modal>
+    <InventoryCheckModal ref="modalForm" @ok="modalFormOk"></InventoryCheckModal>
   </a-row>
 </template>
 
 <script>
-import FilterForm from './components/FilterForm.vue'
-import table from './utils/table'
-import StockModal from './components/stockModal.vue'
 import { getAction, postAction } from '@/api/manage'
-import { newTableMixin } from '@/mixins/newTableMixin'
-import { mixinDevice } from '@/utils/mixin.js'
-
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import InventoryCheckModal from './modules/InventoryCheckModal.vue'
 export default {
-  components: { FilterForm, StockModal },
-  mixins: [newTableMixin,mixinDevice],
+  components: { InventoryCheckModal },
+  mixins: [JeecgListMixin],
   data() {
     return {
-      description: '盘点任务列表',
-      cardStyle: '',
-      // 表头
-      scroll: { x: 1500 },
-      // 权限按钮集合
-      btnEnableList: [1, 1, 1],
-      queryParam: {
-        taskStatus: undefined,
-        number: '',
-        depotId: undefined,
-        createBy: undefined,
+      labelCol: {
+        span: 4,
       },
-      // stockTable: {
-      //   loading: false,
-      //   dataSource: [],
-      //   columns: table.taskColumns,
-      // },
-      columns: table.taskColumns,
-      dataSource: [],
-      loading: false,
-
+      wrapperCol: {
+        span: 19,
+        offset: 1,
+      },
+      taskStatusList: [
+        { value: 0, label: '未审核' },
+        { value: 1, label: '已审核' },
+        { value: 2, label: '进行中' },
+        { value: 3, label: '已完成' },
+        { value: 4, label: '已取消' },
+        { value: 5, label: '已更新' },
+        { value: 8, label: '审核未通过' },
+        { value: 9, label: '审核中' },
+      ],
+      queryParam: {},
+      columns: [
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          width: 150,
+          scopedSlots: { customRender: 'action' },
+        },
+        {
+          title: '盘点任务编号',
+          dataIndex: 'number',
+          align: 'left',
+          width: 170,
+        },
+        {
+          title: '盘点任务名称',
+          dataIndex: 'taskName',
+          align: 'left',
+          width: 140,
+        },
+        {
+          title: '盘点类型',
+          dataIndex: 'taskType',
+          align: 'left',
+          width: 100,
+          scopedSlots: { customRender: 'taskType' },
+        },
+        {
+          title: '盘点仓库',
+          dataIndex: 'depotName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '商品数量',
+          dataIndex: 'materialCount',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点库位范围',
+          dataIndex: 'positionRange',
+          align: 'left',
+          width: 120,
+        },
+        {
+          title: '创建人',
+          dataIndex: 'createByName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点负责人',
+          dataIndex: 'creatorName',
+          align: 'left',
+          width: 100,
+        },
+        {
+          title: '盘点状态',
+          dataIndex: 'taskStatus',
+          align: 'left',
+          width: 100,
+          scopedSlots: { customRender: 'taskStatus' },
+        },
+        {
+          title: '完成时间',
+          dataIndex: 'operTime',
+          align: 'left',
+          width: 100,
+        },
+      ],
       rules: {
         taskType: { rules: [{ required: true, message: '请选择盘点类型' }] },
         depotId: { rules: [{ required: true, message: '请选择盘点仓库' }] },
         taskName: { rules: [{ required: true, message: '请输入盘点任务名称' }] },
       },
-
-      // rules: {
-      //   number: { rules: [{ required: true, message: '请输入盘点编号' }] },
-      // },
-
       url: {
         list: '/stocktaking/list',
         add: '/stocktaking/add',
-        detailList: '/stocktaking/detail',
         spinnerList: '/stocktaking/creatorSpinnerList',
         depotList: '/depot/findDepotByCurrentUser',
-        detailByItemList: '/stocktaking/detailByItemList',
         delete: '/stocktaking/taskDelete/',
         cancel: '/stocktaking/taskCancel/',
       },
-      stockVisible: false,
-      title: '',
       spinnerList: [],
       deoptData: [],
-      taskId: '',
-      openType: 'add',
     }
   },
-  watch: {
-    stockVisible(val) {
-      if (!val) {
-        this.getList()
-      }
-    },
-  },
   computed: {
     isDel() {
-      return this.selectionRows.filter((item) => item.taskStatus !== 1 && item.taskStatus !== 4).length > 0
+      return this.selectionRows.filter((item) => item.taskStatus !== 0 && item.taskStatus !== 4).length > 0
         ? true
         : false
     },
     isStock() {
-      return this.selectionRows.filter((item) => item.taskStatus !== 1 && item.taskStatus !== 2).length > 0
+      return this.selectionRows.filter((item) => item.taskStatus !== 0 && item.taskStatus !== 2).length > 0
         ? true
         : false
     },
   },
-
   created() {
-    if (this.isDesktop()) {
-      this.cardStyle = 'min-height:' + (document.documentElement.clientHeight - 100) + 'px'
-    }
-    this.getList()
-    this.getSpinnerList(), this.getDepotList()
+    this.getSpinnerList()
+    this.getDepotList()
   },
   methods: {
-    addTask(type, data) {
-      this.taskId = ''
-      this.openType = type
-      this.title = type === 'add' ? '新增盘点任务' : type === 'edit' ? '编辑盘点任务' : '查看盘点任务'
-      if (type !== 'add') {
-        this.getDetailList(data.id)
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error('请设置url.list属性!')
+        return
       }
-      this.stockVisible = true
-    },
-    getList(type) {
-      if (type === 'search') this.ipagination.current = 1 // 重新加载数据时,重置当前页为第一页
-      if (type === 'reset') {
-        for (let i in this.queryParam) {
-          this.$set(this.queryParam, i, null)
-        }
+      //加载数据 若传入参数1则加载第一页的内容
+      if (arg === 1) {
+        this.ipagination.current = 1
       }
-      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
       this.loading = true
-      const params = { ...this.queryParam }
-      postAction(url, params).then((res) => {
-        this.dataSource = res.data.rows
-        this.ipagination.total = Number(res.data.total)
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      postAction(url, {
+        ...this.queryParam
+      }).then((res) => {
+        if (res.code === 200) {
+          this.dataSource = res.data.rows
+          this.ipagination.total = Number(res.data.total)
+        }else {
+          this.$message.warning(res.msg)
+        }
         this.loading = false
+        this.onClearSelected()
       })
     },
-    getDetailList(id) {
-      this.taskId = id
+    onEdit(record){
+      if(record.taskStatus==0||record.taskStatus==8){
+        this.$refs.modalForm.edit(record.number)
+        this.$refs.modalForm.title = '编辑盘点任务'
+      }else{
+        this.$message.warning('只有未审核、审核不通过的状态才能编辑!')
+      }
+    },
+    onAdd(){
+      this.$refs.modalForm.add()
+      this.$refs.modalForm.title = '新增盘点任务'
+    },
+    onDetail(record){
+      this.$refs.modalForm.lookDetail(record.number)
+      this.$refs.modalForm.title = '查看盘点任务'
     },
-
     getSpinnerList() {
       getAction(this.url.spinnerList).then((res) => {
         this.spinnerList = res.data || []
       })
     },
-
     getDepotList() {
       getAction(this.url.depotList).then((res) => {
         this.deoptData = res.data.map((item) => {
@@ -212,34 +295,40 @@ export default {
         })
       })
     },
-
-    handleDelete(id) {
-      if (this.isDel) return this.$message.error('只能删除未开始或已取消的盘点任务,请重新选择!')
-
-      const ids = id || this.selectedRowKeys
+    handleDelete(record) {
+      if(record&&(record.taskStatus!=0&&record.taskStatus!=4)){
+        this.$message.warning('只有未审核、已取消的状态才能删除!')
+        return
+      }
+      if (this.isDel) return this.$message.error('只能删除未审核或已取消的盘点任务,请重新选择!')
+      const ids = record? record.id: this.selectedRowKeys
       const url = this.url.delete + ids
       getAction(url)
         .then((res) => {
           this.$message.success('删除成功')
-          this.getList()
+          this.loadData()
         })
         .catch((err) => {
           this.$message.error('删除失败')
         })
     },
     cancelTask() {
-      if (this.isStock) return this.$message.error('只能取消未开始或进行中的盘点任务,请重新选择!')
+      if (this.isStock) return this.$message.error('只能取消未审核或进行中的盘点任务,请重新选择!')
       const ids = this.selectedRowKeys
       const url = this.url.cancel + ids
       getAction(url)
         .then((res) => {
           this.$message.success('取消成功')
-          this.getList()
+          this.loadData()
         })
         .catch((err) => {
           this.$message.error('取消失败')
         })
     },
+    formateTaskStatus(type) {
+      const target = this.taskStatusList.find(item => item.value == type)
+      return target?target.label:''
+    },
   },
 }
 </script>

+ 0 - 99
jshERP-web/src/views/stock/components/FilterForm.vue

@@ -1,99 +0,0 @@
-<template>
-  <div class="table-page-search-wrapper">
-    <!-- 搜索区域 -->
-    <a-form layout="inline" :form="queryParam" ref="form" @keyup.enter.native="searchQuery">
-      <a-row :gutter="24">
-        <a-col :md="4" :sm="24">
-          <a-form-item label="盘点状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择盘点状态" showSearch :options="taskStatusList" v-model="queryParam.taskStatus">
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :md="5" :sm="24">
-          <a-form-item label="盘点单号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-input placeholder="请输入SKU、名称" v-model="queryParam.number"></a-input>
-          </a-form-item>
-        </a-col>
-        <a-col :md="5" :sm="24">
-          <a-form-item label="盘点仓库" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择盘点仓库" showSearch :options="deoptData" v-model="queryParam.depotId">
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :md="4" :sm="24">
-          <a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择创建人" showSearch :options="spinnerList" v-model="queryParam.createBy">
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <!-- <a-col :md="6" :sm="24">
-          <a-form-item label="商品类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-select placeholder="请选择商品类别" showSearch optionFilterProp="children" v-model="queryParam.organId">
-              <a-select-option v-for="(item, index) in statusList" :key="index" :value="item.id">
-                {{ item.supplier }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </a-col>
-        <a-col :md="6" :sm="24">
-          <a-form-item label="商品信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
-            <a-input placeholder="请输入商品信息" v-model="queryParam.number"></a-input>
-          </a-form-item>
-        </a-col> -->
-        <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="onSearch">查询</a-button>
-            <a-button style="margin-left: 8px" @click="onReset">重置</a-button>
-          </a-col>
-        </span>
-      </a-row>
-    </a-form>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    queryParam: {
-      type: Object,
-      default: () => {},
-    },
-    spinnerList: {
-      type: Array,
-      default: () => [],
-    },
-    deoptData: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  data() {
-    return {
-      labelCol: {
-        xs: { span: 24 },
-        sm: { span: 8 },
-      },
-      wrapperCol: {
-        xs: { span: 24 },
-        sm: { span: 16 },
-      },
-      taskStatusList: [
-        { value: 1, label: '未开始' },
-        { value: 2, label: '进行中' },
-        { value: 3, label: '已完成' },
-        { value: 4, label: '已取消' },
-      ],
-    }
-  },
-  methods: {
-    onSearch() {
-      this.$emit('search')
-    },
-    onReset() {
-      this.$emit('reset')
-    },
-  },
-}
-</script>
-
-<style></style>

+ 13 - 5
jshERP-web/src/views/stock/components/checkModal.vue

@@ -59,7 +59,13 @@
                   </a-form-item>
                 </a-col>
                 <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
-                  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否存在数量差异">
+                  <a-form-item :labelCol="{
+                    xs: { span: 24 },
+                    sm: { span: 11 },
+                }" :wrapperCol="{
+                    xs: { span: 24 },
+                    sm: { span: 13 },
+                  }" label="是否存在数量差异">
                     <a-select placeholder="请选择" v-model="queryParam.isDifference" :options="isDifferenceData"> </a-select>
                   </a-form-item>
                 </a-col>
@@ -99,7 +105,7 @@
         <a-button v-if="isShowBtn" @click="handleUpdate" type="primary">确定更新盘点数据</a-button>
       </template>
     </a-modal>
-    <a-modal @cancel="editVisible = false" @ok="onSubmitGoods" :visible="editVisible" title="编辑" width="50%">
+    <a-modal @cancel="closeFormModal" @ok="onSubmitGoods" :visible="editVisible" title="编辑" width="50%">
       <a-form-model :model="editForm" :rules="editFormRules" ref="editFormModel">
         <a-form-model-item label="盘点任务名称" :labelCol="{ span: 4 }" :wrapperCol="{ span: 14 }" prop="name">
           <a-input disabled v-model="editForm.name" placeholder="请输入"></a-input>
@@ -141,7 +147,6 @@
 
 <script>
 import {  queryMaterialCategoryTreeList } from '@/api/api'
-
 import editForm from './editForm.vue'
 import table from '../utils/table'
 import JSelectMaterialModal from '../../../components/jeecgbiz/modal/JSelectMaterialModal.vue'
@@ -207,7 +212,7 @@ export default {
       form: {},
       isShow: false,
       stockType: 'check',
-      queryParam: { categoryId: '', materialName: '', batchNumber: '', position: '', isDifference: null },
+      queryParam: { categoryId: undefined, materialName: '', batchNumber: '', position: '', isDifference: undefined },
       isDifferenceData: [
         {
           label: '全部',
@@ -274,11 +279,14 @@ export default {
     },
   },
   methods: {
+    closeFormModal(){
+      this.editVisible = false
+      this.$refs.editFormModel.resetFields()
+    },
     handleEdit(data) {
       console.log('handleEdit=====',data)
       this.editForm = { ...data,name:this.form.taskName }
       this.editVisible = true
-      this.handleChangeNewInventory(data.inventory)
     },
     onSubmitGoods() {
       this.$refs.editFormModel.validate((valid) => {

+ 8 - 4
jshERP-web/src/views/stock/components/editForm.vue

@@ -129,10 +129,14 @@ export default {
   data() {
     return {
       taskStatusList: [
-        { value: 1, label: '未开始' },
+        { value: 0, label: '未审核' },
+        { value: 1, label: '已审核' },
         { value: 2, label: '进行中' },
         { value: 3, label: '已完成' },
         { value: 4, label: '已取消' },
+        { value: 5, label: '已更新' },
+        { value: 8, label: '审核未通过' },
+        { value: 9, label: '审核中' },
       ],
       labelCol: {
         xs: { span: 24 },
@@ -164,10 +168,10 @@ export default {
           this.emitForm()
         }
         if (this.openType === 'add') {
-          this.model.taskStatus = 1
+          this.model.taskStatus = 0
 
           this.$nextTick(() => {
-            this.form.setFieldsValue({ taskStatus: 1 })
+            this.form.setFieldsValue({ taskStatus: 0 })
           })
         }
       },
@@ -177,7 +181,7 @@ export default {
   },
   computed: {
     isDisabled() {
-      return this.openType === 'detail' || this.model.taskStatus !== 1
+      return this.openType === 'detail' || this.model.taskStatus !== 0
     },
   },
   methods: {

+ 0 - 343
jshERP-web/src/views/stock/components/stockModal.vue

@@ -1,343 +0,0 @@
-<template>
-  <div ref="container">
-    <a-modal 
-      :title="title" 
-      width="100%" 
-      @cancel="handleCancel" 
-      :visible="stockVisible" 
-      :confirmLoading="confirmLoading"
-      :getContainer="() => $refs.container" 
-      :wrapClassName="wrapClassNameInfo()"
-      :mask="isDesktop()"
-      :maskClosable="false"
-      style="top: 0; height: 100%"
-    >
-      <a-spin :spinning="confirmLoading">
-        <edit-form
-          :spinnerList="spinnerList"
-          :depotList="deoptData"
-          :form="form"
-          :rules="rules"
-          :stockVisible="stockVisible"
-          ref="editForm"
-          :total="ipagination.total"
-          :openType="openType"
-          :stockType="stockType"
-          @changeForm="handleChangeForm"
-        ></edit-form>
-        <div>
-          <a-button v-if="form.taskType === 2&&openType!='detail'" style="margin-bottom: 6px" type="primary" @click="onChangeGoods"
-            >选择商品</a-button
-          >
-          <a-table
-            v-if="dataSource.length"
-            ref="table"
-            size="middle"
-            bordered
-            rowKey="id"
-            :scroll="{ x: 'max-content'}"
-            :columns="columns"
-            :dataSource="dataSource"
-            :loading="loading"
-            :pagination="ipagination"
-            @change="handleTableChange"
-          >
-            <span v-if="isShowBtn" slot="action" slot-scope="text, record">
-              <!-- <a-divider type="vertical" /> -->
-              <a-popconfirm @confirm="handleDelete(record)" title="确定删除吗?">
-                <a v-if="form.taskType!=1">删除</a>
-              </a-popconfirm>
-            </span>
-            <template slot="inventory" slot-scope="value, record">
-              {{ parseInt(value) }}
-            </template>
-            <!-- <template slot="customName" slot-scope="text, record">
-          {{ record.name }}
-          <a-tag v-if="record.enableSerialNumber == 1" color="orange">序</a-tag>
-          <a-tag v-if="record.enableBatchNumber == 1" color="orange">批</a-tag>
-        </template> -->
-          </a-table>
-        </div>
-      </a-spin>
-      <template slot="footer">
-        <a-button @click="handleCancel">取消</a-button>
-        <a-button v-if="isShowBtn" @click="handleOk" type="primary">确认发布盘点任务</a-button>
-      </template>
-    </a-modal>
-    <j-select-material-modal
-      @ok="getGoods"
-      @all="findAllSelect"
-      ref="selectModal"
-      :multi="true"
-      :isStock="true"
-    ></j-select-material-modal>
-  </div>
-</template>
-
-<script>
-import editForm from './editForm.vue'
-import table from '../utils/table'
-import JSelectMaterialModal from '../../../components/jeecgbiz/modal/JSelectMaterialModal.vue'
-import { getAction, postAction } from '@/api/manage'
-import { newTableMixin } from '@/mixins/newTableMixin'
-import { mixinDevice } from '@/utils/mixin'
-
-export default {
-  name: 'StockModal',
-  components: { editForm, JSelectMaterialModal },
-  mixins: [ newTableMixin, mixinDevice ],
-  props: {
-    rules: {
-      type: Object,
-      default: () => {
-        return {}
-      },
-    },
-
-    stockVisible: {
-      type: Boolean,
-      default: false,
-    },
-    title: {
-      type: String,
-      default: '新增',
-    },
-    spinnerList: {
-      type: Array,
-      default: () => [],
-    },
-    deoptData: {
-      type: Array,
-      default: () => [],
-    },
-    taskId: {
-      type: String,
-      default: '',
-    },
-    openType: {
-      type: String,
-      default: 'add',
-    },
-  },
-  data() {
-    return {
-      width: '1600px',
-      visible: false,
-      confirmLoading: false,
-      prefixNo: '',
-      loading: false,
-      dataSource: [],
-      columns: table.goodsColums,
-      url: {
-        add: '/stocktaking/add',
-        update: '/stocktaking/detailUpdate',
-      },
-      form: {},
-      isShow: false,
-      stockType: 'task',
-      batchNumberStr: ''
-    }
-  },
-  watch: {
-    stockVisible(val) {
-      if (val) {
-        if (this.taskId) {
-          this.$nextTick(() => {
-            this.getList(this.taskId)
-          })
-
-          return
-        }
-      } else {
-        this.dataSource = []
-        this.ipagination.current = 1
-        this.loading = false
-      }
-    },
-  },
-  computed: {
-    isShowBtn() {
-      if (this.openType === 'add') return true
-
-      if (this.openType === 'detail') return false
-      if (this.form.taskStatus !== 1) return false
-      return true
-    },
-  },
-  methods: {
-    handleCancel() {
-      this.$emit('update:stockVisible', false)
-    },
-    handleOk() {
-      this.$refs.editForm.form.validateFields((err, values) => {
-        if (!err) {
-          const params = { ...values }
-          if (params.taskType === 2) {
-            params.materialExtendIdList = this.dataSource.map((item) => item.batchNumber)
-          }
-          if(this.openType != 'add') {
-            params.id = this.taskId
-          }
-          const url = this.openType === 'add' ? this.url.add : this.url.update
-          postAction(url, params).then((res) => {
-            if (res.code === 200) {
-              this.$message.success('操作成功')
-              this.handleCancel()
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
-        }
-      })
-    },
-    onChangeGoods() {
-      if(!this.form.depotId){
-        this.$message.warning('请选择仓库!')
-        return
-      }
-      // this.$refs.selectModal.queryParam.depotId = this.form.depotId
-      this.$refs.selectModal.showModal()
-    },
-    getList(id) {
-      const url = '/stocktaking/detail/' + id
-      const url2 = `/stocktaking/detailByItemList?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`
-      const form = this.$refs['editForm'].form
-
-      getAction(url).then((res) => {
-        const {
-          depotId,
-          taskName,
-          taskStatus,
-          taskType,
-          createTime,
-          createByName,
-          materialCount,
-          positionRange,
-          creator,
-          id,
-          number
-        } = res.data
-        form.setFieldsValue({
-          depotId,
-          taskName,
-          taskStatus,
-          taskType,
-          createTime,
-          createByName,
-          materialCount,
-          positionRange,
-          creator,
-          id,
-          number
-        })
-
-        postAction(url2, { taskStocktakingId: id }).then((res) => {
-          this.dataSource = res.data
-          this.ipagination.total = this.dataSource.length
-          const materialExtendIdList = this.dataSource.map((item) => item.batchNumber)
-
-          form.setFieldsValue({
-            materialExtendIdList,
-          })
-          this.getForm(form.getFieldsValue())
-          console.log('this.dataSource',this.dataSource)
-          console.log('this.columns',this.columns)
-        })
-      })
-    },
-    getGoods(rows, ids) {
-      const str = ids
-        .split(',')
-        .filter((item) => item)
-        .join(',')
-      if(!this.form.depotId){
-        this.$message.warning('请选择仓库!')
-        return
-      }
-      getAction('/materialBatch/findBatchNumbersByBarCode',{
-        barCodes: str,
-        depotId:this.form.depotId
-      }).then((res) => {
-        const batchStr = res.data.split(',')
-        .filter((item) => item)
-        .join(',')
-        this.batchNumberStr = batchStr
-        this.getBatchData()
-      })
-    },
-    findAllSelect() {
-      if(!this.form.depotId){
-        this.$message.warning('请选择仓库!')
-        return
-      }
-      getAction('/materialBatch/findBatchNumbersByBarCode',{
-        depotId:this.form.depotId
-      }).then((res) => {
-        this.$refs.selectModal.close()
-        const batchStr = res.data.split(',')
-        .filter((item) => item)
-        .join(',')
-        this.batchNumberStr = batchStr
-        this.getBatchData()
-      })
-    },
-    getBatchData() {
-      const params = {
-        batchNumber: this.batchNumberStr,
-        // organId: '',
-        // mpList: '',
-        // prefixNo: '',
-      }
-      getAction(`/material/getMaterialByBatchNumber?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`, params).then((res) => {
-        this.dataSource = res.data.rows
-        if(this.dataSource.length===0){
-          this.$message.warning('暂无数据!')
-        }
-        this.ipagination.total = Number(res.data.total)
-        this.dataSource = this.dataSource.reduce((acc, cur) => {
-          const hasDuplicate = acc.some((item) => item.batchNumber === cur.batchNumber)
-          if (!hasDuplicate) {
-            acc.push(cur)
-          }
-          return acc
-        }, [])
-      })
-    },
-    getForm(val) {
-      this.form = val
-      this.$refs['editForm'].model = val
-    },
-    //删除
-    handleDelete(record) {
-      this.dataSource = this.dataSource.filter((item) => item.batchNumber !== record.batchNumber)
-      this.ipagination.total -=1
-    },
-
-    handleChangeForm(val) {
-      this.dataSource = []
-      this.ipagination.current = 1
-      this.ipagination.total = 0
-      this.getForm(val)
-      if (val.taskType === 1) {
-        this.findAllSelect()
-      }
-    },
-
-    handleDrag() {},
-    // ipagination() {},
-
-    handleTableChange(pagination) {
-      if (pagination && pagination.current) {
-        this.ipagination = pagination
-      }
-      if(this.openType=='add'){
-        this.getBatchData()
-      }else{
-        this.getList(this.taskId)
-      }
-    },
-  },
-}
-</script>
-
-<style></style>

+ 525 - 0
jshERP-web/src/views/stock/modules/InventoryCheckModal.vue

@@ -0,0 +1,525 @@
+<template>
+  <j-modal
+    :title="title"
+    width="100%"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    :keyboard="false"
+    :forceRender="true"
+    v-bind:prefixNo="prefixNo"
+    fullscreen
+    switchFullscreen
+    @cancel="handleCancel"
+    :id="prefixNo"
+    style="top: 20px; height: 95%"
+  >
+    <template slot="footer" v-if="!approvalId">
+      <a-button @click="handleCancel">取消</a-button>
+      <a-button v-if="isShowBtn" @click="submit(9)" :loading="confirmLoading">保存并申请审核</a-button>
+      <a-button v-if="isShowBtn" @click="submit(0)" :loading="confirmLoading" type="primary">保存</a-button>
+    </template>
+    <template slot="footer" v-else>
+      <a-button v-if="!approvalIsReadonly" :loading="confirmLoading" @click="submitApproval(2)">审核不通过</a-button>
+      <a-button type="primary" v-if="!approvalIsReadonly" :loading="confirmLoading" @click="submitApproval(1)">审核通过</a-button>
+      <a-button key="back" v-if="approvalIsReadonly" @click="handleCancel">取消</a-button>
+    </template>
+    <a-spin :spinning="confirmLoading">
+      <a-form-model :model="model" ref="form" :rules="rules" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <a-row class="form-row" :gutter="24" type="flex">
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="盘点单号" prop="number">
+              <a-input disabled placeholder="自动生成" v-model="model.number" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="盘点类型" prop="taskType">
+              <a-select
+                placeholder="请选择"
+                @change="handleChangeForm"
+                v-model="model.taskType"
+                :options="taskTypeList"
+                :disabled="isDisabled"
+              >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item prop="taskName" label="盘点任务名称">
+              <a-input placeholder="请输入" :disabled="isDisabled" v-model="model.taskName" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item prop="depotId" label="盘点仓库">
+              <a-select
+                placeholder="请选择"
+                :options="deoptData"
+                v-model="model.depotId"
+                :disabled="isDisabled"
+                @change="handleChangeForm"
+              >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="盘点负责人" prop="creator">
+              <a-select placeholder="请选择" v-model="model.creator" :options="spinnerList" :disabled="isDisabled">
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="创建人" prop="createByName">
+              <a-input placeholder="自动生成" v-model="model.createByName" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="创建时间" prop="createTime">
+              <a-input placeholder="自动生成" v-model="model.createTime" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="盘点库位范围" prop="positionRange">
+              <a-input placeholder="自动生成" v-model="model.positionRange" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="商品数量" prop="materialCount">
+              <a-input disabled placeholder="自动生成" v-model="model.materialCount" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xl="6" :lg="8" :md="12" :sm="24" >
+            <a-form-model-item label="盘点状态" prop="taskStatus">
+              <a-select placeholder="自动生成" v-model="model.taskStatus" :options="taskStatusList" disabled>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+      <div>
+        <a-button v-if="model.taskType === 2&&action!='detail'" style="margin-bottom: 6px" type="primary" @click="onChangeGoods"
+          >选择商品</a-button
+        >
+        <a-table
+          v-if="dataSource.length"
+          ref="table"
+          size="middle"
+          bordered
+          rowKey="id"
+          :scroll="{ x: 'max-content'}"
+          :columns="columns"
+          :dataSource="dataSource"
+          :loading="loading"
+          :pagination="ipagination"
+          @change="handleTableChange"
+        >
+          <span v-if="isShowBtn" slot="action" slot-scope="text, record">
+            <a-popconfirm @confirm="handleDelete(record)" title="确定删除吗?">
+              <a v-if="model.taskType!=1">删除</a>
+            </a-popconfirm>
+          </span>
+        </a-table>
+      </div>
+      <!-- 审批历史 -->
+    <section v-if="approvalId">
+      <h4 class="block-title">审批历史</h4>
+      <a-table 
+        size="middle"
+        bordered
+        rowKey="id"
+        :pagination="false"
+        :loading="approval.loading"
+        :columns="approval.columns"
+        :rowClassName="rowClassName"
+        :dataSource="approval.dataSource"
+        :scroll="{ x: '100%' }"
+      ></a-table>
+      <a-textarea :rows="1" placeholder="审核备注" v-model="auditComment" v-if="!approvalIsReadonly" style="margin-top: 8px" />
+    </section>
+  </a-spin>
+  <j-select-material-modal
+    @ok="getGoods"
+    @all="findAllSelect"
+    ref="selectModal"
+    :multi="true"
+    :isStock="true"
+  ></j-select-material-modal> 
+  </j-modal>
+</template>
+
+<script>
+import JSelectMaterialModal from '@/components/jeecgbiz/modal/JSelectMaterialModal.vue'
+import { getAction, postAction } from '@/api/manage'
+import { mapGetters } from 'vuex'
+
+export default {
+  name: 'InventoryCheckModal',
+  components: { JSelectMaterialModal },
+  data() {
+    return {
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 9 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 15 },
+      },
+      visible: false,
+      spinnerList: [],
+      deoptData: [],
+      taskTypeList: [
+        { value: 1, label: '全盘' },
+        { value: 2, label: '抽盘' },
+      ],
+      taskStatusList: [
+        { value: 0, label: '未审核' },
+        { value: 1, label: '已审核' },
+        { value: 2, label: '进行中' },
+        { value: 3, label: '已完成' },
+        { value: 4, label: '已取消' },
+        { value: 5, label: '已更新' },
+        { value: 8, label: '审核未通过' },
+        { value: 9, label: '审核中' },
+      ],
+      confirmLoading: false,
+      prefixNo: 'PDRW',
+      loading: false,
+      dataSource: [],
+      columns: [
+        {
+          title: '操作',
+          dataIndex: 'action',
+          align: 'center',
+          width: 90,
+          scopedSlots: { customRender: 'action' },
+        },
+        { dataIndex: 'batchNumber', title: '批次号' },
+        { dataIndex: 'materialName', title: '商品名称', scopedSlots: { customRender: 'customName' } },
+        { dataIndex: 'categoryName', title: '类别' },
+        { dataIndex: 'standard', title: '规格' },
+        { dataIndex: 'model', title: '型号' },
+        { dataIndex: 'color', title: '颜色' },
+        { dataIndex: 'brand', title: '品牌' },
+        { dataIndex: 'supplierName', title: '供应商' },
+        { dataIndex: 'commodityUnit', title: '单位' },
+        { dataIndex: 'inventory', title: '库存' },
+        { dataIndex: 'productionDate', title: '生产日期' },
+        { dataIndex: 'expiryNum', title: '保质期' },
+        { dataIndex: 'sku', title: 'SKU' },
+        { dataIndex: 'depotName', title: '仓库名称' },
+        { dataIndex: 'position', title: '仓库货架' },
+      ],
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30', '50', '100'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      url: {
+        add: '/stocktaking/add',
+        update: '/stocktaking/detailUpdate',
+        spinnerList: '/stocktaking/creatorSpinnerList',
+        depotList: '/depot/findDepotByCurrentUser',
+      },
+      batchNumberStr: '',
+      action: '',
+      title: '',
+      rules: {
+        taskType: [{ required: true, message: '请选择盘点类型', trigger: 'change' }],
+        depotId: [{ required: true, message: '请选择盘点仓库',trigger: 'change' }],
+        taskName: [{ required: true, message: '请输入盘点任务名称', trigger: 'change' }],
+      },
+      model: {},
+
+      // 审批历史
+      approvalId: null, //审批id
+      approvalIsReadonly: false,
+      approval:{
+        loading:false,
+        columns:[
+          { title: '审核时间', dataIndex: 'auditTime' },
+          { title: '审核环节', dataIndex: 'nodeOrder',customRender(text,record,index){
+            if(index===0){
+              return text
+            }
+            return `审批节点${text}`
+          } },
+          { title: '审批人', dataIndex: 'auditorName' },
+          { title: '审核动作', dataIndex: 'auditResult',customRender(text,record,index){
+            if(index===0){
+              return text
+            }
+            if(text==1){
+              return '审批通过'
+            }else if(text==2){
+              return '审批不通过'
+            }
+            return ''
+          } },
+          { title: '备注', dataIndex: 'auditComment' },
+        ],
+        dataSource:[]
+      },
+      auditComment: ''
+    }
+  },
+  computed: {
+    isDisabled() {
+      switch (this.action) {
+        case 'detail':
+          return true
+        case 'add':
+          return false
+        case 'edit':
+          return this.model.taskStatus != 0&&this.model.taskStatus != 8
+        default:
+          return true
+      }
+    },
+    isShowBtn() {
+      switch (this.action) {
+        case 'detail':
+          return false
+        case 'add':
+          return true
+        case 'edit':
+          return this.model.taskStatus == 0 || this.model.taskStatus == 8
+        default:
+          return false
+      }
+    },
+    ...mapGetters(['username'])
+  },
+  methods: {
+    getSpinnerList() {
+      getAction(this.url.spinnerList).then((res) => {
+        this.spinnerList = res.data || []
+      })
+    },
+    getDepotList() {
+      getAction(this.url.depotList).then((res) => {
+        this.deoptData = res.data.map((item) => {
+          return {
+            label: item.depotName,
+            value: item.id,
+          }
+        })
+      })
+    },
+    handleOpen(number){
+      this.visible = true
+      if(number){
+        this.getDetail(number)
+      }
+      this.getSpinnerList()
+      this.getDepotList()
+    },
+    edit(number) {
+      this.action = 'edit'
+      this.handleOpen(number)
+    },
+    add(){
+      this.action = 'add'
+      this.$set(this.model,'taskStatus',0)
+      this.handleOpen()
+    },
+    lookDetail(number,approvalRow=null){
+      this.action = 'detail'
+      this.handleOpen(number)
+      //审批历史
+      if(approvalRow&&approvalRow.id){
+        this.approvalId = approvalRow.id
+        getAction('/audit/auditHistory',{id:approvalRow.id}).then(res => {
+          const list = res.data
+          list.unshift({
+            auditTime: approvalRow.submitTime,
+            nodeOrder: '开始',
+            auditorName: approvalRow.initiatorName,
+            auditResult: '提交审批',
+            auditComment: '',
+          })
+          this.approval.dataSource = list
+          console.log('approvalRow=====',approvalRow)
+        })
+      }
+    },
+    getDetail(number){
+      const url = '/stocktaking/detail/number/' + number
+      getAction(url).then((res) => {
+        this.model = res.data
+        this.getTableData(res.data.id)
+      })
+    },
+    getTableData(id){
+      const url2 = `/stocktaking/detailByItemList?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`
+      postAction(url2, { taskStocktakingId: id }).then((res) => {
+        this.dataSource = res.data
+        this.ipagination.total = this.dataSource.length
+      })
+    },
+    close(){
+      this.visible = false
+      this.$refs.form.resetFields()
+      this.dataSource = []
+      this.action = ''
+      this.model = {}
+      this.ipagination.current = 1
+      this.$emit('close')
+      // 审批
+      this.approvalId = null
+      this.auditComment = ''
+      this.approval.dataSource = []
+      this.approvalIsReadonly = false
+    },
+    handleCancel() {
+      this.close()
+    },
+    // 提交盘点任务
+    submit(taskStatus) {
+      this.$refs.form.validate((flag, values) => {
+        console.log('flag===',flag)
+        if (flag) {
+          this.confirmLoading = true
+          const params = { ...this.model }
+          if (params.taskType === 2) {
+            params.materialExtendIdList = this.dataSource.map((item) => item.batchNumber)
+          }
+          params.taskStatus = taskStatus
+          const url = params.id ? this.url.update : this.url.add
+          postAction(url, params).then((res) => {
+            if (res.code === 200) {
+              this.$message.success('操作成功')
+              this.handleCancel()
+              this.$emit('ok')
+            } else {
+              this.$message.error(res.msg)
+            }
+          }).finally(() => {
+            this.confirmLoading = false
+          })
+        }
+      })
+    },
+    onChangeGoods() {
+      if(!this.model.depotId){
+        this.$message.warning('请选择仓库!')
+        return
+      }
+      this.$refs.selectModal.showModal()
+    },
+    getGoods(rows, ids) {
+      const str = ids
+        .split(',')
+        .filter((item) => item)
+        .join(',')
+      if(!this.model.depotId){
+        this.$message.warning('请选择仓库!')
+        return
+      }
+      getAction('/materialBatch/findBatchNumbersByBarCode',{
+        barCodes: str,
+        depotId:this.model.depotId
+      }).then((res) => {
+        const batchStr = res.data.split(',')
+        .filter((item) => item)
+        .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
+      })
+    },
+    findAllSelect() {
+      if(!this.model.depotId){
+        this.$message.warning('请选择仓库!')
+        return
+      }
+      getAction('/materialBatch/findBatchNumbersByBarCode',{
+        depotId:this.model.depotId
+      }).then((res) => {
+        this.$refs.selectModal.close()
+        const batchStr = res.data.split(',')
+        .filter((item) => item)
+        .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
+      })
+    },
+    getBatchData() {
+      const params = {
+        batchNumber: this.batchNumberStr,
+      }
+      getAction(`/material/getMaterialByBatchNumber?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`, params).then((res) => {
+        this.dataSource = res.data.rows
+        if(this.dataSource.length===0){
+          this.$message.warning('暂无数据!')
+        }
+        this.ipagination.total = Number(res.data.total)
+        this.$set(this.model,'materialCount',Number(res.data.total))
+      })
+    },
+    //删除
+    handleDelete(record) {
+      this.dataSource = this.dataSource.filter((item) => item.batchNumber !== record.batchNumber)
+      this.ipagination.total -=1
+      this.$set(this.model,'materialCount',this.ipagination.total)
+    },
+
+    handleChangeForm(val) {
+      this.dataSource = []
+      this.ipagination.current = 1
+      this.ipagination.total = 0
+      this.$set(this.model,'materialCount',0)
+      console.log('this.model=====',this.model)
+      if (this.model.taskType === 1) {
+        this.findAllSelect()
+      }
+    },
+    handleTableChange(pagination) {
+      if (pagination && pagination.current) {
+        this.ipagination = pagination
+      }
+      if(this.action=='add'){
+        this.getBatchData()
+      }else{
+        this.getTableData(this.model.id)
+      }
+    },
+    rowClassName(record,index){
+      if(this.username===record.auditorName){
+        return 'red-row'
+      }
+      return ''
+    },
+    // 提交审核
+    submitApproval(status){
+      const params = {
+        id: this.approvalId,
+        status,
+        auditComment: this.auditComment
+      }
+      this.confirmLoading = true
+      postAction('/audit/setStatus',params).then(res => {
+        console.log(res)
+        if(res.code===200){
+          this.$message.success(res.msg)
+          this.handleCancel()
+          this.$emit('ok')
+        }else{
+          this.$message.error(res.data.message)
+        }
+      }).finally(() => {
+       this.confirmLoading = false
+      })
+    }
+  },
+}
+</script>
+
+<style scoped>
+::v-deep .red-row{
+  color: #f5222d;
+}
+</style>

+ 13 - 3
jshERP-web/src/views/stock/utils/table.js

@@ -3,54 +3,66 @@ const table = {
     {
       title: '操作',
       dataIndex: 'action',
+      align: 'center',
+      width: 100,
       scopedSlots: { customRender: 'action' },
     },
     {
       title: '盘点任务编号',
       dataIndex: 'number',
+      align: 'left',
     },
-
     {
       title: '盘点任务名称',
       dataIndex: 'taskName',
+      align: 'left',
     },
     {
       title: '盘点类型',
       dataIndex: 'taskType',
+      align: 'left',
       scopedSlots: { customRender: 'taskType' },
     },
     {
       title: '盘点仓库',
       dataIndex: 'depotName',
+      align: 'left',
     },
     {
       title: '商品数量',
       dataIndex: 'materialCount',
+      align: 'left',
     },
     {
       title: '盘点库位范围',
       dataIndex: 'positionRange',
+      align: 'left',
     },
     {
       title: '创建人',
       dataIndex: 'createByName',
+      align: 'left',
     },
     {
       title: '创建时间',
       dataIndex: 'createTime',
+      align: 'left',
     },
     {
       title: '盘点负责人',
       dataIndex: 'creatorName',
+      align: 'left',
     },
     {
       title: '盘点状态',
       dataIndex: 'taskStatus',
+      align: 'left',
       scopedSlots: { customRender: 'taskStatus' },
     },
     {
       title: '完成时间',
       dataIndex: 'operTime',
+      align: 'left',
     },
   ],
   goodsColums: [
@@ -61,8 +73,6 @@ const table = {
       width: 90,
       scopedSlots: { customRender: 'action' },
     },
-    // { dataIndex: 'id', title: 'id' },
-
     { dataIndex: 'batchNumber', title: '批次号' },
     { dataIndex: 'materialName', title: '商品名称', scopedSlots: { customRender: 'customName' } },
     { dataIndex: 'categoryName', title: '类别' },

+ 21 - 4
jshERP-web/src/views/task/ApprovalList.vue

@@ -48,7 +48,8 @@
           >
             <span slot="action" slot-scope="text, record">
               <a @click="goApproval(record,true)">详情</a>
-              <a @click="goApproval(record,false)" style="margin-left: 8px;">审批</a>
+              <a-divider v-if="btnEnableList.indexOf(2) > -1" type="vertical" />
+              <a @click="goApproval(record,false)" v-if="btnEnableList.indexOf(2) > -1" style="margin-left: 8px;">审批</a>
             </span>
             <template slot="auditStatus" slot-scope="status">
               <a-tag v-if="status == 0" color="blue">待审批</a-tag>
@@ -60,7 +61,9 @@
         <!-- table区域-end -->
       </a-card>
     </a-col>
-    <bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
+    <bill-detail ref="modalDetail" @ok="handleOk"></bill-detail>
+    <!-- 盘点任务审批 -->
+    <InventoryCheckModal ref="InventoryCheckModal" @ok="handleOk" />
   </a-row>
 </template>
 <script>
@@ -69,12 +72,14 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { approvalMixin } from './mixin/approvalMixin'
 import { flowTypes } from './utils/flow'
 import BillDetail from '@/views/bill/dialog/BillDetail.vue'
+import InventoryCheckModal from '@/views/stock/modules/InventoryCheckModal'
 
 export default {
   name: 'ApprovalList',
   mixins: [JeecgListMixin,approvalMixin],
   components: {
-    BillDetail
+    BillDetail,
+    InventoryCheckModal
   },
   data() {
     return {
@@ -107,9 +112,17 @@ export default {
       url: {
         list: '/audit/pendingApprovalList',
       },
+      disableMixinCreated: true
     }
   },
-  created() {
+  beforeRouteEnter(to, from, next){
+    next(vm => {
+      vm.loadData()
+      //初始化按钮权限
+      vm.initActiveBtnStr()
+      // 更新数据
+      vm.$store.dispatch('updateApprovalStat')
+    })
   },
   methods: {
     loadData(arg) {
@@ -136,6 +149,10 @@ export default {
         this.onClearSelected()
       })
     },
+    handleOk(){
+      this.$store.dispatch('updateApprovalStat')
+      this.loadData()
+    }
   },
 }
 </script>

+ 6 - 4
jshERP-web/src/views/task/FlowList.vue

@@ -24,8 +24,8 @@
         </div>
         <!-- 操作按钮区域 -->
         <div class="table-operator" style="margin-top: 5px">
-          <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-          <a-button icon="delete" @click="batchDel">删除</a-button>
+          <a-button @click="handleAdd" type="primary" icon="plus" v-if="btnEnableList.indexOf(1) > -1">新增</a-button>
+          <a-button icon="delete" @click="batchDel" v-if="btnEnableList.indexOf(1) > -1">删除</a-button>
         </div>
         <!-- table区域-begin -->
         <div>
@@ -48,12 +48,14 @@
             <span slot="auditNode4" slot-scope="text, record"> {{ getAuditNodeText(record,4) }} </span>
             <span slot="action" slot-scope="text, record">
               <a @click="showDetail(record)">详情</a>
-              <a @click="handleEdit(record)" style="margin-left: 8px;">编辑</a>
+              <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
+              <a @click="handleEdit(record)" style="margin-left: 8px;" v-if="btnEnableList.indexOf(1) > -1">编辑</a>
+              <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
               <a-popconfirm
                 title="确定删除吗?"
                 @confirm="() => handleDelete(record.id)"
               >
-                <a style="margin-left: 8px;">删除</a>
+                <a style="margin-left: 8px;" v-if="btnEnableList.indexOf(1) > -1">删除</a>
               </a-popconfirm>
             </span>
           </a-table>

+ 13 - 4
jshERP-web/src/views/task/HandledList.vue

@@ -74,7 +74,7 @@
               <a @click="goApproval(record,true)">详情</a>
             </span>
             <template slot="auditStatus" slot-scope="status">
-              <a-tag v-if="status == 0" color="blue">审批</a-tag>
+              <a-tag v-if="status == 0" color="blue">审批</a-tag>
               <a-tag v-if="status == 1" color="green">审批完成</a-tag>
               <a-tag v-if="status == 2" color="red">审批未通过</a-tag>
             </template>
@@ -84,6 +84,8 @@
       </a-card>
     </a-col>
     <bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
+    <!-- 盘点任务审批 -->
+    <InventoryCheckModal ref="InventoryCheckModal" @ok="modalFormOk" />
   </a-row>
 </template>
 <script>
@@ -92,6 +94,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { approvalMixin } from './mixin/approvalMixin'
 import { flowTypes } from './utils/flow'
 import BillDetail from '@/views/bill/dialog/BillDetail.vue'
+import InventoryCheckModal from '@/views/stock/modules/InventoryCheckModal'
 import { cloneDeep } from 'lodash'
 import moment from 'moment'
 
@@ -99,7 +102,8 @@ export default {
   name: 'HandledList',
   mixins: [JeecgListMixin,approvalMixin],
   components: {
-    BillDetail
+    BillDetail,
+    InventoryCheckModal
   },
   data() {
     return {
@@ -131,11 +135,16 @@ export default {
       ],
       url: {
         list: '/audit/processedApprovalList',
-        delete: '',
       },
+      disableMixinCreated: true
     }
   },
-  created() {
+  beforeRouteEnter(to, from, next){
+    next(vm => {
+      vm.loadData()
+      //初始化按钮权限
+      vm.initActiveBtnStr()
+    })
   },
   methods: {
     loadData(arg) {

+ 32 - 17
jshERP-web/src/views/task/InitiateList.vue

@@ -68,7 +68,8 @@
           >
             <span slot="action" slot-scope="text, record">
               <a @click="goApproval(record,true)">详情</a>
-              <a @click="myHandleEdit(record)" v-if="record.auditStatus==2" style="margin-left: 8px;">编辑</a>
+              <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
+              <a @click="myHandleEdit(record)" v-if="btnEnableList.indexOf(1) > -1" style="margin-left: 8px;">编辑</a>
             </span>
             <template slot="auditStatus" slot-scope="status">
               <a-tag v-if="status == 0" color="blue">审批中</a-tag>
@@ -80,13 +81,17 @@
         <!-- table区域-end -->
       </a-card>
     </a-col>
-    <bill-detail ref="modalDetail" @ok="modalFormOk" @close="modalFormClose"></bill-detail>
-    <OtherInModal ref="OtherInModal" @ok="modalFormOk" @close="modalFormClose" />
-    <OtherOutModal ref="OtherOutModal" @ok="modalFormOk" @close="modalFormClose" />
-    <PurchaseInModal ref="PurchaseInModal" @ok="modalFormOk" @close="modalFormClose" />
-    <PurchaseOrderModal ref="PurchaseOrderModal" @ok="modalFormOk" @close="modalFormClose" />
-    <SaleOrderModal ref="SaleOrderModal" @ok="modalFormOk" @close="modalFormClose" />
-    <SaleOutModal ref="SaleOutModal" @ok="modalFormOk" @close="modalFormClose" />
+    <!-- 审核详情 -->
+    <bill-detail ref="modalDetail" @ok="modalFormOk" ></bill-detail>
+    <!-- 订单未通过审核重新编辑 -->
+    <OtherInModal ref="OtherInModal" @ok="modalFormOk" />
+    <OtherOutModal ref="OtherOutModal" @ok="modalFormOk" />
+    <PurchaseInModal ref="PurchaseInModal" @ok="modalFormOk" />
+    <PurchaseOrderModal ref="PurchaseOrderModal" @ok="modalFormOk" />
+    <SaleOrderModal ref="SaleOrderModal" @ok="modalFormOk" />
+    <SaleOutModal ref="SaleOutModal" @ok="modalFormOk" />
+    <!-- 盘点未通过重新编辑 -->
+    <InventoryCheckModal ref="InventoryCheckModal" @ok="modalFormOk" />
   </a-row>
 </template>
 <script>
@@ -103,6 +108,7 @@ import PurchaseInModal from '@/views/bill/modules/PurchaseInModal'
 import PurchaseOrderModal from '@/views/bill/modules/PurchaseOrderModal'
 import SaleOrderModal from '@/views/bill/modules/SaleOrderModal'
 import SaleOutModal from '@/views/bill/modules/SaleOutModal'
+import InventoryCheckModal from '@/views/stock/modules/InventoryCheckModal'
 import {
   findBillDetailByNumber,
 } from '@/api/api'
@@ -117,6 +123,7 @@ export default {
     PurchaseOrderModal,
     SaleOrderModal,
     SaleOutModal,
+    InventoryCheckModal
   },
   data() {
     return {
@@ -147,11 +154,16 @@ export default {
       ],
       url: {
         list: '/audit/myApprovalList',
-        delete: '',
       },
+      disableMixinCreated: true
     }
   },
-  created() {
+  beforeRouteEnter(to, from, next){
+    next(vm => {
+      vm.loadData()
+      //初始化按钮权限
+      vm.initActiveBtnStr()
+    })
   },
   methods: {
     loadData(arg) {
@@ -182,6 +194,10 @@ export default {
       })
     },
     myHandleEdit(record) {
+      if(record.auditStatus!=2){
+        this.$message.warning('抱歉,只有审批未通过的单据才能编辑!')
+        return
+      }
       let modalRefName = ''
       switch (record.type) {
         case '销售订单':
@@ -190,10 +206,10 @@ export default {
         case '销售出库':
           modalRefName = 'SaleOutModal'
           break;
-        case '其入库':
+        case '其入库':
           modalRefName = 'OtherInModal'
           break;
-        case '其出库':
+        case '其出库':
           modalRefName = 'OtherOutModal'
           break;
         case '采购订单':
@@ -203,10 +219,11 @@ export default {
           modalRefName = 'PurchaseInModal'
           break;
         case '盘点任务':
-          
+          this.$refs.InventoryCheckModal.edit(record.number)
+          this.$refs.InventoryCheckModal.title = '编辑盘点任务'
           break;
         case 'pda维护商品':
-          
+          this.$message.warning('待开发中...')
           break;
       
         default:
@@ -216,9 +233,6 @@ export default {
         return
       }
       this.$refs[modalRefName].action = 'edit'
-      if (this.btnEnableList.indexOf(2) === -1) {
-        this.$refs[modalRefName].isCanCheck = false
-      }
       //查询单条单据信息
       findBillDetailByNumber({ number: record.number }).then((res) => {
         if (res && res.code === 200) {
@@ -227,6 +241,7 @@ export default {
         }
       })
     },
+    // 订单弹框编辑
     handleEdit(record,modalRefName) {
       this.$refs[modalRefName].edit(record)
       this.$refs[modalRefName].title = '编辑'

+ 10 - 2
jshERP-web/src/views/task/mixin/approvalMixin.js

@@ -7,8 +7,8 @@ export const approvalMixin = {
       switch (record.type) {
         case '销售订单':
         case '销售出库':
-        case '其入库':
-        case '其出库':
+        case '其入库':
+        case '其出库':
         case '采购订单':
         case '采购入库':
           this.$refs.modalDetail.show({number: record.number}, record.type, target.prefixNo, record)
@@ -20,8 +20,16 @@ export const approvalMixin = {
           }
           break;
         case '盘点任务':
+          this.$refs.InventoryCheckModal.lookDetail(record.number,record)
+          this.$refs.InventoryCheckModal.approvalIsReadonly = approvalIsReadonly
+          if(approvalIsReadonly){
+            this.$refs.InventoryCheckModal.title = record.type + '-审核详情'
+          }else{
+            this.$refs.InventoryCheckModal.title = record.type + '-去审核'
+          }
           break
         case 'pda维护商品':
+          this.$message.warning('待开发中...')
           break
         default:
           break;

+ 4 - 4
jshERP-web/src/views/task/utils/flow.js

@@ -15,13 +15,13 @@ export const flowTypes = [
   //   prefixNo: 'XSTH'
   // },
   {
-    label: '其入库',
-    value: '其入库',
+    label: '其入库',
+    value: '其入库',
     prefixNo: 'QTRK'
   },
   {
-    label: '其出库',
-    value: '其出库',
+    label: '其出库',
+    value: '其出库',
     prefixNo: 'QTCK'
 
   },