From e4e75a7312f5195144b105d59ac90f26e174d4ba Mon Sep 17 00:00:00 2001
From: lixiangyu <lixiangyu@xalxzn.com>
Date: 星期五, 05 九月 2025 18:02:54 +0800
Subject: [PATCH] feat(cms): 优化刀具入库和库存列表功能

---
 src/views/cms/modules/CuttingInboundModal.vue |  106 +++++++++++++++++++++++++++--------------------------
 1 files changed, 54 insertions(+), 52 deletions(-)

diff --git a/src/views/cms/modules/CuttingInboundModal.vue b/src/views/cms/modules/CuttingInboundModal.vue
index 5d11427..e9385b4 100644
--- a/src/views/cms/modules/CuttingInboundModal.vue
+++ b/src/views/cms/modules/CuttingInboundModal.vue
@@ -3,7 +3,7 @@
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
         <a-row style="width: 100%">
-           <a-col :span="24 / 2">
+          <a-col :span="24 / 2">
             <a-form-item label="鍏ュ簱浜�" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <j-search-select-tag
                 :disabled="disableSubmit"
@@ -26,12 +26,13 @@
         <a-row style="width: 100%">
           <a-col :span="24">
             <a-form-item label="鍏ュ簱璇存槑" :labelCol="{span:3}" :wrapperCol="{span:21}">
-              <a-textarea :disabled="disableSubmit" placeholder="璇疯緭鍏ュ叆搴撹鏄�" v-decorator="['receiveComment', validatorRules.receiveComment]" />
+              <a-textarea :disabled="disableSubmit" placeholder="璇疯緭鍏ュ叆搴撹鏄�"
+                          v-decorator="['receiveComment', validatorRules.receiveComment]" />
             </a-form-item>
           </a-col>
         </a-row>
         <a-row style="width: 100%">
-           <a-col :span="24 / 2">
+          <a-col :span="24 / 2">
             <a-form-item label="纭浜�" :labelCol="labelCol" :wrapperCol="wrapperCol">
               <j-search-select-tag
                 :disabled="disableSubmit"
@@ -54,7 +55,8 @@
         <a-row style="width: 100%">
           <a-col :span="24">
             <a-form-item label="纭鎰忚" :labelCol="{span:3}" :wrapperCol="{span:21}">
-              <a-textarea :disabled="disableSubmit" placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" v-decorator="['confirmComment', validatorRules.confirmComment]" />
+              <a-textarea :disabled="disableSubmit" placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�"
+                          v-decorator="['confirmComment', validatorRules.confirmComment]" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -103,27 +105,28 @@
 
 <script>
 
-  import pick from 'lodash.pick'
-  import JSelectToolingModal from './JSelectToolingModal'
-  import moment from 'moment'
-  import { getAction, postAction, requestPut } from '@/api/manage'
-  import JDictSelectTag from '@/components/dict/JDictSelectTag'
-  import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
-  import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
-  import { filterObj } from '@/utils/util'
-  import store from '@/store/'
-  export default {
-    name: 'CuttingInboundModal',
-    components: {
+import pick from 'lodash.pick'
+import JSelectToolingModal from './JSelectToolingModal'
+import moment from 'moment'
+import { getAction, postAction, requestPut } from '@/api/manage'
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
+import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
+import { filterObj } from '@/utils/util'
+import store from '@/store/'
+
+export default {
+  name: 'CuttingInboundModal',
+  components: {
     JSelectToolingModal,
     JMultiSelectTag,
     JDictSelectTag,
     store,
-    moment,
+    moment
   },
-    data () {
-      return {
-         /* 鍒嗛〉鍙傛暟 */
+  data() {
+    return {
+      /* 鍒嗛〉鍙傛暟 */
       ipagination: {
         current: 1,
         pageSize: 10,
@@ -133,27 +136,26 @@
         },
         showQuickJumper: true,
         showSizeChanger: true,
-        total: 0,
+        total: 0
       },
-      title:'鏂板',
-         visible: false,
-         selectedRowKeys: {},
+      title: '鏂板',
+      visible: false,
+      selectedRowKeys: {},
       model: {},
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 6 },
+        sm: { span: 6 }
       },
       wrapperCol: {
         xs: { span: 24 },
-        sm: { span: 18 },
+        sm: { span: 18 }
       },
       confirmLoading: false,
       loading: false,
       form: this.$form.createForm(this),
       dataSource: [],
       param: {},
-      validatorRules: {
-      },
+      validatorRules: {},
       columns: [
         {
           title: '#',
@@ -161,52 +163,52 @@
           key: 'rowIndex',
           width: 50,
           align: 'center',
-          customRender: function (t, r, index) {
+          customRender: function(t, r, index) {
             return parseInt(index) + 1
-          },
+          }
         },
         {
           title: '鍒�鍏风紪鐮�',
           align: 'center',
           dataIndex: 'cuttingCode',
-          width: 150,
+          width: 150
         },
         {
           title: '鍒�鍏峰悕绉�',
           align: 'center',
-          dataIndex: 'cuttingName',
+          dataIndex: 'cuttingName'
         },
         {
           title: '鍏ュ簱鏁伴噺',
           align: 'center',
           dataIndex: 'receiveNumber',
-          scopedSlots: { customRender: 'receiveNumber' },
+          scopedSlots: { customRender: 'receiveNumber' }
         },
         {
           title: '鎿嶄綔',
           dataIndex: 'action',
           align: 'center',
-          scopedSlots: { customRender: 'action' },
-        },
+          scopedSlots: { customRender: 'action' }
+        }
       ],
       url: {
         add: '/cms/cuttingInbound/add',
-        detailList: '/cms/cuttingInbound/detailList',
+        detailList: '/cms/cuttingInbound/detailList'
       },
-      orderId:'',
-      disableSubmit:false
-      }
-    },
-    methods: {
-      modalFormOk(){
+      orderId: '',
+      disableSubmit: false
+    }
+  },
+  methods: {
+    modalFormOk() {
 
-      },
-       getQueryParams() {
+    },
+    getQueryParams() {
       this.param.pageNo = this.ipagination.current
       this.param.pageSize = this.ipagination.pageSize
       return filterObj(this.param)
     },
-      add() {
+    add() {
       let receiver = store.getters.userInfo.id
       let receiveTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
       this.edit({ receiver: receiver, receiveTime: receiveTime })
@@ -228,7 +230,7 @@
         )
       })
     },
-     handleDelete(record, index) {
+    handleDelete(record, index) {
       this.dataSource.splice(index, 1)
     },
     handleChange(value, key, column, index) {
@@ -240,7 +242,7 @@
         this.dataSource = temp
       }
     },
-    selectTooling: function () {
+    selectTooling: function() {
       let ids = []
       for (let i = 0; i < this.dataSource.length; i++) {
         ids.push(this.dataSource[i].cuttingId)
@@ -266,7 +268,7 @@
         return
       }
       // 鏍¢獙鍏ュ簱鏁伴噺鏄惁濉啓
-      for(let i=0; i<this.dataSource.length; i++) {
+      for (let i = 0; i < this.dataSource.length; i++) {
         if (!this.dataSource[i].receiveNumber || this.dataSource[i].receiveNumber <= 0) {
           this.$message.error(`蹇呴』濉啓鍏ュ簱鏁伴噺`)
           return
@@ -303,9 +305,9 @@
       this.dataSource = []
       this.visible = false
       this.disableSubmit = false
-    },
-    },
-    mounted() {
+    }
+  },
+  mounted() {
     this.$bus.$on('selectionRows', (data) => {
       //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟
       for (let i = 0; i < data.length; i++) {
@@ -316,6 +318,6 @@
         })
       }
     })
-  },
   }
+}
 </script>
\ No newline at end of file

--
Gitblit v1.9.3