From c3f9133f259abacf02ae5acb2e5b4352f40d9b22 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期一, 26 五月 2025 15:49:06 +0800
Subject: [PATCH] 刀具刃磨/ 工具盘点、 库存预警界面修改

---
 src/views/tms/requirement/ToolSharpeningList .vue                     |   18 ++--
 src/views/tms/lossBound/modules/LossboundModal.vue                    |   28 +++---
 src/views/tms/requirement/modules/ToolsSharpeningModal.vue            |   36 +++++---
 src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue        |   16 +++
 src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue |  111 ++++++++++++++-------------
 5 files changed, 117 insertions(+), 92 deletions(-)

diff --git a/src/views/tms/lossBound/modules/LossboundModal.vue b/src/views/tms/lossBound/modules/LossboundModal.vue
index 3942e81..2017454 100644
--- a/src/views/tms/lossBound/modules/LossboundModal.vue
+++ b/src/views/tms/lossBound/modules/LossboundModal.vue
@@ -205,7 +205,21 @@
           align: 'center',
           width: 150
         },
+        {
+          title: '鎶ユ崯鍘熷洜',
+          width: 150,
+          dataIndex: 'lossReason',
+          align: 'center',
+          scopedSlots: { customRender: 'lossReason' }
+        },
 
+        {
+          title: '鎶ユ崯鏁伴噺',
+          dataIndex: 'lossNumber',
+          align: 'center',
+          width: 150,
+          scopedSlots: { customRender: 'lossNumber' }
+        },
         {
           title: '涓枃鍚嶇О',
           dataIndex: 'chineseName',
@@ -245,21 +259,7 @@
           dataIndex: 'goodsShelvesId',
           align: 'center'
         },
-        {
-          title: '鎶ユ崯鍘熷洜',
-          width: 150,
-          dataIndex: 'lossReason',
-          align: 'center',
-          scopedSlots: { customRender: 'lossReason' }
-        },
 
-        {
-          title: '鎶ユ崯鏁伴噺',
-          dataIndex: 'lossNumber',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'lossNumber' }
-        },
 
         {
           title: '澶囨敞',
diff --git a/src/views/tms/requirement/ToolSharpeningList .vue b/src/views/tms/requirement/ToolSharpeningList .vue
index 2dc5ab7..cf8841a 100644
--- a/src/views/tms/requirement/ToolSharpeningList .vue
+++ b/src/views/tms/requirement/ToolSharpeningList .vue
@@ -5,18 +5,18 @@
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
-            <a-form-item label="鍒�鍏峰悕绉�">
-              <j-input placeholder="璇疯緭鍏ュ垁鍏峰悕绉�" v-model="queryParam.toolName"></j-input>
+            <a-form-item label="鍒�鍏风紪鍙�">
+              <a-input placeholder="璇疯緭鍏ュ垁鍏风紪鍙�" v-model="queryParam.toolId"></a-input>
             </a-form-item>
           </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍒冪(缁撴灉">
-              <j-input placeholder="璇疯緭鍏ュ垉纾ㄧ粨鏋�" v-model="queryParam.grindingResult"></j-input>
+              <a-input placeholder="璇疯緭鍏ュ垉纾ㄧ粨鏋�" v-model="queryParam.sharpeningResult"></a-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍒冪(鏃堕棿">
-              <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
+              <a-range-picker v-model="queryParam.sharpeningTime" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
             </a-form-item>
           </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
@@ -177,7 +177,6 @@
         deleteBatch: "/tms/toolSharpening/deleteBatch",
         exportXlsUrl: "/tms/toolSharpening/exportXls",
         importExcelUrl: "tms/toolSharpening/importExcel",
-
       },
       dictOptions:{},
       superFieldList:[],
@@ -193,8 +192,8 @@
 
   methods: {
     onInspectionDateChange: function(value, dateString) {
-      this.queryParam.inspectionDateBegin = dateString[0]
-      this.queryParam.inspectionDateEnd = dateString[1]
+      this.queryParam.sharpeningTimeBegin = dateString[0]
+      this.queryParam.sharpeningTimeEnd = dateString[1]
     },
 
 
@@ -220,10 +219,9 @@
       deleteAction(this.url.delete, { id: id }).then((res) => {
         if (res.success) {
           //閲嶆柊璁$畻鍒嗛〉闂
-          this.reCalculatePage(1)
           this.$message.success(res.message)
-          this.$refs.toolStockingBoundDetail.dataSource = []
-          this.loadData()
+          this.ipagination.current = 1
+          this.loadData() // 寮哄埗浠庣涓�椤靛姞杞�
         } else {
           this.$message.warning(res.message)
         }
diff --git a/src/views/tms/requirement/modules/ToolsSharpeningModal.vue b/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
index 9a903d0..9346322 100644
--- a/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
+++ b/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
@@ -45,7 +45,7 @@
 
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-model-item prop="operator" label="璐d换浜�">
+            <a-form-model-item prop="responsiblePerson" label="璐d换浜�">
               <j-dict-select-tag type="list" v-model="model.responsiblePerson" dictCode="sys_user,realname,id"
                                  placeholder="璇烽�夋嫨璐d换浜�" :disabled="disableSubmit" />
             </a-form-model-item>
@@ -97,10 +97,15 @@
             </a-form-model-item>
           </a-col>
         </a-row>
-
         <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark">
+          <a-col :span="12">
+            <a-form-model-item label="瀛樺偍浣嶇疆" prop="storageLocation">
+              <a-input placeholder="閫夋嫨濉啓瀛樺偍浣嶇疆" v-model="model.positionCode" readOnly
+                       :disabled="disableSubmit" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item label="澶囨敞">
               <a-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
@@ -121,7 +126,7 @@
 </template>
 
 <script>
-import { getAction, httpAction, postAction, requestPut } from '@/api/manage'
+import { getAction, postAction, requestPut } from '@/api/manage'
 import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
 import ToolsModal from '@views/tms/requirement/modules/ToolsModal.vue'
 
@@ -153,16 +158,12 @@
         sharpeningTime: [
           { required: true, message: '璇烽�夋嫨鍒冪(鏃ユ湡!' }
         ],
-        responsibleRerson: [
+        responsiblePerson: [
           { required: true, message: '璇烽�夋嫨璐d换浜�!' }
         ],
         sharpeningResult: [
           { required: true, message: '璇疯緭鍏ュ垉纾ㄧ粨鏋滃強寤鸿!' }
-        ],
-        responsiblePerson: [
-          { required: true, message: '璇烽�夋嫨璐d换浜�!' }
         ]
-
       },
       url: {
         add: '/tms/toolSharpening/add',
@@ -208,7 +209,7 @@
 
     edit(record) {
       console.log(record)
-      this.model = Object.assign({}, record)
+      // this.model = Object.assign({}, record)
       this.visible = true
       getAction(this.url.queryDetailList, {
         id: record.id,
@@ -216,8 +217,17 @@
         pageSize: 99999
       }).then((res) => {
         if (res.success) {
-          console.log(res.result.records)
-          this.dataSource = res.result.records
+          const readOnlyData = res.result.records[0] || {}
+          this.model = Object.assign({}, this.model, {
+            paramaTableName: readOnlyData.paramaTableName_dictText,
+            applicationType: readOnlyData.applicationType_dictText,
+            provinceCity: readOnlyData.provinceCity,
+            warehouseId: readOnlyData.warehouseId,
+            positionCode: readOnlyData.positionCode,
+            mainUnit: readOnlyData.mainUnit,
+            toolModel: readOnlyData.toolModel
+          })
+
         } else {
           this.dataSource = null
         }
diff --git a/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue b/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue
index 81fe76b..d0d4230 100644
--- a/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue
+++ b/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue
@@ -17,11 +17,11 @@
                                  :disabled="disableSubmit"></j-dict-select-tag>
             </a-form-model-item>
           </a-col>
+
+
           <a-col :span="12">
-            <a-form-model-item v-show="addShow" label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol"
-                               prop="handler">
-              <j-dict-select-tag dictCode="sys_user,realname,id" placeholder="璇烽�夋嫨缁忔墜浜�" v-model="model.handler"
-                                 :disabled="disableSubmit" />
+            <a-form-model-item label="鐩樼偣鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stocktakingName">
+              <a-input v-model="model.stocktakingName" placeholder="璇疯緭鍏ョ洏鐐瑰悕绉�"></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -31,8 +31,17 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item label="鐩樼偣鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stocktakingName">
-              <a-input v-model="model.stocktakingName" placeholder="璇疯緭鍏ョ洏鐐瑰悕绉�"></a-input>
+            <a-form-model-item label="鐩樼偣鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryTime">
+              <j-date placeholder="璇烽�夋嫨鐩樼偣鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.inventoryTime"
+                      style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="12">
+            <a-form-model-item v-show="addShow" label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                               prop="handler">
+              <j-dict-select-tag dictCode="sys_user,realname,id" placeholder="璇烽�夋嫨缁忔墜浜�" v-model="model.handler"
+                                 :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
 
@@ -56,12 +65,7 @@
                       style="width: 100%" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="鐩樼偣鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryTime">
-              <j-date placeholder="璇烽�夋嫨鐩樼偣鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.inventoryTime"
-                      style="width: 100%" />
-            </a-form-model-item>
-          </a-col>
+
           <a-col :span="12">
             <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
               <a-input v-model="model.remark" placeholder="璇疯緭鍏ュ娉�" type="textarea"></a-input>
@@ -176,47 +180,6 @@
           align: 'center',
           width: 150
         },
-
-        {
-          title: '涓枃鍚嶇О',
-          dataIndex: 'chineseName',
-          width: 150,
-          align: 'center'
-        },
-
-        {
-          title: '鍨嬪彿/鍥惧彿',
-          dataIndex: 'toolModel',
-          width: 150,
-          align: 'center'
-        },
-
-        {
-          title: '鍒�鍏锋潗鏂�',
-          width: 150,
-          dataIndex: 'toolMaterial',
-          align: 'center'
-        },
-        {
-          title: '闆朵欢鏉愭枡',
-          width: 150,
-          dataIndex: 'partMaterial',
-          align: 'center'
-        },
-        {
-          title: '鍘傚',
-          width: 150,
-          dataIndex: 'supplierId',
-          align: 'center'
-
-        },
-        {
-          title: '瀛樺偍浣嶇疆',
-          width: 150,
-          dataIndex: 'goodsShelvesId',
-          align: 'center'
-
-        },
         {
           title: '璐﹂潰搴撳瓨',
           width: 150,
@@ -269,6 +232,48 @@
           scopedSlots: { customRender: 'remark' }
         },
         {
+          title: '涓枃鍚嶇О',
+          dataIndex: 'chineseName',
+          width: 150,
+          align: 'center'
+        },
+
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          dataIndex: 'toolModel',
+          width: 150,
+          align: 'center'
+        },
+
+        {
+          title: '鍒�鍏锋潗鏂�',
+          width: 150,
+          dataIndex: 'toolMaterial',
+          align: 'center'
+        },
+        {
+          title: '闆朵欢鏉愭枡',
+          width: 150,
+          dataIndex: 'partMaterial',
+          align: 'center'
+        },
+        {
+          title: '鍘傚',
+          width: 150,
+          dataIndex: 'supplierId',
+          align: 'center'
+
+        },
+        {
+          title: '瀛樺偍浣嶇疆',
+          width: 150,
+          dataIndex: 'goodsShelvesId',
+          align: 'center'
+
+        },
+
+
+        {
           title: '鎿嶄綔',
           width: 150,
           dataIndex: 'action',
diff --git a/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue
index 30aeb17..189bab2 100644
--- a/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue
+++ b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue
@@ -109,7 +109,7 @@
         :pagination="ipagination"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
+        :rowClassName="setRowClassName"
         @change="handleTableChange">
 
         <template slot="htmlSlot" slot-scope="text">
@@ -273,6 +273,13 @@
       },
     },
     methods: {
+      setRowClassName(record,index){
+
+        //鍒ゆ柇骞惰繑鍥炶鐨勬牱寮忓悕绉�
+        if(record){
+          return "bg-blue"
+        }
+      },
       initDictConfig(){
       },
       getSuperFieldList(){
@@ -300,4 +307,9 @@
 </script>
 <style scoped>
   @import '~@assets/less/common.less';
-</style>
\ No newline at end of file
+  ::v-deep .bg-blue{
+
+    background-color:#C1194E;
+
+  }
+</style>

--
Gitblit v1.9.3