From 88a01935759943d38e1ab5d318ace12e3d948a60 Mon Sep 17 00:00:00 2001
From: cuijian <cuijian@xalxzn.com>
Date: 星期五, 05 九月 2025 10:32:11 +0800
Subject: [PATCH] 刀具刃磨功能,增加刃磨后刀具信息变更

---
 src/views/tms/modules/inbound/InboundModel.vue |   41 +++++++++++++++++++++++++++++++++++++----
 1 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/views/tms/modules/inbound/InboundModel.vue b/src/views/tms/modules/inbound/InboundModel.vue
index 3ba3ee8..66cf019 100644
--- a/src/views/tms/modules/inbound/InboundModel.vue
+++ b/src/views/tms/modules/inbound/InboundModel.vue
@@ -78,7 +78,7 @@
         <div :key="col.dataIndex">
           <a-input-number
             v-if="col.dataIndex == 'inStorageQuantity'"
-            :disabled="record.accuracyClass == '1'"
+            
             :value="text"
             @change="(e) => handleChange(e, record, col, index)"
             :min="1"
@@ -86,6 +86,8 @@
         </div>
       </template>
       <span slot="action" slot-scope="text, record, index">
+        <a @click="handleChangeClassify(record)" v-if="sharpenShow && !disableSubmit">鍙樻洿宸ュ叿鍒嗙被</a>
+        <a-divider type="vertical" v-if="sharpenShow && !disableSubmit"/>
         <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record, index)" :disabled="disableSubmit">
           <a>鍒犻櫎</a>
         </a-popconfirm>
@@ -102,11 +104,13 @@
     <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal>
     <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal>
     <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal>
+    <change-classify-modal ref="changeClassifyModalForm" @ok="modalFormOk" :classifyId="classifyId"></change-classify-modal>
   
     <div id="printArea" style="display: block;">
       <div v-for="(item, index) in qrList" :key="index" class="qrcode-item">
+        <p>{{ item.onlyCode }}</p>
+        <p>{{ item.toolName }}</p>
         <img :src="item.base64" alt="QR Code">
-        <p>{{ item.content }}</p>
       </div>
     </div>
   </a-modal>
@@ -116,6 +120,7 @@
 <script>
 import pick from 'lodash.pick'
 import JSelectToolingModal from '.././inboundOrder/JSelectToolingModal'
+import ChangeClassifyModal from './ChangeClassifyModal'
 import { ajaxGetDictItems } from '@/api/api'
 import moment from 'moment'
 import { getAction, postAction, requestPut } from '@/api/manage'
@@ -136,6 +141,7 @@
     JSelectReturnListModal,
     JSearchSelectTag,
     JSelectSharpenListModal,
+    ChangeClassifyModal
   },
   data() {
     return {
@@ -260,6 +266,11 @@
           scopedSlots: { customRender: 'inStorageQuantity' },
         },
         {
+          title: '鏂板伐鍏风紪鐮�',
+          align: 'center',
+          dataIndex: 'newToolCode',
+        },
+        {
           title: '鎿嶄綔',
           dataIndex: 'action',
           align: 'center',
@@ -347,12 +358,13 @@
               if (res.success) {
                 if(this.model.inStorehouseType === '1'){
                   this.qrList = res.result.map((content, i) => ({
-                  content:res.result[i].content,
+                  onlyCode:res.result[i].onlyCode,
+                  toolName:res.result[i].toolName,
                   base64: res.result[i].image
                   }));
                   this.handleBacthPrint();
                 }else{
-                   that.$message.success("淇濆瓨鎴愬姛")
+                   that.$message.success("鍏ュ簱鎴愬姛")
                 }
                 that.$emit('ok', new Date())
               } else {
@@ -458,6 +470,12 @@
           scanStyles: false
         });
       });
+    },
+    //鍒冪(鍚庡彉鏇村伐鍏峰垎绫�
+    handleChangeClassify(record){
+      this.$refs.changeClassifyModalForm.showModal(record.id)
+      this.$refs.changeClassifyModalForm.title = '閫夋嫨宸ュ叿鍒嗙被'
+      this.$refs.changeClassifyModalForm.disableSubmit = false
     }
   },
   watch: {},
@@ -481,6 +499,21 @@
       }
       //this.ipaginationm.total = this.dataSource.length
     })
+    this.$bus.$on('selectionToolCode', (data) => {
+      //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟
+      for (let i = 0; i < this.dataSource.length; i++) {
+        console.log("1111",this.dataSource.length,data,this.dataSource[i])
+        if(this.dataSource[i].id == data.oldId){
+          this.dataSource[i].newToolCode = data.toolCode
+          this.dataSource[i].newToolCodeId = data.toolCodeId
+          this.dataSource[i].goodsShelvesId = data.positionCode
+          this.$set(this.dataSource[i],'newToolClassify',data.toolCode)
+        }
+      }
+      // 寮哄埗鏇存柊瑙嗗浘
+      this.$forceUpdate();
+      //this.ipaginationm.total = this.dataSource.length
+    })
   },
 }
 </script>

--
Gitblit v1.9.3