From d9aab92fa25860c6682debe50e10770dc7db42a0 Mon Sep 17 00:00:00 2001
From: cuikaidong <ckd2942379034@163.com>
Date: 星期四, 14 八月 2025 12:44:33 +0800
Subject: [PATCH] 组合刀模块增加

---
 src/views/tms/combinationKnife/ToolCombinationDetailList.vue          |  180 +++++++
 src/views/tms/combinationKnife/modules/JSelectToolingModal.vue        |  275 +++++++++++
 src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue |   18 
 src/views/tms/combinationKnife/modules/InboundOrderModel.vue          |  463 ++++++++++++++++++++
 src/views/tms/combinationKnife/ToolCombinationList.vue                |  266 +++++++++++
 src/views/tms/combinationKnife/modules/ToolCombinationDetailModal.vue |  133 +++++
 6 files changed, 1,320 insertions(+), 15 deletions(-)

diff --git a/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue b/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue
index 7bde367..d0a7a7f 100644
--- a/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue
+++ b/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue
@@ -52,7 +52,7 @@
             </a-form-model-item>
           </a-col>
         </a-row>
-        <div v-if="confirmDisable">
+        <div v-if="approvalDisable">
           <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍛樺鎵�
           </a-divider>
           <a-row :gutter="24">
@@ -64,7 +64,7 @@
             </a-col>
             <a-col :span="12">
               <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalComment" label="纭鎰忚">
-                <a-textarea placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" v-model="model.confirmComment"
+                <a-textarea placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" v-model="model.approvalComment"
                             :disabled="disableSubmit || returnDisable" />
               </a-form-model-item>
             </a-col>
@@ -83,19 +83,7 @@
 <!--            </a-col>-->
 <!--          </a-row>-->
 <!--        </div>-->
-        <div v-if="confirmDisable">
-          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍛樼‘璁�
-          </a-divider>
-          <a-row :gutter="24">
-            <a-col :span="24">
-              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment"
-                                 label="纭鎰忚">
-                <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment"
-                            :disabled="disableSubmit || completionDisable" />
-              </a-form-model-item>
-            </a-col>
-          </a-row>
-        </div>
+
       </a-form-model>
     </a-spin>
   </j-modal>
diff --git a/src/views/tms/combinationKnife/ToolCombinationDetailList.vue b/src/views/tms/combinationKnife/ToolCombinationDetailList.vue
new file mode 100644
index 0000000..7e02a62
--- /dev/null
+++ b/src/views/tms/combinationKnife/ToolCombinationDetailList.vue
@@ -0,0 +1,180 @@
+<template>
+  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            涓嬭浇
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">缂栬緫</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+            <a>鍒犻櫎</a>
+          </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+
+    <toolCombinationDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></toolCombinationDetail-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ToolCombinationDetailModal from './modules/ToolCombinationDetailModal'
+
+  export default {
+    name: "ToolCombinationDetailList",
+    mixins:[JeecgListMixin],
+    components: { ToolCombinationDetailModal },
+    props:{
+      mainId:{
+        type:String,
+        default:'',
+        required:false
+      }
+    },
+    watch:{
+      mainId:{
+        immediate: true,
+        handler(val) {
+          if(!this.mainId){
+            this.clearList()
+          }else{
+            this.queryParam['combinationId'] = val
+            this.loadData(1);
+          }
+        }
+      }
+    },
+    data () {
+      return {
+        description: '缁勫悎鍒�璁板綍涓昏〃绠$悊椤甸潰',
+        disableMixinCreated:true,
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'鍒�鏌勫彿',
+            align:"center",
+            dataIndex: 'hiltCode'
+          },
+          {
+            title: '宸ュ叿绫诲瀷',
+            align: 'center',
+            dataIndex: 'applicationType_dictText'
+          },
+          // {
+          //   title: '宸ュ叿缂栧彿',
+          //   align: 'center',
+          //   dataIndex: 'toolId'
+          // },
+          {
+            title: '涓枃鍚嶇О',
+            align: 'center',
+            dataIndex: 'chineseName'
+          },
+          {
+            title: '宸ュ叿鍙傛暟鏍囪瘑',
+            align: 'center',
+            dataIndex: 'paramaTableName_dictText'
+          },
+          {
+            title: '鍨嬪彿/鍥惧彿',
+            align: 'center',
+            dataIndex: 'toolModel'
+          },
+          {
+            title: '鍒嗙被鍚嶇О',
+            align: 'center',
+            dataIndex: 'typeName'
+          },
+          // {
+          //   title: '鎿嶄綔',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' },
+          // }
+        ],
+        url: {
+          list: "/tms/toolCombination/listToolCombinationDetailByMainId",
+          delete: "/tms/toolCombination/deleteToolCombinationDetail",
+          deleteBatch: "/tms/toolCombination/deleteBatchToolCombinationDetail",
+          exportXlsUrl: "/tms/toolCombination/exportToolCombinationDetail",
+          importUrl: "/tms/toolCombination/importToolCombinationDetail",
+        },
+        dictOptions:{
+         status:[],
+        }
+      }
+    },
+    created() {
+    },
+    computed: {
+      importExcelUrl(){
+        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
+      }
+    },
+    methods: {
+      clearList(){
+        this.dataSource=[]
+        this.selectedRowKeys=[]
+        this.ipagination.current = 1
+      }
+
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>
diff --git a/src/views/tms/combinationKnife/ToolCombinationList.vue b/src/views/tms/combinationKnife/ToolCombinationList.vue
new file mode 100644
index 0000000..439b967
--- /dev/null
+++ b/src/views/tms/combinationKnife/ToolCombinationList.vue
@@ -0,0 +1,266 @@
+<template>
+  <a-card :bordered='false'>
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class='table-page-search-wrapper'>
+      <a-form layout='inline' @keyup.enter.native='searchQuery'>
+        <a-row :gutter='24'>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <a-form-item label='鍒�鏌勫彿'>
+              <a-input v-model='queryParam.hiltCode' placeholder='璇疯緭鍏ュ垁鏌勫彿'></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <a-form-item label='鐘舵��'>
+              <j-dict-select-tag v-model='queryParam.status' dictCode='combined_knife_state' placeholder='璇烽�夋嫨鐘舵��' />
+            </a-form-item>
+          </a-col>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <span class='table-page-search-submitButtons' style='float: left;overflow: hidden;'>
+              <a-button icon='search' type='primary' @click='searchQuery'>鏌ヨ</a-button>
+              <a-button icon='reload' style='margin-left: 8px' type='primary' @click='searchReset'>閲嶇疆</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class='table-operator'>
+      <a-button icon='plus' type='primary' @click='handleAdd'>鍒�鍏风粍瑁�</a-button>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+      <a-table
+        ref='table'
+        :columns='columns'
+        :customRow='clickThenSelect'
+        :dataSource='dataSource'
+        :loading='loading'
+        :pagination='ipagination'
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
+        :scroll='{x:true}'
+        bordered
+        class='j-table-force-nowrap'
+        rowKey='id'
+        size='middle'
+        @change='handleTableChange'>
+
+        <template slot='htmlSlot' slot-scope='text'>
+          <div v-html='text'></div>
+        </template>
+        <template slot='imgSlot' slot-scope='text,record'>
+          <span v-if='!text' style='font-size: 12px;font-style: italic;'>鏃犲浘鐗�</span>
+          <img v-else :preview='record.id' :src='getImgView(text)' alt='' height='25px'
+               style='max-width:80px;font-size: 12px;font-style: italic;' />
+        </template>
+        <template slot='fileSlot' slot-scope='text'>
+          <span v-if='!text' style='font-size: 12px;font-style: italic;'>鏃犳枃浠�</span>
+          <a-button
+            v-else
+            :ghost='true'
+            icon='download'
+            size='small'
+            type='primary'
+            @click='downloadFile(text)'>
+            涓嬭浇
+          </a-button>
+        </template>
+
+        <span slot='action' slot-scope='text, record'>
+              <a-popconfirm title='纭畾鎷嗗嵏鍚�?' @confirm='() => handleDelete(record.id)'>
+                  <a>鍒�鍏锋媶鍗�</a>
+                </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+
+    <a-tabs defaultActiveKey='1'>
+      <a-tab-pane key='1' tab='缁勫悎鍒�璁板綍'>
+        <ToolCombinationDetailList :mainId='toolCombinationDetailMainId' />
+      </a-tab-pane>
+    </a-tabs>
+
+<!--    <toolCombination-modal ref='modalForm' @ok='modalFormOk'></toolCombination-modal>-->
+    <inbound-order-model ref="modalForm" @ok="modalFormOk"></inbound-order-model>
+  </a-card>
+</template>
+
+<script>
+
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import InboundOrderModel from './modules/InboundOrderModel'
+// import ToolCombinationModal from './modules/ToolCombinationModal'
+import { getAction } from '@/api/manage'
+import ToolCombinationDetailList from './ToolCombinationDetailList'
+import '@/assets/less/TableExpand.less'
+
+export default {
+  name: 'ToolCombinationList',
+  mixins: [JeecgListMixin],
+  components: {
+    InboundOrderModel,
+    ToolCombinationDetailList,
+    // ToolCombinationModal
+  },
+  data() {
+    return {
+      description: '缁勫悎鍒�璁板綍涓昏〃绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '鍒�鏌勫彿',
+          align: 'center',
+          dataIndex: 'hiltCode'
+        },
+        {
+          title: '鐘舵��',
+          align: 'center',
+          dataIndex: 'status_dictText'
+        },
+        {
+          title: '缁勮浜�',
+          align: 'center',
+          dataIndex: 'bindPerson'
+        },
+        {
+          title: '缁勮鏃堕棿',
+          align: 'center',
+          dataIndex: 'bindDate',
+          customRender: function(text) {
+            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
+          }
+        },
+        {
+          title: '鎷嗗嵏浜�',
+          align: 'center',
+          dataIndex: 'disassemblePerson'
+        },
+        {
+          title: '鎷嗗嵏鏃堕棿',
+          align: 'center',
+          dataIndex: 'disassembleDate',
+          customRender: function(text) {
+            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
+          }
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          fixed: 'right',
+          width: 147,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/tms/toolCombination/list',
+        delete: '/tms/toolCombination/delete',
+        deleteBatch: '/tms/toolCombination/deleteBatch',
+        exportXlsUrl: '/tms/toolCombination/exportXls',
+        importExcelUrl: 'tms/toolCombination/importExcel'
+      },
+      dictOptions: {
+        status: []
+      },
+      /* 鍒嗛〉鍙傛暟 */
+      ipagination: {
+        current: 1,
+        pageSize: 5,
+        pageSizeOptions: ['5', '10', '50'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      selectedMainId: '',
+      superFieldList: [],
+      toolCombinationDetailMainId: ''
+    }
+  },
+  created() {
+    this.getSuperFieldList()
+  },
+  computed: {
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    }
+  },
+  methods: {
+    initDictConfig() {
+    },
+    clickThenSelect(record) {
+      return {
+        on: {
+          click: () => {
+            this.onSelectChange(record.id.split(','), [record])
+          }
+        }
+      }
+    },
+    onClearSelected() {
+      this.selectedRowKeys = []
+      this.selectionRows = []
+      this.selectedMainId = ''
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      this.selectedMainId = selectedRowKeys[0]
+      this.selectedRowKeys = selectedRowKeys
+      this.selectionRows = selectionRows
+      this.toolCombinationDetailMainId = selectionRows[0]['id']
+    },
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error('璇疯缃畊rl.list灞炴��!')
+        return
+      }
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      this.onClearSelected()
+      var params = this.getQueryParams()//鏌ヨ鏉′欢
+      this.loading = true
+      getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total
+          // 瀛愯〃淇℃伅灞曠ず
+          if (this.dataSource.length !== 0) {
+            // 鍒锋柊瀛愯〃鏍�
+            this.selectedMainId = this.dataSource[0].id
+            this.selectedRowKeys.push(this.dataSource[0].id);
+            this.selectionRows = this.dataSource[0]
+            this.toolCombinationDetailMainId = this.dataSource[0].id
+          } else {
+            // 鍒锋柊瀛愯〃鏍�
+            this.toolCombinationDetailMainId = ''
+          }
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false
+      })
+    },
+    getSuperFieldList() {
+      let fieldList = []
+      fieldList.push({ type: 'string', value: 'id', text: '涓婚敭', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'hiltCode', text: '鍒�鏌勫彿', dictCode: '' })
+      fieldList.push({ type: 'string', value: 'status', text: '鐘舵��', dictCode: 'combined_knife_state' })
+      fieldList.push({ type: 'string', value: 'bindPerson', text: '缁勮浜�', dictCode: '' })
+      fieldList.push({ type: 'date', value: 'bindDate', text: '缁勮鏃堕棿' })
+      fieldList.push({ type: 'string', value: 'disassemblePerson', text: '鎷嗗嵏浜�', dictCode: '' })
+      fieldList.push({ type: 'date', value: 'disassembleDate', text: '鎷嗗嵏鏃堕棿' })
+      this.superFieldList = fieldList
+    }
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less'
+</style>
\ No newline at end of file
diff --git a/src/views/tms/combinationKnife/modules/InboundOrderModel.vue b/src/views/tms/combinationKnife/modules/InboundOrderModel.vue
new file mode 100644
index 0000000..36ab2f1
--- /dev/null
+++ b/src/views/tms/combinationKnife/modules/InboundOrderModel.vue
@@ -0,0 +1,463 @@
+<template>
+  <a-modal
+    :title="title"
+    :visible="visible"
+    :fullScreen="true"
+    :width="1200"
+    @ok="handleOk"
+    @cancel="handleCancel"
+  >
+    <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTooling()" >閫夋嫨宸ュ叿</a-button>
+    <a-table
+      ref="table"
+      bordered
+      size="middle"
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+       @change="handleTableChange"
+    >
+      <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index">
+        <div :key="col.dataIndex">
+          <a-input-number
+            v-if="col.dataIndex == 'inStorageQuantity'"
+            :disabled="record.accuracyClass == '1'"
+            :value="text"
+            @change="(e) => handleChange(e, record.key, col, index)"
+            :min="1"
+          />
+          <a-select
+            v-if="col.dataIndex == 'goodsShelvesId'"
+            :disabled="disableSubmit"
+            :triggerChange="true"
+            :value="text"
+            show-search
+            :filter-option="filterOption"
+            style="width: 100%"
+            :options="locationCodeOptions"
+            @change="(e) => handleChange(e, record.key, col, index)"
+          />
+        </div>
+      </template>
+      <span slot="action" slot-scope="text, record, index">
+        <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record, index)" :disabled="disableSubmit">
+          <a>鍒犻櫎</a>
+        </a-popconfirm>
+      </span>
+    </a-table>
+    <template slot="footer" v-if="disableSubmit == false">
+      <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
+      <a-button @click="handleOk" :disabled="isDisabled" type="primary">纭畾</a-button>
+    </template>
+
+    <template slot="footer" v-if="disableSubmit == true">
+      <a-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button>
+    </template>
+    <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk"></j-select-tooling-modal>
+<!--    <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk"></j-select-return-list-modal>-->
+<!--    <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk"></j-select-sharpen-list-modal>-->
+  </a-modal>
+</template>
+
+<script>
+import pick from 'lodash.pick'
+import JSelectToolingModal from './JSelectToolingModal'
+import { ajaxGetDictItems } from '@/api/api'
+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 JSelectReturnListModal from './JSelectReturnListModal'
+// import JSelectSharpenListModal from './JSelectSharpenListModal'
+import store from '@/store'
+
+export default {
+  name: 'InboundOrderModel',
+  components: {
+    JSelectToolingModal,
+    JMultiSelectTag,
+    JDictSelectTag,
+    // JSelectReturnListModal,
+    JSearchSelectTag,
+    // JSelectSharpenListModal,
+    store
+  },
+  data() {
+    return {
+     /* 鍒嗛〉鍙傛暟 */
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      isDisabled: false,
+      selectedRowKeys: {},
+      state: {
+        show: false,
+        maintenanceValue: 1,
+        checkValue: 1,
+        maintenanceState: false,
+        checkState: false,
+      },
+      inboundDate: '',
+      applicationDate: '',
+      supplierShow: false,
+      disableSubmit: false,
+      numDisable:false,
+      quantityDisable:false,
+      onlyCodeDisable:true,
+      toolingShow:false,
+      addDisable:false,
+      toolinngOptions:[],
+      title: '鎿嶄綔',
+      visible: false,
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 6 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 18 },
+      },
+      confirmLoading: false,
+      loading: false,
+      form: this.$form.createForm(this),
+      dataSource: [],
+      toolingTreeData:[],
+      warehouseOptions:[],
+      locationOptions:[],
+      allToolingList:[],
+      param: {},
+      barcodeCurrentType: false,
+      inboundOrderId:'',
+      url: {
+        add: '/tms/toolCombination/add/combination',
+        edit: '/tms/inboundOrder/edit',
+        toolingList:'/tms/baseTools/list',
+        querySharpenList:'/tms/toolLedgerDetail/list',
+        queryReturnList:'/tms/toolLedgerDetail/list',
+        detailList:'/tms/inboundDetail/list',
+      },
+      toolingOptions:[],
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+           width: 50,
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+        },
+        {
+          title: '宸ュ叿缂栫爜',
+          align: 'center',
+          dataIndex: 'toolId'
+        },
+        {
+          title: '宸ュ叿绫诲瀷',
+          align: 'center',
+          dataIndex: 'applicationType_dictText'
+        },
+        // {
+        //   title: '宸ュ叿缂栧彿',
+        //   align: 'center',
+        //   dataIndex: 'toolId'
+        // },
+        {
+          title: '涓枃鍚嶇О',
+          align: 'center',
+          dataIndex: 'chineseName'
+        },
+        {
+          title: '宸ュ叿鍙傛暟鏍囪瘑',
+          align: 'center',
+          dataIndex: 'paramaTableName_dictText'
+        },
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          align: 'center',
+          dataIndex: 'toolModel'
+        },
+        {
+          title: '鍒嗙被鍚嶇О',
+          align: 'center',
+          dataIndex: 'typeName'
+        },
+        //  {
+        //   title: '搴撲綅鍙�',
+        //   align: 'center',
+        //   dataIndex: 'goodsShelvesId',
+        //   scopedSlots: { customRender: 'goodsShelvesId' },
+        // },
+        // {
+        //   title: '鍏ュ簱鏁伴噺',
+        //   align: 'center',
+        //   dataIndex: 'inStorageQuantity',
+        //   scopedSlots: { customRender: 'inStorageQuantity' },
+        // },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' },
+        },
+      ],
+      locationCodeOptions:[]
+    }
+  },
+  created() {
+    ajaxGetDictItems("tms_goods_shelves,location_code,id", null).then((res) => {
+        if (res.success) {
+          this.locationCodeOptions = res.result
+        }
+      })
+  },
+  methods: {
+    modalFormOk() {
+    },
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getQueryParams() {
+      this.param.pageNo = this.ipagination.current
+      this.param.pageSize = this.ipagination.pageSize
+      return filterObj(this.param)
+    },
+    add() {
+      this.hafilterOptionndle = store.getters.userInfo.username
+      this.edit({})
+    },
+    edit(record) {
+      let that = this
+      this.form.resetFields()
+      this.model = Object.assign({}, record)
+      this.visible = true
+      this.isDisabled = false
+      this.disableSubmit = false
+      if (record.id) {
+        if(record.inStorehouseType == "1"){
+          this.toolingShow = true
+        }
+        this.inboundOrderId = record.id
+        this.detailList(this.inboundOrderId)
+      }
+      this.$nextTick(() => {
+        this.form.setFieldsValue(
+          pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark')
+        )
+      })
+    },
+    handleChange(value, key, column, index) {
+      //let t = (this.ipaginationm.current - 1) * this.ipaginationm.pageSize + index
+      const temp = [...this.dataSource]
+      const target = temp.filter(item => key === item.key)[index];
+      if (target) {
+        target[column.dataIndex] = value
+        if(column.dataIndex === 'inStorageQuantity'){
+          if(target['quantity']<value){
+            this.$message.error('鍏ュ簱鏁伴噺涓嶈兘澶т簬鍑哄簱鏁伴噺!')
+            this.isDisabled = true
+          }else{
+            this.isDisabled = false
+          }
+        }
+        this.dataSource = temp
+      }
+    },
+    close() {
+      this.$emit('close')
+      this.dataSource = []
+      this.visible = false
+      this.supplierShow = false,
+       this.disableSubmit = false,
+       this.numDisable = false,
+      this.quantityDisable = false,
+       this.onlyCodeDisable = true,
+       this.toolingShow = false,
+       this.addDisable = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      this.ipagination = pagination
+      this.detailList(this.inboundOrderId);
+    },
+    handleOk() {
+      const that = this
+      // 妫�鏌ユ暟缁勬槸鍚︿负绌�
+      if (!this.dataSource || this.dataSource.length === 0) {
+        that.$message.warning('璇烽�夋嫨宸ュ叿')
+        return;
+      }
+      // 楠岃瘉鏄惁鏈夊垁鏌�
+      if (!this.checkHasSingleHandle()) {
+        that.$message.warning('璇烽�夋嫨涓�鎶婂垁鏌勪俊鎭�')
+        return;
+      }
+      if (this.dataSource.length < 2) {
+        that.$message.warning('璇烽�夋嫨鑷冲皯涓�鎶婂垁鍏�')
+        return;
+      }
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          that.confirmLoading = true
+          let formData = Object.assign(this.model, values)
+          formData.detailData = this.dataSource
+          let http = ''
+          if(this.model.id){
+            http = this.url.edit
+          }else{
+            http = this.url.add
+          }
+          postAction(http, formData)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.$emit('ok', new Date())
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+              that.close()
+            })
+        }
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+    // 妫�鏌ユ槸鍚︽湁涓斾粎鏈変竴鏉ypeName涓�"鍒�鏌�"鐨勬暟鎹�
+    checkHasSingleHandle() {
+      // 鍏堢‘淇漝ataSource鏄暟缁勪笖涓嶄负绌�
+      if (!Array.isArray(this.dataSource) || this.dataSource.length === 0) {
+        return false;
+      }
+      // 绛涢�夊嚭typeName涓�"鍒�鏌�"鐨勬潯鐩�
+      const handleItems = this.dataSource.filter(
+        item => item && item.typeName === '鍒�鏌�'
+      );
+      // 妫�鏌ユ槸鍚﹀垰濂芥湁涓�鏉$鍚堟潯浠剁殑鏁版嵁
+      return handleItems.length === 1;
+    },
+    //閫夋嫨宸ュ叿
+    selectTooling: function () {
+      let ids = []
+      for (let i = 0; i < this.dataSource.length; i++) {
+        ids.push(this.dataSource[i].id)
+      }
+      this.$refs.toolingModalForm.showModal(ids)
+      this.$refs.toolingModalForm.title = '閫夋嫨宸ュ叿'
+      this.$refs.toolingModalForm.disableSubmit = false
+    },
+    //閫夋嫨褰掕繕宸ュ叿
+    selectReturnList: function () {
+      let ids = []
+      for (let i = 0; i < this.dataSource.length; i++) {
+        ids.push(this.dataSource[i].id)
+      }
+      this.$refs.returnModalForm.showModal(ids)
+      this.$refs.returnModalForm.title = '閫夋嫨褰掕繕宸ュ叿'
+      this.$refs.returnModalForm.disableSubmit = false
+    },
+    //閫夋嫨鍒冪(宸ュ叿
+    selectSharpenList: function () {
+      let ids = []
+      for (let i = 0; i < this.dataSource.length; i++) {
+        ids.push(this.dataSource[i].id)
+      }
+      this.$refs.sharpenModalForm.showModal(ids)
+      this.$refs.sharpenModalForm.title = '閫夋嫨鍒冪(宸ュ叿'
+      this.$refs.sharpenModalForm.disableSubmit = false
+    },
+    handleDelete(record, index) {
+      this.dataSource.splice(index, 1)
+    },
+    onChange() {},
+    //鎵嬮�変汉鍛樺��
+    selectCurrentUserChange(e) {
+      console.log('褰撳墠鎵嬮��', e)
+      // this.form.setFieldsValue({
+      //   // userName: e,
+      //   userNameId: e,
+      // })
+    },
+    detailList(inboundOrderId) {
+      this.param.inboundOrderId = inboundOrderId
+      getAction(this.url.detailList, this.getQueryParams()).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total;
+        }
+      })
+    },
+     filterOption(input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      );
+    },
+  },
+  watch: {},
+  mounted() {
+    this.$bus.$on('selectionRows', (data) => {
+      //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟
+      for (let i = 0; i < data.length; i++) {
+        this.dataSource.push({
+          id:data[i].id,
+          applicationType_dictText: data[i].applicationType_dictText,
+          typeName: data[i].typeName,
+          paramaTableName_dictText: data[i].paramaTableName_dictText,
+          toolCodeId: data[i].toolCodeId,
+          toolId: data[i].toolId,
+          chineseName: data[i].chineseName,
+          toolModel: data[i].toolModel,
+          applicationType: data[i].applicationTypeName,
+          onlyCode:data[i].onlyCode,
+          quantity:data[i].quantity,
+          inStorageQuantity:data[i].storageQuantity || data[i].quantity || 1,
+          accuracyClass:data[i].accuracyClass
+        })
+      }
+      //this.ipaginationm.total = this.dataSource.length
+    })
+  },
+}
+</script>
+
+
+<style  lang="less" scoped>
+.ant-btn {
+  padding: 0 10px;
+  margin-left: 3px;
+}
+
+.ant-form-item-control {
+  line-height: 0px;
+}
+
+/** 涓昏〃鍗曡闂磋窛 */
+.ant-form .ant-form-item {
+  margin-bottom: 10px;
+}
+
+/** Tab椤甸潰琛岄棿璺� */
+.ant-tabs-content .ant-form-item {
+  margin-bottom: 0px;
+}
+
+/deep/ .notshow {
+  display: none;
+}
+</style>
diff --git a/src/views/tms/combinationKnife/modules/JSelectToolingModal.vue b/src/views/tms/combinationKnife/modules/JSelectToolingModal.vue
new file mode 100644
index 0000000..10ce853
--- /dev/null
+++ b/src/views/tms/combinationKnife/modules/JSelectToolingModal.vue
@@ -0,0 +1,275 @@
+<template>
+  <!--鏀寔鍏ㄥ睆缂╂斁-->
+  <j-modal
+    :visible="visible"
+    :title="title"
+    switchFullscreen
+    :width="1200"
+    @ok="handleSubmit"
+    @cancel="close"
+    style="top: 50px"
+    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 :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="宸ュ叿缂栫爜">
+                <a-input placeholder="璇疯緭鍏ュ伐鍏风紪鐮�,鏀寔妯$硦鏌ヨ" v-model="queryParam.toolCode"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="涓枃鍚嶇О">
+                <a-input placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�,鏀寔妯$硦鏌ヨ" v-model="queryParam.chineseName"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="鍨嬪彿/鍥惧彿">
+                <a-input placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�,鏀寔妯$硦鏌ヨ" v-model="queryParam.toolModel"></a-input>
+              </a-form-item>
+            </a-col>
+
+            <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-row>
+        </a-form>
+      </div>
+      <!--宸ュ叿鍒楄〃-->
+      <a-table
+        ref="table"
+        :scroll="scrollTrigger"
+        size="middle"
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :rowSelection="rowSelection"
+        :loading="loading"
+        @change="handleTableChange"
+      >
+      </a-table>
+    </a-card>
+  </j-modal>
+</template>
+
+<script>
+import { filterObj } from '@/utils/util'
+import { getAction } from '@/api/manage'
+
+export default {
+  name: 'JSelectToolingModal',
+  components: {},
+  props: {
+    classifyId:{
+        type:String
+      }
+  },
+  data() {
+    return {
+      queryParam: {},
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 50,
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+        },
+        {
+          title: '宸ュ叿缂栫爜',
+          align: 'center',
+          dataIndex: 'toolId'
+        },
+        {
+          title: '宸ュ叿绫诲瀷',
+          align: 'center',
+          dataIndex: 'applicationType_dictText'
+        },
+        // {
+        //   title: '宸ュ叿缂栧彿',
+        //   align: 'center',
+        //   dataIndex: 'toolId'
+        // },
+        {
+          title: '涓枃鍚嶇О',
+          align: 'center',
+          dataIndex: 'chineseName'
+        },
+        {
+          title: '宸ュ叿鍙傛暟鏍囪瘑',
+          align: 'center',
+          dataIndex: 'paramaTableName_dictText'
+        },
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          align: 'center',
+          dataIndex: 'toolModel'
+        },
+        {
+          title: '鍨嬪彿/鍥惧彿',
+          align: 'center',
+          dataIndex: 'toolModel'
+        },
+        {
+          title: '鍒嗙被鍚嶇О',
+          align: 'center',
+          dataIndex: 'typeName'
+        },
+      ],
+      selectedRowKeys: [],
+      oldSlelectRows: [],
+      scrollTrigger: {},
+      dataSource: [],
+      selectionRows: [],
+      title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨宸ュ叿',
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['5', '10', '20'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      isorter: {
+        column: 'toolCode',
+        order: 'desc',
+      },
+      departTree: [],
+      visible: false,
+      loading: false,
+      url: {
+        // list: '/base/tooling/list',
+        list: '/tms/baseTools/listWithSharpedAndConfig/combination'
+      },
+    }
+  },
+  computed: {
+    rowSelection() {
+      return {
+        type: 'checkbox',
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.onSelectChange(selectedRows)
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.distable,
+          },
+        }),
+        selectedRowKeys: this.selectedRowKeys,
+      }
+    },
+  },
+  watch: {},
+  created() {},
+  methods: {
+    async loadData(arg) {
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      let that = this
+      this.loading = true
+      let params = this.getQueryParams() //鏌ヨ鏉′欢
+      params.classifyId = this.classifyId
+      await getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          for (let i = 0; i < res.result.records.length; i++) {
+            if (that.oldSlelectRows.indexOf(res.result.records[i].id) > -1) {
+              res.result.records[i].distable = true
+            } else {
+              res.result.records[i].distable = false
+            }
+          }
+          this.dataSource = res.result.records
+          this.ipagination.total = res.result.total
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false
+      })
+    },
+    showModal(oldSlelectRows) {
+      this.oldSlelectRows = oldSlelectRows
+      this.visible = true
+      this.loadData(1)
+    },
+    getQueryParams() {
+      let param = Object.assign({}, this.queryParam, this.isorter)
+      param.field = this.getQueryField()
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    //鏌ヨ鏉′欢澶勭悊
+    getQueryField() {
+      let str = 'id,'
+      for (let a = 0; a < this.columns.length; a++) {
+        str += ',' + this.columns[a].dataIndex
+      }
+      return str
+    },
+    searchReset(num) {
+      let that = this
+      if (num !== 0) {
+        that.loadData(1)
+      }
+      that.selectborrowIds = []
+    },
+    close() {
+      this.searchReset(0)
+      this.selectedRowKeys = []
+      this.visible = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      //TODO 绛涢��
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      this.loadData()
+    },
+    handleSubmit() {
+      this.$bus.$emit('selectionRows', this.selectionRows)
+      this.searchReset(0)
+      this.close()
+    },
+    onSelectChange(selectionRows) {
+      this.selectionRows = selectionRows
+    },
+    onSearch() {
+      this.loadData(1)
+    },
+     searchQuery() {
+      this.loadData(1);
+    },
+    searchReset() {
+      this.queryParam = {}
+      this.loadData(1)
+    },
+  },
+}
+</script>
+
+<style scoped>
+.ant-table-tbody .ant-table-row td {
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+#components-layout-demo-custom-trigger .trigger {
+  font-size: 18px;
+  line-height: 64px;
+  padding: 0 24px;
+  cursor: pointer;
+  transition: color 0.3s;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/tms/combinationKnife/modules/ToolCombinationDetailModal.vue b/src/views/tms/combinationKnife/modules/ToolCombinationDetailModal.vue
new file mode 100644
index 0000000..5cf222d
--- /dev/null
+++ b/src/views/tms/combinationKnife/modules/ToolCombinationDetailModal.vue
@@ -0,0 +1,133 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="鍒�鏌勫彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hiltCode">
+              <a-input v-model="model.hiltCode"placeholder="璇疯緭鍏ュ垁鏌勫彿" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="缁勫悎鍒�id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="combinationId">
+              <a-input v-model="model.combinationId"placeholder="璇疯緭鍏ョ粍鍚堝垁id" ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍒�鍏峰敮涓�缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="onlyCode">
+              <a-input v-model="model.onlyCode"placeholder="璇疯緭鍏ュ垁鍏峰敮涓�缂栫爜" ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+
+  import { httpAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: "ToolCombinationDetailModal",
+    components: {
+    },
+    props:{
+      mainId:{
+        type:String,
+        required:false,
+        default:''
+      }
+    },
+    data () {
+      return {
+        title:"鎿嶄綔",
+        width:800,
+        visible: false,
+        model:{
+        },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/tms/toolCombination/addToolCombinationDetail",
+          edit: "/tms/toolCombination/editToolCombinationDetail",
+        }
+
+      }
+    },
+    created () {
+    //澶囦唤model鍘熷鍊�
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+        this.$refs.form.clearValidate();
+      },
+      handleOk () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            this.model['combinationId'] = this.mainId
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+          }else{
+             return false
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>

--
Gitblit v1.9.3