From e48436b9c5dd3f0365f77339f84b37eea95b56e2 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期一, 16 六月 2025 15:22:19 +0800 Subject: [PATCH] 提取刀具选择刀具 修改文件名称展示 --- src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue | 72 +++++++++++++++++++++++++++++++++-- 1 files changed, 67 insertions(+), 5 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue index 451c5bb..610fa74 100644 --- a/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue @@ -20,7 +20,7 @@ <a-space> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="handleAdd" icon="plus" v-has="'cutter_add'">鏂板</a-button> - <a-button type="primary" @click="handleAdd()" icon="export">鍙戦�佸垁鍏风郴缁�</a-button> + <a-button type="primary" @click="handleSend()" icon="export">鍙戦�佸垁鍏风郴缁�</a-button> </a-space> </a-col> </a-row> @@ -31,7 +31,7 @@ @change="handleTableChange" :scroll="{y:189}"> <template slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">閫夋嫨鍒�鍏�</a> + <a @click="handleChoose(record)">閫夋嫨鍒�鍏�</a> <a-divider type="vertical"/> @@ -56,16 +56,21 @@ </a-table> <CutterModal ref="cutterModalRef" :currentTreeNodeInfo="currentLevelInfo" @submitSuccess="loadData"/> + + <DncToolsSelectModal ref="dncToolsSelectModal" @submitSuccess="loadData"/> </div> </template> <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' import CutterModal from '@views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue' +import DncToolsSelectModal from '@views/tms/modules/baseTools/DncToolsSelectModal.vue' +import { getAction, httpAction } from '@api/manage' +import dncApi from '@api/dnc' export default { name: 'CutterTableList', - components: { CutterModal }, + components: { DncToolsSelectModal, CutterModal }, mixins: [JeecgListMixin], props: { currentLevelInfo: { @@ -89,7 +94,7 @@ return parseInt(index) + 1 } }, - { title: '鍒�鍏风紪鍙�', dataIndex: 'cutterCode', width: 100, align: 'center' }, + { title: '鍒�鍏风紪鍙�', dataIndex: 'cutterCode', width: 200, align: 'center' }, { title: '鍒�鍏峰悕绉�', dataIndex: 'cutterName', width: 100, align: 'center' }, { title: '鍒�鍏风畝绉�', dataIndex: 'cutterType', width: 80, align: 'center' }, { title: '鍒�鍏疯鏍�', dataIndex: 'cutterSpec', align: 'center' }, @@ -103,7 +108,8 @@ list: '/nc/cutter/getByBusinessId', delete: '/nc/cutter/delete', exportXlsUrl: '/nc/cutter/exportXls', - importExcelUrl: '/nc/cutter/importExcel' + importExcelUrl: '/nc/cutter/importExcel', + sendCutterUrl: '/nc/cutter/sendCutterUrl', } } }, @@ -171,6 +177,62 @@ this.$refs.cutterModalRef.title = '鍒�鍏疯鎯�' this.$refs.cutterModalRef.disableSubmit = true this.$refs.cutterModalRef.handleCutterEdit(record) + }, + /** + * 閫夋嫨鍒�鍏� + */ + handleChoose(record){ + if (record.cutterName.match(/\d+(\.\d+)?/g) !== null) { + record.cutterName = record.cutterName.match(/\d+(\.\d+)?/g)[0] + } + const param = { + aliasLabel: record.cutterType, + diameter: record.cutterName, + cutterId: record.id + } + this.$refs.dncToolsSelectModal.open(param) + this.$refs.dncToolsSelectModal.title = '閫夋嫨鍒�鍏�' + }, + /** + * 鍙戦�佸垁鍏风郴缁� + */ + handleSend(){ + const that = this + const { docId,attributionId, attributionType } = this.currentLevelInfo + that.$confirm({ + title: '鎻愮ず', + content: `纭鍙戦�佸垁鍏风郴缁熷悧锛焋, + okText: '纭', + cancelText: '鍙栨秷', + onOk: () => { + dncApi.sendToolsApi({ docId, attributionId, attributionType }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + } else { + that.$notification.error({ + message: '娑堟伅', + description: res.message + }) + } + }) + .catch(err => { + that.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) } } } -- Gitblit v1.9.3