From bac10733d14f935a026ea9c3f8beeb9fd7b5d803 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期一, 26 五月 2025 10:30:52 +0800
Subject: [PATCH] 刀具刃磨/  工具盘点/工具报损

---
 src/views/tms/lossBound/LossboundList.vue                               |   20 
 src/views/tms/requirement/ToolSharpeningList .vue                       |  153 ++----
 src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue |  524 ++++++++++++++++++++++
 src/views/tms/lossBound/modules/LossboundModal.vue                      |   45 +
 src/views/tms/requirement/modules/ToolsSharpeningModal.vue              |  355 +++++----------
 src/views/tms/requirement/modules/ToolsModal.vue                        |  221 +++++++++
 src/views/flowable/workflow/lossBound/lossBoundHandle.vue               |   40 +
 src/views/tms/stocktakingBound/ToolsStocktaKingBoundDetail.vue          |    1 
 src/views/tms/stocktakingBound/ToolsStocktakingBoundList.vue            |    3 
 9 files changed, 985 insertions(+), 377 deletions(-)

diff --git a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
index d0b2286..a9e2cfd 100644
--- a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
+++ b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
@@ -36,13 +36,13 @@
                   <a-row>
                     <a-col :span="span">
                       <a-form-model-item label="鎶ユ崯鍗曞崟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum">
-                        <a-input :disabled="coldisabled" v-model="tableRowRecord.orderCode"></a-input>
+                        <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.orderCode"></a-input>
                       </a-form-model-item>
                     </a-col>
                     <a-col :span="span">
                       <a-form-model-item label="鎶ユ崯浜�" :labelCol="labelCol" :wrapperCol="wrapperCol"
                                          prop="outStorehouseType">
-                        <j-dict-select-tag :disabled="coldisabled"
+                        <j-dict-select-tag :readOnly="inputReadOnly"
                                            v-model="tableRowRecord.losser" dictCode="sys_user,realname,id"
                                            placeholder="璇烽�夋嫨" />
                       </a-form-model-item>
@@ -52,28 +52,28 @@
                     <a-col :span="span">
                       <a-form-model-item label="鎶ユ崯鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"
                                          prop="outboundTime">
-                        <j-date :disabled="coldisabled" v-model="tableRowRecord.lossTime" :show-time="true"
+                        <j-date :readOnly="inputReadOnly" v-model="tableRowRecord.lossTime" :show-time="true"
                                 dateFormat="YYYY-MM-DD HH:mm" style="width: 100%" />
                       </a-form-model-item>
                     </a-col>
                     <a-col :span="span">
                       <a-form-model-item label="鎶ユ崯鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol"
                                          prop="subjectMatter">
-                        <a-input :disabled="coldisabled" v-model="tableRowRecord.lossReason"></a-input>
+                        <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.lossReason"></a-input>
                       </a-form-model-item>
                     </a-col>
                   </a-row>
                   <a-row>
                     <a-col :span="span">
                       <a-form-model-item label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler">
-                        <j-dict-select-tag :disabled="coldisabled"
+                        <j-dict-select-tag :readOnly="inputReadOnly"
                                            v-model="tableRowRecord.handler" dictCode="sys_user,realname,id"
                                            placeholder="璇烽�夋嫨" />
                       </a-form-model-item>
                     </a-col>
                     <a-col :span="span">
                       <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-                        <a-textarea :disabled="coldisabled" v-model="tableRowRecord.remark" rows="4" />
+                        <a-textarea :readOnly="inputReadOnly" v-model="tableRowRecord.remark" rows="4" />
                       </a-form-model-item>
                     </a-col>
                   </a-row>
@@ -119,17 +119,17 @@
           <a-row>
             <a-col ::span="span">
               <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler_dictText">
-                <a-input :disabled="coldisabled" v-model="tableRowRecord.handler_dictText"></a-input>
+                <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handler_dictText"></a-input>
               </a-form-model-item>
             </a-col>
             <a-col ::span="span">
               <a-form-model-item label="鐢宠鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
-                <a-input :disabled="coldisabled" v-model="tableRowRecord.createTime"></a-input>
+                <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.createTime"></a-input>
               </a-form-model-item>
             </a-col>
             <a-col :span="24" class="btxx">
               <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                <a-select v-model="assignFileStream.status" placeholder="璇烽�夋嫨瀹℃壒缁撴灉">
+                <a-select :disabled="disableSubmit" v-model="assignFileStream.status" placeholder="璇烽�夋嫨瀹℃壒缁撴灉">
                   <a-select-option value="3">閫氳繃</a-select-option>
                   <a-select-option value="4">椹冲洖</a-select-option>
                 </a-select>
@@ -137,13 +137,14 @@
             </a-col>
             <a-col :span="24" class="btxx">
               <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                <a-textarea v-model="assignFileStream.approvalOpinion" rows="4" placeholder="璇疯緭鍏ュ鎵规剰瑙�" />
+                <a-textarea :disabled="disableSubmit" v-model="assignFileStream.approvalOpinion" rows="4"
+                            placeholder="璇疯緭鍏ュ鎵规剰瑙�" />
               </a-form-model-item>
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
             <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button :disabled="disableSubmit" @click="submitForm">鎻愪氦</a-button>
           </div>
         </a-form-model>
       </div>
@@ -174,7 +175,8 @@
       form: this.$form.createForm(this),
       span: 12,
       span1: 8,
-      coldisabled: true,
+      disableSubmit: false,
+      inputReadOnly: true,
       spinning: false,
       tableRowRecord: {},
       assignFileStream: {},
@@ -294,11 +296,11 @@
       visible: false,
       // 琛ㄥご
       url: {
-        queryOutBoundOrder: '/tms/toolsLossBound/queryById',
-        queryOutBoundDetailList: '/tms/toolsLossBound/listlossboundDetailByMainId',
+        queryLossBoundOrder: '/tms/toolsLossBound/queryById',
+        queryLossBoundDetailList: '/tms/toolsLossBound/listlossboundDetailByMainId',
         diagramView: '/assign/flow/diagramView',
         queryHisTaskList: '/assign/flow/queryHisTaskList',
-        approve: '/tms/outboundOrder/approval'
+        approve: '/tms/toolsLossBound/approval'
       },
       dictOptions: {},
       superFieldList: [],
@@ -384,6 +386,10 @@
 
       })
     },
+    /**
+     * 鑾峰彇娴佺▼鑺傜偣鍜屾祦绋嬪浘
+     * @param record 寰呭姙璁板綍淇℃伅
+     */
     getAllApproveData(item) {
       this.visible = true
       this.loading = true
@@ -394,12 +400,12 @@
           this.hitaskDataSource = res.result
         }
       })
-      getAction(this.url.queryOutBoundOrder, { id: item.dataId }).then((res => {
+      getAction(this.url.queryLossBoundOrder, { id: item.dataId }).then((res => {
         if (res.success) {
           this.tableRowRecord = res.result
         }
       }))
-      getAction(this.url.queryOutBoundDetailList, { lossBoundId: item.dataId }).then(res => {
+      getAction(this.url.queryLossBoundDetailList, { lossBoundId: item.dataId }).then(res => {
         if (res.success) {
           this.dataSource = res.result.records
           if (res.result.total) {
diff --git a/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue b/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
new file mode 100644
index 0000000..d0d5110
--- /dev/null
+++ b/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
@@ -0,0 +1,524 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :footer="null"
+    @cancel="handCancel"
+  >
+    <a-card :bordered="false">
+      <div>
+        <b>{{ selectShenpiData.description }}</b>
+        <br>
+        <br>
+        <a-tag color="blue">
+          澶勭悊浜� {{ selectShenpiData.assignee_dictText }}
+        </a-tag>
+        <a-tag color="blue">
+          鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }}
+        </a-tag>
+        <br>
+        <br>
+        <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button>
+        <div v-if="imageSrc">
+          <img :src="imageSrc" alt="Fetched Image" />
+        </div>
+        <hr class="shallow-hr">
+      </div>
+      <div>
+        <b>鐩樼偣璇︽儏</b>
+        <br>
+        <a-form :form="form">
+          <a-spin :spinning="spinning">
+            <a-tabs default-active-key="1" @change="callback">
+              <a-tab-pane key="1" tab="鐢宠鍩烘湰淇℃伅">
+                <a-form-model ref="form" :model="tableRowRecord">
+                  <a-row>
+                    <a-col :span="span">
+                      <a-form-model-item label="鍑哄簱鍗曠紪鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum">
+                        <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.outNum"></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span="span">
+                      <a-form-model-item label="鍑哄簱绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                                         prop="outStorehouseType">
+                        <j-dict-select-tag :readOnly="inputReadOnly" type="list"
+                                           v-model="tableRowRecord.outStorehouseType" dictCode="out_storehouse_type" />
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="span">
+                      <a-form-model-item label="鍑哄簱鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                                         prop="outboundTime">
+                        <j-date :readOnly="inputReadOnly" v-model="tableRowRecord.outboundTime" :show-time="true"
+                                dateFormat="YYYY-MM-DD HH:mm" style="width: 100%" />
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span="span">
+                      <a-form-model-item label="棰嗙敤浜嬬敱" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                                         prop="subjectMatter">
+                        <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.subjectMatter"></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                  <a-row>
+                    <a-col :span="span">
+                      <a-form-model-item label="缁忔墜浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler">
+                        <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handler_dictText"></a-input>
+                      </a-form-model-item>
+                    </a-col>
+                    <a-col :span="span">
+                      <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+                        <a-textarea :readOnly="inputReadOnly" v-model="tableRowRecord.remark" rows="4" />
+                      </a-form-model-item>
+                    </a-col>
+                  </a-row>
+                </a-form-model>
+              </a-tab-pane>
+              <a-tab-pane key="2" tab="鐩樼偣鏄庣粏淇℃伅">
+                <a-table
+                  ref="table"
+                  size="middle"
+                  bordered
+                  rowKey="id"
+                  :scroll="{x:'max-content'}"
+                  :columns="columns"
+                  :dataSource="dataSource"
+                  :pagination="ipagination"
+                  :loading="loading"
+                  :rowSelection="null">
+                </a-table>
+              </a-tab-pane>
+              <a-tab-pane key="3" tab="娴佺▼鑺傜偣">
+                <a-timeline>
+                  <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index">
+                    <div>
+                      <h3 style="font-weight: bold;">{{ item.taskName }}</h3>
+                      <div>澶勭悊浜猴細{{ item.assignee_dictText }}</div>
+                      <div v-if="index !==0">澶勭悊鏃堕暱锛歿{ item.duration }}</div>
+                      <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{ item.sequenceFlowName }}</div>
+                      <div v-if="item.description">澶勭悊鎰忚锛歿{ item.description }}</div>
+                    </div>
+                  </a-timeline-item>
+                </a-timeline>
+              </a-tab-pane>
+            </a-tabs>
+          </a-spin>
+        </a-form>
+      </div>
+      <div v-if="auditVisible">
+        <hr class="shallow-hr">
+        <br>
+        <b>瀹℃壒璇︽儏</b>
+        <br>
+        <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail">
+          <a-row>
+            <a-col ::span="span">
+              <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler_dictText">
+                <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.handler_dictText"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col ::span="span">
+              <a-form-model-item label="鐢宠鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
+                <a-input :readOnly="inputReadOnly" v-model="tableRowRecord.createTime"></a-input>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24" class="btxx">
+              <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-select :disabled="disableSubmit" v-model="assignFileStream.status" placeholder="璇烽�夋嫨瀹℃壒缁撴灉">
+                  <a-select-option value="3">閫氳繃</a-select-option>
+                  <a-select-option value="4">椹冲洖</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24" class="btxx">
+              <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                <a-textarea :disabled="disableSubmit" v-model="assignFileStream.approvalOpinion" rows="4"
+                            placeholder="璇疯緭鍏ュ鎵规剰瑙�" />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <div class="table-operator" style="text-align: right;">
+            <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
+            <a-button :disabled="disableSubmit" @click="submitForm">鎻� 浜�</a-button>
+          </div>
+        </a-form-model>
+      </div>
+    </a-card>
+
+
+  </a-modal>
+</template>
+
+<script>
+
+import '@assets/less/TableExpand.less'
+import { mixinDevice } from '@/utils/mixin'
+import { downFile, getAction, httpAction } from '@api/manage'
+
+export default {
+  name: 'stocktakingBoundHandle',
+  mixins: [mixinDevice],
+  props: {
+    selectShenpiData: {
+      type: Object,
+      required: true
+    }
+  },
+
+  data() {
+    return {
+      form: this.$form.createForm(this),
+      span: 12,
+      span1: 8,
+      inputReadOnly: true,
+      spinning: false,
+      tableRowRecord: {},
+      assignFileStream: {},
+      tableDataSource: [],
+      usageDataSource: [],
+      hitaskDataSource: [],
+      dataSource: [],
+      bomForm: {},
+      imageSrc: null,
+      drawerVisible: true,
+      auditVisible: true,
+      disableSubmit: false,
+      loading: false,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 30 },
+        sm: { span: 16 }
+      },
+      /* 鍒嗛〉鍙傛暟 */
+      ipagination: {
+        current: 1,
+        pageSize: 5,
+        pageSizeOptions: ['5', '10', '50'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
+          }
+        },
+        {
+          title: '鍒�鍏风紪鍙�',
+          dataIndex: 'toolCode',
+          align: 'center'
+        },
+        {
+          title: '宸ュ叿绫诲瀷',
+          dataIndex: 'applicationType_dictText',
+          align: 'center'
+
+        },
+
+        {
+          title: '涓枃鍚嶇О',
+          dataIndex: 'chineseName',
+          align: 'center'
+        },
+
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          dataIndex: 'toolModel',
+          align: 'center'
+        },
+        {
+          title: '鍒�鍏锋潗鏂�',
+          dataIndex: 'toolMaterial',
+          align: 'center'
+
+        },
+        {
+          title: '闆朵欢鏉愭枡',
+          dataIndex: 'partMaterial',
+          align: 'center'
+        },
+        {
+          title: '鍘傚',
+          dataIndex: 'supplierId',
+          align: 'center'
+
+        },
+        {
+          title: '瀛樺偍浣嶇疆(搴撲綅鍙�)',
+          dataIndex: 'goodsShelvesId',
+          align: 'center'
+        },
+
+        {
+          title: '璐﹂潰鏁伴噺',
+          dataIndex: 'bookQuantity',
+          align: 'center'
+
+        },
+        {
+          title: '鍙敤鏁伴噺',
+          dataIndex: 'availableQuantity',
+          align: 'center'
+
+        },
+        {
+          title: '瀹炵洏鏁伴噺',
+          dataIndex: 'practicalQuantity',
+          align: 'center'
+        },
+        {
+          title: '宸紓鍊�',
+          dataIndex: 'differenceValue',
+          align: 'center'
+        },
+        {
+          title: '鐩樹簭鐩樼泩',
+          dataIndex: 'surplusDeficit_dictText',
+          align: 'center'
+        },
+        {
+          title: '鐩樺簱鏃堕棿',
+          dataIndex: 'stocktakingDate',
+          align: 'center'
+        },
+        {
+          title: '澶囨敞',
+          dataIndex: 'remark',
+          align: 'center'
+        }
+      ],
+      validatorRules: {
+        status: {
+          rules: [
+            { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!' }
+          ]
+        }
+      },
+      approveData: {},
+      flowData: {},
+      title: '瀹℃壒椤甸潰',
+      width: 1200,
+      visible: false,
+      // 琛ㄥご
+      url: {
+        queryStocktakingBoundOrder: '/tms/toolsStocktakingBound/queryById',
+        queryStocktakingBoundDetailList: '/tms/toolsStocktakingBound/listToolsStocktakingBoundControllerDetailsByMainId',
+        diagramView: '/assign/flow/diagramView',
+        queryHisTaskList: '/assign/flow/queryHisTaskList',
+        approve: '/tms/toolsStocktakingBound/approval'
+      },
+      dictOptions: {},
+      superFieldList: [],
+      workflowSource: []
+    }
+  },
+  created() {
+  },
+  computed: {},
+  methods: {
+    callback() {
+    },
+    handCancel() {
+      this.visible = false
+    },
+    clearTableSource() {
+      this.tableDataSource = []
+      this.usageDataSource = []
+    },
+    fetchAndShowBmp() {
+      console.log('flowData----->', this.flowData)
+      try {
+        let parm = {
+          processDefinitionId: this.flowData.processDefinitionId,
+          processInstanceId: this.flowData.processInstanceId,
+          TaskDefinitionKey: this.flowData.processDefinitionKey
+        }
+        downFile(this.url.diagramView, parm, 'get').then((res => {
+          console.log('Pica------>', res)
+          const urlObject = window.URL.createObjectURL(new Blob([res]))
+          this.imageSrc = urlObject
+        }))
+      } catch (error) {
+        console.error('Error fetching image blob:', error)
+        alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
+      }
+    },
+    handleQueXiaoTask() {
+      this.visible = false
+      this.routeReload()
+    },
+    submitForm() {
+      const that = this
+      if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) {
+        this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
+        return false
+      }
+      if (!that.assignFileStream.approvalOpinion == null || that.assignFileStream.approvalOpinion === undefined) {
+        this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒')
+        return false
+      }
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          that.confirmLoading = true
+          let url = this.url.approve
+          let method = 'post'
+          let flowTaskVo = {}
+          flowTaskVo.status = that.assignFileStream.status
+          flowTaskVo.approvalOpinion = that.assignFileStream.approvalOpinion
+          flowTaskVo.comment = that.assignFileStream.approvalOpinion
+          flowTaskVo.dataId = this.selectShenpiData.dataId
+          flowTaskVo.taskId = this.selectShenpiData.id
+          flowTaskVo.userId = this.selectShenpiData.assignee
+          flowTaskVo.instanceId = this.selectShenpiData.procInstId
+          flowTaskVo.targetKey = this.selectShenpiData.taskDefKey
+          flowTaskVo.values = this.selectShenpiData.variables
+          flowTaskVo.assignee = this.selectShenpiData.assignee
+          console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo)
+          httpAction(url, flowTaskVo, method).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message)
+              that.visible = false
+              //鍒锋柊琛ㄦ牸
+              that.$emit('searchReset')
+            } else {
+              that.$message.warning(res.message)
+            }
+          }).finally(() => {
+            that.confirmLoading = false
+          })
+        }
+
+      })
+    },
+    /**
+     * 鑾峰彇娴佺▼鑺傜偣鍜屾祦绋嬪浘
+     * @param record 寰呭姙璁板綍淇℃伅
+     */
+    getAllApproveData(item) {
+      this.visible = true
+      this.loading = true
+      console.log('selectShenpiData----->', this.selectShenpiData)
+      this.flowData = item
+      getAction(this.url.queryHisTaskList, { procInstId: item.procInstId }).then(res => {
+        if (res.success) {
+          this.hitaskDataSource = res.result
+        }
+      })
+      getAction(this.url.queryStocktakingBoundOrder, { id: item.dataId }).then((res => {
+        if (res.success) {
+          this.tableRowRecord = res.result
+        }
+      }))
+      getAction(this.url.queryStocktakingBoundDetailList, { stocktakingBoundId: item.dataId }).then(res => {
+        if (res.success) {
+          this.dataSource = res.result.records
+          if (res.result.total) {
+            this.ipagination.total = res.result.total
+          } else {
+            this.ipagination.total = 0
+          }
+        } else {
+          this.$message.warning(res.message)
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+.shallow-hr {
+  border: 0;
+  height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
+  background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */
+  margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */
+}
+
+.btn-custom {
+  background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */
+  color: white; /* 鐧借壊鏂囧瓧 */
+  border: none; /* 鏃犺竟妗� */
+  padding: 5px 15px; /* 鍐呰竟璺� */
+  text-align: center; /* 鏂囧瓧灞呬腑 */
+  text-decoration: none; /* 鏃犱笅鍒掔嚎 */
+  display: inline-block; /* 琛屽唴鍧楀厓绱� */
+  font-size: 12px; /* 瀛椾綋澶у皬 */
+  margin: 4px 2px; /* 澶栬竟璺� */
+  cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */
+  border-radius: 4px; /* 鍦嗚杈规 */
+}
+
+.bold-large-label {
+  font-weight: bold;
+  font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */
+}
+
+.left_qiu {
+  position: absolute;
+  left: -74px;
+  top: 0;
+  width: 54px;
+  border-radius: 50%;
+  height: 54px;
+  font-size: 13px;
+  margin: auto;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  justify-content: center;
+  background: #0099ff;
+  transform: translate(0, 0);
+}
+
+/deep/ .ant-timeline-item-tail {
+  left: -29px !important;
+}
+
+.left_qiu span {
+  width: 3em;
+  display: block;
+  color: #fff;
+  text-align: center;
+}
+
+.img {
+  width: 75%;
+}
+
+.wrap {
+  clear: both;
+  width: 100%;
+  display: flex;
+  height: 50px;
+  border: 1px solid #ccc;
+  /* background-color: aqua; */
+}
+
+.box {
+  width: 21%;
+  height: 50px;
+  border-right: 1px solid #ccc;
+  line-height: 50px;
+  /* background: red; */
+  text-align: center;
+  margin: auto;
+}
+
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/tms/lossBound/LossboundList.vue b/src/views/tms/lossBound/LossboundList.vue
index 23d100c..67bac90 100644
--- a/src/views/tms/lossBound/LossboundList.vue
+++ b/src/views/tms/lossBound/LossboundList.vue
@@ -6,7 +6,7 @@
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="鎶ユ崯鍗曞崟鍙�">
-              <a-input placeholder="璇疯緭鍏ユ姤鎹熷崟鍗曞彿" v-model="queryParam.orderCode"></a-input>
+              <j-input placeholder="璇疯緭鍏ユ姤鎹熷崟鍗曞彿"    v-model="queryParam.orderCode"></j-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -19,10 +19,10 @@
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-              </a>
+<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
+<!--                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />-->
+<!--              </a>-->
             </span>
           </a-col>
         </a-row>
@@ -190,6 +190,16 @@
     }
   },
   methods: {
+    // handleEdit: function (record) {
+    //   this.$refs.modalForm.edit(record);
+    //   this.$refs.modalForm.title = "缂栬緫";
+    //   this.$refs.modalForm.disableSubmit = false;
+    // },
+    // handleAdd: function () {
+    //   this.$refs.modalForm.add();
+    //   this.$refs.modalForm.title = "鏂板";
+    //   this.$refs.modalForm.disableSubmit = false;
+    // },
     modalFormOk() {
       this.$refs.lossboundDetailList.clearList()
       this.loadData()
diff --git a/src/views/tms/lossBound/modules/LossboundModal.vue b/src/views/tms/lossBound/modules/LossboundModal.vue
index 62782be..3942e81 100644
--- a/src/views/tms/lossBound/modules/LossboundModal.vue
+++ b/src/views/tms/lossBound/modules/LossboundModal.vue
@@ -13,7 +13,7 @@
         <a-row>
           <a-col :span="12">
             <a-form-model-item label="鎶ユ崯鍗曞崟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode">
-              <a-input v-model="model.orderCode" placeholder="绯荤粺鑷姩鐢熸垚" :disabled="true"></a-input>
+              <j-input v-model="model.orderCode" placeholder="绯荤粺鑷姩鐢熸垚" :disabled="true"></j-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -28,7 +28,7 @@
           <a-col :span="12">
             <a-form-model-item label="鎶ユ崯鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lossTime">
 
-              <j-date placeholder="璇烽�夋嫨鎶ユ崯鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime"
+              <j-date placeholder="璇烽�夋嫨鎶ユ崯鏃堕棿" :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime"
                       style="width: 100%" />
             </a-form-model-item>
           </a-col>
@@ -66,7 +66,7 @@
             <a-form-model-item v-if="addShow" label="瀹℃牳鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol"
                                prop="approvalDate">
 
-              <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate"
+              <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿"  :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate"
                       style="width: 100%" />
             </a-form-model-item>
           </a-col>
@@ -96,7 +96,7 @@
       </a-form-model>
     </a-spin>
 
-    <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTools">
+    <a-button type="primary" :style="{ marginBottom: '8px' }"  :disabled="disableSubmit" @click="selectTools">
       閫夋嫨宸ュ叿
     </a-button>
     <a-table
@@ -355,27 +355,34 @@
     },
     add() {
       this.addShow = false
-      this.edit()
+      this.edit({}) // 浼犲叆绌哄璞′綔涓洪粯璁ゅ��
       this.dataSource = []
     },
     edit(record) {
       console.log(record)
-      this.model = Object.assign({}, record)
-      this.visible = true
-      getAction(this.url.list, {
-        lossBoundId: record.id,
-        pageNo: 1,
-        pageSize: 99999
-      }).then((res) => {
-        if (res.success) {
-          console.log(res.result.records)
-          this.dataSource = res.result.records
-        } else {
-          this.dataSource = null
-        }
-      })
+      if (record && record.id) {
+        this.model = Object.assign({}, record)
+        this.visible = true
+        getAction(this.url.list, {
+          lossBoundId: record.id,
+          pageNo: 1,
+          pageSize: 99999
+        }).then((res) => {
+          if (res.success) {
+            console.log(res.result.records)
+            this.dataSource = res.result.records
+          } else {
+            this.dataSource = null
+          }
+        })
+      } else {
+        this.model = {} // 濡傛灉鏄柊澧炴ā寮忥紝鍒欏垵濮嬪寲 model
+        this.visible = true
+        this.dataSource = [] // 娓呯┖鏁版嵁婧�
+      }
     },
 
+
     close() {
       this.$emit('close')
       this.addShow = true
diff --git a/src/views/tms/requirement/ToolSharpeningList .vue b/src/views/tms/requirement/ToolSharpeningList .vue
index d864f8c..2dc5ab7 100644
--- a/src/views/tms/requirement/ToolSharpeningList .vue
+++ b/src/views/tms/requirement/ToolSharpeningList .vue
@@ -6,12 +6,12 @@
         <a-row :gutter="24">
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍒�鍏峰悕绉�">
-              <a-input placeholder="璇疯緭鍏ュ垁鍏峰悕绉�" v-model="queryParam.toolName"></a-input>
+              <j-input placeholder="璇疯緭鍏ュ垁鍏峰悕绉�" v-model="queryParam.toolName"></j-input>
             </a-form-item>
           </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍒冪(缁撴灉">
-              <a-input placeholder="璇疯緭鍏ュ垉纾ㄧ粨鏋�" v-model="queryParam.grindingResult"></a-input>
+              <j-input placeholder="璇疯緭鍏ュ垉纾ㄧ粨鏋�" v-model="queryParam.grindingResult"></j-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -79,7 +79,7 @@
       </a-table>
     </div>
 
-    <tools-sharpening-modal ref="modalForm" :treeSelected="treeSelected" @ok="modalFormOk"></tools-sharpening-modal>
+    <tools-sharpening-modal ref="modalForm"  @ok="modalFormOk"></tools-sharpening-modal>
   </a-card>
 </template>
 
@@ -115,48 +115,38 @@
         {
           title:'鍒�鍏峰垎绫�',
           align:"center",
-          dataIndex: 'warehouseId'
+          dataIndex: 'paramaTableName_dictText'
         },
         {
           title:'鍒�鍏风紪鍙�',
           align:"center",
-          dataIndex: 'warehouseName'
+          dataIndex: 'toolId'
         },
         {
           title:'鍒�鍏峰悕绉�',
           align:"center",
-          dataIndex: 'warehouseName'
-        },
-        {
-          title:'鍒�鍏锋潗鏂�',
-          align:"center",
-          dataIndex: 'parentWarehouseName',
-        },
-        {
-          title:'鍘傚',
-          align:"center",
-          dataIndex: 'status',
-        },
-        {
-          title:'闆朵欢鏉愭枡',
-          align:"center",
-          dataIndex: 'remark'
+          dataIndex: 'typeName'
         },
 
         {
+          title:'鍘傚',
+          align:"center",
+          dataIndex: 'supplierId',
+        },
+        {
           title:'鍒冪(鏃堕棿',
           align:"center",
-          dataIndex: 'createBy'
+          dataIndex: 'sharpeningTime'
         },
         {
           title:'鍒冪(缁撴灉鍙婂缓璁�',
           align:"center",
-          dataIndex: 'createBy'
+          dataIndex: 'sharpeningResult'
         },
         {
           title:'璐d换浜�',
           align:"center",
-          dataIndex: 'createBy'
+          dataIndex: 'responsiblePerson_dictText'
         },
 
         {
@@ -180,7 +170,8 @@
         }
       ],
       url: {
-        list: "/tms/toolSharpening/list",
+        list: "/tms/toolSharpening/listToolSharpening",
+        add: "/tms/toolSharpening/add",
         delete: "/tms/toolSharpening/delete",
         edit: "/tms/toolSharpening/edit",
         deleteBatch: "/tms/toolSharpening/deleteBatch",
@@ -190,104 +181,62 @@
       },
       dictOptions:{},
       superFieldList:[],
-      treeSelected: {},
+
     }
   },
-  created() {
-    this.getSuperFieldList();
-  },
+  created() {},
   computed: {
     importExcelUrl: function(){
       return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
     },
-    addFlag: function(){
-      return !(this.treeSelected.key && this.treeSelected.entity.leafFlag === '2');
-    }
   },
-  mounted() {
-    this.handleGetCurrSelected = (data) => {
-      this.treeSelected = data;
-      this.queryParam.parentId = data.key;
-      this.loadData();
-    }
-    this.$bus.$on('getCurrSelected', this.handleGetCurrSelected);
-  },
-  beforeDestroy() {
-    this.$bus.$off('getCurrSelected', this.handleGetCurrSelected);
-  },
+
   methods: {
-    handleStatus(record) {
-      getAction(this.url.list, { parentId: record.id }).then((res) => {
-        if (res.success) {
-          if (res.result.total > 0) {
-            this.$message.warning('璇ヨ妭鐐逛笅瀛樺湪瀛愯妭鐐癸紝涓嶈兘鍙樻洿鐘舵�侊紒')
-          } else {
-            const params = {
-              id: record.id,
-              status: record.status === '1' ? '2' : '1'
-            }
-            putAction(this.url.edit, params).then((res) => {
-              if (res.success) {
-                this.$message.success(res.message)
-                this.loadData()
-              } else {
-                this.$message.warning(res.message)
-              }
-            })
-          }
-        } else {
-          this.$message.warning(res.message);
-        }
-      });
+    onInspectionDateChange: function(value, dateString) {
+      this.queryParam.inspectionDateBegin = dateString[0]
+      this.queryParam.inspectionDateEnd = dateString[1]
+    },
+
+
+    handleEdit: function (record) {
+      console.log('record:', record)
+      this.$refs.modalForm.title = '缂栬緫'
+      this.$refs.modalForm.disableSubmit = false
+      this.$refs.modalForm.edit(record)
 
     },
-    handleDelete(id) {
-      getAction(this.url.list, { parentId: id }).then((res) => {
+    handleDetail:function(record){
+      this.$refs.modalForm.title="璇︽儏";
+      this.$refs.modalForm.disableSubmit = true;
+      this.$refs.modalForm.edit(record);
+    },
+
+
+    handleDelete: function (id) {
+      if (!this.url.delete) {
+        this.$message.error('璇疯缃畊rl.delete灞炴��!')
+        return
+      }
+      deleteAction(this.url.delete, { id: id }).then((res) => {
         if (res.success) {
-          if (res.result.total > 0) {
-            this.$message.warning('璇峰厛鍒犻櫎瀛愯妭鐐�');
-          } else {
-            deleteAction(this.url.delete, {id: id}).then((res) => {
-              if (res.success) {
-                //閲嶆柊璁$畻鍒嗛〉闂
-                this.loadData()
-                this.$message.success(res.message);
-                this.$bus.$emit('queryTreeData')
-              } else {
-                this.$message.warning(res.message);
-              }
-            });
-          }
+          //閲嶆柊璁$畻鍒嗛〉闂
+          this.reCalculatePage(1)
+          this.$message.success(res.message)
+          this.$refs.toolStockingBoundDetail.dataSource = []
+          this.loadData()
         } else {
-          this.$message.warning(res.message);
+          this.$message.warning(res.message)
         }
       })
     },
     searchReset() {
-      this.queryParam = {
-        parentId: this.treeSelected.key
-      }
       this.loadData(1)
     },
     modalFormOk() {
       this.loadData()
-      this.$bus.$emit('queryTreeData')
     },
-    initDictConfig(){
-    },
-    getSuperFieldList(){
-      let fieldList=[];
-      fieldList.push({type:'string',value:'toolId',text:'宸ュ叿缂栧彿',dictCode:''})
-      fieldList.push({type:'string',value:'warehouseName',text:'浠撳簱鍚嶇О',dictCode:''})
-      fieldList.push({type:'string',value:'parentId',text:'鐖惰妭鐐圭紪鍙�',dictCode:''})
-      fieldList.push({type:'string',value:'seq',text:'灞曠ず搴忓彿',dictCode:''})
-      fieldList.push({type:'string',value:'leafFlag',text:'鏄惁鍙跺瓙鑺傜偣(1鏄�;2鍚�)',dictCode:''})
-      fieldList.push({type:'string',value:'status',text:'鐘舵�侊紙1鍚敤;2鍋滅敤锛�',dictCode:''})
-      fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''})
-      fieldList.push({type:'string',value:'createBy',text:'鍒涘缓浜�',dictCode:''})
-      fieldList.push({type:'date',value:'createTime',text:'鍒涘缓鏃堕棿'})
-      this.superFieldList = fieldList
-    }
+
+
   }
 }
 </script>
diff --git a/src/views/tms/requirement/modules/ToolsModal.vue b/src/views/tms/requirement/modules/ToolsModal.vue
index e69de29..e053d46 100644
--- a/src/views/tms/requirement/modules/ToolsModal.vue
+++ b/src/views/tms/requirement/modules/ToolsModal.vue
@@ -0,0 +1,221 @@
+<template>
+  <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
+           cancelText="鍏抽棴">
+    <a-card :bordered="false">
+      <!-- 鏌ヨ鍖哄煙 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :md="7" :sm="7">
+              <a-form-item label="宸ュ叿缂栫爜">
+                <a-input placeholder="璇疯緭鍏ュ伐鍏风紪鐮佹绱�" v-model="queryParam.equipmentid"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="3" :sm="3">
+              <a-space>
+                <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+              </a-space>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <!-- table鍖哄煙-begin -->
+      <div>
+        <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+                 :dataSource="dataSource" :pagination="ipagination" :loading="loading"
+                 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
+                 @change="handleTableChange">
+        </a-table>
+      </div>
+      <!-- table鍖哄煙-end -->
+    </a-card>
+  </a-modal>
+</template>
+
+<script>
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+import { getAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JInput from '@/components/jeecg/JInput'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import Tooltip from 'ant-design-vue/es/tooltip'
+import JDate from '@/components/jeecg/JDate'
+import { filterObj } from '@/utils/util'
+
+export default {
+  name: 'ToolsModal',
+  mixins: [JeecgListMixin],
+  components: {
+    JDictSelectTag,
+    JEllipsis,
+    JInput,
+    Tooltip,
+    JDate
+  },
+  props: {
+    status: {
+      type: Number,
+      default: 1
+    }
+  },
+  data() {
+    return {
+      disableSubmit:false,
+      title: '',
+      visible: false,
+      disableMixinCreated: true,
+      queryParam: {},
+      columns: [{
+        title: '宸ュ叿缂栫爜',
+        align: 'center',
+        dataIndex: 'toolCode'
+      },
+        {
+          title: '宸ュ叿绫诲瀷',
+          align: 'center',
+          dataIndex: 'applicationType_dictText'
+        },
+        {
+          title: '宸ュ叿缂栧彿',
+          align: 'center',
+          dataIndex: 'toolId'
+        },
+        {
+          title: '涓枃鍚嶇О',
+          align: 'center',
+          dataIndex: 'chineseName'
+        },
+        {
+          title: '宸ュ叿鍙傛暟鏍囪瘑',
+          align: 'center',
+          dataIndex: 'paramaTableName'
+        },
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          align: 'center',
+          dataIndex: 'toolModel'
+        },
+        {
+          title: '涓昏閲忓崟浣�',
+          align: 'center',
+          dataIndex: 'mainUnit'
+        }
+      ],
+      url: {
+        list: '/tms/baseTools/listWithSharpedAndConfig'
+      }
+
+    }
+  },
+  created() {
+
+  },
+  methods: {
+    showModals() {
+      this.selectedRowKeys = []
+      this.visible = true
+      this.loadData(1)
+    },
+    getQueryParams() {
+      //鑾峰彇鏌ヨ鏉′欢
+      let sqp = {}
+      if (this.superQueryParams) {
+        sqp['superQueryParams'] = encodeURI(this.superQueryParams)
+        sqp['superQueryMatchType'] = this.superQueryMatchType
+      }
+      var param = Object.assign(sqp, this.queryParam)
+      // param.field = this.getQueryField();
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error('璇疯缃畊rl.list灞炴��!')
+        return
+      }
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      var params = this.getQueryParams()//鏌ヨ鏉′欢
+
+      if (!params) {
+        return false
+      }
+
+      this.loading = true
+      getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+
+          this.dataSource = res.result.records || res.result
+          if (res.result.total) {
+            this.ipagination.total = res.result.total
+          } else {
+            this.ipagination.total = 0
+          }
+
+        } else {
+          // this.$message.warning(res.message)
+          this.$notification.warning({
+            message: '娑堟伅',
+            description: res.message
+          })
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    getQueryField() {
+      //TODO 瀛楁鏉冮檺鎺у埗
+      // var str = "";
+      // this.columns.forEach(function (value) {
+      //   str +=  value.dataIndex +"," ;
+      // });
+      // return str;
+    },
+    modalFormOk(val) {
+      // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
+      this.loadData()
+      this.selectedRowKeys = [val.id]
+    },
+    searchQuery() {
+      this.loadData()
+      this.onClearSelected()
+    },
+    searchReset() {
+      this.queryParam = {}
+      this.loadData()
+      this.onClearSelected()
+    },
+    close() {
+      this.$emit('close')
+      this.visible = false
+    },
+    handleCancel() {
+      this.close()
+    },
+    handleOk() {
+      this.$bus.$emit('selectionRows', this.selectionRows)
+      this.close()
+    },
+  }
+}
+</script>
+<style>
+@import '~@assets/less/common.less';
+
+.frozenRowClass {
+  color: #c9c9c9;
+}
+
+.success {
+  color: green;
+}
+
+.error {
+  color: red;
+}
+</style>
diff --git a/src/views/tms/requirement/modules/ToolsSharpeningModal.vue b/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
index 37c0fb8..9a903d0 100644
--- a/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
+++ b/src/views/tms/requirement/modules/ToolsSharpeningModal.vue
@@ -2,10 +2,10 @@
   <j-modal
     :title="title"
     :width="1200"
-    :visible="visible"
     :confirmLoading="confirmLoading"
     switchFullscreen
     centered
+    :visible="visible"
     :mask-closable="false"
     @ok="handleOk"
     @cancel="handleCancel"
@@ -14,113 +14,122 @@
     <a-spin :spinning="spinning">
       <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
         <a-row :gutter="24">
-          <a-col :span="8">
+          <a-col :span="12">
             <a-form-model-item prop="standardCode" label="宸ュ叿缂栧彿">
-              <a-input-search v-model="model.toolsId"  placeholder="璇烽�夋嫨宸ュ叿缂栧彿"  :disabled="disableSubmit" @search="onSearchPart" enter-button
+              <a-input-search v-model="model.toolId" placeholder="璇烽�夋嫨宸ュ叿缂栧彿" :disabled="disableSubmit"
+                              @search="selectTools" enter-button
               />
             </a-form-model-item>
           </a-col>
-          <a-col :span="10">
-            <a-form-model-item prop="equipmentId" label="宸ュ叿鍒嗙被鍚嶇О">
-              <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.typeName" readOnly/>
+          <a-col :span="12">
+            <a-form-model-item prop="classify_id" label="宸ュ叿鍒嗙被缂栫爜">
+              <a-input placeholder="璇疯緭鍏ュ伐鍏峰垎绫诲悕绉�" v-model="model.classifyId" readOnly :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
 
         </a-row>
         <a-row :gutter="24">
-          <a-col :span="8">
-            <a-form-model-item prop="standardCode" label="宸ュ叿鍙傛暟鏍囪瘑">
-              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" readOnly v-model="model.paraTypeFlagName" readOnly/>
+          <a-col :span="12">
+            <a-form-model-item prop="paramaTableName" label="宸ュ叿鍙傛暟鏍囪瘑">
+              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" readOnly v-model="model.paramaTableName" readOnly
+                       :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
+          <a-col :span="12">
             <a-form-model-item label="宸ュ叿绫诲瀷">
-              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.applicationType" readOnly/>
+              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.applicationType" readOnly
+                       :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
 
         <a-row :gutter="24">
-          <a-col :span="8">
+          <a-col :span="12">
             <a-form-model-item prop="operator" label="璐d换浜�">
-              <j-dict-select-tag type="list" v-model="model.reportPerson" dictCode="sys_user,realname,id" placeholder="璇烽�夋嫨鎶ュ伐浜哄憳" />
+              <j-dict-select-tag type="list" v-model="model.responsiblePerson" dictCode="sys_user,realname,id"
+                                 placeholder="璇烽�夋嫨璐d换浜�" :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
-            <a-form-model-item prop="standardName" label="宸ュ叿鍒嗙被缂栫爜">
-              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" readOnly v-model="model.classifyId" readOnly/>
+          <a-col :span="12">
+            <a-form-model-item label="鍒冪(鏃堕棿" prop="sharpeningTime">
+              <j-date placeholder="璇烽�夋嫨鍒冪(鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.sharpeningTime"
+                      style="width: 100%" :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
 
         <a-row :gutter="24">
-          <a-col :span="8">
-            <a-form-model-item label="缁撴灉鍙婂缓璁�" prop="inspectionDate">
-              <a-input placeholder="閫夋嫨濉啓鍒冪(缁撴灉鍙婂缓璁�"  v-model="model.sharpeningResult" readOnly/>
+          <a-col :span="12">
+            <a-form-model-item label="鍒冪(缁撴灉鍙婂缓璁�" prop="sharpeningResult">
+              <a-textarea placeholder="閫夋嫨濉啓鍒冪(缁撴灉鍙婂缓璁�" v-model="model.sharpeningResult"
+                          :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="6">
+          <a-col :span="12">
             <a-form-model-item label="鍨嬪彿/鍥惧彿">
-              <j-date placeholder="閫夋嫨濉啓鍨嬪彿/鍥惧彿" v-model="model.toolModel" disabled style="width: 100%"/>
+              <a-input placeholder="閫夋嫨濉啓鍨嬪彿/鍥惧彿" v-model="model.toolModel" :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
         <a-row :gutter="24">
-          <a-col :span="8">
+          <a-col :span="12">
             <a-form-model-item label="浠撳簱鍩庡競" prop="inspectionDate">
-              <a-input placeholder="閫夋嫨濉啓浠撳簱鐪佷唤鍩庡競"  v-model="model.provinceCity" readOnly/>
+              <a-input placeholder="閫夋嫨濉啓浠撳簱鐪佷唤鍩庡競" v-model="model.provinceCity" readOnly
+                       :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="8">
+          <a-col :span="12">
             <a-form-model-item label="搴撳尯/搴撳彿">
-              <j-date placeholder="閫夋嫨濉啓搴撳尯/搴撳彿" v-model="model.warehouseId" disabled style="width: 100%"/>
+              <a-input placeholder="閫夋嫨濉啓搴撳尯/搴撳彿" v-model="model.warehouseId" readOnly :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
         <a-row :gutter="24">
-          <a-col :span="8">
-            <a-form-model-item label="瀛樺偍浣嶇疆" prop="inspectionDate">
-              <a-input placeholder="閫夋嫨濉啓瀛樺偍浣嶇疆"  v-model="model.storageLocation" readOnly/>
+          <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="8">
+          <a-col :span="12">
             <a-form-model-item label="璁¢噺涓诲崟浣�">
-              <j-date placeholder="璇峰~鍐欒閲忎富鍗曚綅" v-model="model.mainUnit" disabled style="width: 100%"/>
+              <a-input placeholder="璇峰~鍐欒閲忎富鍗曚綅" v-model="model.mainUnit" readOnly :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
-        <a-row :gutter="24">
-          <a-col :span="8">
-            <a-form-model-item label="鍒冪(鏃堕棿" prop="inspectionDate">
-              <j-date placeholder="璇烽�夋嫨鎵撳嵃鏃堕棿" v-model="model.sharpeningTime"  style="width: 100%" />
-            </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-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�"/>
+              <a-textarea v-model="model.remark" rows="3" placeholder="璇疯緭鍏ュ娉�" :disabled="disableSubmit" />
             </a-form-model-item>
           </a-col>
         </a-row>
       </a-form-model>
     </a-spin>
+    <template slot="footer">
+      <a-button :style="{ marginRight: '8px' }" @click="handleCancel()">
+        鍏抽棴
+      </a-button>
+
+      <a-button @click="handleOk()" :disabled="disableSubmit" type="primary" :loading="confirmLoading">纭畾</a-button>
+    </template>
+    <tools-modal ref="toolListModel"></tools-modal>
+
+
   </j-modal>
 </template>
 
 <script>
-import { getAction, httpAction } from '@/api/manage'
+import { getAction, httpAction, postAction, requestPut } from '@/api/manage'
 import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
-import { JVXETypes } from '@/components/jeecg/JVxeTable'
-import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect'
-import moment from 'dayjs'
+import ToolsModal from '@views/tms/requirement/modules/ToolsModal.vue'
 
 export default {
   name: 'ToolsSharpeningModal',
   mixins: [JVxeTableModelMixin],
   components: {
-    MaintenanceEquipmentSelect
+    ToolsModal
   },
   data() {
     return {
@@ -138,123 +147,99 @@
       confirmLoading: false,
       spinning: false,
       disabled: false,
+      disableSubmit: false,
       validatorRules: {
-        // standardName: [
-        //   { required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�!' }
-        // ],
-        inspectionDate: [
-          { required: true, message: '璇烽�夋嫨鐐规鏃ユ湡!' }
+
+        sharpeningTime: [
+          { required: true, message: '璇烽�夋嫨鍒冪(鏃ユ湡!' }
         ],
-        // maintenancePeriod: [
-        //   { required: true, message: '璇疯緭鍏ヤ繚鍏诲懆鏈燂紝鍗曚綅锛氬ぉ!' }
-        // ],
-        equipmentId: [
-          { required: true, message: '璇烽�夋嫨璁惧!' }
+        responsibleRerson: [
+          { required: true, message: '璇烽�夋嫨璐d换浜�!' }
+        ],
+        sharpeningResult: [
+          { required: true, message: '璇疯緭鍏ュ垉纾ㄧ粨鏋滃強寤鸿!' }
+        ],
+        responsiblePerson: [
+          { required: true, message: '璇烽�夋嫨璐d换浜�!' }
         ]
+
       },
       url: {
-        add: '/eam/eamInspectionOrder/add',
-        edit: '/eam/eamInspectionOrder/edit',
-        detail: '/eam/eamMaintenanceStandardDetail/queryList',
-        detailOrder: '/eam/eamInspectionOrderDetail/queryList',
-        userSelect: '/eam/user_select/list'
-      },
-      maintenanceCategory: 'POINT_INSPECTION',
-      maintenanceOperatorOptions: [],
-      standardId: '',
-      standardType: false,
-      detail: {
-        loading: false,
-        dataSource: [],
-        columns: [
-          {
-            title: '搴忓彿',
-            key: 'itemCode',
-            type: JVXETypes.inputNumber,
-            width: '10%',
-            align: 'center',
-            validateRules: [
-              { required: true, unique: true, message: '搴忓彿涓嶈兘閲嶅' }
-            ]
-          },
-          {
-            title: '淇濆吇椤�',
-            key: 'itemName',
-            type: JVXETypes.textarea,
-            width: '20%',
-            align: 'center',
-            validateRules: [
-              { required: true, message: '淇濆吇椤逛笉鑳戒负绌猴紒' }
-            ]
-          },
-          {
-            title: '淇濆吇瑕佹眰',
-            key: 'itemDemand',
-            type: JVXETypes.textarea,
-            width: '30%',
-            align: 'center',
-            validateRules: [
-              { required: true, message: '淇濆吇瑕佹眰涓嶈兘涓虹┖锛�' }
-            ]
-          }
-        ]
+        add: '/tms/toolSharpening/add',
+        edit: '/tms/toolSharpening/edit',
+        queryDetailList: '/tms/toolSharpening/listToolSharpening'
       }
     }
   },
   created() {
   },
+  mounted() {
+    this.$bus.$on('selectionRows', (data) => {
+      console.log('selectionRows', data)
+      if (data && data.length > 0) {
+        const item = data[0]
+        // 浣跨敤 $set 纭繚 model 鐨勫睘鎬ф槸鍝嶅簲寮忕殑
+        this.$set(this.model, 'toolId', item.toolCode)
+        this.$set(this.model, 'toolCode', item.id)
+        this.$set(this.model, 'classifyId', item.classifyId)
+        this.$set(this.model, 'paramaTableName', item.paramaTableName_dictText)
+        this.$set(this.model, 'applicationType', item.applicationType_dictText)
+        this.$set(this.model, 'toolModel', item.toolModel)
+        this.$set(this.model, 'provinceCity', item.provinceCity)
+        this.$set(this.model, 'warehouseId', item.warehouseId)
+        this.$set(this.model, 'positionCode', item.positionCode)
+        this.$set(this.model, 'mainUnit', item.mainUnit)
+      }
+    })
+
+  },
   methods: {
+
+    selectTools: function() {
+      this.$refs.toolListModel.showModals()
+      this.$refs.toolListModel.title = '閫夋嫨宸ュ叿淇℃伅'
+      this.$refs.toolListModel.disableSubmit = false
+    },
+
     add() {
-      this.model = {}
-      this.detail.dataSource = []
-      this.visible = true
-      this.disabled = false
-      this.standardType = false
+      this.addShow = false
+      this.edit()
     },
 
     edit(record) {
+      console.log(record)
       this.model = Object.assign({}, record)
-      this.standardId = record.standardId
-      this.disabled = true
-      this.standardType = true
       this.visible = true
-      this.detail.dataSource = []
-      if (record && record.referenceFile) {
-        let obj = JSON.parse(record.referenceFile)
-        this.model.fileList = [obj]
-      } else {
-        this.model.fieldList = []
-      }
-      this.loadDetailOrder(record.id)
+      getAction(this.url.queryDetailList, {
+        id: record.id,
+        pageNo: 1,
+        pageSize: 99999
+      }).then((res) => {
+        if (res.success) {
+          console.log(res.result.records)
+          this.dataSource = res.result.records
+        } else {
+          this.dataSource = null
+        }
+      })
     },
-
-    async handleOk() {
+    handleOk() {
       const that = this
-      let errMap = await that.$refs.editableDetailTable.validateTable()
-      if (errMap) {
-        this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�')
-        return
-      }
-      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.confirmLoading = true
+
+      // 鉁� 瑙﹀彂琛ㄥ崟楠岃瘉
       this.$refs.form.validate(valid => {
         if (valid) {
-          let tableData = that.$refs.editableDetailTable.getTableData()
-          let removeData = that.$refs.editableDetailTable.getDeleteData()
-          that.model.tableDetailList = [...tableData]
-          that.model.removeDetailList = [...removeData]
+          let formData = Object.assign(this.model)
 
-          that.confirmLoading = that.spinning = true
-          let httpurl = ''
-          let method = ''
+          let obj
           if (!this.model.id) {
-            httpurl += this.url.add
-            method = 'post'
+            obj = postAction(this.url.add, formData)
           } else {
-            httpurl += this.url.edit
-            method = 'put'
+            obj = requestPut(this.url.edit, formData, { id: this.model.id })
           }
-          this.model.standardId = this.standardId
-          httpAction(httpurl, this.model, method).then((res) => {
+
+          obj.then((res) => {
             if (res.success) {
               that.$message.success(res.message)
               that.$emit('ok')
@@ -263,108 +248,14 @@
               that.$message.warning(res.message)
             }
           }).finally(() => {
-            that.confirmLoading = that.spinning = false
+            that.confirmLoading = false
           })
         } else {
+          that.$message.warning('璇峰~鍐欏繀濉瓧娈�')
+          that.confirmLoading = false
           return false
         }
       })
-    },
-    onSearchPart() {
-      this.$refs.PartPopUp.showModals([this.model.enterpriseId])
-    },
-
-    autocompleteForm(selectObj) {
-      this.model.standardName = selectObj.standardName
-      this.model.maintenancePeriod = selectObj.maintenancePeriod
-      this.model.standardCode = selectObj.standardCode
-      // 鑻ュ彇娑堣澶囬�夋嫨鍚庝繚鍏诲懆鏈熶负绌哄垯闇�娓呯┖鐐规鏃ユ湡鍜岀偣妫�杩囨湡鏃堕棿
-      if (!this.model.equipmentId) {
-        delete this.model.inspectionDate
-        delete this.model.expirationTime
-      } else {
-        // 濡傛灉鐐规鏃ユ湡瀛樺湪锛屽垯鍦ㄩ噸鏂伴�夋嫨璁惧鍚庡嵆淇濆吇鍛ㄦ湡鍙兘鍙戠敓鏀瑰彉鍚庨噸鏂拌绠楄繃鏈熸椂闂�
-        if (this.model.inspectionDate) this.expirationTimeFrom(this.model.inspectionDate)
-      }
-      if (!this.standardType) {
-        console.log('this.standardType', this.standardType)
-        this.standardId = selectObj.id
-        this.loadDetail(selectObj.id)
-      }
-      this.$nextTick(() => this.loadMaintenanceOperatorList(this.model.equipmentId))
-    },
-
-    expirationTimeFrom(date) {
-      //杩囨湡鏃堕棿鏄垵濮嬫椂闂�+淇濆吇鍛ㄦ湡
-      if (date && this.model.maintenancePeriod) {
-        // 杞崲涓烘椂闂存埑瀛楃涓诧紙鎴栨寚瀹氭牸寮忥級
-        this.model.expirationTime = moment(date)
-          .add(this.model.maintenancePeriod, 'days')
-          .format('YYYY-MM-DD')
-      } else {
-        this.model.expirationTime = null // 娓呯┖鏃犳晥鍊�
-      }
-    },
-
-    //鍔犺浇璇︽儏鏁版嵁
-    loadDetail(standardId) {
-      this.detail.dataSource = []
-      if (standardId) {
-        console.log('standardId', standardId)
-        this.spinning = true
-        getAction(this.url.detail, { standardId: standardId })
-          .then(res => {
-            if (res.success) {
-              this.detail.dataSource = [...res.result]
-            }
-          })
-          .finally(() => {
-            this.spinning = false
-          })
-      }
-    },
-
-    loadDetailOrder(orderId) {
-      if (orderId) {
-        this.spinning = true
-        getAction(this.url.detailOrder, { orderId: orderId })
-          .then(res => {
-            if (res.success) {
-              this.detail.dataSource = [...res.result]
-            }
-          })
-          .finally(() => {
-            this.spinning = false
-          })
-      }
-    },
-
-    loadMaintenanceOperatorList(equipmentId) {
-      this.maintenanceOperatorOptions = []
-      let params = { positionCode: 'PCR0001' }
-      if (equipmentId) {
-        params.equipmentId = equipmentId
-      } else {
-        delete this.model.operator
-        return
-      }
-      const that = this
-      getAction(this.url.userSelect, params)
-        .then(res => {
-          if (res.success) {
-            that.maintenanceOperatorOptions = res.result.map(item => ({
-              key: item.id,
-              value: item.username,
-              text: item.realname
-            }))
-            if (!that.maintenanceOperatorOptions.find(item => item.value === that.model.operator)) delete that.model.operator
-          } else {
-            if (that.model.operator) delete that.model.operator
-          }
-        })
-        .catch(err => {
-          if (that.model.operator) delete that.model.operator
-        })
     },
 
     handleCancel() {
diff --git a/src/views/tms/stocktakingBound/ToolsStocktaKingBoundDetail.vue b/src/views/tms/stocktakingBound/ToolsStocktaKingBoundDetail.vue
index 692fd9e..b6acfa5 100644
--- a/src/views/tms/stocktakingBound/ToolsStocktaKingBoundDetail.vue
+++ b/src/views/tms/stocktakingBound/ToolsStocktaKingBoundDetail.vue
@@ -38,7 +38,6 @@
         if (!this.mainId) {
           this.clearList()
         } else {
-          alert(val)
           this.queryParam['stocktakingBoundId'] = val;
           this.queryParam['delFlag'] = 0;
           this.loadData(1);
diff --git a/src/views/tms/stocktakingBound/ToolsStocktakingBoundList.vue b/src/views/tms/stocktakingBound/ToolsStocktakingBoundList.vue
index 28d161a..b4e6153 100644
--- a/src/views/tms/stocktakingBound/ToolsStocktakingBoundList.vue
+++ b/src/views/tms/stocktakingBound/ToolsStocktakingBoundList.vue
@@ -6,7 +6,7 @@
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="鐩樼偣鍗曞彿">
-              <a-input placeholder="璇疯緭鍏ョ洏鐐瑰崟鍙�" v-model="queryParam.orderCode"></a-input>
+              <j-input placeholder="璇疯緭鍏ョ洏鐐瑰崟鍙�" v-model="queryParam.orderCode"></j-input>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -260,6 +260,7 @@
       handleSubmit(record) {
         getAction(this.url.submit,{ id: record.id }).then((res)=>{
           if (res.success) {
+
             this.$message.success(res.message);
             this.loadData();
             this.$refs.toolStockingBoundDetail.clearList()

--
Gitblit v1.9.3