From b6b2c379bd92f076acd16801b1442604ea21fc5d Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期三, 27 八月 2025 17:30:52 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue | 3 src/views/tms/modules/baseTools/BaseToolsListLeft.vue | 2 src/views/tms/modules/toolLedger/ToolSharpenList.vue | 8 src/components/page/GlobalFooter.vue | 39 src/views/tms/modules/baseTools/ParaBladeSearchModal.vue | 299 + src/views/dnc/base/modules/ProductStructure/ProductStructureBaseContextMenu.vue | 7 src/views/system/modules/UserModal.vue | 17 src/views/tms/modules/baseTools/ParaCommonToolList.vue | 2 src/views/tms/ToolVerificationList.vue | 174 src/views/dashboard/TodoList.vue | 642 +++ src/views/flowable/workflow/inboundOrder/InboundOrderHandleXq.vue | 479 ++ src/views/dashboard/Analysis.vue | 66 src/views/eam/purchase/EamEquipmentPurchasePlanList.vue | 3 src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue | 4 src/views/tms/combinationKnife/ToolCombinationList.vue | 266 + src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue | 19 src/views/tms/modules/GoodsShelvesForm.vue | 2 src/views/eam/dispose/EamEquipmentLeanOutList.vue | 35 src/views/tms/combinationKnife/modules/JSelectToolingModal.vue | 275 + src/views/tms/lossBound/modules/LossboundModal.vue | 53 src/views/tms/modules/inbound/InboundListRight.vue | 100 src/views/dnc/common/TableContextMenu.vue | 11 src/views/tms/modules/baseTools/ParaMillToolSearchModal.vue | 319 + src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue | 89 src/views/dnc/base/modules/DeviceStructure/DeviceStructureTreeContextMenu.vue | 61 src/views/tms/combinationKnife/modules/ToolCombinationDetailModal.vue | 133 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue | 2 src/views/tms/modules/baseTools/ParaTurningToolsModal.vue | 96 src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue | 2 src/views/tms/modules/baseTools/ParaThreadingToolSearchModal.vue | 264 + src/views/tms/modules/inboundOrder/JSelectToolingModal.vue | 20 src/views/tms/modules/baseTools/ParaHoleToolsSearchModal.vue | 319 + src/views/tms/modules/baseTools/ParaThreadingToolModal.vue | 111 src/views/tms/modules/baseTools/ParaThreadingToolList.vue | 5 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue | 24 src/views/tms/modules/baseTools/BaseToolsListRight.vue | 1155 +++-- src/views/tms/modules/baseTools/ParaCommonToolModal.vue | 21 src/views/tms/modules/toolLedger/ToolLedgerListRight.vue | 248 + src/views/tms/modules/baseTools/ParaBladeList.vue | 5 src/api/signage.js | 6 src/views/tms/modules/toolLedger/ToolLedgerListLeft.vue | 2 src/views/tms/modules/verification/JSelectTools.vue | 207 + src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue | 3 src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue | 2 src/views/tms/modules/baseTools/ParaMillToolModal.vue | 109 src/views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue | 226 + src/views/tms/combinationKnife/ToolCombinationDetailList.vue | 180 src/views/tms/lossBound/LossboundList.vue | 2 src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue | 44 src/views/tms/ToolVerificationRecordList.vue | 223 + src/views/tms/modules/baseTools/ParaHoleToolsList.vue | 7 src/components/layouts/TabLayout.vue | 754 ++-- src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue | 36 src/components/page/GlobalLayout.vue | 1016 ++-- src/views/flowable/workflow/FlowTodo.vue | 17 src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue | 2 src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue | 443 ++ src/views/tms/modules/toolLedger/ToolLedgerDetailList.vue | 2 src/views/dnc/base/modules/DeviceStructure/Permission/AssignPermissionModal.vue | 5 src/views/tms/WarehouseList.vue | 15 src/views/tms/modules/baseTools/ParaBladeModal.vue | 132 src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue | 11 src/views/dnc/base/modules/ProductStructure/ProductStructureTreeContextMenu.vue | 322 src/views/tms/combinationKnife/modules/InboundOrderModel.vue | 463 ++ src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue | 9 src/views/tms/modules/baseTools/ParaTurningToolsSearchModal.vue | 319 + src/views/dashboard/dncIndex/DncManagerSignage.vue | 153 src/views/tms/modules/verification/ToolVerificationRecordModal.vue | 212 + src/views/tms/modules/baseTools/ParaHoleToolsModal.vue | 112 src/views/tms/modules/baseTools/ParaTurningToolsList.vue | 5 src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue | 538 +- src/views/flowable/workflow/FlowCompleted.vue | 102 src/views/tms/modules/baseTools/ParaMillToolList.vue | 5 src/views/dnc/base/modules/ProductStructure/Permission/AssignPermissionModal.vue | 214 74 files changed, 9,029 insertions(+), 2,249 deletions(-) diff --git a/src/api/signage.js b/src/api/signage.js new file mode 100644 index 0000000..8c0a115 --- /dev/null +++ b/src/api/signage.js @@ -0,0 +1,6 @@ +import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' + +export default { + // 鏍规嵁鐢ㄦ埛ID鑾峰彇鐢ㄦ埛淇℃伅 + getUserByIdApi: id => getAction('sys/api/getUserById', { id }), +} \ No newline at end of file diff --git a/src/components/layouts/TabLayout.vue b/src/components/layouts/TabLayout.vue index b70473d..a9ddfdb 100644 --- a/src/components/layouts/TabLayout.vue +++ b/src/components/layouts/TabLayout.vue @@ -35,427 +35,427 @@ </template> <script> - import GlobalLayout from '@/components/page/GlobalLayout' - import Contextmenu from '@/components/menu/Contextmenu' - import { mixin, mixinDevice } from '@/utils/mixin.js' - import { triggerWindowResizeEvent } from '@/utils/util' - import Vue from 'vue' - import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' - import registerApps from "@/qiankun"; +import GlobalLayout from '@/components/page/GlobalLayout' +import Contextmenu from '@/components/menu/Contextmenu' +import { mixin, mixinDevice } from '@/utils/mixin.js' +import { triggerWindowResizeEvent } from '@/utils/util' +import Vue from 'vue' +import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' +import registerApps from "@/qiankun"; - const indexKey = '/dashboard/analysis' +const indexKey = '/dashboard/analysis' - export default { - name: 'TabLayout', - components: { - GlobalLayout, - Contextmenu - }, - mixins: [mixin, mixinDevice], - data() { - return { - pageList: [], - linkList: [], - activePage: '', - menuVisible: false, - menuItemList: [ - { key: '4', icon: 'reload', text: '鍒� 鏂�' }, - { key: '1', icon: 'arrow-left', text: '鍏抽棴宸︿晶' }, - { key: '2', icon: 'arrow-right', text: '鍏抽棴鍙充晶' }, - { key: '3', icon: 'close', text: '鍏抽棴鍏跺畠' } - ], - reloadFlag:true +export default { + name: 'TabLayout', + components: { + GlobalLayout, + Contextmenu + }, + mixins: [mixin, mixinDevice], + data() { + return { + pageList: [], + linkList: [], + activePage: '', + menuVisible: false, + menuItemList: [ + { key: '4', icon: 'reload', text: '鍒� 鏂�' }, + { key: '1', icon: 'arrow-left', text: '鍏抽棴宸︿晶' }, + { key: '2', icon: 'arrow-right', text: '鍏抽棴鍙充晶' }, + { key: '3', icon: 'close', text: '鍏抽棴鍏跺畠' } + ], + reloadFlag:true + } + }, + /* update_begin author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤 ->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ + provide(){ + return{ + closeCurrent:this.closeCurrent, + changeTitle: this.changeTitle, + changeTabTitle: this.changeTabTitle, + } + }, + /* update_end author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ + computed: { + multipage() { + //鍒ゆ柇濡傛灉鏄墜鏈烘ā寮忥紝鑷姩鍒囨崲涓哄崟椤甸潰妯″紡 + if (this.isMobile()) { + return false + } else { + return this.$store.state.app.multipage + } + } + }, + created() { + if (this.$route.path != indexKey) { + this.addIndexToFirst() + } + // 澶嶅埗涓�涓猺oute瀵硅薄鍑烘潵锛屼笉鑳藉奖鍝嶅師route + let currentRoute = Object.assign({}, this.$route) + currentRoute.meta = Object.assign({}, currentRoute.meta) + this.pageList.push(currentRoute) + this.linkList.push(currentRoute.fullPath) + this.activePage = currentRoute.fullPath + }, + mounted() { + if (process.env.VUE_APP_QIANKUN == 'true') { + //update-begin-author:zyf date:20211129 for:qiankun 娉ㄥ唽瀛愬簲鐢� + if (!window.qiankunStarted) { + window.qiankunStarted = true; + registerApps(); + } + //update-end-author:zyf date:20211129 for:qiankun 娉ㄥ唽瀛愬簲鐢� + } + }, + watch: { + '$route': function(newRoute) { + //console.log("鏂扮殑璺敱",newRoute) + this.activePage = newRoute.fullPath + if (!this.multipage) { + this.linkList = [newRoute.fullPath] + this.pageList = [Object.assign({},newRoute)] + // update-begin-author:taoyan date:20200211 for: TASK #3368 銆愯矾鐢辩紦瀛樸�戦椤电殑缂撳瓨璁剧疆鏈夐棶棰橈紝闇�瑕佹牴鎹悗鍙扮殑璺敱閰嶇疆鏉ュ疄鐜版槸鍚︾紦瀛� + } else if(indexKey==newRoute.fullPath) { + //棣栭〉鏃� 鍒ゆ柇鏄惁缂撳瓨 娌℃湁缂撳瓨 鍒锋柊涔� + if (newRoute.meta.keepAlive === false) { + this.routeReload() + } + // update-end-author:taoyan date:20200211 for: TASK #3368 銆愯矾鐢辩紦瀛樸�戦椤电殑缂撳瓨璁剧疆鏈夐棶棰橈紝闇�瑕佹牴鎹悗鍙扮殑璺敱閰嶇疆鏉ュ疄鐜版槸鍚︾紦瀛� + }else if (this.linkList.indexOf(newRoute.fullPath) < 0) { + this.linkList.push(newRoute.fullPath) + this.pageList.push(Object.assign({},newRoute)) + //// update-begin-author:sunjianlei date:20200103 for: 濡傛灉鏂板鐨勯〉闈㈤厤缃簡缂撳瓨璺敱锛岄偅涔堝氨寮哄埗鍒锋柊涓�閬� #842 + // if (newRoute.meta.keepAlive) { + // this.routeReload() + // } + //// update-end-author:sunjianlei date:20200103 for: 濡傛灉鏂板鐨勯〉闈㈤厤缃簡缂撳瓨璺敱锛岄偅涔堝氨寮哄埗鍒锋柊涓�閬� #842 + } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) { + let oldIndex = this.linkList.indexOf(newRoute.fullPath) + let oldPositionRoute = this.pageList[oldIndex] + this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta})) } }, - /* update_begin author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤 ->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ - provide(){ - return{ - closeCurrent:this.closeCurrent, - changeTitle: this.changeTitle, - changeTabTitle: this.changeTabTitle, + 'activePage': function(key) { + let index = this.linkList.lastIndexOf(key) + let waitRouter = this.pageList[index] + // 銆怲ESTA-523銆戜慨澶嶏細涓嶅厑璁搁噸澶嶈烦杞矾鐢卞紓甯� + if (waitRouter.fullPath !== this.$route.fullPath) { + this.$router.push(Object.assign({}, waitRouter)) } + this.changeTitle(waitRouter.meta.title) }, - /* update_end author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ - computed: { - multipage() { - //鍒ゆ柇濡傛灉鏄墜鏈烘ā寮忥紝鑷姩鍒囨崲涓哄崟椤甸潰妯″紡 - if (this.isMobile()) { - return false - } else { - return this.$store.state.app.multipage + 'multipage': function(newVal) { + if(this.reloadFlag){ + if (!newVal) { + this.linkList = [this.$route.fullPath] + this.pageList = [this.$route] } } }, - created() { - if (this.$route.path != indexKey) { + // update-begin-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + device() { + if (this.multipage && this.linkList.indexOf(indexKey) === -1) { this.addIndexToFirst() } - // 澶嶅埗涓�涓猺oute瀵硅薄鍑烘潵锛屼笉鑳藉奖鍝嶅師route - let currentRoute = Object.assign({}, this.$route) - currentRoute.meta = Object.assign({}, currentRoute.meta) - this.pageList.push(currentRoute) - this.linkList.push(currentRoute.fullPath) - this.activePage = currentRoute.fullPath }, - mounted() { - if (process.env.VUE_APP_QIANKUN == 'true') { - //update-begin-author:zyf date:20211129 for:qiankun 娉ㄥ唽瀛愬簲鐢� - if (!window.qiankunStarted) { - window.qiankunStarted = true; - registerApps(); + // update-end-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + }, + methods: { + // update-begin-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + // 灏嗛椤垫坊鍔犲埌绗竴浣� + addIndexToFirst() { + this.pageList.splice(0, 0, { + name: 'dashboard-analysis', + path: indexKey, + fullPath: indexKey, + meta: { + icon: 'dashboard', + title: '棣栭〉' } - //update-end-author:zyf date:20211129 for:qiankun 娉ㄥ唽瀛愬簲鐢� + }) + this.linkList.splice(0, 0, indexKey) + }, + // update-end-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + + // update-begin-author:sunjianlei date:20200120 for: 鍔ㄦ�佹洿鏀归〉闈㈡爣棰� + /** + * 淇敼褰撳墠椤甸潰鐨勭獥鍙f爣棰� + * @param title 瑕佷慨鏀圭殑鏂版爣棰� + */ + changeTitle(title) { + let projectTitle = "MDC鏅烘収杞﹂棿" + // 棣栭〉鐗规畩澶勭悊 + if (this.$route.path === indexKey) { + document.title = projectTitle + } else { + document.title = title + ' 路 ' + projectTitle } }, - watch: { - '$route': function(newRoute) { - //console.log("鏂扮殑璺敱",newRoute) - this.activePage = newRoute.fullPath - if (!this.multipage) { - this.linkList = [newRoute.fullPath] - this.pageList = [Object.assign({},newRoute)] - // update-begin-author:taoyan date:20200211 for: TASK #3368 銆愯矾鐢辩紦瀛樸�戦椤电殑缂撳瓨璁剧疆鏈夐棶棰橈紝闇�瑕佹牴鎹悗鍙扮殑璺敱閰嶇疆鏉ュ疄鐜版槸鍚︾紦瀛� - } else if(indexKey==newRoute.fullPath) { - //棣栭〉鏃� 鍒ゆ柇鏄惁缂撳瓨 娌℃湁缂撳瓨 鍒锋柊涔� - if (newRoute.meta.keepAlive === false) { - this.routeReload() - } - // update-end-author:taoyan date:20200211 for: TASK #3368 銆愯矾鐢辩紦瀛樸�戦椤电殑缂撳瓨璁剧疆鏈夐棶棰橈紝闇�瑕佹牴鎹悗鍙扮殑璺敱閰嶇疆鏉ュ疄鐜版槸鍚︾紦瀛� - }else if (this.linkList.indexOf(newRoute.fullPath) < 0) { - this.linkList.push(newRoute.fullPath) - this.pageList.push(Object.assign({},newRoute)) - //// update-begin-author:sunjianlei date:20200103 for: 濡傛灉鏂板鐨勯〉闈㈤厤缃簡缂撳瓨璺敱锛岄偅涔堝氨寮哄埗鍒锋柊涓�閬� #842 - // if (newRoute.meta.keepAlive) { - // this.routeReload() - // } - //// update-end-author:sunjianlei date:20200103 for: 濡傛灉鏂板鐨勯〉闈㈤厤缃簡缂撳瓨璺敱锛岄偅涔堝氨寮哄埗鍒锋柊涓�閬� #842 - } else if (this.linkList.indexOf(newRoute.fullPath) >= 0) { - let oldIndex = this.linkList.indexOf(newRoute.fullPath) - let oldPositionRoute = this.pageList[oldIndex] - this.pageList.splice(oldIndex, 1, Object.assign({},newRoute,{meta:oldPositionRoute.meta})) + /** + * 淇敼tab鏍囩鐨勬爣棰� + * @param title 瑕佷慨鏀圭殑鏂版爣棰� + * @param fullPath 瑕佷慨鏀圭殑璺敱鍏ㄨ矾寰勶紝濡傛灉涓嶅~灏辨槸淇敼褰撳墠璺敱 + */ + changeTabTitle(title, fullPath = '') { + if (title) { + let currentRoute = this.pageList.find((r) => r.fullPath === (fullPath ? fullPath : this.$route.fullPath)) + if (currentRoute != null) { + currentRoute.meta = {...currentRoute.meta, title} } - }, - 'activePage': function(key) { - let index = this.linkList.lastIndexOf(key) - let waitRouter = this.pageList[index] - // 銆怲ESTA-523銆戜慨澶嶏細涓嶅厑璁搁噸澶嶈烦杞矾鐢卞紓甯� - if (waitRouter.fullPath !== this.$route.fullPath) { - this.$router.push(Object.assign({}, waitRouter)) - } - this.changeTitle(waitRouter.meta.title) - }, - 'multipage': function(newVal) { - if(this.reloadFlag){ - if (!newVal) { - this.linkList = [this.$route.fullPath] - this.pageList = [this.$route] - } - } - }, - // update-begin-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG - device() { - if (this.multipage && this.linkList.indexOf(indexKey) === -1) { - this.addIndexToFirst() - } - }, - // update-end-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + } }, - methods: { - // update-begin-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG - // 灏嗛椤垫坊鍔犲埌绗竴浣� - addIndexToFirst() { - this.pageList.splice(0, 0, { - name: 'dashboard-analysis', - path: indexKey, - fullPath: indexKey, - meta: { - icon: 'dashboard', - title: '棣栭〉' - } - }) - this.linkList.splice(0, 0, indexKey) - }, - // update-end-author:sunjianlei date:20191223 for: 淇浠庡崟椤垫ā寮忓垏鎹㈠洖澶氶〉妯″紡鍚庨椤典笉灞呯涓�浣嶇殑 BUG + // update-end-author:sunjianlei date:20200120 for: 鍔ㄦ�佹洿鏀归〉闈㈡爣棰� - // update-begin-author:sunjianlei date:20200120 for: 鍔ㄦ�佹洿鏀归〉闈㈡爣棰� - /** - * 淇敼褰撳墠椤甸潰鐨勭獥鍙f爣棰� - * @param title 瑕佷慨鏀圭殑鏂版爣棰� - */ - changeTitle(title) { - let projectTitle = "MDC鏅烘収杞﹂棿" - // 棣栭〉鐗规畩澶勭悊 - if (this.$route.path === indexKey) { - document.title = projectTitle - } else { - document.title = title + ' 路 ' + projectTitle - } - }, - /** - * 淇敼tab鏍囩鐨勬爣棰� - * @param title 瑕佷慨鏀圭殑鏂版爣棰� - * @param fullPath 瑕佷慨鏀圭殑璺敱鍏ㄨ矾寰勶紝濡傛灉涓嶅~灏辨槸淇敼褰撳墠璺敱 - */ - changeTabTitle(title, fullPath = '') { - if (title) { - let currentRoute = this.pageList.find((r) => r.fullPath === (fullPath ? fullPath : this.$route.fullPath)) - if (currentRoute != null) { - currentRoute.meta = {...currentRoute.meta, title} - } - } - }, - // update-end-author:sunjianlei date:20200120 for: 鍔ㄦ�佹洿鏀归〉闈㈡爣棰� + changePage(key) { + this.activePage = key + }, + tabCallBack() { + this.$nextTick(() => { + //update-begin-author:taoyan date: 20201211 for:銆愭柊鐗堛�憃nline鎶ラ敊 JT-100 + setTimeout(()=>{ + //鐪佸競鍖虹粍浠堕噷闈㈢粰window缁戝畾浜嗕釜resize浜嬩欢 瀵艰嚧鍒囨崲椤甸潰鐨勬椂鍊欒Е鍙戜簡浠栫殑resize锛屼絾鏄垏鎹㈤〉闈紝鐪佸競鍖虹粍浠惰繕娌¤閿�姣佸墠灏辫Е鍙戜簡璇ヤ簨浠讹紝瀵艰嚧鎺у埗鍙版姤閿欙紝鍔犱釜寤惰繜 + triggerWindowResizeEvent() + },20) + //update-end-author:taoyan date: 20201211 for:銆愭柊鐗堛�憃nline鎶ラ敊 JT-100 + }) + }, + editPage(key, action) { + this[action](key) + }, + remove(key) { + if (key == indexKey) { + this.$message.warning('棣栭〉涓嶈兘鍏抽棴!') + return + } + if (this.pageList.length === 1) { + this.$message.warning('杩欐槸鏈�鍚庝竴椤碉紝涓嶈兘鍐嶅叧闂簡鍟�') + return + } + console.log("this.pageList ",this.pageList ); + let removeRoute = this.pageList.filter(item => item.fullPath == key) + this.pageList = this.pageList.filter(item => item.fullPath !== key) + let index = this.linkList.indexOf(key) + this.linkList = this.linkList.filter(item => item !== key) + index = index >= this.linkList.length ? this.linkList.length - 1 : index + this.activePage = this.linkList[index] - changePage(key) { - this.activePage = key - }, - tabCallBack() { - this.$nextTick(() => { - //update-begin-author:taoyan date: 20201211 for:銆愭柊鐗堛�憃nline鎶ラ敊 JT-100 - setTimeout(()=>{ - //鐪佸競鍖虹粍浠堕噷闈㈢粰window缁戝畾浜嗕釜resize浜嬩欢 瀵艰嚧鍒囨崲椤甸潰鐨勬椂鍊欒Е鍙戜簡浠栫殑resize锛屼絾鏄垏鎹㈤〉闈紝鐪佸競鍖虹粍浠惰繕娌¤閿�姣佸墠灏辫Е鍙戜簡璇ヤ簨浠讹紝瀵艰嚧鎺у埗鍙版姤閿欙紝鍔犱釜寤惰繜 - triggerWindowResizeEvent() - },20) - //update-end-author:taoyan date: 20201211 for:銆愭柊鐗堛�憃nline鎶ラ敊 JT-100 - }) - }, - editPage(key, action) { - this[action](key) - }, - remove(key) { - if (key == indexKey) { - this.$message.warning('棣栭〉涓嶈兘鍏抽棴!') - return + //update-begin--Author:scott Date:20201015 for锛氳矾鐢辩紦瀛橀棶棰橈紝鍏抽棴浜唗ab椤垫椂鍐嶆墦寮�灏变笉鍒锋柊 #842 + //鍏抽棴椤甸潰鍒欎粠缂撳瓨cache_included_routes涓垹闄よ矾鐢憋紝涓嬫鐐瑰嚮鑿滃崟浼氶噸鏂板姞杞介〉闈� + let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] + if (removeRoute && removeRoute[0]) { + let componentName = removeRoute[0].meta.componentName + console.log("key: ", key); + console.log("componentName: ", componentName); + if(cacheRouterArray.includes(componentName)){ + cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1) + Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) } - if (this.pageList.length === 1) { - this.$message.warning('杩欐槸鏈�鍚庝竴椤碉紝涓嶈兘鍐嶅叧闂簡鍟�') - return - } - console.log("this.pageList ",this.pageList ); - let removeRoute = this.pageList.filter(item => item.fullPath == key) - this.pageList = this.pageList.filter(item => item.fullPath !== key) - let index = this.linkList.indexOf(key) - this.linkList = this.linkList.filter(item => item !== key) - index = index >= this.linkList.length ? this.linkList.length - 1 : index - this.activePage = this.linkList[index] + this.emitPageClosed(removeRoute[0]) + } + //update-end--Author:scott Date:20201015 for锛氳矾鐢辩紦瀛橀棶棰橈紝鍏抽棴浜唗ab椤垫椂鍐嶆墦寮�灏变笉鍒锋柊 #842 - //update-begin--Author:scott Date:20201015 for锛氳矾鐢辩紦瀛橀棶棰橈紝鍏抽棴浜唗ab椤垫椂鍐嶆墦寮�灏变笉鍒锋柊 #842 - //鍏抽棴椤甸潰鍒欎粠缂撳瓨cache_included_routes涓垹闄よ矾鐢憋紝涓嬫鐐瑰嚮鑿滃崟浼氶噸鏂板姞杞介〉闈� - let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] - if (removeRoute && removeRoute[0]) { - let componentName = removeRoute[0].meta.componentName - console.log("key: ", key); - console.log("componentName: ", componentName); - if(cacheRouterArray.includes(componentName)){ - cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1) - Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) - } - this.emitPageClosed(removeRoute[0]) - } - //update-end--Author:scott Date:20201015 for锛氳矾鐢辩紦瀛橀棶棰橈紝鍏抽棴浜唗ab椤垫椂鍐嶆墦寮�灏变笉鍒锋柊 #842 - - }, - // 瑙﹀彂 page-closed 锛堥〉闈㈠叧闂級鍏ㄥ眬浜嬩欢 - emitPageClosed(closedRoute) { - this.$root.$emit('page-closed', { - closedRoute, - pageList: this.pageList, - linkList: this.linkList, - activePage: this.activePage - }) - }, - onContextmenu(e) { - const pagekey = this.getPageKey(e.target) - if (pagekey !== null) { - e.preventDefault() - this.menuVisible = true - } - }, - getPageKey(target, depth) { - depth = depth || 0 - if (depth > 2) { - return null - } - let pageKey = target.getAttribute('pagekey') - pageKey = pageKey || (target.previousElementSibling ? target.previousElementSibling.getAttribute('pagekey') : null) - return pageKey || (target.firstElementChild ? this.getPageKey(target.firstElementChild, ++depth) : null) - }, - onMenuSelect(key, target) { - let pageKey = this.getPageKey(target) - switch (key) { - case '1': - this.closeLeft(pageKey) - break - case '2': - this.closeRight(pageKey) - break - case '3': - this.closeOthers(pageKey) - break - case '4': - this.routeReload() - break - default: - break - } - }, - /* update_begin author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ - closeCurrent(){ - this.remove(this.activePage); - }, - /* update_end author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ - closeOthers(pageKey) { - let index = this.linkList.indexOf(pageKey) - if (pageKey == indexKey || pageKey.indexOf('?ticke=')>=0) { - this.linkList = this.linkList.slice(index, index + 1) - this.pageList = this.pageList.slice(index, index + 1) - this.activePage = this.linkList[0] - } else { - let indexContent = this.pageList.slice(0, 1)[0] - this.linkList = this.linkList.slice(index, index + 1) - this.pageList = this.pageList.slice(index, index + 1) - this.linkList.unshift(indexContent.fullPath) - this.pageList.unshift(indexContent) - this.activePage = this.linkList[1] - } - }, - closeLeft(pageKey) { - if (pageKey == indexKey) { - return - } - let tempList = [...this.pageList] - let indexContent = tempList.slice(0, 1)[0] - let index = this.linkList.indexOf(pageKey) - this.linkList = this.linkList.slice(index) - this.pageList = this.pageList.slice(index) + }, + // 瑙﹀彂 page-closed 锛堥〉闈㈠叧闂級鍏ㄥ眬浜嬩欢 + emitPageClosed(closedRoute) { + this.$root.$emit('page-closed', { + closedRoute, + pageList: this.pageList, + linkList: this.linkList, + activePage: this.activePage + }) + }, + onContextmenu(e) { + const pagekey = this.getPageKey(e.target) + if (pagekey !== null) { + e.preventDefault() + this.menuVisible = true + } + }, + getPageKey(target, depth) { + depth = depth || 0 + if (depth > 2) { + return null + } + let pageKey = target.getAttribute('pagekey') + pageKey = pageKey || (target.previousElementSibling ? target.previousElementSibling.getAttribute('pagekey') : null) + return pageKey || (target.firstElementChild ? this.getPageKey(target.firstElementChild, ++depth) : null) + }, + onMenuSelect(key, target) { + let pageKey = this.getPageKey(target) + switch (key) { + case '1': + this.closeLeft(pageKey) + break + case '2': + this.closeRight(pageKey) + break + case '3': + this.closeOthers(pageKey) + break + case '4': + this.routeReload() + break + default: + break + } + }, + /* update_begin author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ + closeCurrent(){ + this.remove(this.activePage); + }, + /* update_end author:wuxianquan date:20190828 for: 鍏抽棴褰撳墠tab椤碉紝渚涘瓙椤甸潰璋冪敤->鏈涜彍鍗曡兘閰嶇疆澶栭摼锛岀洿鎺ュ脊鍑烘柊椤甸潰鑰屼笉鏄祵鍏frame #428 */ + closeOthers(pageKey) { + let index = this.linkList.indexOf(pageKey) + if (pageKey == indexKey || pageKey.indexOf('?ticke=')>=0) { + this.linkList = this.linkList.slice(index, index + 1) + this.pageList = this.pageList.slice(index, index + 1) + this.activePage = this.linkList[0] + } else { + let indexContent = this.pageList.slice(0, 1)[0] + this.linkList = this.linkList.slice(index, index + 1) + this.pageList = this.pageList.slice(index, index + 1) this.linkList.unshift(indexContent.fullPath) this.pageList.unshift(indexContent) - if (this.linkList.indexOf(this.activePage) < 0) { - this.activePage = this.linkList[0] + this.activePage = this.linkList[1] + } + }, + closeLeft(pageKey) { + if (pageKey == indexKey) { + return + } + let tempList = [...this.pageList] + let indexContent = tempList.slice(0, 1)[0] + let index = this.linkList.indexOf(pageKey) + this.linkList = this.linkList.slice(index) + this.pageList = this.pageList.slice(index) + this.linkList.unshift(indexContent.fullPath) + this.pageList.unshift(indexContent) + if (this.linkList.indexOf(this.activePage) < 0) { + this.activePage = this.linkList[0] + } + }, + closeRight(pageKey) { + let index = this.linkList.indexOf(pageKey) + this.linkList = this.linkList.slice(0, index + 1) + this.pageList = this.pageList.slice(0, index + 1) + if (this.linkList.indexOf(this.activePage < 0)) { + this.activePage = this.linkList[this.linkList.length - 1] + } + }, + //update-begin-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle + dynamicRouterShow(key,title){ + let keyIndex = this.linkList.indexOf(key) + if(keyIndex>=0){ + let currRouter = this.pageList[keyIndex] + let meta = Object.assign({},currRouter.meta,{title:title}) + this.pageList.splice(keyIndex, 1, Object.assign({},currRouter,{meta:meta})) + if (key === this.activePage) { + this.changeTitle(title) } - }, - closeRight(pageKey) { - let index = this.linkList.indexOf(pageKey) - this.linkList = this.linkList.slice(0, index + 1) - this.pageList = this.pageList.slice(0, index + 1) - if (this.linkList.indexOf(this.activePage < 0)) { - this.activePage = this.linkList[this.linkList.length - 1] - } - }, - //update-begin-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle - dynamicRouterShow(key,title){ - let keyIndex = this.linkList.indexOf(key) - if(keyIndex>=0){ - let currRouter = this.pageList[keyIndex] - let meta = Object.assign({},currRouter.meta,{title:title}) - this.pageList.splice(keyIndex, 1, Object.assign({},currRouter,{meta:meta})) - if (key === this.activePage) { - this.changeTitle(title) - } - } - }, - //update-end-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle + } + }, + //update-end-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle - //update-begin-author:taoyan date:20191008 for:璺敱鍒锋柊 - routeReload(){ - this.reloadFlag = false - let ToggleMultipage = "ToggleMultipage" - this.$store.dispatch(ToggleMultipage,false) - this.$nextTick(()=>{ - this.$store.dispatch(ToggleMultipage,true) - this.reloadFlag = true - }) - }, - //update-end-author:taoyan date:20191008 for:璺敱鍒锋柊 - //鏂板涓�涓繑鍥炴柟娉� - excuteCallback(callback){ - callback() - }, - } + //update-begin-author:taoyan date:20191008 for:璺敱鍒锋柊 + routeReload(){ + this.reloadFlag = false + let ToggleMultipage = "ToggleMultipage" + this.$store.dispatch(ToggleMultipage,false) + this.$nextTick(()=>{ + this.$store.dispatch(ToggleMultipage,true) + this.reloadFlag = true + }) + }, + //update-end-author:taoyan date:20191008 for:璺敱鍒锋柊 + //鏂板涓�涓繑鍥炴柟娉� + excuteCallback(callback){ + callback() + }, } +} </script> <style lang="less"> - /* - * The following styles are auto-applied to elements with - * transition="page-transition" when their visibility is toggled - * by Vue.js. - * - * You can easily play with the page transition by editing - * these styles. - */ +/* +* The following styles are auto-applied to elements with +* transition="page-transition" when their visibility is toggled +* by Vue.js. +* +* You can easily play with the page transition by editing +* these styles. +*/ - .page-transition-enter { - opacity: 0; +.page-transition-enter { + opacity: 0; +} + +.page-transition-leave-active { + opacity: 0; +} + +.page-transition-enter .page-transition-container, +.page-transition-leave-active .page-transition-container { + -webkit-transform: scale(1.1); + transform: scale(1.1); +} + +/*缇庡寲寮瑰嚭Tab鏍峰紡*/ +.ant-tabs-nav-container { + margin-top: 4px; +} + +/* 淇敼 ant-tabs 鏍峰紡 */ +.tab-layout-tabs.ant-tabs { + border-bottom: 1px solid #ccc; + border-left: 1px solid #ccc; + background-color: white; + padding: 0 20px; + + .ant-tabs-bar { + margin: 4px 0 0; + border: none; } - .page-transition-leave-active { - opacity: 0; - } +} - .page-transition-enter .page-transition-container, - .page-transition-leave-active .page-transition-container { - -webkit-transform: scale(1.1); - transform: scale(1.1); - } +.tab-layout-tabs.ant-tabs { - /*缇庡寲寮瑰嚭Tab鏍峰紡*/ - .ant-tabs-nav-container { - margin-top: 4px; - } + &.ant-tabs-card .ant-tabs-tab { - /* 淇敼 ant-tabs 鏍峰紡 */ - .tab-layout-tabs.ant-tabs { - border-bottom: 1px solid #ccc; - border-left: 1px solid #ccc; - background-color: white; - padding: 0 20px; + padding: 0 24px !important; + background-color: white !important; + margin-right: 10px !important; - .ant-tabs-bar { - margin: 4px 0 0; - border: none; + .ant-tabs-close-x { + width: 12px !important; + height: 12px !important; + opacity: 0 !important; + cursor: pointer !important; + font-size: 12px !important; + margin: 0 !important; + position: absolute; + top: 36%; + right: 6px; + } + + &:hover .ant-tabs-close-x { + opacity: 1 !important; } } - .tab-layout-tabs.ant-tabs { +} - &.ant-tabs-card .ant-tabs-tab { - - padding: 0 24px !important; - background-color: white !important; - margin-right: 10px !important; - - .ant-tabs-close-x { - width: 12px !important; - height: 12px !important; - opacity: 0 !important; - cursor: pointer !important; - font-size: 12px !important; - margin: 0 !important; - position: absolute; - top: 36%; - right: 6px; - } - - &:hover .ant-tabs-close-x { - opacity: 1 !important; - } - - } - +.tab-layout-tabs.ant-tabs.ant-tabs-card > .ant-tabs-bar { + .ant-tabs-tab { + border: none !important; + border-bottom: 1px solid transparent !important; } - - .tab-layout-tabs.ant-tabs.ant-tabs-card > .ant-tabs-bar { - .ant-tabs-tab { - border: none !important; - border-bottom: 1px solid transparent !important; - } - .ant-tabs-tab-active { - border-color: @primary-color!important; - } + .ant-tabs-tab-active { + border-color: @primary-color!important; } +} </style> diff --git a/src/components/page/GlobalFooter.vue b/src/components/page/GlobalFooter.vue index c71d938..42911dc 100644 --- a/src/components/page/GlobalFooter.vue +++ b/src/components/page/GlobalFooter.vue @@ -9,33 +9,34 @@ </template> <script> - export default { - name: 'LayoutFooter' - } +export default { + name: 'LayoutFooter' +} </script> <style lang="less" scoped> - .footer { - text-align: center; +.footer { + text-align: center; - .links { - margin-bottom: 8px; + .links { + margin-bottom: 8px; - a { - color: rgba(0, 0, 0, .45); + a { + color: rgba(0, 0, 0, .45); - &:hover { - color: rgba(0, 0, 0, .65); - } + &:hover { + color: rgba(0, 0, 0, .65); + } - &:not(:last-child) { - margin-right: 40px; - } + &:not(:last-child) { + margin-right: 40px; } } - .copyright { - color: rgba(0, 0, 0, .45); - font-size: 14px; - } } + + .copyright { + color: rgba(0, 0, 0, .45); + font-size: 14px; + } +} </style> \ No newline at end of file diff --git a/src/components/page/GlobalLayout.vue b/src/components/page/GlobalLayout.vue index 7b0aa51..fad7f31 100644 --- a/src/components/page/GlobalLayout.vue +++ b/src/components/page/GlobalLayout.vue @@ -86,277 +86,293 @@ </template> <script> - import SideMenu from '@/components/menu/SideMenu' - import GlobalHeader from '@/components/page/GlobalHeader' - import GlobalFooter from '@/components/page/GlobalFooter' - import { triggerWindowResizeEvent } from '@/utils/util' - import { mapActions, mapState } from 'vuex' - import { mixin, mixinDevice } from '@/utils/mixin.js' - // update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ - // import SettingDrawer from '@/components/setting/SettingDrawer' - // 娉ㄩ噴杩欎釜鍥犱负鍦ㄤ釜浜鸿缃ā鍧楀凡缁忓姞杞戒簡SettingDrawer椤甸潰 - // update-end ---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ +import SideMenu from '@/components/menu/SideMenu' +import GlobalHeader from '@/components/page/GlobalHeader' +import GlobalFooter from '@/components/page/GlobalFooter' +import { triggerWindowResizeEvent } from '@/utils/util' +import { mapActions, mapState } from 'vuex' +import { mixin, mixinDevice } from '@/utils/mixin.js' +// update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ +// import SettingDrawer from '@/components/setting/SettingDrawer' +// 娉ㄩ噴杩欎釜鍥犱负鍦ㄤ釜浜鸿缃ā鍧楀凡缁忓姞杞戒簡SettingDrawer椤甸潰 +// update-end ---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ - export default { - name: 'GlobalLayout', - components: { - SideMenu, - GlobalHeader, - GlobalFooter, - // update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ - // // SettingDrawer - // 娉ㄩ噴杩欎釜鍥犱负鍦ㄤ釜浜鸿缃ā鍧楀凡缁忓姞杞戒簡SettingDrawer椤甸潰 - // update-end ---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ +export default { + name: 'GlobalLayout', + components: { + SideMenu, + GlobalHeader, + GlobalFooter, + // update-start---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ + // // SettingDrawer + // 娉ㄩ噴杩欎釜鍥犱负鍦ㄤ釜浜鸿缃ā鍧楀凡缁忓姞杞戒簡SettingDrawer椤甸潰 + // update-end ---- author:os_chengtgen -- date:20190830 -- for:issues/463 -缂栬瘧涓婚棰滆壊宸茬敓鏁堬紝浣嗚繕涓�鐩磋浆鍦堬紝鏄剧ず涓婚 姝e湪缂栬瘧 ------ - }, - mixins: [mixin, mixinDevice], - data() { - return { - collapsed: false, - activeMenu:{}, - menus: [] - } - }, - computed: { - ...mapState({ - // 涓昏矾鐢� - mainRouters: state => state.permission.addRouters, - // 鍚庡彴鑿滃崟 - permissionMenuList: state => state.user.permissionList - }) - }, - watch: { - sidebarOpened(val) { - this.collapsed = !val - } - }, - created() { - //--update-begin----author:scott---date:20190320------for:鏍规嵁鍚庡彴鑿滃崟閰嶇疆锛屽垽鏂槸鍚﹁矾鐢辫彍鍗曞瓧娈碉紝鍔ㄦ�侀�夋嫨鏄惁鐢熸垚璺敱锛堜负浜嗘敮鎸佸弬鏁癠RL鑿滃崟锛�------ - //this.menus = this.mainRouters.find((item) => item.path === '/').children; - this.menus = this.permissionMenuList - - //--update-begin----author:liusq---date:20210223------for:鍏充簬娴嬭竟鑿滃崟閬尅鍐呭闂璇︾粏璇存槑 #2255 - this.collapsed=!this.sidebarOpened; - //--update-begin----author:liusq---date:20210223------for:鍏充簬娴嬭竟鑿滃崟閬尅鍐呭闂璇︾粏璇存槑 #2255 - - // 鏍规嵁鍚庡彴閰嶇疆鑿滃崟锛岄噸鏂版帓搴忓姞杞借矾鐢变俊鎭� - //console.log('----鍔犺浇鑿滃崟閫昏緫----') - //console.log(this.mainRouters) - //console.log(this.permissionMenuList) - //console.log('----navTheme------'+this.navTheme) - //--update-end----author:scott---date:20190320------for:鏍规嵁鍚庡彴鑿滃崟閰嶇疆锛屽垽鏂槸鍚﹁矾鐢辫彍鍗曞瓧娈碉紝鍔ㄦ�侀�夋嫨鏄惁鐢熸垚璺敱锛堜负浜嗘敮鎸佸弬鏁癠RL鑿滃崟锛�------ - }, - methods: { - ...mapActions(['setSidebar']), - toggle() { - this.collapsed = !this.collapsed - this.setSidebar(!this.collapsed) - triggerWindowResizeEvent() - }, - menuSelect() { - if (!this.isDesktop()) { - this.collapsed = false - } - }, - //update-begin-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle - myMenuSelect(value){ - //姝ゅ瑙﹀彂鍔ㄦ�佽矾鐢辫鐐瑰嚮浜嬩欢 - this.findMenuBykey(this.menus,value.key) - this.$emit("dynamicRouterShow",value.key,this.activeMenu.meta.title) - }, - findMenuBykey(menus,key){ - for(let i of menus){ - if(i.path==key){ - this.activeMenu = {...i} - }else if(i.children && i.children.length>0){ - this.findMenuBykey(i.children,key) - } - } - }, - //update-end-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle - - // update-begin-author:sunjianlei date:20210409 for: 淇鍔ㄦ�佸姛鑳芥祴璇曡彍鍗曘�佸甫鍙傛暟鑿滃崟鏍囬閿欒銆佸睍寮�閿欒鐨勯棶棰� - handleUpdateMenuTitle(value) { - this.findMenuBykey(this.menus, value.path) - this.activeMenu.meta.title = value.meta.title - this.$emit('dynamicRouterShow', value.path, this.activeMenu.meta.title) - }, - // update-end-author:sunjianlei date:20210409 for: 淇鍔ㄦ�佸姛鑳芥祴璇曡彍鍗曘�佸甫鍙傛暟鑿滃崟鏍囬閿欒銆佸睍寮�閿欒鐨勯棶棰� - + }, + mixins: [mixin, mixinDevice], + data() { + return { + collapsed: false, + activeMenu:{}, + menus: [] } + }, + computed: { + ...mapState({ + // 涓昏矾鐢� + mainRouters: state => state.permission.addRouters, + // 鍚庡彴鑿滃崟 + permissionMenuList: state => state.user.permissionList + }) + }, + watch: { + sidebarOpened(val) { + this.collapsed = !val + } + }, + created() { + //--update-begin----author:scott---date:20190320------for:鏍规嵁鍚庡彴鑿滃崟閰嶇疆锛屽垽鏂槸鍚﹁矾鐢辫彍鍗曞瓧娈碉紝鍔ㄦ�侀�夋嫨鏄惁鐢熸垚璺敱锛堜负浜嗘敮鎸佸弬鏁癠RL鑿滃崟锛�------ + //this.menus = this.mainRouters.find((item) => item.path === '/').children; + this.menus = this.permissionMenuList + + //--update-begin----author:liusq---date:20210223------for:鍏充簬娴嬭竟鑿滃崟閬尅鍐呭闂璇︾粏璇存槑 #2255 + this.collapsed=!this.sidebarOpened; + //--update-begin----author:liusq---date:20210223------for:鍏充簬娴嬭竟鑿滃崟閬尅鍐呭闂璇︾粏璇存槑 #2255 + + // 鏍规嵁鍚庡彴閰嶇疆鑿滃崟锛岄噸鏂版帓搴忓姞杞借矾鐢变俊鎭� + //console.log('----鍔犺浇鑿滃崟閫昏緫----') + //console.log(this.mainRouters) + //console.log(this.permissionMenuList) + //console.log('----navTheme------'+this.navTheme) + //--update-end----author:scott---date:20190320------for:鏍规嵁鍚庡彴鑿滃崟閰嶇疆锛屽垽鏂槸鍚﹁矾鐢辫彍鍗曞瓧娈碉紝鍔ㄦ�侀�夋嫨鏄惁鐢熸垚璺敱锛堜负浜嗘敮鎸佸弬鏁癠RL鑿滃崟锛�------ + }, + methods: { + ...mapActions(['setSidebar']), + toggle() { + this.collapsed = !this.collapsed + this.setSidebar(!this.collapsed) + triggerWindowResizeEvent() + }, + menuSelect() { + if (!this.isDesktop()) { + this.collapsed = false + } + }, + //update-begin-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle + myMenuSelect(value){ + //姝ゅ瑙﹀彂鍔ㄦ�佽矾鐢辫鐐瑰嚮浜嬩欢 + this.findMenuBykey(this.menus,value.key) + this.$emit("dynamicRouterShow",value.key,this.activeMenu.meta.title) + }, + findMenuBykey(menus,key){ + for(let i of menus){ + if(i.path==key){ + this.activeMenu = {...i} + }else if(i.children && i.children.length>0){ + this.findMenuBykey(i.children,key) + } + } + }, + //update-end-author:taoyan date:20190430 for:鍔ㄦ�佽矾鐢眛itle鏄剧ず閰嶇疆鐨勮彍鍗晅itle鑰屼笉鏄叾瀵瑰簲璺敱鐨則itle + + // update-begin-author:sunjianlei date:20210409 for: 淇鍔ㄦ�佸姛鑳芥祴璇曡彍鍗曘�佸甫鍙傛暟鑿滃崟鏍囬閿欒銆佸睍寮�閿欒鐨勯棶棰� + handleUpdateMenuTitle(value) { + this.findMenuBykey(this.menus, value.path) + this.activeMenu.meta.title = value.meta.title + this.$emit('dynamicRouterShow', value.path, this.activeMenu.meta.title) + }, + // update-end-author:sunjianlei date:20210409 for: 淇鍔ㄦ�佸姛鑳芥祴璇曡彍鍗曘�佸甫鍙傛暟鑿滃崟鏍囬閿欒銆佸睍寮�閿欒鐨勯棶棰� + } +} </script> <style lang="less"> - body { - // 鎵撳紑婊氬姩鏉″浐瀹氭樉绀� - // 娉ㄩ噴鍘熷洜锛歩ssues/I5VK11 - //overflow-y: scroll; +body { + // 鎵撳紑婊氬姩鏉″浐瀹氭樉绀� + // 娉ㄩ噴鍘熷洜锛歩ssues/I5VK11 + //overflow-y: scroll; - &.colorWeak { - filter: invert(80%); - } + &.colorWeak { + filter: invert(80%); } +} - .layout { - min-height: 100vh !important; - overflow-x: hidden; +.layout { + min-height: 100vh !important; + overflow-x: hidden; - &.mobile { + &.mobile { - .ant-layout-content { + .ant-layout-content { - .content { - margin: 24px 0 0; - } - } - - /** - * ant-table-wrapper - * 瑕嗙洊鐨勮〃鏍兼墜鏈烘ā寮忔牱寮忥紝濡傛灉鎯充慨鏀瑰湪鎵嬫満涓婅〃鏍兼渶浣庡搴︼紝鍙互鍦ㄨ繖閲屾敼鍔� - */ - .ant-table-wrapper { - .ant-table-content { - overflow-y: auto; - } - .ant-table-body { - // update-begin---author:sunjianlei Date:20220104 for锛� 銆怞TC-480銆戠Щ鍔ㄧ涓嶆敮鎸佸乏鍙虫嫋鍔紝闇�瑕佹敞閲婃帀姝ゆ浠g爜 ------------ - //min-width: 800px; - // update-end---author:sunjianlei Date:20220104 for锛� 銆怞TC-480銆戠Щ鍔ㄧ涓嶆敮鎸佸乏鍙虫嫋鍔紝闇�瑕佹敞閲婃帀姝ゆ浠g爜 ------------ - } - } - .sidemenu { - .ant-header-fixedHeader { - - &.ant-header-side-opened, &.ant-header-side-closed { - width: 100% - } - } - } - - .topmenu { - /* 蹇呴』涓� topmenu 鎵嶈兘鍚敤娴佸紡甯冨眬 */ - &.content-width-Fluid { - .header-index-wide { - margin-left: 0; - } - } - } - .header, .top-nav-header-index { - .user-wrapper .action { - padding: 0 12px; - } + .content { + margin: 24px 0 0; } } - &.ant-layout-has-sider { - flex-direction: row; + /** + * ant-table-wrapper + * 瑕嗙洊鐨勮〃鏍兼墜鏈烘ā寮忔牱寮忥紝濡傛灉鎯充慨鏀瑰湪鎵嬫満涓婅〃鏍兼渶浣庡搴︼紝鍙互鍦ㄨ繖閲屾敼鍔� + */ + .ant-table-wrapper { + .ant-table-content { + overflow-y: auto; + } + .ant-table-body { + // update-begin---author:sunjianlei Date:20220104 for锛� 銆怞TC-480銆戠Щ鍔ㄧ涓嶆敮鎸佸乏鍙虫嫋鍔紝闇�瑕佹敞閲婃帀姝ゆ浠g爜 ------------ + //min-width: 800px; + // update-end---author:sunjianlei Date:20220104 for锛� 銆怞TC-480銆戠Щ鍔ㄧ涓嶆敮鎸佸乏鍙虫嫋鍔紝闇�瑕佹敞閲婃帀姝ゆ浠g爜 ------------ + } } + .sidemenu { + .ant-header-fixedHeader { - .trigger { - font-size: 22px; - line-height: 42px; - padding: 0 18px; - cursor: pointer; - transition: color 300ms, background 300ms; - - &:hover { - background: rgba(255, 255, 255, 0.3); + &.ant-header-side-opened, &.ant-header-side-closed { + width: 100% + } } } .topmenu { - .ant-header-fixedHeader { - position: fixed; - top: 0; - right: 0; - z-index: 9; - width: 100%; - transition: width .2s; - - &.ant-header-side-opened { - width: 100%; - } - - &.ant-header-side-closed { - width: 100%; - } - } /* 蹇呴』涓� topmenu 鎵嶈兘鍚敤娴佸紡甯冨眬 */ &.content-width-Fluid { .header-index-wide { - max-width: unset; - margin-left: 24px; - } - - .page-header-index-wide { - max-width: unset; - } - } - - } - - .sidemenu { - .ant-header-fixedHeader { - position: fixed; - top: 0; - right: 0; - z-index: 9; - width: 100%; - transition: width .2s; - - &.ant-header-side-opened { - width: calc(100% - 200px) - } - - &.ant-header-side-closed { - width: calc(100% - 80px) + margin-left: 0; } } } - - .header { - height: 64px; - padding: 0 12px 0 0; - background: #fff; - box-shadow: 0 1px 4px rgba(0, 21, 41, .08); - position: relative; - } - .header, .top-nav-header-index { + .user-wrapper .action { + padding: 0 12px; + } + } + } + &.ant-layout-has-sider { + flex-direction: row; + } + + .trigger { + font-size: 22px; + line-height: 42px; + padding: 0 18px; + cursor: pointer; + transition: color 300ms, background 300ms; + + &:hover { + background: rgba(255, 255, 255, 0.3); + } + } + + .topmenu { + .ant-header-fixedHeader { + position: fixed; + top: 0; + right: 0; + z-index: 9; + width: 100%; + transition: width .2s; + + &.ant-header-side-opened { + width: 100%; + } + + &.ant-header-side-closed { + width: 100%; + } + } + /* 蹇呴』涓� topmenu 鎵嶈兘鍚敤娴佸紡甯冨眬 */ + &.content-width-Fluid { + .header-index-wide { + max-width: unset; + margin-left: 24px; + } + + .page-header-index-wide { + max-width: unset; + } + } + + } + + .sidemenu { + .ant-header-fixedHeader { + position: fixed; + top: 0; + right: 0; + z-index: 9; + width: 100%; + transition: width .2s; + + &.ant-header-side-opened { + width: calc(100% - 200px) + } + + &.ant-header-side-closed { + width: calc(100% - 80px) + } + } + } + + .header { + height: 64px; + padding: 0 12px 0 0; + background: #fff; + box-shadow: 0 1px 4px rgba(0, 21, 41, .08); + position: relative; + } + + .header, .top-nav-header-index { + + .user-wrapper { + float: right; + height: 100%; + + .action { + cursor: pointer; + padding: 0 14px; + display: inline-block; + transition: all .3s; + + height: 70%; + line-height: 46px; + + &.action-full { + height: 100%; + } + + &:hover { + background: rgba(255, 255, 255, 0.3); + } + + .avatar { + margin: 20px 10px 20px 0; + color: #1890ff; + background: hsla(0, 0%, 100%, .85); + vertical-align: middle; + } + + .icon { + font-size: 16px; + padding: 4px; + } + + .anticon { + color: inherit; + } + } + } + + &.dark { .user-wrapper { - float: right; - height: 100%; .action { - cursor: pointer; - padding: 0 14px; - display: inline-block; - transition: all .3s; - - height: 70%; - line-height: 46px; - - &.action-full { - height: 100%; - } + color: black; &:hover { - background: rgba(255, 255, 255, 0.3); - } - - .avatar { - margin: 20px 10px 20px 0; - color: #1890ff; - background: hsla(0, 0%, 100%, .85); - vertical-align: middle; - } - - .icon { - font-size: 16px; - padding: 4px; + background: rgba(0, 0, 0, 0.05); } .anticon { @@ -364,336 +380,320 @@ } } } - - &.dark { - .user-wrapper { - - .action { - color: black; - - &:hover { - background: rgba(0, 0, 0, 0.05); - } - - .anticon { - color: inherit; - } - } - } - } } + } - &.mobile { - .top-nav-header-index { - - .header-index-wide { - - .header-index-left { - - .trigger { - color: rgba(255, 255, 255, 0.85); - padding: 0 12px; - } - - .logo.top-nav-header { - text-align: center; - width: 56px; - line-height: 58px; - } - } - } - - .user-wrapper .action .avatar { - margin: 20px 0; - } - - &.light { - - .header-index-wide { - - .header-index-left { - .trigger { - color: rgba(0, 0, 0, 0.65); - } - } - } - // - } - } - } - - &.tablet { - // overflow: hidden; text-overflow:ellipsis; white-space: nowrap; - .top-nav-header-index { - - .header-index-wide { - - .header-index-left { - .logo > a { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - } - } - } - - } - + &.mobile { .top-nav-header-index { - box-shadow: 0 1px 4px rgba(0, 21, 41, .08); - position: relative; - transition: background .3s, width .2s; .header-index-wide { - width: 100%; - margin: auto; - padding: 0 20px 0 0; - display: flex; - height: 59px; - - .ant-menu.ant-menu-horizontal { - border: none; - height: 64px; - line-height: 64px; - } .header-index-left { - flex: 1 1; - display: flex; + + .trigger { + color: rgba(255, 255, 255, 0.85); + padding: 0 12px; + } .logo.top-nav-header { - width: 165px; - height: 64px; - position: relative; - line-height: 64px; - transition: all .3s; - overflow: hidden; - - img { - display: inline-block; - vertical-align: middle; - height: 32px; - } - - h1 { - color: #fff; - display: inline-block; - vertical-align: top; - font-size: 16px; - margin: 0 0 0 12px; - font-weight: 400; - } + text-align: center; + width: 56px; + line-height: 58px; } } + } - .header-index-right { - float: right; - height: 59px; - overflow: hidden; - .action:hover { - background-color: rgba(0, 0, 0, 0.05); - } - } + .user-wrapper .action .avatar { + margin: 20px 0; } &.light { - background-color: #fff; .header-index-wide { + .header-index-left { - .logo { - h1 { - color: #002140; - } + .trigger { + color: rgba(0, 0, 0, 0.65); } } } + // } + } + } - &.dark { + &.tablet { + // overflow: hidden; text-overflow:ellipsis; white-space: nowrap; + .top-nav-header-index { - .user-wrapper { + .header-index-wide { - .action { - color: white; - - &:hover { - background: rgba(255, 255, 255, 0.3); - } + .header-index-left { + .logo > a { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } } - .header-index-wide .header-index-left .trigger:hover { - background: rgba(255, 255, 255, 0.3); - } } - - } - - // 鍐呭鍖� - .layout-content { - margin: 24px 24px 0px; - height: 64px; - padding: 0 12px 0 0; } } - .topmenu { - .page-header-index-wide { - margin: 0 auto; - width: 100%; - } - } - - // drawer-sider 鑷畾涔� - .ant-drawer.drawer-sider { - .sider { - box-shadow: none; - } - - &.dark { - .ant-drawer-content { - background-color: rgb(0, 21, 41); - } - } - &.light { - box-shadow: none; - .ant-drawer-content { - background-color: #fff; - } - } - - .ant-drawer-body { - padding: 0 - } - } - - // 鑿滃崟鏍峰紡 - .sider { - box-shadow: 2px 116px 6px 0 rgba(0, 21, 41, .35); + .top-nav-header-index { + box-shadow: 0 1px 4px rgba(0, 21, 41, .08); position: relative; - z-index: 10; + transition: background .3s, width .2s; - &.ant-fixed-sidemenu { - position: fixed; - height: 100%; - } + .header-index-wide { + width: 100%; + margin: auto; + padding: 0 20px 0 0; + display: flex; + height: 59px; - .logo { - height: 64px; - position: relative; - line-height: 64px; - padding-left: 24px; - -webkit-transition: all .3s; - transition: all .3s; - background: #002140; - overflow: hidden; - - img, h1 { - display: inline-block; - vertical-align: middle; + .ant-menu.ant-menu-horizontal { + border: none; + height: 64px; + line-height: 64px; } - img { - height: 32px; + .header-index-left { + flex: 1 1; + display: flex; + + .logo.top-nav-header { + width: 165px; + height: 64px; + position: relative; + line-height: 64px; + transition: all .3s; + overflow: hidden; + + img { + display: inline-block; + vertical-align: middle; + height: 32px; + } + + h1 { + color: #fff; + display: inline-block; + vertical-align: top; + font-size: 16px; + margin: 0 0 0 12px; + font-weight: 400; + } + } } - h1 { - color: #fff; - font-size: 18px; - margin: 0 0 0 8px; - font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: 600; + .header-index-right { + float: right; + height: 59px; + overflow: hidden; + .action:hover { + background-color: rgba(0, 0, 0, 0.05); + } } } &.light { background-color: #fff; - box-shadow: 2px 116px 8px 0 rgba(29, 35, 41, 0.05); - .logo { - background: #fff; - box-shadow: 1px 1px 0 0 #e8e8e8; - - h1 { - color: unset; + .header-index-wide { + .header-index-left { + .logo { + h1 { + color: #002140; + } + } } } + } - .ant-menu-light { - border-right-color: transparent; + &.dark { + + .user-wrapper { + + .action { + color: white; + + &:hover { + background: rgba(255, 255, 255, 0.3); + } + } + } + .header-index-wide .header-index-left .trigger:hover { + background: rgba(255, 255, 255, 0.3); } } } - // 澶栫疆鐨勬牱寮忔帶鍒� - .user-dropdown-menu-wrapper.ant-dropdown-menu { - padding: 4px 0; + // 鍐呭鍖� + .layout-content { + margin: 24px 24px 0px; + height: 64px; + padding: 0 12px 0 0; + } - .ant-dropdown-menu-item { - width: 160px; +} + +.topmenu { + .page-header-index-wide { + margin: 0 auto; + width: 100%; + } +} + +// drawer-sider 鑷畾涔� +.ant-drawer.drawer-sider { + .sider { + box-shadow: none; + } + + &.dark { + .ant-drawer-content { + background-color: rgb(0, 21, 41); + } + } + &.light { + box-shadow: none; + .ant-drawer-content { + background-color: #fff; + } + } + + .ant-drawer-body { + padding: 0 + } +} + +// 鑿滃崟鏍峰紡 +.sider { + box-shadow: 2px 116px 6px 0 rgba(0, 21, 41, .35); + position: relative; + z-index: 10; + + &.ant-fixed-sidemenu { + position: fixed; + height: 100%; + } + + .logo { + height: 64px; + position: relative; + line-height: 64px; + padding-left: 24px; + -webkit-transition: all .3s; + transition: all .3s; + background: #002140; + overflow: hidden; + + img, h1 { + display: inline-block; + vertical-align: middle; } - .ant-dropdown-menu-item > .anticon:first-child, - .ant-dropdown-menu-item > a > .anticon:first-child, - .ant-dropdown-menu-submenu-title > .anticon:first-child - .ant-dropdown-menu-submenu-title > a > .anticon:first-child { - min-width: 12px; + img { + height: 32px; + } + + h1 { + color: #fff; + font-size: 18px; + margin: 0 0 0 8px; + font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: 600; + } + } + + &.light { + background-color: #fff; + box-shadow: 2px 116px 8px 0 rgba(29, 35, 41, 0.05); + + .logo { + background: #fff; + box-shadow: 1px 1px 0 0 #e8e8e8; + + h1 { + color: unset; + } + } + + .ant-menu-light { + border-right-color: transparent; + } + } + +} + +// 澶栫疆鐨勬牱寮忔帶鍒� +.user-dropdown-menu-wrapper.ant-dropdown-menu { + padding: 4px 0; + + .ant-dropdown-menu-item { + width: 160px; + } + + .ant-dropdown-menu-item > .anticon:first-child, + .ant-dropdown-menu-item > a > .anticon:first-child, + .ant-dropdown-menu-submenu-title > .anticon:first-child + .ant-dropdown-menu-submenu-title > a > .anticon:first-child { + min-width: 12px; + margin-right: 8px; + } + +} + +// 鏁版嵁鍒楄〃 鏍峰紡 +.table-alert { + margin-bottom: 16px; +} + +.table-page-search-wrapper { + + .ant-form-inline { + + .ant-form-item { + display: flex; + margin-bottom: 24px; + margin-right: 0; + + .ant-form-item-control-wrapper { + flex: 1 1; + display: inline-block; + vertical-align: middle; + } + + > .ant-form-item-label { + line-height: 32px; + padding-right: 8px; + width: auto; + } + .ant-form-item-control { + height: 32px; + line-height: 32px; + } + } + } + + .table-page-search-submitButtons { + display: block; + margin-bottom: 24px; + white-space: nowrap; + } + +} + +.content { + + .table-operator { + margin-bottom: 18px; + + button { margin-right: 8px; } - } - - // 鏁版嵁鍒楄〃 鏍峰紡 - .table-alert { - margin-bottom: 16px; - } - - .table-page-search-wrapper { - - .ant-form-inline { - - .ant-form-item { - display: flex; - margin-bottom: 24px; - margin-right: 0; - - .ant-form-item-control-wrapper { - flex: 1 1; - display: inline-block; - vertical-align: middle; - } - - > .ant-form-item-label { - line-height: 32px; - padding-right: 8px; - width: auto; - } - .ant-form-item-control { - height: 32px; - line-height: 32px; - } - } - } - - .table-page-search-submitButtons { - display: block; - margin-bottom: 24px; - white-space: nowrap; - } - - } - - .content { - - .table-operator { - margin-bottom: 18px; - - button { - margin-right: 8px; - } - } - } +} </style> diff --git a/src/views/dashboard/Analysis.vue b/src/views/dashboard/Analysis.vue index 1503277..156fa95 100644 --- a/src/views/dashboard/Analysis.vue +++ b/src/views/dashboard/Analysis.vue @@ -1,25 +1,75 @@ <template> - <div> - - </div> + <Component :is="currentSignage" :userType="userType" :productionCode="productionCode" + :workshopSectionProductionCode="workshopSectionProductionCode" + > + </Component> </template> <script> + import signageApi from '@/api/signage' + import DncManagerSignage from './dncIndex/DncManagerSignage.vue' + export default { name: "Analysis", components: { - + DncManagerSignage }, data() { return { - + currentSignage: '', + productionCode: '', + branchFactoryProductionCode: '', + workshopSectionProductionCode: '', + userType: '' } }, created() { - + this.showModuleByUserInfo() }, methods: { - + showModuleByUserInfo() { + const id = JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id + signageApi.getUserByIdApi(id) + .then(res => { + console.log("res", res.userType) + this.userType = res.userType + switch (this.userType) { + // case 1: + // //鍒�鍏风鐞� + // this.currentSignage = 'EquipmentSignage' + // break + // case 2: + // //mdc + // this.currentSignage = 'WorkshopSectionSignage' + // break + case 3: + //dnc + this.currentSignage = 'DncManagerSignage' + break + // case 4: + // //璁惧绠$悊 + // this.currentSignage = 'IndexSignage' + // break + default: + this.currentSignage = '' + break + } + }) + } } } -</script> \ No newline at end of file + + +</script> +<style lang="less" scoped> +/deep/ .back-nav { + width: 100px; + height: 30px; + color: #fff; + position: absolute; + top: 15px; + left: 10px; + cursor: pointer; + z-index: 9999 +} +</style> \ No newline at end of file diff --git a/src/views/dashboard/TodoList.vue b/src/views/dashboard/TodoList.vue new file mode 100644 index 0000000..724d8b5 --- /dev/null +++ b/src/views/dashboard/TodoList.vue @@ -0,0 +1,642 @@ +<template> + <div> + <a-spin :spinning="loading"> + <div class="todo-container"> + <el-dropdown + v-for="(item, index) in todoList" + :key="index" + class="todo-item" + @click.native="handelDetail(item)" + > + <span class="todo-title" >{{ item.description }}</span> +<!-- <el-dropdown-menu slot="dropdown">--> +<!-- <el-dropdown-item @click.native="handelDetail(item)">鎵ц/瀹℃壒</el-dropdown-item>--> +<!-- </el-dropdown-menu>--> + <div class="todo-info"> + <div class="todo-node">{{ item.name }}</div> + <div class="todo-time">{{ item.createTime }}</div> + </div> + </el-dropdown> + </div> + </a-spin> + + <AssignFileStreamHandle + ref='modalFormApproval' + :selectShenpiData='selectShenpiData' + @searchReset='searchReset' + ></AssignFileStreamHandle> + <DispatchFileHandle + ref='modalFormDispatchFileXq' + :selectShenpiData='selectDispatchFileXqData' + @searchReset='searchReset' + ></DispatchFileHandle> + <StandardizedProcessHandle + ref='StandardizedProcessHandle' + :selectShenpiData='selectDispatchFileXqData' + @searchReset='searchReset' + ></StandardizedProcessHandle> + <DispatchFileBachHandleStyle + ref='modalFormDispatchFileBatch' + @ok='modalFormOk' + @searchReset='searchReset' + ></DispatchFileBachHandleStyle> + <!--鍗曚釜娴佺▼澶勭悊--> + <InspectionOrderHandle + ref='modalFormInspectionOrder' + :selectShenpiData='selectInspectionOrderData' + @searchReset='searchReset' + ></InspectionOrderHandle> + <week-maintenance-approval-modal + ref='weekMaintenanceApprovalModal' + :selectShenpiData='selectWeekMaintenanceData' + @searchReset='searchReset' + ></week-maintenance-approval-modal> + <repair-order-approval-modal + ref='repairOrderApprovalModal' + :selectShenpiData='selectRepairOrderData' + @searchReset='searchReset' + ></repair-order-approval-modal> + <out-bound-order-handle + ref='outBoundOrderHandle' + :selectShenpiData='selectOutBoundOrderData' + @searchReset='searchReset' + ></out-bound-order-handle> + <stocktaking-bound-handle + ref='stocktakingBoundHandle' + :selectShenpiData='selectStocktakingBoundOrderData' + @searchReset='searchReset' + ></stocktaking-bound-handle> + + <loss-bound-handle + ref='lossBoundHandle' + :selectShenpiData='selectLossBoundOrderData' + @searchReset='searchReset' + ></loss-bound-handle> + + <!--鎵归噺澶勭悊--> + <inspection-order-batch-handle + ref='inspectionOrderBatchHandleRef' + :taskList='selectionRows' + @searchReset='searchReset' + /> + + <week-maintenance-batch-approval-modal + ref='weenMaintenanceBatchApprovalModalRef' + :taskList='selectionRows' + @searchReset='searchReset' + /> + <equipment-lean-out-approval-modal + ref='equipmentLeanOutApprovalModelRef' + @searchReset='searchReset' + /> + <equipment-return-approval-modal + ref='equipmentReturnApprovalModelRef' + @searchReset='searchReset' + /> + + <second-maintenance-approval-modal + ref='secondMaintenanceApprovalModal' + :selectShenpiData='selectSecondMaintenanceData' + @searchReset='searchReset' + ></second-maintenance-approval-modal> + <third-maintenance-approval-modal + ref='thirdMaintenanceApprovalModal' + :selectShenpiData='selectThirdMaintenanceData' + @searchReset='searchReset' + ></third-maintenance-approval-modal> + <equipment-seal-up-approval-modal + ref='equipmentSealUpApprovalModelRef' + @searchReset='searchReset' + /> + <inbound-order-handle + ref='inboundOrderApprovalModal' + :selectInboundOrderData='selectInboundOrderData' + @searchReset='searchReset' + ></inbound-order-handle> + <equipment-transfer-approval-modal + ref='equipmentTransferApprovalModelRef' + @searchReset='searchReset' + /> + <equipment-scrap-approval-modal + ref='equipmentScrapApprovalModelRef' + @searchReset='searchReset' + /> + <spare-part-apply-handle + ref='sparePartApplyModal' + :selectSparePartApplyData='selectSparePartApplyData' + @searchReset='searchReset' + ></spare-part-apply-handle> + <guide-card-batch-handle + ref='guideCardBatchHandle' + :selectShenpiData='selectGuideCardData' + @searchReset='searchReset' + ></guide-card-batch-handle> + <AssignEquipmentFileStreamHandle + ref='assignEquipmentFileStreamHandle' + :selectShenpiData='selectEquipmentSealUpData' + @searchReset='searchReset' + ></AssignEquipmentFileStreamHandle> + </div> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import lossBoundHandle from '@views/flowable/workflow/lossBound/lossBoundHandle.vue' +import stocktakingBoundHandle from '@views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue' +import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' +import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' +import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' +import WeekMaintenanceBatchApprovalModal + from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceBatchApprovalModal.vue' +import InspectionOrderBatchHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderBatchHandle.vue' +import JDictSelectTag from '@comp/dict/JDictSelectTag.vue' +import WeekMaintenanceApprovalModal from '@views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue' +import RepairOrderApprovalModal from '@views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue' +import InspectionOrderHandle from '@views/flowable/workflow/InspectionOrder/InspectionOrderHandle.vue' +import EquipmentLeanOutApprovalModal from '@views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue' +import EquipmentReturnApprovalModal from '@views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue' +import SecondMaintenanceApprovalModal + from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' +import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' +import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue' +import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue' +import InboundOrderHandle from '@views/flowable/workflow/inboundOrder/InboundOrderHandle.vue' +import EquipmentTransferApprovalModal from '@views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue' +import EquipmentScrapApprovalModal from '@views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue' +import SparePartApplyHandle from '@views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue' +import StandardizedProcessHandle from '@views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue' +import GuideCardBatchHandle from '@views/flowable/workflow/guideCardBatch/GuideCardBatchHandle.vue' +import AssignEquipmentFileStreamHandle + from '@views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue' +import { getAction } from '@api/manage' + +export default { + name: "TodoList", + mixins: [JeecgListMixin, mixinDevice], + components: { + lossBoundHandle, + stocktakingBoundHandle, + AssignFileStreamHandle, + DispatchFileHandle, + DispatchFileBachHandleStyle, + WeekMaintenanceBatchApprovalModal, + InspectionOrderBatchHandle, + JDictSelectTag, + WeekMaintenanceApprovalModal, + RepairOrderApprovalModal, + InspectionOrderHandle, + EquipmentLeanOutApprovalModal, + EquipmentReturnApprovalModal, + SecondMaintenanceApprovalModal, + ThirdMaintenanceApprovalModal, + OutBoundOrderHandle, + EquipmentSealUpApprovalModal, + InboundOrderHandle, + EquipmentTransferApprovalModal, + EquipmentScrapApprovalModal, + SparePartApplyHandle, + StandardizedProcessHandle, + GuideCardBatchHandle, + AssignEquipmentFileStreamHandle + }, + props: { + // 娣诲姞榛樿鍒嗙被灞炴�� + defaultCategories: { + type: Array, + default: () => [] + } + }, + data() { + return { + todoList: [], + url: { + list: '/assign/flow/toTaskBySelf', + isSameNode: '/assign/flow/isSameNode' + }, + dictOptions: {}, + selectShenpiData: {}, + selectDispatchFileXqData: {}, + selectInspectionOrderData: {}, + selectWeekMaintenanceData: {}, + selectSecondMaintenanceData: {}, + selectThirdMaintenanceData: {}, + selectBachData: {}, + selectRepairOrderData: {}, + selectOutBoundOrderData: {}, + selectLossBoundOrderData: {}, + selectStocktakingBoundOrderData: {}, + selectInboundOrderData: {}, + selectSparePartApplyData: {}, + selectGuideCardData: {}, + selectEquipmentAssignProductData: {}, + selectEquipmentSealUpData: {}, + //涓氬姟淇℃伅ID + dataId: undefined, + loading: false, + disableMixinCreated: true + }; + }, + + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + }, + getTableColumnsTotalWidth() { + return this.columns.reduce((total, item) => total + item.width, 0) + } + }, + + methods: { + loadData(arg) { + + this.todoList = [] + + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!') + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1 + this.ipagination.page = 1 + this.ipagination.pageSize = 50 + } + this.queryParam.categoryList = this.defaultCategories; + // 灏佽鏌ヨ鏉′欢 + let formData = { + pageNo: arg, + pageSize: this.ipagination.pageSize, + categoryList: this.queryParam.categoryList + } + this.loading = true + getAction(this.url.list, formData).then((res) => { + if (res.success) { + // console.log(res) + //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + this.todoList = res.result.records || res.result + if (res.result.total) { + this.ipagination.total = res.result.total + } else { + this.ipagination.total = 0 + } + if (this.selectedRowKeys.length > 0) this.selectedRowKeys = this.selectionRows = [] + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + + handelDetail(item, index) { + console.log('鐐瑰嚮浜嗚鎯�') + console.log('item----->', item) + console.log('index----->', index) + let processType = this.splitAprocessType(item.category) + console.log('processType--->', processType) + switch (processType) { + case 'drApproval': + this.handDrDetial(item) + break + case 'ggApproval': + this.handDispatchFileDetial(item) + break + case 'ncFileSettingProcessApproval': + this.handStandardizedDetial(item) + break + case 'sbdjApproval': + this.handInspectionOrder(item) + break + case 'WEEK_MAINTENANCE': + this.handleWeekMaintenance(item) + break + case 'eam_repair': + this.handleRepairOrder(item) + break + case 'equipment_lean_out': + this.handleEquipmentLeanOut(item) + break + case 'equipment_return': + this.handleEquipmentReturn(item) + break + case 'second_maintenance': + this.handleSecondMaintenance(item) + break + case 'third_maintenance': + this.handleThirdMaintenance(item) + break + case 'toolOutStorageApproval': + this.handleToolOutStorageApproval(item) + break + case 'toolsStocktakingBoundApproval': + this.handleToolStocktakingApproval(item) + break + case 'toolsLossApproval': + this.handleToolLossApproval(item) + break + case 'equipment_seal_up': + this.handleEquipmentSealUp(item) + break + case 'equipment_unseal': + this.handleEquipmentUnSeal(item) + break + case 'toolInStorageApproval': + this.handleToolInStorage(item) + break + case 'equipment_transfer': + this.handleEquipmentTransfer(item) + break + case 'equipment_scrap': + this.handleEquipmentScrap(item) + break + case 'spare_part_apply': + this.handleSparePartApplyApproval(item) + break + case 'programConfirmApproval': + this.handleGuideCardApproval(item) + break + case 'equipmentAssignProductApproval': + this.handleEquipmentAssignProductApproval(item) + break + default: + alert('娌℃壘鍒拌娴佺▼') + } + }, + + batchHandle() { + const categorySet = new Set(this.selectionRows.map(item => item.category)) + const nameSet = new Set(this.selectionRows.map(item => item.name)) + if (categorySet.size !== 1 || nameSet.size !== 1) { + this.$notification.info({ + message: '娑堟伅', + description: '璇烽�夋嫨鍚屼竴娴佺▼鍒嗙被涓嬬殑鍚屼竴褰撳墠鑺傜偣' + }) + return + } + + if (categorySet.has('eam_repair')) { + this.$notification.info({ + message: '娑堟伅', + description: '璁惧缁翠慨娴佺▼鏃犳硶鎵归噺澶勭悊' + }) + return + } + + if (categorySet.has('sbdjApproval')) { + this.$refs.inspectionOrderBatchHandleRef.visible = true + this.$refs.inspectionOrderBatchHandleRef.title = this.selectionRows[0].name + this.$refs.inspectionOrderBatchHandleRef.getAllApproveData(this.selectionRows[0]) + this.$refs.inspectionOrderBatchHandleRef.getBasicInformation(this.selectionRows[0]) + } else if (categorySet.has('WEEK_MAINTENANCE')) { + this.$refs.weenMaintenanceBatchApprovalModalRef.handleDetail(this.selectionRows[0]) + this.$refs.weenMaintenanceBatchApprovalModalRef.title = this.selectionRows[0].name + } else if (categorySet.has('ggApproval')) { + let ids = '' + for (let a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' + } + getAction(this.url.isSameNode + '?taskIds=' + ids).then((res) => { + if (res.success) { + let taskDefKey = res.result + this.selectBachData.taskIds = ids + this.selectBachData.taskDefKey = taskDefKey + this.$refs.modalFormDispatchFileBatch.title = '鎵归噺澶勭悊' + this.$refs.modalFormDispatchFileBatch.edit(this.selectBachData) + this.$refs.modalFormDispatchFileBatch.disableSubmit = false + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + } + }, + + splitAprocessType(title) { + let parts = title.split('锛�') // 娉ㄦ剰鍐掑彿鏄叏瑙掑瓧绗︼紝浣跨敤瀵瑰簲鐨勫瓧杩涜鍒嗗壊 + let result = parts[0] + return result + }, + //DNC-鎸囨淳NC绋嬪簭鑷宠澶� + handDrDetial(item) { + this.selectShenpiData = item + this.$refs.modalFormApproval.clearTableSource() + this.$refs.modalFormApproval.getAllApproveData(item) + }, + //DNC-NC绋嬪簭绛炬淳 + handDispatchFileDetial(item) { + console.log('item----->', item) + this.selectDispatchFileXqData = item + this.$refs.modalFormDispatchFileXq.clearTableSource() + this.$refs.modalFormDispatchFileXq.getAllApproveData(item) + }, + //DNC-瀹氬瀷瀹℃壒椤甸潰 + handStandardizedDetial(item) { + this.selectDispatchFileXqData = item + this.$refs.StandardizedProcessHandle.clearTableSource() + this.$refs.StandardizedProcessHandle.getAllApproveData(item) + }, + + handInspectionOrder(record) { + console.log('record----->', record) + this.selectInspectionOrderData = Object.assign({}, record) + this.$refs.modalFormInspectionOrder.visible = true + this.$refs.modalFormInspectionOrder.title = record.name + this.$refs.modalFormInspectionOrder.getAllApproveData(record) + this.$refs.modalFormInspectionOrder.getBasicInformation(record) + }, + + handleWeekMaintenance(item) { + if (item && item.dataId) { + this.selectWeekMaintenanceData = Object.assign({}, item) + this.$refs.weekMaintenanceApprovalModal.handleDetail(item) + this.$refs.weekMaintenanceApprovalModal.title = item.name + this.$refs.weekMaintenanceApprovalModal.disableSubmit = false + } + }, + + /** + * 鐐瑰嚮璁惧缁翠慨鍒嗙被娴佺▼璇︽儏鏃惰Е鍙� + * @param record + */ + handleRepairOrder(record) { + this.selectRepairOrderData = Object.assign({}, record) + this.$refs.repairOrderApprovalModal.visible = true + this.$refs.repairOrderApprovalModal.title = record.name + this.$refs.repairOrderApprovalModal.getAllApproveData(record) + this.$refs.repairOrderApprovalModal.getBasicInformation(record) + }, + handleEquipmentLeanOut(item) { + this.$refs.equipmentLeanOutApprovalModelRef.visible = true + this.$refs.equipmentLeanOutApprovalModelRef.title = item.name + this.$refs.equipmentLeanOutApprovalModelRef.handleDetail(item) + this.$refs.equipmentLeanOutApprovalModelRef.disableSubmit = false + }, + handleEquipmentReturn(item) { + this.$refs.equipmentReturnApprovalModelRef.visible = true + this.$refs.equipmentReturnApprovalModelRef.title = item.name + this.$refs.equipmentReturnApprovalModelRef.handleDetail(item) + this.$refs.equipmentReturnApprovalModelRef.disableSubmit = false + }, + handleSecondMaintenance(item) { + if (item && item.dataId) { + this.selectSecondMaintenanceData = Object.assign({}, item) + this.$refs.secondMaintenanceApprovalModal.handleDetail(item) + this.$refs.secondMaintenanceApprovalModal.title = item.name + this.$refs.secondMaintenanceApprovalModal.disableSubmit = false + } + }, + handleThirdMaintenance(item) { + if (item && item.dataId) { + this.selectThirdMaintenanceData = Object.assign({}, item) + this.$refs.thirdMaintenanceApprovalModal.handleDetail(item) + this.$refs.thirdMaintenanceApprovalModal.title = item.name + this.$refs.thirdMaintenanceApprovalModal.disableSubmit = false + } + }, + handleToolOutStorageApproval(item) { + if (item && item.dataId) { + this.selectOutBoundOrderData = Object.assign({}, item) + this.$refs.outBoundOrderHandle.auditVisible = true + this.$refs.outBoundOrderHandle.clearTableSource() + this.$refs.outBoundOrderHandle.getAllApproveData(item) + } + }, + handleToolStocktakingApproval(item) { + if (item && item.dataId) { + this.selectStocktakingBoundOrderData = Object.assign({}, item) + this.$refs.stocktakingBoundHandle.auditVisible = true + this.$refs.stocktakingBoundHandle.clearTableSource() + this.$refs.stocktakingBoundHandle.getAllApproveData(item) + } + }, + handleToolLossApproval(item) { + if (item && item.dataId) { + this.selectLossBoundOrderData = Object.assign({}, item) + this.$refs.lossBoundHandle.auditVisible = true + this.$refs.lossBoundHandle.clearTableSource() + this.$refs.lossBoundHandle.getAllApproveData(item) + } + }, + + handleEquipmentSealUp(item) { + this.$refs.equipmentSealUpApprovalModelRef.visible = true + this.$refs.equipmentSealUpApprovalModelRef.title = item.name + this.$refs.equipmentSealUpApprovalModelRef.handleDetail(item) + this.$refs.equipmentSealUpApprovalModelRef.disableSubmit = false + }, + + handleEquipmentUnSeal(item) { + this.$refs.equipmentSealUpApprovalModelRef.visible = true + this.$refs.equipmentSealUpApprovalModelRef.title = item.name + this.$refs.equipmentSealUpApprovalModelRef.handleDetail(item) + this.$refs.equipmentSealUpApprovalModelRef.disableSubmit = false + }, + handleToolInStorage(item) { + if (item && item.dataId) { + this.selectInboundOrderData = Object.assign({}, item) + this.$refs.inboundOrderApprovalModal.auditVisible = true + this.$refs.inboundOrderApprovalModal.clearTableSource() + this.$refs.inboundOrderApprovalModal.getAllApproveData(item) + } + }, + handleEquipmentTransfer(item) { + this.$refs.equipmentTransferApprovalModelRef.visible = true + this.$refs.equipmentTransferApprovalModelRef.title = item.name + this.$refs.equipmentTransferApprovalModelRef.handleDetail(item) + this.$refs.equipmentTransferApprovalModelRef.disableSubmit = false + }, + handleEquipmentScrap(item) { + this.$refs.equipmentScrapApprovalModelRef.visible = true + this.$refs.equipmentScrapApprovalModelRef.title = item.name + this.$refs.equipmentScrapApprovalModelRef.handleDetail(item) + this.$refs.equipmentScrapApprovalModelRef.disableSubmit = false + }, + handleSparePartApplyApproval(item) { + if (item && item.dataId) { + debugger + this.selectSparePartApplyData = Object.assign({}, item) + this.$refs.sparePartApplyModal.auditVisible = true + this.$refs.sparePartApplyModal.clearTableSource() + this.$refs.sparePartApplyModal.getAllApproveData(item) + } + }, + //DNC-绋嬪簭纭琛ㄦ祦绋� + handleGuideCardApproval(item) { + console.log('item----->', item) + this.selectGuideCardData = item + this.$refs.guideCardBatchHandle.clearTableSource() + this.$refs.guideCardBatchHandle.getAllApproveData(item) + }, + //DNC-璁惧缁撴瀯鏍戞寚娲句骇鍝佺粨鏋勬爲 + handleEquipmentAssignProductApproval(item) { + console.log('item----->', item) + this.selectEquipmentSealUpData = item + this.$refs.assignEquipmentFileStreamHandle.clearTableSource() + this.$refs.assignEquipmentFileStreamHandle.getAllApproveData(item) + } + } +}; +</script> +<style scoped> +.todo-container { + width: 100%; + margin: 0; + box-sizing: border-box; + /* 鏂板锛氳缃鍣ㄦ渶澶ч珮搴︼紙鍙牴鎹〉闈㈠竷灞�璋冩暣锛屽500px/80vh锛� */ + max-height: 80vh; + /* 鏂板锛氬瀭鐩存柟鍚戞孩鍑烘椂鏄剧ず婊氬姩鏉★紝姘村钩鏂瑰悜婧㈠嚭闅愯棌锛堥伩鍏嶅竷灞�閿欎贡锛� */ + overflow-y: auto; + overflow-x: hidden; + /* 鍙�夛細娣诲姞婊氬姩鏉℃牱寮忎紭鍖栵紙閫傞厤Chrome/Safari锛屽彲閫夛級 */ + &::-webkit-scrollbar { + width: 6px; /* 婊氬姩鏉″搴� */ + } + &::-webkit-scrollbar-thumb { + background-color: #e5e7eb; /* 婊氬姩鏉℃粦鍧楅鑹� */ + border-radius: 3px; /* 婊氬姩鏉″渾瑙� */ + } + &::-webkit-scrollbar-track { + background-color: #f9fafb; /* 婊氬姩鏉¤建閬撻鑹� */ + } +} + +.todo-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 20px; + border-bottom: 1px solid #eee; + position: relative; + min-width: 300px; + box-sizing: border-box; + cursor: pointer; +} +.todo-title { + flex: 1; + margin-right: 100px; + font-size: 14px; + +} +.todo-info { + display: flex; + flex-direction: column; + align-items: flex-end; + min-width: 120px; + font-size: 12px; +} +.todo-node { + margin-bottom: 5px; + white-space: nowrap; +} +.el-dropdown { + width: 100%; +} +.el-dropdown-menu { + min-width: 200px; + align-items: center; +} +</style> diff --git a/src/views/dashboard/dncIndex/DncManagerSignage.vue b/src/views/dashboard/dncIndex/DncManagerSignage.vue new file mode 100644 index 0000000..b2fe580 --- /dev/null +++ b/src/views/dashboard/dncIndex/DncManagerSignage.vue @@ -0,0 +1,153 @@ +<template> + <div class="home-container"> + <div class="left-card"> + <div class="card"> + <div class="card-header"> + <h2 class="card-title">鎴戠殑寰呭姙</h2> + <h2 class="more-btn" @click = "gotoTodoList">鏇村</h2> + </div> + <div class="card-content"> + <!-- 宓屽叆todoList缁勪欢骞惰缃粯璁ゅ垎绫� --> + <todo-list + ref="todoList" + class="embedded-flow-todo" + :defaultCategories="['drApproval','ggApproval','programConfirmApproval','ncFileSettingProcessApproval']" + ></todo-list> + </div> + </div> + </div> + + <!-- 鍙充晶涓や釜灏忓崱鐗� --> + <div class="right-cards"> + <div class="card top-card"> + <h2 class="card-title">鍗$墖1</h2> + <div class="card-content"> + </div> + </div> + + <div class="card bottom-card"> + <h2 class="card-title">娲惧伐浠诲姟棰嗗彇</h2> + <div class="card-content"> + </div> + </div> + </div> + </div> +</template> + +<script> +import TodoList from '@views/dashboard/TodoList.vue' + +export default { + name: 'DncManagerSignage', + components: { + TodoList + }, + data() { + return { + } + }, + mounted() { + this.$nextTick(() => { + if (this.$refs.todoList) { + this.$refs.todoList.loadData(1) + } + }) + }, + methods: { + gotoTodoList() { + this.$router.push('/flowable/workflow/FlowTodo') + } + } +} +</script> + +<style scoped> +.left-card .card-content { + padding: 5px 0; +} +.home-container { + display: flex; + min-height: 100vh; + padding: 5px; + box-sizing: border-box; + gap: 16px; + background-color: #f0f2f7; +} + +.left-card { + flex: 1; + min-width: 0; +} + +.right-cards { + flex: 2; + min-width: 0; + display: flex; + flex-direction: column; + gap: 16px; +} + +.card { + background: #ffffff; + border-radius: 8px; + box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); + padding: 10px; + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + justify-content: flex-start; +} + +/* 鍦ㄥ師鏈夋牱寮忓熀纭�涓婃坊鍔� */ +.card-header { + display: flex; + justify-content: space-between; + /* 鍨傜洿灞呬腑瀵归綈 */ + align-items: center; + /* 鍙互鏍规嵁闇�瑕佽缃珮搴︼紝杩欓噷鍋囪璁剧疆涓� 40px锛屼篃鍙牴鎹疄闄呮儏鍐佃皟鏁� */ + height: 40px; +} + +.more-btn { + margin: 0; + color: #00bfff; + font-size: 14px; + border: none; + cursor: pointer; +} +.top-card { + flex: 1; +} + +.bottom-card { + flex: 1; +} + +.card-title { + margin: 0; + padding-bottom: 0; + color: #000000; + font-size: 16px; + font-weight: 600; +} + +.card-content { + flex: 1; + overflow: auto; +} + +@media (max-width: 992px) { + .home-container { + flex-direction: column; + } + + .left-card, .right-cards { + width: 100%; + } + + .left-card { + margin-bottom: 16px; + } +} +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue index 41d4ac9..c2db72b 100644 --- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue +++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTree.vue @@ -22,9 +22,13 @@ <a-tree blockNode show-icon :expandedKeys.sync="expandedKeys" :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> - <template slot="title" slot-scope="{ title, parentId, entity, key:treeKey,equipmentId,type}"> - <DeviceStructureTreeContextMenu ref="contextMenuRef" - :treeParams="{title,treeKey,searchValue,equipmentId,entity,type,param:currentDeviceDocClassCode}"/> + <template slot="title" slot-scope="{ title }"> + <span v-if="title.indexOf(searchValue) > -1"> + {{ title.substr(0, title.indexOf(searchValue)) }} + <span class="replaceSearch">{{ searchValue }}</span> + {{ title.substr(title.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ title }}</span> </template> <a-icon slot="switcherIcon" type="down"/> @@ -37,281 +41,309 @@ <!--鏉冮檺閰嶇疆寮圭獥--> <AssignPermissionModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="getTreeDataByApi"/> - <!--浜у搧缁撴瀯鏍戝熀鏈彸閿彍鍗�(绌虹櫧澶勮Е鍙�)--> + + <!--璁惧缁撴瀯鏍戞爲鑺傜偣鍙抽敭鑿滃崟锛堟爲鑺傜偣瑙﹀彂锛�--> + <device-structure-tree-context-menu ref="mainContextmenuRef" :treeParams="rightClickSelected"/> + + <!--璁惧缁撴瀯鏍戝熀鏈彸閿彍鍗�(绌虹櫧澶勮Е鍙�)--> <DeviceStructureBaseContextMenu ref="baseContextmenuRef"/> </a-card> </template> <script> -import dncApi from '@/api/dnc' -import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' -import AssignPermissionModal from './Permission/AssignPermissionModal' -import DeviceStructureBaseContextMenu - from '@views/dnc/base/modules/DeviceStructure/DeviceStructureBaseContextMenu.vue' + import dncApi from '@/api/dnc' + import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' + import AssignPermissionModal from './Permission/AssignPermissionModal' + import DeviceStructureBaseContextMenu + from '@views/dnc/base/modules/DeviceStructure/DeviceStructureBaseContextMenu.vue' -export default { - name: 'DeviceStructureTree', - components: { - DeviceStructureBaseContextMenu, - AssignPermissionModal, - DeviceStructureTreeContextMenu - }, - data() { - return { - searchInput: '', - cardLoading: false, - loading: false, - treeDataSource: [], - selectedKeys: [], - expandedKeys: [], - beforeSearchExpandedKeys: [], - searchValue: '', - dataList: [], - autoExpandParent: true, - checkStrictly: true, - allTreeKeys: [], - currentSelected: {}, - rightClickSelected: {}, - currentDeviceDocClassCode: 'SEND', - url: { - delete: '/nc/product/delete' - } - } - }, - created() { - this.getTreeDataByApi() - this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) - this.$bus.$on('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) - }, - beforeDestroy() { - this.$bus.$off('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) - this.$bus.$off('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) - }, - methods: { - // 璋冪敤鎺ュ彛鑾峰彇鏍戠殑鏁版嵁 - getTreeDataByApi() { - this.loading = true - this.cardLoading = true - this.treeDataSource = [] - dncApi.getDeviceTreeDataApi() - .then(res => { - if (res.success) { - this.dataList = [] - this.allTreeKeys = [] - this.treeDataSource = res.result - this.generateList(this.treeDataSource) - this.expandedKeys = this.beforeSearchExpandedKeys = this.allTreeKeys - this.$bus.$emit('sendDeviceTreeNodeInfo', this.treeDataSource[0]) - } else { - this.$message.warn(res.message) - } - }) - .finally(() => { - this.loading = false - this.cardLoading = false - }) + export default { + name: 'DeviceStructureTree', + components: { + DeviceStructureBaseContextMenu, + AssignPermissionModal, + DeviceStructureTreeContextMenu }, - - /** - * 閫氳繃鍙充晶tab鏍忔墍鍦╝ctiveKey璁剧疆褰撳墠璁惧鐨凬C鏂囨。绫诲瀷 - * @param documentActiveTabKey 鍙充晶tab鏍忕殑activeKey - */ - setCurrentDeviceDocClassCode(documentActiveTabKey) { - if (documentActiveTabKey === 1) this.currentDeviceDocClassCode = 'SEND' - else this.currentDeviceDocClassCode = 'REC' - }, - - /** - * 鏍戣妭鐐归�変腑鏃惰Е鍙� - * @param selectedKeys 閫変腑鑺傜偣key - * @param {node} node 鑺傜偣瀵硅薄 - */ - handleTreeSelect(selectedKeys, { node }) { - let record = node.dataRef - this.currentSelected = Object.assign({}, record) - // 鍚戝彸渚х埗绾х粍浠跺彂閫佸綋鍓嶉�変腑鏍戣妭鐐逛俊鎭� - this.$bus.$emit('sendDeviceTreeNodeInfo', this.currentSelected) - if (selectedKeys.length === 0) return - this.selectedKeys = selectedKeys - }, - - /** - * 鏍戣妭鐐瑰彸閿崟鍑昏妭鐐规椂瑙﹀彂 - * @param event 浜嬩欢瀵硅薄 - * @param node 鑺傜偣瀵硅薄 - */ - handleTreeRightClick({ event, node }) { - if (this.$refs.baseContextmenuRef) this.$refs.baseContextmenuRef.menuVisible = false - const record = node.dataRef - // 鑻ュ彸閿椂褰撳墠鍙充晶灞曠ず灞傜骇涓鸿澶囧眰绾т笖褰撳墠鍙抽敭鏍戝眰绾у悓涓鸿澶囧眰绾ф椂鍒欏湪瑙﹀彂鍙抽敭鑿滃崟鍔熻兘鏃跺悓鏃惰Е鍙戝乏閿�変腑鍔熻兘 - if (this.currentSelected.type === 2 && record.type === 2) this.handleTreeSelect([record.key], { node }) - this.rightClickSelected = Object.assign({}, record) - }, - - /** - * 鏍戣妭鐐瑰睍寮�鍚堝苟鏃惰Е鍙� - * @param expandedKeys 灞曞紑椤筴ey - */ - handleTreeExpand(expandedKeys) { - this.expandedKeys = this.beforeSearchExpandedKeys = expandedKeys - console.log('beforeSearchExpandedKeys', this.beforeSearchExpandedKeys) - this.autoExpandParent = false - }, - - /* 杈撳叆鏌ヨ鍐呭鍙樺寲鏃惰Е鍙� */ - handleSearchInputChange() { - let search = this.searchInput - let expandedKeys - let autoExpandParent - if (search !== '') { - expandedKeys = this.dataList - .map(item => { - if (item.title != null) { - if (item.title.indexOf(search) > -1) { - return this.getParentKey(item.key, this.treeDataSource) - } - return null - } - }) - .filter((item, i, self) => item && self.indexOf(item) === i) - autoExpandParent = true - } else { - expandedKeys = this.beforeSearchExpandedKeys - autoExpandParent = false - } - - Object.assign(this, { - expandedKeys, - searchValue: search, - autoExpandParent - }) - }, - - /** - * 閫掑綊鑾峰緱杈撳叆椤圭殑鐖剁骇key - * @param key 瀛愰」key - * @param tree 瀛愰」 - */ - getParentKey(key, tree) { - let parentKey - for (let i = 0; i < tree.length; i++) { - const node = tree[i] - if (node.children) { - if (node.children.some(item => item.key === key)) { - parentKey = node.key - } else if ( - this.getParentKey(key, node.children)) { - parentKey = this.getParentKey(key, node.children) - } + data() { + return { + searchInput: '', + cardLoading: false, + loading: false, + treeDataSource: [], + selectedKeys: [], + expandedKeys: [], + beforeSearchExpandedKeys: [], + searchValue: '', + dataList: [], + autoExpandParent: true, + checkStrictly: true, + allTreeKeys: [], + currentSelected: {}, + rightClickSelected: {}, + currentDeviceDocClassCode: 'SEND', + url: { + delete: '/nc/product/delete' } } - return parentKey }, - - /** - * 閫掑綊鑾峰緱鎵�鏈夋爲鑺傜偣key - * @param data - */ - generateList(data) { - for (let i = 0; i < data.length; i++) { - const node = data[i] - const key = node.key - const title = node.title - this.dataList.push({ key, title }) - this.allTreeKeys.push(key) - this.setTreeNodeIcon(node) - if (node.children) this.generateList(node.children) - } - }, - - /** - * 鏍戞墍鍦ㄧ埗鍏冪礌鐨勫彸閿簨浠� - * @param event 浜嬩欢瀵硅薄 - */ - openBaseContextMenu(event) { - event.preventDefault() - if (event.target.id !== 'tree-container') return - this.$refs.baseContextmenuRef.menuStyle.top = event.clientY + 'px' - this.$refs.baseContextmenuRef.menuStyle.left = event.clientX + 'px' - this.$refs.baseContextmenuRef.menuVisible = true - document.body.addEventListener('click', this.handleBaseContextMenuClose) - }, - - /** - * 璁剧疆鏍戣妭鐐瑰浘鏍� - * @param treeNode - */ - setTreeNodeIcon(treeNode) { - if (+treeNode.type === 1) { - treeNode.slots = { icon: 'workshop' } - } else { - treeNode.slots = { icon: 'device' } - } - }, - - // 鎺у埗鍩虹鍙抽敭鑿滃崟鍏抽棴 - handleBaseContextMenuClose() { - this.$refs.baseContextmenuRef.menuVisible = false - document.body.removeEventListener('click', this.handleBaseContextMenuClose) - }, - - // 鍒锋柊閲嶆柊鑾峰彇鏍戠殑鏁版嵁 - handleTreeReload() { + created() { this.getTreeDataByApi() + this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + this.$bus.$on('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) }, + beforeDestroy() { + this.$bus.$off('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) + this.$bus.$off('handleSwitchDeviceDocClassCode', this.setCurrentDeviceDocClassCode) + }, + methods: { + // 璋冪敤鎺ュ彛鑾峰彇鏍戠殑鏁版嵁 + getTreeDataByApi() { + this.loading = true + this.cardLoading = true + this.treeDataSource = [] + dncApi.getDeviceTreeDataApi() + .then(res => { + if (res.success) { + this.dataList = [] + this.allTreeKeys = [] + this.treeDataSource = res.result + this.generateList(this.treeDataSource) + this.expandedKeys = this.beforeSearchExpandedKeys = this.allTreeKeys + this.$bus.$emit('sendDeviceTreeNodeInfo', this.treeDataSource[0]) + } else { + this.$message.warn(res.message) + } + }) + .finally(() => { + this.loading = false + this.cardLoading = false + }) + }, - triggerCorrespondingMethod({ methodName }) { - if (this[methodName]) this[methodName]() + /** + * 閫氳繃鍙充晶tab鏍忔墍鍦╝ctiveKey璁剧疆褰撳墠璁惧鐨凬C鏂囨。绫诲瀷 + * @param documentActiveTabKey 鍙充晶tab鏍忕殑activeKey + */ + setCurrentDeviceDocClassCode(documentActiveTabKey) { + if (documentActiveTabKey === 1) this.currentDeviceDocClassCode = 'SEND' + else this.currentDeviceDocClassCode = 'REC' + }, + + /** + * 鏍戣妭鐐归�変腑鏃惰Е鍙� + * @param selectedKeys 閫変腑鑺傜偣key + * @param {node} node 鑺傜偣瀵硅薄 + */ + handleTreeSelect(selectedKeys, { node }) { + let record = node.dataRef + this.currentSelected = Object.assign({}, record) + // 鍚戝彸渚х埗绾х粍浠跺彂閫佸綋鍓嶉�変腑鏍戣妭鐐逛俊鎭� + this.$bus.$emit('sendDeviceTreeNodeInfo', this.currentSelected) + if (selectedKeys.length === 0) return + this.selectedKeys = selectedKeys + }, + + /** + * 鏍戣妭鐐瑰彸閿崟鍑昏妭鐐规椂瑙﹀彂 + * @param event 浜嬩欢瀵硅薄 + * @param node 鑺傜偣瀵硅薄 + */ + handleTreeRightClick({ event, node }) { + if (this.$refs.baseContextmenuRef) this.$refs.baseContextmenuRef.menuVisible = false + const record = node.dataRef + // 鑻ュ彸閿椂褰撳墠鍙充晶灞曠ず灞傜骇涓鸿澶囧眰绾т笖褰撳墠鍙抽敭鏍戝眰绾у悓涓鸿澶囧眰绾ф椂鍒欏湪瑙﹀彂鍙抽敭鑿滃崟鍔熻兘鏃跺悓鏃惰Е鍙戝乏閿�変腑鍔熻兘 + if (this.currentSelected.type === 2 && record.type === 2) this.handleTreeSelect([record.key], { node }) + this.rightClickSelected = Object.assign({ param: this.currentDeviceDocClassCode }, record) + this.openMainContextMenu(event) + }, + + /** + * 鏍戣妭鐐瑰睍寮�鍚堝苟鏃惰Е鍙� + * @param expandedKeys 灞曞紑椤筴ey + */ + handleTreeExpand(expandedKeys) { + this.expandedKeys = this.beforeSearchExpandedKeys = expandedKeys + this.autoExpandParent = false + }, + + /* 杈撳叆鏌ヨ鍐呭鍙樺寲鏃惰Е鍙� */ + handleSearchInputChange() { + let search = this.searchInput + let expandedKeys + let autoExpandParent + if (search !== '') { + expandedKeys = this.dataList + .map(item => { + if (item.title != null) { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource) + } + return null + } + }) + .filter((item, i, self) => item && self.indexOf(item) === i) + autoExpandParent = true + } else { + expandedKeys = this.beforeSearchExpandedKeys + autoExpandParent = false + } + + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent + }) + }, + + /** + * 閫掑綊鑾峰緱杈撳叆椤圭殑鐖剁骇key + * @param key 瀛愰」key + * @param tree 瀛愰」 + */ + getParentKey(key, tree) { + let parentKey + for (let i = 0; i < tree.length; i++) { + const node = tree[i] + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children) + } + } + } + return parentKey + }, + + /** + * 閫掑綊鑾峰緱鎵�鏈夋爲鑺傜偣key + * @param data + */ + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i] + const key = node.key + const title = node.title + this.dataList.push({ key, title }) + this.allTreeKeys.push(key) + this.setTreeNodeIcon(node) + if (node.children) this.generateList(node.children) + } + }, + + /** + * 鎵撳紑鏍戣妭鐐硅彍鍗曚簨浠� + * @param event 鏍戣妭鐐逛簨浠跺璞� + */ + openMainContextMenu(event) { + this.$refs.mainContextmenuRef.menuStyle.top = event.clientY + 'px' + this.$refs.mainContextmenuRef.menuStyle.left = event.clientX + 'px' + this.$refs.mainContextmenuRef.menuVisible = true + document.body.addEventListener('click', this.handleMainContextMenuClose) + }, + + /** + * 鏍戞墍鍦ㄧ埗鍏冪礌鐨勫彸閿簨浠� + * @param event 浜嬩欢瀵硅薄 + */ + openBaseContextMenu(event) { + event.preventDefault() + if (event.target.id !== 'tree-container') return + if (this.$refs.mainContextmenuRef) this.$refs.mainContextmenuRef.menuVisible = false + this.$refs.baseContextmenuRef.menuStyle.top = event.clientY + 'px' + this.$refs.baseContextmenuRef.menuStyle.left = event.clientX + 'px' + this.$refs.baseContextmenuRef.menuVisible = true + document.body.addEventListener('click', this.handleBaseContextMenuClose) + }, + + /** + * 璁剧疆鏍戣妭鐐瑰浘鏍� + * @param treeNode + */ + setTreeNodeIcon(treeNode) { + if (+treeNode.type === 1) { + treeNode.slots = { icon: 'workshop' } + } else { + treeNode.slots = { icon: 'device' } + } + }, + + // 鎺у埗涓昏鍙抽敭鑿滃崟鍏抽棴 + handleMainContextMenuClose() { + if (this.$refs.mainContextmenuRef) this.$refs.mainContextmenuRef.menuVisible = false + document.body.removeEventListener('click', this.handleMainContextMenuClose) + }, + + // 鎺у埗鍩虹鍙抽敭鑿滃崟鍏抽棴 + handleBaseContextMenuClose() { + this.$refs.baseContextmenuRef.menuVisible = false + document.body.removeEventListener('click', this.handleBaseContextMenuClose) + }, + + // 鍒锋柊閲嶆柊鑾峰彇鏍戠殑鏁版嵁 + handleTreeReload() { + this.getTreeDataByApi() + }, + + triggerCorrespondingMethod({ methodName }) { + if (this[methodName]) this[methodName]() + } } } -} </script> <style lang="less" scoped> -/deep/ .ant-card-body { - padding: 0 12px 0 0; -} - -/deep/ .ant-card-body, /deep/ .ant-spin-nested-loading, /deep/ .ant-spin-container { - height: 100%; -} - -/deep/ .ant-tree-title, .ant-tree-title .ant-dropdown-trigger { - display: inline-block; - width: calc(100% - 24px) !important; -} - -::-webkit-scrollbar { - width: 8px; -} - -@media screen and (min-width: 1920px) { - .tree_con { - height: 748px !important; + /deep/ .ant-card-body { + padding: 0 12px 0 0; } -} -@media screen and (min-width: 1680px) and (max-width: 1920px) { - .tree_con { - height: 748px !important; + /deep/ .ant-card-body, /deep/ .ant-spin-nested-loading, /deep/ .ant-spin-container { + height: 100%; } -} -@media screen and (min-width: 1400px) and (max-width: 1680px) { - .tree_con { - height: 600px !important; + /deep/ .ant-tree-title, .ant-tree-title .ant-dropdown-trigger { + display: inline-block; + width: calc(100% - 24px) !important; } -} -@media screen and (min-width: 1280px) and (max-width: 1400px) { - .tree_con { - height: 501px !important; + ::-webkit-scrollbar { + width: 8px; } -} -@media screen and (max-width: 1280px) { - .tree_con { - height: 501px !important; + .replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); } -} + + @media screen and (min-width: 1920px) { + .tree_con { + height: 748px !important; + } + } + + @media screen and (min-width: 1680px) and (max-width: 1920px) { + .tree_con { + height: 748px !important; + } + } + + @media screen and (min-width: 1400px) and (max-width: 1680px) { + .tree_con { + height: 600px !important; + } + } + + @media screen and (min-width: 1280px) and (max-width: 1400px) { + .tree_con { + height: 501px !important; + } + } + + @media screen and (max-width: 1280px) { + .tree_con { + height: 501px !important; + } + } </style> diff --git a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTreeContextMenu.vue b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTreeContextMenu.vue index 58082fe..86ab05d 100644 --- a/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTreeContextMenu.vue +++ b/src/views/dnc/base/modules/DeviceStructure/DeviceStructureTreeContextMenu.vue @@ -1,18 +1,12 @@ <template> - <a-dropdown :trigger="['contextmenu']"> - <span v-if="treeParams.title.indexOf(treeParams.searchValue) > -1">{{ treeParams.title.substr(0, treeParams.title.indexOf(treeParams.searchValue)) }}<span - class="replaceSearch">{{ treeParams.searchValue }}</span>{{ treeParams.title.substr(treeParams.title.indexOf(treeParams.searchValue) + treeParams.searchValue.length) }}</span> - <span v-else>{{ treeParams.title }}</span> - <template #overlay> - <a-menu @click="({ key: menuKey }) => onContextMenuClick(treeParams.treeKey, menuKey)" - @contextmenu="event=>event.preventDefault()"> - <a-menu-item v-for="item in defaultContextMenuList[getCurrentMenuLevel]" :key="item.code" v-has="item.code"> - <a-icon :type="item.icon"/> - {{item.label}} - </a-menu-item> - </a-menu> + <a-menu :style="menuStyle" @click="menuItemClick" v-if="menuVisible" mode="vertical" @contextmenu="menuContextMenu"> + <template v-for="menuItem in defaultContextMenuList[getCurrentMenuLevel]"> + <a-menu-item :key="menuItem.code" v-has="menuItem.code"> + <a-icon :type="menuItem.icon"/> + {{ menuItem.label }} + </a-menu-item> </template> - </a-dropdown> + </a-menu> </template> <script> @@ -26,6 +20,15 @@ }, data() { return { + menuVisible: false, + menuStyle: { + position: 'fixed', + top: 0, + left: 0, + border: '1px solid #eee', + boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)', + zIndex: 999 + }, defaultContextMenuList: { //杞﹂棿 workshop: [ @@ -41,16 +44,15 @@ }, computed: { getCurrentMenuLevel() { - if (this.treeParams.type===1) return 'workshop' + if (this.treeParams.type === 1) return 'workshop' else return 'device' } }, methods: { - onContextMenuClick(treeKey, menuKey) { + menuItemClick({ key }) { + const menuKey = key const level = this.getCurrentMenuLevel - const { param } = this.treeParams - const treeNodeInfo = Object.assign({}, this.treeParams, { param }) - console.log('treeNodeInfo++++++++++++++++++++++++++++', treeNodeInfo) + const treeNodeInfo = Object.assign({ treeKey: this.treeParams.key }, this.treeParams) if (treeNodeInfo.type === 2) treeNodeInfo.type = 7 // 璁惧缁撴瀯鏍戣妭鐐逛腑鐨勮澶囧眰绾т负2锛屼絾鍦ㄤ骇鍝佺粨鏋勬爲涓皢璁惧灞傜骇鐨則ype璁剧疆涓�7锛屽洜姝ゅ湪姝ゅ璁剧疆涓�7 const menuKeyArray = menuKey.split('_') @@ -63,21 +65,18 @@ } else { methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') } - console.log('methodName------------------------------------', methodName) - console.log('treeParams------------------------------------', this.treeParams) const modalTitle = this.defaultContextMenuList[level].find(item => item.code === menuKey).label - this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle, treeNodeInfo }) + }, + + /** + * 閬垮厤鍗曟閲嶅鍙抽敭鍚庡叧闂彍鍗曟垨鎵撳紑window鑿滃崟 + * @param event 浜嬩欢瀵硅薄 + */ + menuContextMenu(event) { + event.preventDefault() + event.stopPropagation() } } } -</script> - -<style scoped> - .replaceSearch { - color: #40a9ff; - font-weight: bold; - background-color: rgb(204, 204, 204); - } - -</style> \ No newline at end of file +</script> \ No newline at end of file diff --git a/src/views/dnc/base/modules/DeviceStructure/Permission/AssignPermissionModal.vue b/src/views/dnc/base/modules/DeviceStructure/Permission/AssignPermissionModal.vue index 6ea023b..c11061f 100644 --- a/src/views/dnc/base/modules/DeviceStructure/Permission/AssignPermissionModal.vue +++ b/src/views/dnc/base/modules/DeviceStructure/Permission/AssignPermissionModal.vue @@ -66,6 +66,11 @@ // 璋冪敤鎺ュ彛鑾峰彇鎵�鏈夌敤鎴峰垪琛� getAllUsersListByApi() { + this.$nextTick(() => { + this.$refs.userPermissionTransferRef.spinning = true + this.allUsersList = [] + this.$refs.userPermissionTransferRef.targetKeys = [] + }) dncApi.getAllUsersListApi() .then(res => { if (res.success) { diff --git a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue index 0ce254b..c9d7509 100644 --- a/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue +++ b/src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue @@ -4,9 +4,9 @@ :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> <!-- 瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> - <span slot="docName" slot-scope="text"> - <j-ellipsis :value="text"/> - </span> +<!-- <span slot="docName" slot-scope="text">--> +<!-- <j-ellipsis :value="text"/>--> +<!-- </span>--> </a-table> <DocumentModal ref="modalForm" @ok="modalFormOk"/> @@ -53,8 +53,7 @@ title: '鏂囦欢鍚嶇О', dataIndex: 'docName', key: 'docName', - align: 'center', - scopedSlots: { customRender: 'docName' }, + width: 500, sorter: true }, diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue index 905db06..9e97310 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchEditForm.vue @@ -9,6 +9,21 @@ </a-form-model-item> </a-col> <a-col :span="24"> + <a-form-model-item label="鍔犲伐鎵规" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingBatch"> + <a-input v-model="model.processingBatch" placeholder="璇疯緭鍏ュ姞宸ユ壒娆�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍔犲伐鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingQuantity"> + <a-input-number v-model="model.processingQuantity" placeholder="璇疯緭鍏ュ姞宸ユ暟閲�" :min="1" style="width: 100%"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="鍔犲伐璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingEquipment"> + <a-input v-model="model.processingEquipment" placeholder="璇疯緭鍏ュ姞宸ヨ澶�" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> <a-form-model-item label="鍥剧墖" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="picture"> <j-image-upload :number="1" v-model="model.picture" ></j-image-upload> </a-form-model-item> @@ -61,6 +76,15 @@ picture: [ { required: true, message: '璇疯緭鍏ュ浘鐗�!'}, ], + processingBatch: [ + { required: true, message: '璇疯緭鍏ュ姞宸ユ壒娆�!'}, + ], + processingQuantity: [ + { required: true, message: '璇疯緭鍏ュ姞宸ユ暟閲�!'}, + ], + processingEquipment: [ + { required: true, message: '璇疯緭鍏ュ姞宸ヨ澶�!'}, + ], remake: [ { required: true, message: '璇疯緭鍏ヨ鏄庝俊鎭�!'}, ], diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue index 70c8ba3..382e1eb 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue @@ -45,7 +45,7 @@ <th colspan="2">鍒�鍏风紪鍙�</th> <th>鍒�鍏峰悕绉�</th> <th colspan="2">鍒�鍏风畝绉�</th> - <th colspan="2">鍒�鍏疯鏍�</th> + <th colspan="2">鍒�鍏锋爣璁�</th> <th>鍒�浣�</th> <th>鍒�鍏锋暟閲�</th> <th colspan="2">鎻忚堪</th> diff --git a/src/views/dnc/base/modules/ProductStructure/Permission/AssignPermissionModal.vue b/src/views/dnc/base/modules/ProductStructure/Permission/AssignPermissionModal.vue index 425111e..464e7df 100644 --- a/src/views/dnc/base/modules/ProductStructure/Permission/AssignPermissionModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/Permission/AssignPermissionModal.vue @@ -27,123 +27,131 @@ </template> <script> -import dncApi from '@/api/dnc' -import DepartPermissionTransfer from './DepartPermissionTransfer' -import UserPermissionTransfer from './UserPermissionTransfer' + import dncApi from '@/api/dnc' + import DepartPermissionTransfer from './DepartPermissionTransfer' + import UserPermissionTransfer from './UserPermissionTransfer' -export default { - name: 'AssignPermissionModal', - components: { UserPermissionTransfer, DepartPermissionTransfer }, - props: { - currentTreeNodeInfo: { - type: Object - } - }, - data() { - return { - visible: false, - title: '', - isAssignSonNode: true, - activeTabKey: 1, - allDepartmentsList: [], - allUsersList: [], - allTreeKeys: [], - hasLoadedDataTabKeyArray: [] - } - }, - watch: { - visible: { - handler(value) { - if (value) { - this.activeTabKey = 1 - this.isAssignSonNode = true - this.getAllDepartmentsListByApi() + export default { + name: 'AssignPermissionModal', + components: { UserPermissionTransfer, DepartPermissionTransfer }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, + data() { + return { + visible: false, + title: '', + isAssignSonNode: true, + activeTabKey: 1, + allDepartmentsList: [], + allUsersList: [], + allTreeKeys: [], + hasLoadedDataTabKeyArray: [] + } + }, + watch: { + visible: { + handler(value) { + if (value) { + this.activeTabKey = 1 + this.isAssignSonNode = true + this.getAllDepartmentsListByApi() + } + } + }, + activeTabKey: { + handler(value) { + if (this.hasLoadedDataTabKeyArray.includes(value)) return + if (value === 2) this.getAllUsersListByApi() + this.hasLoadedDataTabKeyArray.push(value) } } }, - activeTabKey: { - handler(value) { - if (this.hasLoadedDataTabKeyArray.includes(value)) return - if (value === 2) this.getAllUsersListByApi() - this.hasLoadedDataTabKeyArray.push(value) - } - } - }, - created() { - this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) - }, - methods: { - // 鐐瑰嚮鏍戣妭鐐瑰彸閿彍鍗曟潈闄愰厤缃寜閽悗瑙﹀彂 - handleAssignPermission() { - this.visible = true + created() { + this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) }, + methods: { + // 鐐瑰嚮鏍戣妭鐐瑰彸閿彍鍗曟潈闄愰厤缃寜閽悗瑙﹀彂 + handleAssignPermission() { + this.visible = true + }, - // 璋冪敤鎺ュ彛鑾峰彇鎵�鏈夎溅闂村垪琛� - getAllDepartmentsListByApi() { - this.allTreeKeys = [] - dncApi.getAllDepartmentsListApi() - .then(res => { - if (res.success) { - this.allDepartmentsList = res.result - this.generateList(this.allDepartmentsList) - this.$nextTick(() => { - this.$refs.departPermissionTransferRef.getHasPermissionDepartByApi() - this.$refs.departPermissionTransferRef.expandedKeys = this.allTreeKeys - this.$refs.departPermissionTransferRef.flatten(JSON.parse(JSON.stringify(this.allDepartmentsList))) - }) - // 鍙湁涓婃閫�鍑烘椂鍦ㄨ溅闂村垎閰峵ab鐣岄潰鎵嶄細杩涘叆姝ゅ垽鏂� - // 鑻ヤ笂娆¢��鍑烘椂鍦ㄧ敤鎴峰垎閰峵ab鐣岄潰鍒欏啀娆¤繘鍏ユ椂key鐢�2鍙樹负1鏃朵細瑙﹀彂watch鐩戞祴activeTabKey鍙樺寲鍒欎細灏唊ey:1鍔犲叆hasLoadedDataTabKeyArray锛屽洜姝ゆ棤闇�鍐嶆鍔犲叆key:1 - if (!this.hasLoadedDataTabKeyArray.includes(this.activeTabKey)) this.hasLoadedDataTabKeyArray.push(this.activeTabKey) - } + // 璋冪敤鎺ュ彛鑾峰彇鎵�鏈夎溅闂村垪琛� + getAllDepartmentsListByApi() { + this.allTreeKeys = this.allDepartmentsList = [] + this.$nextTick(() => { + this.$refs.departPermissionTransferRef.targetKeys = this.$refs.departPermissionTransferRef.dataSource = [] + this.$refs.departPermissionTransferRef.spinning = true }) - }, + dncApi.getAllDepartmentsListApi() + .then(res => { + if (res.success) { + this.allDepartmentsList = res.result + this.generateList(this.allDepartmentsList) + this.$nextTick(() => { + this.$refs.departPermissionTransferRef.getHasPermissionDepartByApi() + this.$refs.departPermissionTransferRef.expandedKeys = this.allTreeKeys + this.$refs.departPermissionTransferRef.flatten(JSON.parse(JSON.stringify(this.allDepartmentsList))) + }) + // 鍙湁涓婃閫�鍑烘椂鍦ㄨ溅闂村垎閰峵ab鐣岄潰鎵嶄細杩涘叆姝ゅ垽鏂� + // 鑻ヤ笂娆¢��鍑烘椂鍦ㄧ敤鎴峰垎閰峵ab鐣岄潰鍒欏啀娆¤繘鍏ユ椂key鐢�2鍙樹负1鏃朵細瑙﹀彂watch鐩戞祴activeTabKey鍙樺寲鍒欎細灏唊ey:1鍔犲叆hasLoadedDataTabKeyArray锛屽洜姝ゆ棤闇�鍐嶆鍔犲叆key:1 + if (!this.hasLoadedDataTabKeyArray.includes(this.activeTabKey)) this.hasLoadedDataTabKeyArray.push(this.activeTabKey) + } + }) + }, - /** - * 閫掑綊鑾峰緱鎵�鏈夋爲鑺傜偣key - * @param data - */ - generateList(data) { - for (let i = 0; i < data.length; i++) { - const node = data[i] - const key = node.key - this.allTreeKeys.push(key) - if (node.children) this.generateList(node.children) - } - }, - - // 璋冪敤鎺ュ彛鑾峰彇鎵�鏈夌敤鎴峰垪琛� - getAllUsersListByApi() { - dncApi.getAllUsersListApi() - .then(res => { - if (res.success) { - this.allUsersList = res.result - this.$nextTick(() => this.$refs.userPermissionTransferRef.getHasPermissionUserByApi()) - } - }) - }, - - setAdminDisabled() { - this.allUsersList = this.allUsersList.map(item => { - return { - ...item, - disabled: item.username === 'admin' + /** + * 閫掑綊鑾峰緱鎵�鏈夋爲鑺傜偣key + * @param data + */ + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i] + const key = node.key + this.allTreeKeys.push(key) + if (node.children) this.generateList(node.children) } - }) - }, + }, - handleModalClose() { - this.visible = false - this.hasLoadedDataTabKeyArray = [] - }, + // 璋冪敤鎺ュ彛鑾峰彇鎵�鏈夌敤鎴峰垪琛� + getAllUsersListByApi() { + this.$nextTick(() => { + this.allUsersList = [] + this.$refs.userPermissionTransferRef.spinning = true + }) + dncApi.getAllUsersListApi() + .then(res => { + if (res.success) { + this.allUsersList = res.result + this.$nextTick(() => this.$refs.userPermissionTransferRef.getHasPermissionUserByApi()) + } + }) + }, - triggerCorrespondingMethod({ methodName, modalTitle }) { - if (this[methodName]) { - this[methodName]() - this.title = modalTitle + setAdminDisabled() { + this.allUsersList = this.allUsersList.map(item => { + return { + ...item, + disabled: item.username === 'admin' + } + }) + }, + + handleModalClose() { + this.visible = false + this.hasLoadedDataTabKeyArray = [] + }, + + triggerCorrespondingMethod({ methodName, modalTitle }) { + if (this[methodName]) { + this[methodName]() + this.title = modalTitle + } } } } -} </script> <style scoped> diff --git a/src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue b/src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue index 7b7ee3d..c40a94e 100644 --- a/src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue +++ b/src/views/dnc/base/modules/ProductStructure/Permission/DepartPermissionTransfer.vue @@ -48,8 +48,6 @@ <script> import dncApi from '@/api/dnc' - const transferDataSource = [] - export default { name: 'DepartPermissionTransfer', components: {}, diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureBaseContextMenu.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureBaseContextMenu.vue index c5a1cc2..2efd3ba 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureBaseContextMenu.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureBaseContextMenu.vue @@ -18,11 +18,6 @@ export default { name: 'ProductStructureBaseContextMenu', components: {}, - props: { - tableRowInfo: { - type: Object - } - }, data() { return { menuVisible: false, @@ -34,7 +29,6 @@ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)', zIndex: 999 }, - currentMenuLevel: '', baseContextMenuList: [ { label: '鍒锋柊', code: 'tree_reload', icon: 'reload', isHasPermission: false, isCommonMethod: false }, { label: '娣诲姞浜у搧', code: 'product_add', icon: 'plus', isHasPermission: true, isCommonMethod: false } @@ -43,7 +37,6 @@ }, methods: { menuItemClick({ key }) { - console.log('menuKey', key) const isCommonMethod = this.baseContextMenuList.find(item => item.code === key).isCommonMethod const modalTitle = this.baseContextMenuList.find(item => item.code === key).label const menuKeyArray = key.split('_') diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue index 7ca8dcb..011fb44 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue @@ -30,8 +30,12 @@ :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> <template slot="title" slot-scope="{ label, parentId, key:treeKey,type}"> - <ProductStructureTreeContextMenu ref="contextMenuRef" - :treeParams="{label,treeKey,searchValue,type}"/> + <span v-if="label.indexOf(searchValue) > -1"> + {{label.substr(0, label.indexOf(searchValue))}} + <span class="replaceSearch">{{searchValue}}</span> + {{label.substr(label.indexOf(searchValue) + searchValue.length)}} + </span> + <span v-else>{{ label }}</span> </template> <a-icon slot="switcherIcon" type="down"/> @@ -68,6 +72,10 @@ @submitSuccess="modalFormSubmitSuccess"/> <!--寮曠敤閮ㄤ欢--> <NcComponentBorrowModal :currentBorrowInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> + + <!--浜у搧缁撴瀯鏍戝彸閿彍鍗曪紙鏍戣妭鐐硅Е鍙戯級--> + <product-structure-tree-context-menu ref="mainContextmenuRef" :treeParams="rightClickSelected"/> + <!--浜у搧缁撴瀯鏍戝熀鏈彸閿彍鍗�(绌虹櫧澶勮Е鍙�)--> <ProductStructureBaseContextMenu ref="baseContextmenuRef"/> @@ -79,7 +87,7 @@ <script> import dncApi from '@/api/dnc' - import { deleteAction } from '@/api/manage' + import { deleteAction, getAction } from '@/api/manage' import ProductStructureTreeContextMenu from './ProductStructureTreeContextMenu' import ProductModal from './Product/ProductModal' import ComponentModal from './Component/ComponentModal' @@ -130,7 +138,8 @@ rightClickSelected: {}, fullScreenSpinning: false, url: { - delete: '/nc/product/delete' + delete: '/nc/product/delete', + webServiceDNCToPlm: '/dnc/guideCardBatch/webServiceDNCToPlm' } } }, @@ -203,9 +212,10 @@ /** * 鏍戣妭鐐瑰彸閿崟鍑昏妭鐐规椂瑙﹀彂 + * @param event 浜嬩欢瀵硅薄 * @param node 鑺傜偣瀵硅薄 */ - handleTreeRightClick({ node }) { + handleTreeRightClick({ event, node }) { if (this.$refs.baseContextmenuRef) this.$refs.baseContextmenuRef.menuVisible = false const that = this const record = node.dataRef @@ -221,7 +231,9 @@ message: '娑堟伅', description: '鏆傛棤璇ヨ妭鐐硅缁嗕俊鎭�' }) + return } + this.openMainContextMenu(event) } else { that.$notification.error({ message: '娑堟伅', @@ -242,11 +254,48 @@ okType: 'danger', cancelText: '鍙栨秷', onOk: () => { - if (!url.delete) { - this.$message.error('璇疯缃畊rl.delete灞炴��!') + that.loading = true + deleteAction(url.delete + `/${id}/${type}`) + .then((res) => { + if (res.success) { + that.getTreeDataByApi() + $notification.success({ + message: '娑堟伅', + description: res.message + }) + } else { + $notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.$destroyAll() + }) + }, + onCancel: () => { + that.$destroyAll() + } + }) + }, + + // 鍙戦�乶c绋嬪簭鑷充笁缁村伐鑹� + handleSendNcToPlm() { + const that = this + const { rightClickSelected: { id, type }, $confirm, url, $notification } = that + $confirm({ + title: '鎻愮ず', + content: '纭鍙戦�佽nc绋嬪簭锛�', + okText: '纭', + okType: 'danger', + cancelText: '鍙栨秷', + onOk: () => { + if (!url.webServiceDNCToPlm) { + this.$message.error('璇疯缃畊rl.webServiceDNCToPlm!') return } - deleteAction(url.delete + `/${id}/${type}`) + getAction(url.webServiceDNCToPlm, { id: id }) .then((res) => { if (res.success) { that.getTreeDataByApi() @@ -405,12 +454,24 @@ }, /** + * 鎵撳紑鏍戣妭鐐硅彍鍗曚簨浠� + * @param event 鏍戣妭鐐逛簨浠跺璞� + */ + openMainContextMenu(event) { + this.$refs.mainContextmenuRef.menuStyle.top = event.clientY + 'px' + this.$refs.mainContextmenuRef.menuStyle.left = event.clientX + 'px' + this.$refs.mainContextmenuRef.menuVisible = true + document.body.addEventListener('click', this.handleMainContextMenuClose) + }, + + /** * 鏍戞墍鍦ㄧ埗鍏冪礌鐨勫彸閿簨浠� * @param event 浜嬩欢瀵硅薄 */ openBaseContextMenu(event) { event.preventDefault() if (event.target.id !== 'tree-container') return + if (this.$refs.mainContextmenuRef) this.$refs.mainContextmenuRef.menuVisible = false this.$refs.baseContextmenuRef.menuStyle.top = event.clientY + 'px' this.$refs.baseContextmenuRef.menuStyle.left = event.clientX + 'px' this.$refs.baseContextmenuRef.menuVisible = true @@ -443,6 +504,12 @@ break default: } + }, + + // 鎺у埗涓昏鍙抽敭鑿滃崟鍏抽棴 + handleMainContextMenuClose() { + if (this.$refs.mainContextmenuRef) this.$refs.mainContextmenuRef.menuVisible = false + document.body.removeEventListener('click', this.handleMainContextMenuClose) }, // 鎺у埗鍩虹鍙抽敭鑿滃崟鍏抽棴 @@ -496,6 +563,12 @@ align-items: center; } + .replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); + } + @media screen and (min-width: 1920px) { .tree_con { height: 748px !important; diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureTreeContextMenu.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureTreeContextMenu.vue index a57934e..a38332e 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureTreeContextMenu.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureTreeContextMenu.vue @@ -1,181 +1,171 @@ <template> - <a-dropdown :trigger="['contextmenu']"> - <span v-if="treeParams.label.indexOf(treeParams.searchValue) > -1">{{ - treeParams.label.substr(0, treeParams.label.indexOf(treeParams.searchValue)) - }}<span - class="replaceSearch">{{ - treeParams.searchValue - }}</span>{{ - treeParams.label.substr(treeParams.label.indexOf(treeParams.searchValue) + treeParams.searchValue.length) - }}</span> - <span v-else>{{ treeParams.label }}</span> - <template #overlay> - <a-menu @click="({ key: menuKey }) => onContextMenuClick(treeParams.treeKey, menuKey)" - @contextmenu="event=>event.preventDefault()"> - <a-menu-item v-for="item in defaultContextMenuList[getCurrentMenuLevel]" :key="item.code" v-has="item.code"> - <a-icon :type="item.icon"/> - {{ item.label }} - </a-menu-item> - </a-menu> + <a-menu :style="menuStyle" @click="menuItemClick" v-if="menuVisible" mode="vertical" @contextmenu="menuContextMenu"> + <template v-for="menuItem in defaultContextMenuList[getCurrentMenuLevel]"> + <a-menu-item :key="menuItem.code" v-has="menuItem.code"> + <a-icon :type="menuItem.icon"/> + {{ menuItem.label }} + </a-menu-item> </template> - </a-dropdown> + </a-menu> </template> <script> -export default { - name: 'ProductStructureTreeContextMenu', - components: {}, - props: { - treeParams: { - type: Object - } - }, - data() { - return { - defaultContextMenuList: { - //浜у搧 - product: [ - { label: '娣诲姞浜у搧', code: 'product_add', icon: 'plus', isCommonMethod: false }, - { label: '娣诲姞閮ㄤ欢', code: 'product_add_child', icon: 'plus', isCommonMethod: false }, - { label: '缂栬緫浜у搧淇℃伅', code: 'product_edit', icon: 'edit', isCommonMethod: false }, - // { label: '瀵煎嚭鏂囨。', code: 'product_export', icon: 'export', isCommonMethod: true }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'product_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'product_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'product_search_nc', icon: 'search', isCommonMethod: true }, - { label: '鍒犻櫎', code: 'product_delete', icon: 'delete', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ], - //閮ㄤ欢 - component: [ - { label: '娣诲姞瀛愰儴浠�', code: 'component_add', icon: 'plus', isCommonMethod: false }, - { label: '娣诲姞闆朵欢', code: 'component_add_child', icon: 'plus', isCommonMethod: false }, - { label: '鍒涘缓宸ュ簭', code: 'component_add_relative', icon: 'plus', isCommonMethod: false }, - { label: '缂栬緫閮ㄤ欢淇℃伅', code: 'component_edit', icon: 'edit', isCommonMethod: false }, - // { label: '瀵煎嚭鏂囨。', code: 'component_export', icon: 'export', isCommonMethod: true }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'component_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'component_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'component_search_nc', icon: 'search', isCommonMethod: true }, - { label: '寮曠敤閮ㄤ欢',code: 'component_borrow',icon: 'plus',isCommonMethod: false}, - { label: '鍒犻櫎', code: 'component_delete', icon: 'delete', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ], - //闆朵欢 - part: [ - { label: '娣诲姞闆朵欢', code: 'parts_add', icon: 'plus', isCommonMethod: false }, - { label: '鍒涘缓宸ヨ壓瑙勭▼鐗堟湰', code: 'parts_add_relative', icon: 'plus', isCommonMethod: false }, - // { label: '鍒涘缓宸ュ簭', code: 'parts_add_relative', icon: 'plus', isCommonMethod: false }, - { label: '缂栬緫闆朵欢淇℃伅', code: 'parts_edit', icon: 'edit', isCommonMethod: false }, - // { label: '瀵煎嚭鏂囨。', code: 'parts_export', icon: 'export', isCommonMethod: true }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'parts_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'parts_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'parts_search_nc', icon: 'search', isCommonMethod: true }, - { label: '鍒犻櫎', code: 'parts_delete', icon: 'delete', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ], - //宸ヨ壓瑙勭▼鐗堟湰 - processSpecVersion: [ - { label: '鍒涘缓宸ヨ壓瑙勭▼鐗堟湰', code: 'version_add', icon: 'plus', isCommonMethod: false }, - { label: '鍒涘缓宸ュ簭', code: 'version_add_child', icon: 'plus', isCommonMethod: false }, - { label: '缂栬緫宸ヨ壓瑙勭▼鐗堟湰淇℃伅', code: 'version_edit', icon: 'edit', isCommonMethod: false }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'version_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'version_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'version_search_nc', icon: 'search', isCommonMethod: true }, - { label: '鍒犻櫎', code: 'version_delete', icon: 'delete', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ], - //宸ュ簭 - process: [ - { label: '鍒涘缓宸ュ簭', code: 'process_add', icon: 'plus', isCommonMethod: false }, - { label: '鍒涘缓宸ユ', code: 'process_add_child', icon: 'plus', isCommonMethod: false }, - { label: '娣诲姞璁惧绫�', code: 'process_add_type', icon: 'plus', isCommonMethod: true }, - { label: '缂栬緫宸ュ簭淇℃伅', code: 'process_edit', icon: 'edit', isCommonMethod: false }, - { label: '鍒犻櫎', code: 'process_delete', icon: 'delete', isCommonMethod: true }, - // { label: '瀵煎嚭NC绋嬪簭', code: 'process_export', icon: 'export', isCommonMethod: true }, - { label: '瀵煎叆NC绋嬪簭', code: 'process_nc_import', icon: 'import', isCommonMethod: true }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'process_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'process_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'process_search_nc', icon: 'search', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ], - //宸ユ - processStep: [ - { label: '鍒涘缓宸ユ', code: 'processStep_add', icon: 'plus', isCommonMethod: false }, - { label: '缂栬緫宸ユ淇℃伅', code: 'processStep_edit', icon: 'edit', isCommonMethod: false }, - { label: '娣诲姞璁惧绫�', code: 'processStep_add_type', icon: 'plus', isCommonMethod: true }, - { label: '鍒犻櫎', code: 'processStep_delete', icon: 'delete', isCommonMethod: true }, - // { label: '瀵煎嚭NC绋嬪簭', code: 'processStep_export', icon: 'import', isCommonMethod: true }, - { label: '瀵煎叆NC绋嬪簭', code: 'processStep_nc_import', icon: 'import', isCommonMethod: true }, - { label: '瀵煎叆鍏朵粬鏂囨。', code: 'processStep_other_import', icon: 'import', isCommonMethod: true }, - { label: '妫�绱㈢數瀛愭牱鏉�', code: 'processStep_search', icon: 'search', isCommonMethod: true }, - { label: '妫�绱C鏂囦欢', code: 'processStep_search_nc', icon: 'search', isCommonMethod: true }, - { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } - ] - } - } - }, - computed: { - getCurrentMenuLevel() { - switch (+this.treeParams.type) { - case 1: - return 'product' - case 2: - return 'component' - case 3: - return 'part' - case 4: - return 'processSpecVersion' - case 5: - return 'process' - case 6: - return 'processStep' + export default { + name: 'ProductStructureTreeContextMenu', + components: {}, + props: { + treeParams: { + type: Object } }, - // getCurrentDocClassCode() { - // switch (+this.treeParams.type) { - // case 1: - // return 'OTHER' - // case 2: - // return 'OTHER' - // case 3: - // return 'OTHER' - // case 4: - // return 'OTHER' - // case 5: - // return 'NC' - // case 6: - // return 'NC' - // } - // } - }, - methods: { - onContextMenuClick(treeKey, menuKey) { - const level = this.getCurrentMenuLevel - console.log('level---------------------', level) - const treeNodeInfo = Object.assign({}, this.treeParams) - console.log('treeNodeInfo******************', treeNodeInfo) - const menuKeyArray = menuKey.split('_') - const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod - // product_add => handleAdd 瑙﹀彂瀵瑰簲缁勪欢浜嬩欢 - let methodName - // 鍒ゆ柇鏄惁涓哄叕鍏辨柟娉曪紝濡傛灉涓哄叕鍏辨柟娉曞垯鎴彇涓撴湁灞炴�roduct/component/part/process绛夊瓧娈� - if (isCommonMethod) { - methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).slice(1).join('') - } else { - methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') + data() { + return { + menuVisible: false, + menuStyle: { + position: 'fixed', + top: 0, + left: 0, + border: '1px solid #eee', + boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)', + zIndex: 999 + }, + defaultContextMenuList: { + //浜у搧 + product: [ + { label: '娣诲姞浜у搧', code: 'product_add', icon: 'plus', isCommonMethod: false }, + { label: '娣诲姞閮ㄤ欢', code: 'product_add_child', icon: 'plus', isCommonMethod: false }, + { label: '缂栬緫浜у搧淇℃伅', code: 'product_edit', icon: 'edit', isCommonMethod: false }, + // { label: '瀵煎嚭鏂囨。', code: 'product_export', icon: 'export', isCommonMethod: true }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'product_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'product_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'product_search_nc', icon: 'search', isCommonMethod: true }, + { label: '鍒犻櫎', code: 'product_delete', icon: 'delete', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } + ], + //閮ㄤ欢 + component: [ + { label: '娣诲姞瀛愰儴浠�', code: 'component_add', icon: 'plus', isCommonMethod: false }, + { label: '娣诲姞闆朵欢', code: 'component_add_child', icon: 'plus', isCommonMethod: false }, + { label: '鍒涘缓宸ュ簭', code: 'component_add_relative', icon: 'plus', isCommonMethod: false }, + { label: '缂栬緫閮ㄤ欢淇℃伅', code: 'component_edit', icon: 'edit', isCommonMethod: false }, + // { label: '瀵煎嚭鏂囨。', code: 'component_export', icon: 'export', isCommonMethod: true }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'component_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'component_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'component_search_nc', icon: 'search', isCommonMethod: true }, + { label: '寮曠敤閮ㄤ欢', code: 'component_borrow', icon: 'plus', isCommonMethod: false }, + { label: '鍒犻櫎', code: 'component_delete', icon: 'delete', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } + ], + //闆朵欢 + part: [ + { label: '娣诲姞闆朵欢', code: 'parts_add', icon: 'plus', isCommonMethod: false }, + { label: '鍒涘缓宸ヨ壓瑙勭▼鐗堟湰', code: 'parts_add_relative', icon: 'plus', isCommonMethod: false }, + // { label: '鍒涘缓宸ュ簭', code: 'parts_add_relative', icon: 'plus', isCommonMethod: false }, + { label: '缂栬緫闆朵欢淇℃伅', code: 'parts_edit', icon: 'edit', isCommonMethod: false }, + // { label: '瀵煎嚭鏂囨。', code: 'parts_export', icon: 'export', isCommonMethod: true }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'parts_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'parts_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'parts_search_nc', icon: 'search', isCommonMethod: true }, + { label: '鍒犻櫎', code: 'parts_delete', icon: 'delete', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } + ], + //宸ヨ壓瑙勭▼鐗堟湰 + processSpecVersion: [ + { label: '鍒涘缓宸ヨ壓瑙勭▼鐗堟湰', code: 'version_add', icon: 'plus', isCommonMethod: false }, + { label: '鍒涘缓宸ュ簭', code: 'version_add_child', icon: 'plus', isCommonMethod: false }, + { label: '缂栬緫宸ヨ壓瑙勭▼鐗堟湰淇℃伅', code: 'version_edit', icon: 'edit', isCommonMethod: false }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'version_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'version_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'version_search_nc', icon: 'search', isCommonMethod: true }, + { label: '鍒犻櫎', code: 'version_delete', icon: 'delete', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true } + ], + //宸ュ簭 + process: [ + { label: '鍒涘缓宸ュ簭', code: 'process_add', icon: 'plus', isCommonMethod: false }, + { label: '鍒涘缓宸ユ', code: 'process_add_child', icon: 'plus', isCommonMethod: false }, + { label: '娣诲姞璁惧绫�', code: 'process_add_type', icon: 'plus', isCommonMethod: true }, + { label: '缂栬緫宸ュ簭淇℃伅', code: 'process_edit', icon: 'edit', isCommonMethod: false }, + { label: '鍒犻櫎', code: 'process_delete', icon: 'delete', isCommonMethod: true }, + // { label: '瀵煎嚭NC绋嬪簭', code: 'process_export', icon: 'export', isCommonMethod: true }, + { label: '瀵煎叆NC绋嬪簭', code: 'process_nc_import', icon: 'import', isCommonMethod: true }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'process_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'process_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'process_search_nc', icon: 'search', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true }, + { label: '鍙戦�乶c绋嬪簭鑷充笁缁村伐鑹�', code: 'process_send_nc_to_plm', icon: 'import', isCommonMethod: true } + ], + //宸ユ + processStep: [ + { label: '鍒涘缓宸ユ', code: 'processStep_add', icon: 'plus', isCommonMethod: false }, + { label: '缂栬緫宸ユ淇℃伅', code: 'processStep_edit', icon: 'edit', isCommonMethod: false }, + { label: '娣诲姞璁惧绫�', code: 'processStep_add_type', icon: 'plus', isCommonMethod: true }, + { label: '鍒犻櫎', code: 'processStep_delete', icon: 'delete', isCommonMethod: true }, + // { label: '瀵煎嚭NC绋嬪簭', code: 'processStep_export', icon: 'import', isCommonMethod: true }, + { label: '瀵煎叆NC绋嬪簭', code: 'processStep_nc_import', icon: 'import', isCommonMethod: true }, + { label: '瀵煎叆鍏朵粬鏂囨。', code: 'processStep_other_import', icon: 'import', isCommonMethod: true }, + { label: '妫�绱㈢數瀛愭牱鏉�', code: 'processStep_search', icon: 'search', isCommonMethod: true }, + { label: '妫�绱C鏂囦欢', code: 'processStep_search_nc', icon: 'search', isCommonMethod: true }, + { label: '鏉冮檺閰嶇疆', code: 'public_assign_permission', icon: 'idcard', isCommonMethod: true }, + { label: '鍙戦�乶c绋嬪簭鑷充笁缁村伐鑹�', code: 'processStep_send_nc_to_plm', icon: 'import', isCommonMethod: true } + ] + } } - console.log('methodName', methodName) - const modalTitle = this.defaultContextMenuList[level].find(item => item.code === menuKey).label - this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle, treeNodeInfo }) + }, + computed: { + getCurrentMenuLevel() { + switch (+this.treeParams.type) { + case 1: + return 'product' + case 2: + return 'component' + case 3: + return 'part' + case 4: + return 'processSpecVersion' + case 5: + return 'process' + case 6: + return 'processStep' + } + } + }, + methods: { + menuItemClick({ key }) { + const menuKey = key + const level = this.getCurrentMenuLevel + const treeNodeInfo = Object.assign({ treeKey: this.treeParams.key }, this.treeParams) + console.log('treeNodeInfo', treeNodeInfo) + const menuKeyArray = menuKey.split('_') + const isCommonMethod = this.defaultContextMenuList[level].find(item => item.code === menuKey).isCommonMethod + // product_add => handleAdd 瑙﹀彂瀵瑰簲缁勪欢浜嬩欢 + let methodName + // 鍒ゆ柇鏄惁涓哄叕鍏辨柟娉曪紝濡傛灉涓哄叕鍏辨柟娉曞垯鎴彇涓撴湁灞炴�roduct/component/part/process绛夊瓧娈� + if (isCommonMethod) { + methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).slice(1).join('') + } else { + methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('') + } + const modalTitle = this.defaultContextMenuList[level].find(item => item.code === menuKey).label + this.$bus.$emit('treeMenuItemMethodTrigger', { methodName, modalTitle, treeNodeInfo }) + }, + + /** + * 閬垮厤鍗曟閲嶅鍙抽敭鍚庡叧闂彍鍗曟垨鎵撳紑window鑿滃崟 + * @param event 浜嬩欢瀵硅薄 + */ + menuContextMenu(event) { + event.preventDefault() + event.stopPropagation() + } } } -} </script> <style scoped> -.replaceSearch { - color: #40a9ff; - font-weight: bold; - background-color: rgb(204, 204, 204); -} + /deep/ .ant-menu-item { + height: 32px; + line-height: 32px; + } </style> \ No newline at end of file diff --git a/src/views/dnc/common/TableContextMenu.vue b/src/views/dnc/common/TableContextMenu.vue index b6bda8c..a72765f 100644 --- a/src/views/dnc/common/TableContextMenu.vue +++ b/src/views/dnc/common/TableContextMenu.vue @@ -1,5 +1,5 @@ <template> - <a-menu :style="menuStyle" @click="menuItemClick" v-if="menuVisible" mode="vertical"> + <a-menu :style="menuStyle" @click="menuItemClick" v-if="menuVisible" mode="vertical" @contextmenu="menuContextMenu"> <template v-for="menuItem in defaultContextMenuList[tableRowInfo.param]"> <a-menu-item :key="menuItem.code" v-has="menuItem.code" v-if="menuItem.subMenu.length===0"> <a-icon :type="menuItem.icon"/> @@ -168,6 +168,15 @@ modalTitle, tableRowInfo: this.tableRowInfo }) + }, + + /** + * 閬垮厤鍗曟閲嶅鍙抽敭鍚庡叧闂彍鍗曟垨鎵撳紑window鑿滃崟 + * @param event 浜嬩欢瀵硅薄 + */ + menuContextMenu(event) { + event.preventDefault() + event.stopPropagation() } } } diff --git a/src/views/eam/dispose/EamEquipmentLeanOutList.vue b/src/views/eam/dispose/EamEquipmentLeanOutList.vue index c338f64..d26da1c 100644 --- a/src/views/eam/dispose/EamEquipmentLeanOutList.vue +++ b/src/views/eam/dispose/EamEquipmentLeanOutList.vue @@ -145,7 +145,14 @@ </a-menu> </a-dropdown> </template> - <template v-else> + <template v-if="record.leanStatus === 'WAIT_RETURN'"> + <a-popconfirm title='纭畾褰掕繕鍚�?' @confirm='() => equipmentReturn(record.id)'> + <a>褰掕繕</a> + </a-popconfirm> + <a-divider type='vertical' /> + <a @click='handleDetail(record)'>璇︽儏</a> + </template> + <template v-if="record.leanStatus !== 'WAIT_RETURN' && record.leanStatus !== 'WAIT_SUBMIT'"> <a href="javascript:;" @click="handleDetail(record)" @@ -291,11 +298,37 @@ delete: '/eam/eamEquipmentLeanOut/delete', deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch', submit: '/eam/eamEquipmentLeanOut/submit', + equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn', } } }, computed: {}, methods: { + equipmentReturn(id) { + if (!this.url.equipmentReturn) { + this.$message.error('璇疯缃畊rl.submit灞炴��!') + return + } + let that = this + getAction(that.url.equipmentReturn, { id: id }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + that.reCalculatePage(1) + // that.$message.success(res.message); + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + // that.$message.warning(res.message); + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, handleSubmit(id) { if (!this.url.submit) { this.$message.error('璇疯缃畊rl.submit灞炴��!') diff --git a/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue b/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue index 0e6d69d..3c1e2bf 100644 --- a/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue +++ b/src/views/eam/purchase/EamEquipmentPurchasePlanList.vue @@ -185,17 +185,20 @@ title:'閲囪喘璁″垝缂栫爜', align:"center", dataIndex: 'planCode', + width: 100, fixed: 'left' }, { title:'閲囪喘璁″垝鍚嶇О', align:"center", dataIndex: 'planName', + width: 100, fixed: 'left' }, { title:'璁″垝鐘舵��', align:"center", + width: 100, dataIndex: 'planStatus_dictText' }, { diff --git a/src/views/flowable/workflow/FlowCompleted.vue b/src/views/flowable/workflow/FlowCompleted.vue index 716f113..5c172da 100644 --- a/src/views/flowable/workflow/FlowCompleted.vue +++ b/src/views/flowable/workflow/FlowCompleted.vue @@ -166,6 +166,30 @@ @searchReset='searchReset' :selectSparePartApplyData='selectSparePartApplyData' ></spare-part-apply-handle> + <equipment-return-approval-modal + ref='equipmentReturnApprovalModelRef' + @searchReset='searchReset' + /> + <inbound-order-handle-xq + ref='inboundOrderApprovalModal' + :selectInboundOrderData='selectInboundOrderData' + @searchReset='searchReset' + ></inbound-order-handle-xq> + <second-maintenance-approval-modal + ref='secondMaintenanceApprovalModal' + :selectShenpiData='selectSecondMaintenanceData' + @searchReset='searchReset' + ></second-maintenance-approval-modal> + <third-maintenance-approval-modal + ref='thirdMaintenanceApprovalModal' + :selectShenpiData='selectThirdMaintenanceData' + @searchReset='searchReset' + ></third-maintenance-approval-modal> + <guide-card-batch-xq + ref='GuideCardBatchXq' + :selectShenpiData='selectGuideCardData' + @searchReset='searchReset' + ></guide-card-batch-xq> </a-card> </template> @@ -188,6 +212,11 @@ import EquipmentTransferApprovalModal from '@views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue' import EquipmentScrapApprovalModal from '@views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue' import SparePartApplyHandle from '@views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue' +import EquipmentReturnApprovalModal from '@views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue' +import GuideCardBatchXq from '@views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue' +import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' +import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' +import InboundOrderHandleXq from '@views/flowable/workflow/inboundOrder/InboundOrderHandleXq.vue' export default { name: 'NcDeviceCharactersList', @@ -206,7 +235,13 @@ EquipmentSealUpApprovalModal, EquipmentTransferApprovalModal, EquipmentScrapApprovalModal, - SparePartApplyHandle + SparePartApplyHandle, + EquipmentReturnApprovalModal, + SecondMaintenanceApprovalModal, + ThirdMaintenanceApprovalModal, + InboundOrderHandleXq, + GuideCardBatchXq + }, data() { return { @@ -244,7 +279,7 @@ { title: '娴佺▼鍙戣捣浜哄悕绉�', align: 'center', - dataIndex: 'startUserName', + dataIndex: 'proposer_dictText', width: 250 }, { @@ -285,6 +320,11 @@ // selectEquipmentSealUpData: {}, // selectEquipmentTransferData: {}, // selectEquipmentScrapData: {}, + selectSecondMaintenanceData: {}, + selectThirdMaintenanceData: {}, + selectInboundOrderData: {}, + selectGuideCardData: {}, + } }, @@ -321,7 +361,7 @@ case 'toolOutStorageApproval': this.handleToolOutStorageApproval(item) break - case 'toolsStocktakingBound': + case 'toolsStocktakingBoundApproval': this.handleToolStocktakingApproval(item) break case 'toolsLossApproval': @@ -345,6 +385,21 @@ case 'spare_part_apply': this.handleSparePartApplyApproval(item) break + case 'equipment_return': + this.handleEquipmentReturn(item) + break + case 'toolInStorageApproval': + this.handleToolInStorage(item) + break + case 'second_maintenance': + this.handleSecondMaintenance(item) + break + case 'third_maintenance': + this.handleThirdMaintenance(item) + break + case 'programConfirmApproval': + this.handleGuideCardApproval(item) + break default: alert('娌℃壘鍒拌娴佺▼') } @@ -355,6 +410,47 @@ let result = parts[0] return result }, + + handleEquipmentReturn(item) { + this.$refs.equipmentReturnApprovalModelRef.visible = true + this.$refs.equipmentReturnApprovalModelRef.title = item.name + this.$refs.equipmentReturnApprovalModelRef.handleDetail(item) + this.$refs.equipmentReturnApprovalModelRef.disableSubmit = true + }, + handleToolInStorage(item) { + console.log('item----->', item) + this.selectInboundOrderData = item + this.selectGuideCardData.title = item.description + this.$refs.inboundOrderApprovalModal.clearTableSource() + this.$refs.inboundOrderApprovalModal.getAllApproveData(item) + }, + handleSecondMaintenance(item) { + if (item && item.dataId) { + this.selectSecondMaintenanceData = Object.assign({}, item) + this.$refs.secondMaintenanceApprovalModal.handleDetail(item) + this.$refs.secondMaintenanceApprovalModal.title = item.name + this.$refs.secondMaintenanceApprovalModal.disableSubmit = true + } + }, + handleThirdMaintenance(item) { + if (item && item.dataId) { + this.selectThirdMaintenanceData = Object.assign({}, item) + this.$refs.thirdMaintenanceApprovalModal.handleDetail(item) + this.$refs.thirdMaintenanceApprovalModal.title = item.name + this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true + } + }, + //DNC-绋嬪簭纭琛ㄦ祦绋� + handleGuideCardApproval(item) { + console.log('item----->', item) + this.selectGuideCardData = item + this.selectGuideCardData.assignee_dictText = item.todoUsers_dictText + this.selectGuideCardData.procInstId = item.procInsId + this.selectGuideCardData.processInstanceId = item.procInsId + this.selectGuideCardData.title = item.description + this.$refs.GuideCardBatchXq.clearTableSource() + this.$refs.GuideCardBatchXq.getAllApproveData(item) + }, handDrDetial(item) { this.selectShenpiData = item this.selectShenpiData.assignee_dictText = item.todoUsers_dictText diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 263059d..436c14c 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -242,6 +242,10 @@ ref='equipmentLeanOutApprovalModelRef' @searchReset='searchReset' /> + <equipment-return-approval-modal + ref='equipmentReturnApprovalModelRef' + @searchReset='searchReset' + /> <second-maintenance-approval-modal ref='secondMaintenanceApprovalModal' @@ -307,6 +311,7 @@ import AssignEquipmentFileStreamHandle from '@views/flowable/workflow/assignEquipmentFileStream/AssignEquipmentFileStreamHandle.vue' import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue' import EquipmentLeanOutApprovalModal from '@views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue' +import EquipmentReturnApprovalModal from '@views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue' import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue' @@ -334,6 +339,7 @@ RepairOrderApprovalModal, InspectionOrderHandle, EquipmentLeanOutApprovalModal, + EquipmentReturnApprovalModal, SecondMaintenanceApprovalModal, ThirdMaintenanceApprovalModal, OutBoundOrderHandle, @@ -512,6 +518,9 @@ case 'equipment_lean_out': this.handleEquipmentLeanOut(item) break + case 'equipment_return': + this.handleEquipmentReturn(item) + break case 'second_maintenance': this.handleSecondMaintenance(item) break @@ -521,7 +530,7 @@ case 'toolOutStorageApproval': this.handleToolOutStorageApproval(item) break - case 'toolsStocktakingBound': + case 'toolsStocktakingBoundApproval': this.handleToolStocktakingApproval(item) break case 'toolsLossApproval': @@ -666,6 +675,12 @@ this.$refs.equipmentLeanOutApprovalModelRef.handleDetail(item) this.$refs.equipmentLeanOutApprovalModelRef.disableSubmit = false }, + handleEquipmentReturn(item) { + this.$refs.equipmentReturnApprovalModelRef.visible = true + this.$refs.equipmentReturnApprovalModelRef.title = item.name + this.$refs.equipmentReturnApprovalModelRef.handleDetail(item) + this.$refs.equipmentReturnApprovalModelRef.disableSubmit = false + }, handleSecondMaintenance(item) { if (item && item.dataId) { this.selectSecondMaintenanceData = Object.assign({}, item) diff --git a/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue b/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue new file mode 100644 index 0000000..91f2f0b --- /dev/null +++ b/src/views/flowable/workflow/guideCardBatch/GuideCardBatchXq.vue @@ -0,0 +1,443 @@ + +<!-- + Description: 宸ヤ綔娴�-绋嬪簭鍔犲伐纭琛ㄦ祦绋嬭鎯呴〉闈� List + Author: 浣滆�� liuyh + Date: 2025-02-27 +--> +<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' :rules='validatorRules'> + <a-row> + <a-col :span='span'> + <a-form-model-item label="娴佹按鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="serialNumber"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.serialNumber" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="绋嬪簭鏂囦欢鍚�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="docName"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.docName" ></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="partsCode"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.partsCode" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="闆朵欢鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.partsName" ></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="materielDesp"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.materielDesp"></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="澶瑰叿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixtureInformation"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.fixtureInformation" ></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="processWorkCode"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.processWorkCode" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="鍔犲伐鎵规" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingBatch"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.processingBatch" ></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="processingQuantity"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.processingQuantity" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label="鍔犲伐璁惧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processingEquipment"> + <a-input :disabled='coldisabled' v-model="tableRowRecord.processingEquipment" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-tab-pane> + <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> + <a-card> + <a-timeline style="padding:0 1% 0 12%" > + <a-timeline-item color='white' v-for="(item,index1) in hitaskDataSource" :key="index1"> + <div class="bottom"> + <p>澶勭悊浜猴細{{item.assignee_dictText}}</p> + <p v-if="index1 !==0">澶勭悊鏃堕暱锛歿{item.duration}}</p> + <p v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</p> + <p v-if="item.description != null">澶勭悊鎰忚锛歿{item.description}}</p> + <div class="left_qiu"><span>{{item.taskName}}</span></div> + </div> + </a-timeline-item> + </a-timeline> + </a-card> + </a-tab-pane> + </a-tabs> + </a-spin> + </a-form> + </div> + </a-card> + + + </a-modal> +</template> + +<script> + +import '@assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' +export default { + name: 'FlowShenPi', + mixins: [mixinDevice], + props: { + selectShenpiData: { + type: Object, + required: true + } + }, + + data() { + return { + form: this.$form.createForm(this), + span: 12, + span1: 8, + coldisabled: true, + spinning: false, + tableRowRecord: {}, + assignFileStream:{}, + tableDataSource: [], + usageDataSource: [], + hitaskDataSource:[], + bomForm: {}, + imageSrc: null, + drawerVisible: true, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 30 }, + sm: { span: 16 } + }, + validatorRules: { + status: { + rules: [ + { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, + ] + }, + }, + approveData: {}, + flowData: {}, + title: '璇︽儏椤甸潰', + width: 1000, + visible: false, + // 琛ㄥご + url: { + queryBomDataById: '/dnc/guideCardBatch/queryById', + diagramView: '/assign/flow/diagramView', + queryHisTaskList:'/dncFlow/dispatchFile/queryHisTaskList', + auditGuideCardBatch:"/dnc/guideCardBatch/auditGuideCardBatch", + }, + dictOptions: {}, + superFieldList: [], + workflowSource: [], + isSubmitting: false, + } + }, + 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() { + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣� + if (this.isSubmitting) return; + this.visible = false; + this.routeReload(); + }, + submitForm () { + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑� + if (this.isSubmitting) return; + + // 寮�鍚叏灞�绂侀�� + this.isSubmitting = true; + document.body.classList.add('submitting'); + + const that = this; + + // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟 + const resetState = () => { + that.isSubmitting = false; + document.body.classList.remove('submitting'); + }; + if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ + this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�') + return false; + } + if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) { + this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒') + return false; + } + if ((!that.selectShenpiData.inspectionOpinion==null || that.selectShenpiData.taskDefKey===undefined)&&that.selectShenpiData.taskDefKey==="proofread") { + this.$message.warning('璇疯緭鍏ラ妫�鎰忚锛�') + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (err) { + resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬� + return; + } + if (!err) { + that.confirmLoading = true; + let url=this.url.auditGuideCardBatch + let method = 'post'; + let handle =that.assignFileStream.status === '1'; + let flowTaskVo = {} + switch (that.selectShenpiData.taskDefKey){ + case "proofread": + flowTaskVo.checkType=handle; + break; + case "operation": + flowTaskVo.confirmType=handle; + break; + case "approval": + flowTaskVo.approveType=handle; + break; + } + flowTaskVo.comment =that.assignFileStream.approveContent; + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.taskId = this.selectShenpiData.id + flowTaskVo.userId = this.selectShenpiData.assignee + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.values = this.selectShenpiData.variables + flowTaskVo.inspectionOpinion=that.assignFileStream.inspectionOpinion + 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); + } + }) + .catch((error) => { + console.error(error); + that.$message.error('鎻愪氦澶辫触'); + }) + .finally(() => { + that.confirmLoading = false; + resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬� + }); + } + }) + }, + getAllApproveData(item) { + console.log('selectShenpiData----->', this.selectShenpiData) + this.flowData = item + let param = { + 'id': item.dataId + } + let parmhis={ + 'procInstId': item.procInstId + } + getAction(this.url.queryHisTaskList,parmhis).then(res=>{ + this.hitaskDataSource=res.result + getAction(this.url.queryBomDataById, param).then((res => { + if (res.success) { + this.tableRowRecord = res.result + console.log('this.tableRowRecord----->', this.tableRowRecord) + } + })) + }).finally( + this.visible = true, + console.log('this.approveData---->', this.approveData) + ) + } + } +} +</script> +<style scoped> +/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */ +html.submitting, +html.submitting body { + pointer-events: none !important; + cursor: wait !important; +} + +/* 钂欏眰鏁堟灉澧炲己 */ +html.submitting::before { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.5); + z-index: 9998; +} + +/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */ +html.submitting::after { + content: '鎻愪氦涓�...'; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #1890ff; + color: white; + padding: 10px 20px; + border-radius: 4px; + z-index: 9999; +} + +/* 绂佺敤鐘舵�佹寜閽牱寮� */ +.disabled-btn { + opacity: 0.6; + cursor: not-allowed !important; +} +.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/flowable/workflow/inboundOrder/InboundOrderHandle.vue b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue index 05a17a3..f066c3f 100644 --- a/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue +++ b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue @@ -385,7 +385,8 @@ this.visible = true this.loading = true this.flowData = item - getAction(this.url.queryHisTaskList, {procInstId: item.procInstId}).then(res=>{ + + getAction(this.url.queryHisTaskList, {procInstId: item.procInsId}).then(res=>{ if(res.success){ this.hitaskDataSource = res.result } diff --git a/src/views/flowable/workflow/inboundOrder/InboundOrderHandleXq.vue b/src/views/flowable/workflow/inboundOrder/InboundOrderHandleXq.vue new file mode 100644 index 0000000..3880098 --- /dev/null +++ b/src/views/flowable/workflow/inboundOrder/InboundOrderHandleXq.vue @@ -0,0 +1,479 @@ +<template> + <a-modal + :title="title" + :width="width" + :visible="visible" + :footer="null" + @cancel="handCancel" + > + <a-card :bordered="false"> + <div> + <b>{{ selectInboundOrderData.description }}</b> + <br> + <br> + <a-tag color="blue"> + 澶勭悊浜� {{ selectInboundOrderData.assignee_dictText }} + </a-tag> + <a-tag color="blue"> + 鍒涘缓鏃堕棿 {{ selectInboundOrderData.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='inboundNum'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.inboundNum'></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='鍏ュ簱绫诲瀷' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='inStorehouseType'> + <j-dict-select-tag :disabled="coldisabled" type="list" v-model="tableRowRecord.inStorehouseType" dictCode="in_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='inboundTime'> + <j-date :disabled="coldisabled" v-model="tableRowRecord.inboundTime" :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='applicationReason'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.applicationReason'></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 :disabled='coldisabled' 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 :disabled="coldisabled" 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> + </a-card> + + + </a-modal> +</template> + +<script> + +import '@assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' +export default { + name: 'FlowShenPi', + mixins: [mixinDevice], + props: { + selectInboundOrderData: { + type: Object, + required: true + } + }, + + data() { + return { + form: this.$form.createForm(this), + span: 12, + span1: 8, + coldisabled: true, + spinning: false, + tableRowRecord: {}, + assignFileStream:{}, + tableDataSource: [], + usageDataSource: [], + hitaskDataSource:[], + dataSource: [], + bomForm: {}, + imageSrc: null, + drawerVisible: true, + auditVisible: true, + 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:'宸ュ叿缂栫爜', + align:"center", + dataIndex: 'toolCode' + }, + { + title:'宸ュ叿绫诲瀷', + align:"center", + dataIndex: 'applicationType' + }, + { + title:'涓枃鍚嶇О', + align:"center", + dataIndex: 'chineseName' + }, + { + title:'鍨嬪彿/鍥惧彿', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'搴撲綅鍙�', + align:"center", + dataIndex: 'goodsShelvesId' + }, + { + title:'鐢宠鍏ュ簱鏁伴噺', + align:"center", + dataIndex: 'inStorageQuantity' + }, + ], + validatorRules: { + status: { + rules: [ + { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, + ] + }, + }, + approveData: {}, + flowData: {}, + title: '瀹℃壒椤甸潰', + width: 1200, + visible: false, + // 琛ㄥご + url: { + queryInboundOrder: '/tms/inboundOrder/list', + queryInboundDetailList: 'tms/inboundDetail/list', + diagramView: '/assign/flow/diagramView', + queryHisTaskList:'/assign/flow/queryHisTaskList', + approve:"/tms/inboundOrder/approval", + }, + dictOptions: {}, + superFieldList: [], + workflowSource: [], + isSubmitting: false, + } + }, + created() { + }, + computed: {}, + methods: { + callback() { + }, + handCancel() { + this.visible = false + }, + clearTableSource() { + this.tableDataSource = [] + this.usageDataSource = [] + }, + fetchAndShowBmp() { + try { + let parm = { + processDefinitionId: this.flowData.processDefinitionId, + processInstanceId:this.flowData.processInstanceId, + TaskDefinitionKey:this.flowData.processDefinitionKey + } + downFile(this.url.diagramView,parm,'get').then((res=>{ + const urlObject = window.URL.createObjectURL(new Blob([res])) + this.imageSrc = urlObject + })) + } catch (error) { + console.error('Error fetching image blob:', error) + alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') + } + }, + handleQueXiaoTask() { + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣� + if (this.isSubmitting) return; + this.visible = false; + this.routeReload(); + }, + submitForm () { + // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑� + if (this.isSubmitting) return; + + // 寮�鍚叏灞�绂侀�� + this.isSubmitting = true; + document.body.classList.add('submitting'); + + const that = this; + + // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟 + const resetState = () => { + that.isSubmitting = false; + document.body.classList.remove('submitting'); + }; + + 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) { + resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬� + return; + } + 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.selectInboundOrderData.dataId + flowTaskVo.taskId = this.selectInboundOrderData.id + flowTaskVo.userId = this.selectInboundOrderData.assignee + flowTaskVo.instanceId = this.selectInboundOrderData.procInstId + flowTaskVo.targetKey = this.selectInboundOrderData.taskDefKey + flowTaskVo.values = this.selectInboundOrderData.variables + flowTaskVo.assignee = this.selectInboundOrderData.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); + } + }) + .catch((error) => { + console.error(error); + that.$message.error('鎻愪氦澶辫触'); + }) + .finally(() => { + that.confirmLoading = false; + resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬� + }); + } + + }) + }, + getAllApproveData(item) { + this.visible = true + this.loading = true + this.flowData = item + + getAction(this.url.queryHisTaskList, {procInstId: item.procInsId}).then(res=>{ + if(res.success){ + this.hitaskDataSource = res.result + } + }) + getAction(this.url.queryInboundOrder, {id: item.dataId}).then((res => { + if (res.success) { + this.tableRowRecord = res.result.records[0] + } + })) + getAction(this.url.queryInboundDetailList, {inboundOrderId: 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> +/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */ +html.submitting, +html.submitting body { + pointer-events: none !important; + cursor: wait !important; +} + +/* 钂欏眰鏁堟灉澧炲己 */ +html.submitting::before { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.5); + z-index: 9998; +} + +/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */ +html.submitting::after { + content: '鎻愪氦涓�...'; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #1890ff; + color: white; + padding: 10px 20px; + border-radius: 4px; + z-index: 9999; +} + +/* 绂佺敤鐘舵�佹寜閽牱寮� */ +.disabled-btn { + opacity: 0.6; + cursor: not-allowed !important; +} +.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/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue b/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue index 8256df4..d0a7a7f 100644 --- a/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue +++ b/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue @@ -63,39 +63,27 @@ </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalComment" label="瀹℃壒鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.approvalComment" + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalComment" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ョ‘璁ゆ剰瑙�" v-model="model.approvalComment" :disabled="disableSubmit || returnDisable" /> </a-form-model-item> </a-col> </a-row> </div> - <div v-if="returnDisable"> - <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="returnComment" - label="褰掕繕澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ綊杩樺娉�" v-model="model.returnComment" - :disabled="disableSubmit || confirmDisable" /> - </a-form-model-item> - </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> +<!-- <div v-if="returnDisable">--> +<!-- <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="returnComment"--> +<!-- label="褰掕繕澶囨敞">--> +<!-- <a-textarea placeholder="璇疯緭鍏ュ綊杩樺娉�" v-model="model.returnComment"--> +<!-- :disabled="disableSubmit || confirmDisable" />--> +<!-- </a-form-model-item>--> +<!-- </a-col>--> +<!-- </a-row>--> +<!-- </div>--> + </a-form-model> </a-spin> </j-modal> diff --git a/src/views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue b/src/views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue new file mode 100644 index 0000000..8f7f0d8 --- /dev/null +++ b/src/views/flowable/workflow/leanOut/EquipmentReturnApprovalModal.vue @@ -0,0 +1,226 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + switchFullscreen + @ok="handleOk" + @cancel="handleCancel" + centered + cancelText="鍏抽棴"> + + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍊熺敤淇℃伅 + </a-divider> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code" label="鍗曟嵁鍙�"> + <a-input v-model="model.code" disabled /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栫爜"> + <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" + v-model="model.equipmentId" disabled></lx-search-equipment-select> + </a-form-model-item> + </a-col> + </a-row> + <a-row :guitter="24"> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanDepartId_dictText" label="鍊熷叆杞﹂棿"> + <a-input v-model="model.leanDepartId_dictText" disabled /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanPerson_dictText" label="鍊熺敤浜�"> + <a-input v-model="model.leanPerson_dictText" disabled /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanReason" label="鍊熺敤鍘熷洜"> + <a-textarea v-model="model.leanReason" disabled /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞"> + <a-textarea v-model="model.remark" disabled /> + </a-form-model-item> + </a-col> + </a-row> + <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> +</template> + +<script> +import { getAction, httpAction } from '@/api/manage' +import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + +export default { + name: 'EquipmentLeanOutApprovalModal', + components: { + LxSearchEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + editable: false, + model: {}, + treeData: [], + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 2 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 21 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + validatorRules: { + approvalDealType: [ + { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } + ], + approvalComment: [ + { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!' } + ], + returnComment: [ + { required: true, message: '璇疯緭鍏ュ綊杩樺娉�!' } + ], + confirmComment: [ + { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } + ] + }, + url: { + queryById: '/eam/eamEquipmentLeanOut/queryById', + approval: '/eam/eamEquipmentLeanOut/approval', + loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions' + }, + disableSubmit: false + } + }, + created() { + this.loadAllProductionTree() + }, + computed: { + approvalDisable: function() { + return ['WAIT_APPROVAL', 'WAIT_RETURN', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) + }, + returnDisable: function() { + return ['WAIT_RETURN', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) + }, + confirmDisable: function() { + return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) + }, + completionDisable: function() { + return ['COMPLETE'].includes(this.model.leanStatus) + } + }, + methods: { + async handleDetail(item) { + this.initParams() + this.model = {} + let res = await getAction(this.url.queryById, { id: item.dataId }) + this.model = Object.assign({}, res.result) + this.model.dataId = item.dataId + this.model.taskId = item.id + this.model.userId = item.assignee + this.model.instanceId = item.procInstId + this.model.values = item.variables + this.spinning = false; + }, + + recordDetail(record) { + console.log('record', record) + this.initParams() + this.model = Object.assign({}, record) + }, + + initParams() { + this.visible = true + this.spinning = true + }, + + async handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + let httpurl = this.url.approval + let method = 'put' + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message) + that.$emit('searchReset') + that.close() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + }, + loadAllProductionTree() { + //鍔犺浇杞﹂棿閫夋嫨鏍� + getAction(this.url.loadProductionOptions).then(res => { + if (res.success) { + this.treeData = [...res.result] + } else { + that.$message.warning(res.message) + } + }) + } + } +} +</script> + +<style lang="less" scoped> + +</style> \ No newline at end of file diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index 32c2078..d49ed5f 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -103,6 +103,23 @@ </a-form-model-item> <a-form-model-item + label="棣栭〉鏉冮檺" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-radio-group + v-model="model.userType" + :defaultValue="0" + > + <a-radio :value="1">鍒�鍏风鐞�</a-radio> + <a-radio :value="2">mdc</a-radio> + <a-radio :value="3">dnc</a-radio> + <a-radio :value="4">璁惧绠$悊</a-radio> + <a-radio :value="0">鏃�</a-radio> + </a-radio-group> + </a-form-model-item> + + <a-form-model-item label="瑙掕壊鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" diff --git a/src/views/tms/ToolVerificationList.vue b/src/views/tms/ToolVerificationList.vue new file mode 100644 index 0000000..a643dce --- /dev/null +++ b/src/views/tms/ToolVerificationList.vue @@ -0,0 +1,174 @@ +<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 + :md="6" + :sm="8" + > + <a-form-item label="閲忓叿缂栧彿"> + <j-input placeholder="璇疯緭鍏ラ噺鍏风紪鍙�" v-model="queryParam.toolCode" /> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="鍞竴缂栫爜"> + <j-input placeholder="璇疯緭鍏ュ敮涓�缂栫爜" v-model="queryParam.onlyCode" /> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="8"> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-space> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + + <!-- table鍖哄煙-begin --> + <div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="null" + class="j-table-force-nowrap" + @change="handleTableChange"> + + </a-table> + </div> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { getAction } from '../../api/manage' + + export default { + name: 'ToolVerificationList', + mixins:[JeecgListMixin, mixinDevice], + components: { + }, + data () { + return { + description: '閲忓叿妫�瀹氬垪琛�', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'閲忓叿缂栧彿', + align:"center", + dataIndex: 'toolCode', + }, + { + title:'鍞竴缂栫爜', + align:"center", + dataIndex: 'onlyCode', + }, + { + title:'閲忓叿鍚嶇О', + align:"center", + dataIndex: 'toolName' + }, + { + title:'瑙勬牸', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'璁¢噺鍙�', + align:"center", + dataIndex: 'measureNumber' + }, + { + title:'搴撲綅鍙�', + align:"center", + dataIndex: 'warehouseCode' + }, + { + title:'涓嬫妫�瀹氭棩鏈�', + align:"center", + dataIndex: 'nextVerificationDate' + }, + ], + url: { + list: "/tms/toolVerificationRecord/queryPageList", + delete: "/tms/toolVerificationRecord/delete", + deleteBatch: "/tms/toolVerificationRecord/deleteBatch", + exportXlsUrl: "/tms/toolVerificationRecord/exportXls", + importExcelUrl: "tms/toolVerificationRecord/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + searchReset() { + this.queryParam = {} + this.loadData(1); + }, + filterOption(input, option) { + return ( + option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + ); + }, + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'tenantId',text:'绉熸埛鍙�'}) + fieldList.push({type:'string',value:'createdBy',text:'鍒涘缓浜�'}) + fieldList.push({type:'date',value:'createdTime',text:'鍒涘缓鏃堕棿'}) + fieldList.push({type:'string',value:'updatedBy',text:'鏇存柊浜�'}) + fieldList.push({type:'date',value:'updatedTime',text:'鏇存柊鏃堕棿'}) + fieldList.push({type:'string',value:'onlyCode',text:'鍞竴缂栫爜'}) + fieldList.push({type:'string',value:'measureNumber',text:'璁¢噺鍙�'}) + fieldList.push({type:'date',value:'nextVerificationDate',text:'涓嬫妫�瀹氭棩鏈�'}) + fieldList.push({type:'date',value:'verificationReportDate',text:'妫�瀹氭姤鍛婃棩鏈�'}) + fieldList.push({type:'string',value:'personResponsible',text:'璐d换浜�'}) + fieldList.push({type:'string',value:'result',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/ToolVerificationRecordList.vue b/src/views/tms/ToolVerificationRecordList.vue new file mode 100644 index 0000000..76d4c4d --- /dev/null +++ b/src/views/tms/ToolVerificationRecordList.vue @@ -0,0 +1,223 @@ +<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 + :md="6" + :sm="8" + > + <a-form-item label="閲忓叿缂栧彿"> + <j-input placeholder="璇疯緭鍏ラ噺鍏风紪鍙�" v-model="queryParam.toolCode" /> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="鍞竴缂栫爜"> + <j-input placeholder="璇疯緭鍏ュ敮涓�缂栫爜" v-model="queryParam.onlyCode" /> + </a-form-item> + </a-col> + + <a-col :md="6" :sm="8"> + <a-space> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> + </a-space> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + </div> + + <!-- table鍖哄煙-begin --> + <div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="null" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <span slot="action" slot-scope="text, record"> + <a @click="handleDetail(record)">璇︽儏</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleEdit(record)">缂栬緫</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <tool-verification-record-modal ref="modalForm" @ok="modalFormOk"></tool-verification-record-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ToolVerificationRecordModal from './modules/verification/ToolVerificationRecordModal' + import { getAction } from '../../api/manage' + + export default { + name: 'ToolVerificationRecordList', + mixins:[JeecgListMixin, mixinDevice], + components: { + ToolVerificationRecordModal + }, + data () { + return { + description: '閲忓叿妫�瀹氱粨鏋滆褰曞垪琛�', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'閲忓叿缂栧彿', + align:"center", + dataIndex: 'toolCode', + }, + { + title:'鍞竴缂栫爜', + align:"center", + dataIndex: 'onlyCode', + }, + { + title:'閲忓叿鍚嶇О', + align:"center", + dataIndex: 'toolName' + }, + { + title:'瑙勬牸', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'璁¢噺鍙�', + align:"center", + dataIndex: 'measureNumber' + }, + { + title:'妫�瀹氭姤鍛婃棩鏈�', + align:"center", + dataIndex: 'verificationReportDate' + }, + { + title:'妫�瀹氱粨鏋滃強鎰忚', + align:"center", + dataIndex: 'result' + }, + { + title:'璐d换浜�', + align:"center", + dataIndex: 'personResponsible' + }, + // { + // title:'鍒涘缓浜�', + // align:"center", + // dataIndex: 'createBy' + // }, + // { + // title:'鍒涘缓鏃堕棿', + // align:"center", + // dataIndex: 'createTime' + // }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/tms/toolVerificationRecord/queryPageList", + delete: "/tms/toolVerificationRecord/delete", + deleteBatch: "/tms/toolVerificationRecord/deleteBatch", + exportXlsUrl: "/tms/toolVerificationRecord/exportXls", + importExcelUrl: "tms/toolVerificationRecord/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + searchReset() { + this.queryParam = {} + this.loadData(1); + }, + filterOption(input, option) { + return ( + option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + ); + }, + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'tenantId',text:'绉熸埛鍙�'}) + fieldList.push({type:'string',value:'createdBy',text:'鍒涘缓浜�'}) + fieldList.push({type:'date',value:'createdTime',text:'鍒涘缓鏃堕棿'}) + fieldList.push({type:'string',value:'updatedBy',text:'鏇存柊浜�'}) + fieldList.push({type:'date',value:'updatedTime',text:'鏇存柊鏃堕棿'}) + fieldList.push({type:'string',value:'onlyCode',text:'鍞竴缂栫爜'}) + fieldList.push({type:'string',value:'measureNumber',text:'璁¢噺鍙�'}) + fieldList.push({type:'date',value:'nextVerificationDate',text:'涓嬫妫�瀹氭棩鏈�'}) + fieldList.push({type:'date',value:'verificationReportDate',text:'妫�瀹氭姤鍛婃棩鏈�'}) + fieldList.push({type:'string',value:'personResponsible',text:'璐d换浜�'}) + fieldList.push({type:'string',value:'result',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/WarehouseList.vue b/src/views/tms/WarehouseList.vue index 9be0090..9466732 100644 --- a/src/views/tms/WarehouseList.vue +++ b/src/views/tms/WarehouseList.vue @@ -268,7 +268,20 @@ }, methods: { handleAdd: function () { - const nextSeq = Number(this.dataSource[this.dataSource.length - 1].seq) + 1 + let nextSeq = 0; + // 瀹夊叏鐨勫啓娉� + if (this.dataSource && this.dataSource.length > 0) { + const lastItem = this.dataSource[this.dataSource.length - 1]; + if (lastItem && lastItem.seq !== undefined) { + nextSeq = Number(lastItem.seq) + 1; + } else { + // 澶勭悊鏈�鍚庝竴涓厓绱犱笉瀛樺湪seq鐨勬儏鍐� + nextSeq = 0; // 鎴栧叾浠栭粯璁ゅ�� + } + } else { + // 澶勭悊鏁扮粍涓虹┖鐨勬儏鍐� + nextSeq = 0; // 鎴栧叾浠栭粯璁ゅ�� + } this.$refs.modalForm.add(nextSeq); this.$refs.modalForm.title = "鏂板"; this.$refs.modalForm.disableSubmit = false; 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> diff --git a/src/views/tms/lossBound/LossboundList.vue b/src/views/tms/lossBound/LossboundList.vue index b04d6bd..eeb305c 100644 --- a/src/views/tms/lossBound/LossboundList.vue +++ b/src/views/tms/lossBound/LossboundList.vue @@ -135,7 +135,7 @@ { title: '瀹℃牳鏃堕棿', align: 'center', - dataIndex: 'auditDate' + dataIndex: 'approvalDate' }, { title: '瀹℃牳鎰忚', diff --git a/src/views/tms/lossBound/modules/LossboundModal.vue b/src/views/tms/lossBound/modules/LossboundModal.vue index bfa9ba6..7db180f 100644 --- a/src/views/tms/lossBound/modules/LossboundModal.vue +++ b/src/views/tms/lossBound/modules/LossboundModal.vue @@ -89,7 +89,7 @@ <a-row> <a-col :span="12"> <a-form-model-item label="鎶ユ崯鍘熷洜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lossReason"> - <a-textarea :disabled="disableSubmit" v-model="model.lossReason" rows="4" placeholder="璇疯緭鍏ュ娉�" /> + <a-textarea :disabled="disableSubmit" v-model="model.lossReason" rows="4" placeholder="璇疯緭鍏ユ姤鎹熷師鍥�" /> </a-form-model-item> </a-col> </a-row> @@ -113,9 +113,20 @@ @change="handleTableChange"> <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> - <a-input-number :disabled="disableSubmit" :value="text" v-if="col.dataIndex == 'lossNumber'" :min="0" - :max="99999" - @change="(e) => handleChange(e, record.key, col, index)" style="width: 100%;" /> + <div v-if="col.dataIndex == 'lossNumber'"> + <a-input-number + :disabled="disableSubmit" + :value="text" + :min="0" + :max="99999" + @change="(e) => handleChange(e, record.key, col, index)" + style="width: 100%;" + /> + <div v-if="record.lossNumberError" style="color: #f5222d; font-size: 12px; margin-top: 4px;"> + {{ record.lossNumberMsg }} + </div> + </div> + <a-textarea v-if="col.dataIndex == 'lossReason'" :disabled="disableSubmit" @@ -218,7 +229,8 @@ dataIndex: 'lossNumber', align: 'center', width: 150, - scopedSlots: { customRender: 'lossNumber' } + scopedSlots: { customRender: 'lossNumber' }, + key: 'lossNumber' }, { title: '涓枃鍚嶇О', @@ -314,8 +326,10 @@ supplierId: data[i].supplierId, goodsShelvesId: data[i].positionCode, toolMaterial: data[i].toolMaterial, - partMaterial: data[i].partMaterial - + partMaterial: data[i].partMaterial, + lossNumber: null, // 鍒濆鍖栨姤鎹熸暟閲� + lossNumberError: false, // 鏍¢獙鐘舵�� + lossNumberMsg: '' // 閿欒淇℃伅 }) } this.ipagination.total = this.dataSource.length @@ -332,13 +346,15 @@ const target = temp.filter(item => key === item.key)[index] if (target) { target[column.dataIndex] = value - this.dataSource = temp - if (column.dataIndex === 'lossNumber') { - target[column.dataIndex] = value - } - if (column.dataIndex === 'lossReason') { - target[column.dataIndex] = value + if (column.dataIndex === 'lossNumber') { + if (value === null || value === undefined || value <= 0) { + target.lossNumberError = true + target.lossNumberMsg = '鎶ユ崯鏁伴噺涓嶈兘涓虹┖涓斿繀椤诲ぇ浜�0' + } else { + target.lossNumberError = false + target.lossNumberMsg = '' + } } this.dataSource = temp } @@ -398,6 +414,17 @@ // 瑙﹀彂琛ㄥ崟楠岃瘉 this.$refs.form.validate(valid => { if (valid) { + let isTableValid = true + this.dataSource.forEach((row, index) => { + this.handleChange(row.lossNumber, row.key, { dataIndex: 'lossNumber' }, index) + if (row.lossNumberError) { + isTableValid = false + } + }) + + if (!isTableValid) { + return false + } this.model.toolsLossBoundDetailList = this.dataSource that.confirmLoading = true let httpurl = '' diff --git a/src/views/tms/modules/GoodsShelvesForm.vue b/src/views/tms/modules/GoodsShelvesForm.vue index 11c5ade..96c072f 100644 --- a/src/views/tms/modules/GoodsShelvesForm.vue +++ b/src/views/tms/modules/GoodsShelvesForm.vue @@ -45,7 +45,7 @@ </a-col> <a-col :span="12"> <a-form-model-item label="搴撲綅鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-input v-model="model.locationCode" placeholder="璇疯緭鍏ュ簱浣嶅彿" ></a-input> + <a-input :disabled="true" v-model="model.locationCode" placeholder="璇疯緭鍏ュ簱浣嶅彿" ></a-input> </a-form-model-item> </a-col> </a-row> diff --git a/src/views/tms/modules/baseTools/BaseToolsListLeft.vue b/src/views/tms/modules/baseTools/BaseToolsListLeft.vue index 03932f8..962f39b 100644 --- a/src/views/tms/modules/baseTools/BaseToolsListLeft.vue +++ b/src/views/tms/modules/baseTools/BaseToolsListLeft.vue @@ -239,7 +239,7 @@ //鐩戝惉 watch: { currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 - this.$bus.$emit('getCurrSelected', val) + this.$bus.$emit('getBaseToolsListSelected', val) }, } } diff --git a/src/views/tms/modules/baseTools/BaseToolsListRight.vue b/src/views/tms/modules/baseTools/BaseToolsListRight.vue index b2285a4..cf81456 100644 --- a/src/views/tms/modules/baseTools/BaseToolsListRight.vue +++ b/src/views/tms/modules/baseTools/BaseToolsListRight.vue @@ -1,46 +1,41 @@ <template> - <a-card :bordered="false" style="flex: 1;overflow:auto;max-height: 600px; min-height: 600px"> + <a-card :bordered="false" style="flex: 1; overflow: auto; max-height: 600px; min-height: 600px"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> - <a-col - :md="6" - :sm="8" - > - <a-form-item - label="宸ュ叿缂栧彿" - :labelCol="{span: 5}" - :wrapperCol="{span: 18, offset: 1}" - > - <a-input - placeholder="璇疯緭鍏ュ伐鍏风紪鍙锋绱�" - v-model="queryParam.toolCode" - ></a-input> + <a-col :md="6" :sm="8"> + <a-form-item label="宸ュ叿缂栧彿" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }"> + <a-input placeholder="璇疯緭鍏ュ伐鍏风紪鍙锋绱�" v-model="queryParam.toolCode"></a-input> </a-form-item> </a-col> - <a-col - :md="6" - :sm="8" - > - <a-form-item - label="鍨嬪彿/鍥惧彿" - :labelCol="{span: 5}" - :wrapperCol="{span: 18, offset: 1}" - > - <a-input - placeholder="璇疯緭鍏ュ瀷鍙�/鍥惧彿妫�绱�" - v-model="queryParam.toolModel" - ></a-input> + <a-col :md="6" :sm="8"> + <a-form-item label="鍨嬪彿/鍥惧彿" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }"> + <a-input placeholder="璇疯緭鍏ュ瀷鍙�/鍥惧彿妫�绱�" v-model="queryParam.toolModel"></a-input> </a-form-item> </a-col> <a-col :md="6" :sm="24"> - <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <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-button + type="primary" + @click="searchHeightQuery" + icon="search" + style="margin-left: 8px" + :disabled=" + !nodeSelected.key || + nodeSelected.entity.leafFlag === '2' || + (this.paraTypeFlag != '2' && + this.paraTypeFlag != '3' && + this.paraTypeFlag != '4' && + this.paraTypeFlag != '5' && + this.paraTypeFlag != '6') + " + >楂樼骇鏌ヨ</a-button + > </span> </a-col> - </a-row> </a-form> </div> @@ -48,15 +43,34 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <Tooltip - placement="top" - title="閫夋嫨宸ュ叿鍥涚骇鍒嗙被鍚庡啀鎵ц鏂板" - > - <a-button @click="handleAdd(nodeSelected)" type="primary" icon="plus" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">鏂板</a-button> + <Tooltip placement="top" title="閫夋嫨宸ュ叿鍥涚骇鍒嗙被鍚庡啀鎵ц鏂板"> + <a-button + @click="handleAdd(nodeSelected)" + type="primary" + icon="plus" + :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'" + >鏂板</a-button + > </Tooltip> - <a-button type="primary" @click="exportToExcel('鍒�鍏蜂俊鎭鍏ユā鏉�')" icon="export" style="margin-left: 8px" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">涓嬭浇瀵煎叆妯℃澘</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> - <a-button type="primary" icon="import" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">瀵煎叆</a-button> + <a-button + type="primary" + @click="exportToExcel('鍒�鍏蜂俊鎭鍏ユā鏉�')" + icon="export" + style="margin-left: 8px" + :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'" + >涓嬭浇瀵煎叆妯℃澘</a-button + > + <a-upload + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > + <a-button type="primary" icon="import" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'" + >瀵煎叆</a-button + > </a-upload> <!-- <a-button type="primary" icon="download" @click="handleExportXls('tms_tools_classify')">瀵煎嚭</a-button> <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> @@ -66,36 +80,36 @@ <!-- table鍖哄煙-begin --> <div> - <a-table ref="table" size="middle" - :scroll="{x:true}" + :scroll="{ x: true }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }" class="j-table-force-nowrap" :customRow="customRow" - @change="handleTableChange"> - - <template slot='toolPicture' slot-scope='text, record, index'> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.toolPicture" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + @change="handleTableChange" + > + <template slot="toolPicture" slot-scope="text, record, index"> + <span v-if="!text" style="font-size: 12px; font-style: italic">鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.toolPicture" + 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)"> + <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> @@ -118,11 +132,10 @@ </a-menu> </a-dropdown> </span> - </a-table> </div> - <a-tabs defaultActiveKey="1"> + <a-tabs defaultActiveKey="1"> <a-tab-pane key="1"> <span slot="tab"> <a-badge>鍙傛暟 </a-badge> @@ -135,10 +148,7 @@ <para-common-tool-list ref="paraCommonToolList"></para-common-tool-list> </a-tab-pane> - <a-tab-pane - key="2" - forceRender - > + <a-tab-pane key="2" forceRender> <span slot="tab"> <a-badge>绠$悊鍙傛暟 </a-badge> </span> @@ -147,486 +157,677 @@ </a-tabs> <base-tools-modal ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></base-tools-modal> - <para-hole-tools-modal ref="paraHoleToolsModal" @ok="modalFormOk" :nodeSelected="nodeSelected"></para-hole-tools-modal> + <para-hole-tools-modal + ref="paraHoleToolsModal" + @ok="modalFormOk" + :nodeSelected="nodeSelected" + ></para-hole-tools-modal> <para-threading-tool-modal ref="paraThreadingToolModal"></para-threading-tool-modal> <para-mill-tool-modal ref="paraMillToolModal"></para-mill-tool-modal> <para-turning-tools-modal ref="paraTurningToolsModal"></para-turning-tools-modal> <para-blade-modal ref="paraBladeModal"></para-blade-modal> <para-common-tool-modal ref="paraCommonToolModal"></para-common-tool-modal> + <para-hole-tools-search-modal + ref="paraHoleToolsSearchModal" + @searchParams="paraHoleToolsOk" + ></para-hole-tools-search-modal> + <para-turning-tools-search-modal + ref="paraTurningToolsSearchModal" + @searchParams="paraTurningToolsOk" + ></para-turning-tools-search-modal> + <para-threading-tool-search-modal + ref="paraThreadingToolSearchModal" + @searchParams="paraThreadingToolOk" + ></para-threading-tool-search-modal> + <para-mill-tool-search-modal + ref="paraMillToolSearchModal" + @searchParams="paraMillToolOk" + ></para-mill-tool-search-modal> + <para-blade-search-modal ref="paraBladeSearchModal" @searchParams="paraBladeOk"></para-blade-search-modal> </a-card> </template> <script> +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import BaseToolsModal from './BaseToolsModal' +import Tooltip from 'ant-design-vue/es/tooltip' +import { getAction, postAction, deleteAction, requestPut, downFile } from '@api/manage' +import ParaHoleToolsModal from './ParaHoleToolsModal' +import ParaMillToolModal from './ParaMillToolModal' +import ParaThreadingToolModal from './ParaThreadingToolModal' +import ParaTurningToolsModal from './ParaTurningToolsModal' +import ToolsConfigPropertyModal from './ToolsConfigPropertyModal' +import ParaCommonToolModal from './ParaCommonToolModal' +import ParaBladeModal from './ParaBladeModal' +import ParaHoleToolsList from './ParaHoleToolsList' +import ToolsConfigPropertyList from './ToolsConfigPropertyList' +import ParaMillToolList from './ParaMillToolList' +import ParaThreadingToolList from './ParaThreadingToolList' +import ParaTurningToolsList from './ParaTurningToolsList' +import ParaCommonToolList from './ParaCommonToolList' +import ParaBladeList from './ParaBladeList' +import ParaHoleToolsSearchModal from './ParaHoleToolsSearchModal' +import ParaMillToolSearchModal from './ParaMillToolSearchModal' +import ParaThreadingToolSearchModal from './ParaThreadingToolSearchModal' +import ParaTurningToolsSearchModal from './ParaTurningToolsSearchModal' +import ParaBladeSearchModal from './ParaBladeSearchModal' - import '@/assets/less/TableExpand.less' - import { mixinDevice } from '@/utils/mixin' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import BaseToolsModal from './BaseToolsModal' - import Tooltip from 'ant-design-vue/es/tooltip' - import { getAction, postAction, deleteAction, requestPut,downFile } from '@api/manage' - import ParaHoleToolsModal from './ParaHoleToolsModal' - import ParaMillToolModal from './ParaMillToolModal' - import ParaThreadingToolModal from './ParaThreadingToolModal' - import ParaTurningToolsModal from './ParaTurningToolsModal' - import ToolsConfigPropertyModal from './ToolsConfigPropertyModal' - import ParaCommonToolModal from './ParaCommonToolModal' - import ParaBladeModal from './ParaBladeModal' - import ParaHoleToolsList from './ParaHoleToolsList' - import ToolsConfigPropertyList from './ToolsConfigPropertyList' - import ParaMillToolList from './ParaMillToolList' - import ParaThreadingToolList from './ParaThreadingToolList' - import ParaTurningToolsList from './ParaTurningToolsList' - import ParaCommonToolList from './ParaCommonToolList' - import ParaBladeList from './ParaBladeList' - - export default { - name: 'BaseToolsListRight', - mixins:[JeecgListMixin, mixinDevice], - components: { - BaseToolsModal, - Tooltip, - ParaHoleToolsModal, - ParaMillToolModal, - ParaThreadingToolModal, - ParaTurningToolsModal, - ToolsConfigPropertyModal, - ParaCommonToolModal, - ParaBladeModal, - ParaHoleToolsList, - ToolsConfigPropertyList, - ParaMillToolList, - ParaThreadingToolList, - ParaTurningToolsList, - ParaCommonToolList, - ParaBladeList - }, - data () { - return { - description: '宸ュ叿淇℃伅绠$悊椤甸潰', - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ +export default { + name: 'BaseToolsListRight', + mixins: [JeecgListMixin, mixinDevice], + components: { + BaseToolsModal, + Tooltip, + ParaHoleToolsModal, + ParaMillToolModal, + ParaThreadingToolModal, + ParaTurningToolsModal, + ToolsConfigPropertyModal, + ParaCommonToolModal, + ParaBladeModal, + ParaHoleToolsList, + ToolsConfigPropertyList, + ParaMillToolList, + ParaThreadingToolList, + ParaTurningToolsList, + ParaCommonToolList, + ParaBladeList, + ParaHoleToolsSearchModal, + ParaMillToolSearchModal, + ParaThreadingToolSearchModal, + ParaTurningToolsSearchModal, + ParaBladeSearchModal, + }, + data() { + return { + description: '宸ュ叿淇℃伅绠$悊椤甸潰', + /* 鍒嗛〉鍙傛暟 */ + ipagination: { current: 1, pageSize: 5, pageSizeOptions: ['5', '10', '30'], showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' }, showQuickJumper: true, showSizeChanger: true, - total: 0 + total: 0, }, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 }, - { - title:'宸ュ叿缂栫爜', - align:"center", - dataIndex: 'toolCode' - }, - { - title:'搴忓彿', - align:"center", - dataIndex: 'signCode' - }, - { - title:'涓枃鍚嶇О', - align:"center", - dataIndex: 'chineseName' - }, - { - title:'澶栨枃鍚嶇О', - align:"center", - dataIndex: 'foreignLanguageName' - }, - { - title:'鏍囨敞绾у埆', - align:"center", - dataIndex: 'standardLevel' - }, - { - title:'鏍囧噯鍙�', - align:"center", - dataIndex: 'standardCode' - }, - { - title:'鍨嬪彿/鍥惧彿', - align:"center", - dataIndex: 'toolModel' - }, - { + }, + { + title: '宸ュ叿缂栫爜', + align: 'center', + dataIndex: 'toolCode', + }, + { + title: '搴忓彿', + align: 'center', + dataIndex: 'signCode', + }, + { + title: '涓枃鍚嶇О', + align: 'center', + dataIndex: 'chineseName', + }, + { + title: '澶栨枃鍚嶇О', + align: 'center', + dataIndex: 'foreignLanguageName', + }, + { + title: '鏍囨敞绾у埆', + align: 'center', + dataIndex: 'standardLevel', + }, + { + title: '鏍囧噯鍙�', + align: 'center', + dataIndex: 'standardCode', + }, + { + title: '鍨嬪彿/鍥惧彿', + align: 'center', + dataIndex: 'toolModel', + }, + { title: '宸ュ叿鍥剧墖', align: 'center', width: 120, dataIndex: 'toolPicture', - scopedSlots: { customRender: 'toolPicture' } + scopedSlots: { customRender: 'toolPicture' }, }, - { - title:'澶囨敞', - align:"center", - dataIndex: 'remark' - }, - { - title:'鍒涘缓浜�', - align:"center", - dataIndex: 'createBy' - }, - { - title:'鍒涘缓鏃堕棿', - align:"center", - dataIndex: 'createTime', - 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/baseTools/list", - paraHolesToolsList:"/tms/baseTools/paraHolesToolsList", - paraCommonToolList:"/tms/baseTools/paraCommonToolList", - paraThreadingToolList:"/tms/baseTools/paraThreadingToolList", - paraMillToolList:"/tms/baseTools/paraMillToolList", - paraTurningToolsList:"/tms/baseTools/paraTurningToolsList", - paraBladeList:"/tms/baseTools/paraBladeList", - delete: "/tms/baseTools/delete", - deleteBatch: "/tms/baseTools/deleteBatch", - edit: '/tms/baseTools/edit', - exportXlsUrl: "/tms/baseTools/exportXls", - importExcelUrl: "tms/baseTools/importExcel", - queryParaByToolCode:"/tms/baseTools/queryByToolCode", - queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode", - loadTemplate:"/tms/baseTools/loadTemplate", - importBlade:"/tms/paraBlade/importExcel", - importCommonTool:"/tms/paraCommonTool/importExcel", - importHoleTools:"/tms/paraHoleTools/importExcel", - importThreading:"/tms/paraThreadingTool/importExcel", - importTurning:"/tms/paraTurningTools/importExcel", - importMillTool:"/tms/paraMillTool/importExcel" + { + title: '澶囨敞', + align: 'center', + dataIndex: 'remark', }, - dictOptions:{}, - superFieldList:[], - nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� - paraTypeFlag:'', - disableMixinCreated:true, - loading:false - } - }, - created() { - this.$bus.$on('getCurrSelected', (data) => { + { + title: '鍒涘缓浜�', + align: 'center', + dataIndex: 'createBy', + }, + { + title: '鍒涘缓鏃堕棿', + align: 'center', + dataIndex: 'createTime', + 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/baseTools/list', + paraHolesToolsList: '/tms/baseTools/paraHolesToolsList', + paraCommonToolList: '/tms/baseTools/paraCommonToolList', + paraThreadingToolList: '/tms/baseTools/paraThreadingToolList', + paraMillToolList: '/tms/baseTools/paraMillToolList', + paraTurningToolsList: '/tms/baseTools/paraTurningToolsList', + paraBladeList: '/tms/baseTools/paraBladeList', + delete: '/tms/baseTools/delete', + deleteBatch: '/tms/baseTools/deleteBatch', + edit: '/tms/baseTools/edit', + exportXlsUrl: '/tms/baseTools/exportXls', + importExcelUrl: 'tms/baseTools/importExcel', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', + queryByToolCode: '/tms/toolsConfigProperty/queryByToolCode', + loadTemplate: '/tms/baseTools/loadTemplate', + importBlade: '/tms/paraBlade/importExcel', + importCommonTool: '/tms/paraCommonTool/importExcel', + importHoleTools: '/tms/paraHoleTools/importExcel', + importThreading: '/tms/paraThreadingTool/importExcel', + importTurning: '/tms/paraTurningTools/importExcel', + importMillTool: '/tms/paraMillTool/importExcel', + }, + dictOptions: {}, + superFieldList: [], + nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� + paraTypeFlag: '', + disableMixinCreated: true, + loading: false, + } + }, + created() { + this.$bus.$on('getBaseToolsListSelected', (data) => { //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 - this.nodeType = (data.type == undefined ? 0 : data.type); - this.paraTypeFlag = (data.entity == undefined ? 0 : data.entity.paraTypeFlag) - this.nodeSelected = data; + this.nodeType = data.type == undefined ? 0 : data.type + this.paraTypeFlag = data.entity == undefined ? 0 : data.entity.paraTypeFlag + this.nodeSelected = data this.loadData() this.clearPara() }) + }, + computed: { + importExcelUrl: function () { + if (this.paraTypeFlag === '1') { + return `${window._CONFIG['domianURL']}/${this.url.importCommonTool}` + } else if (this.paraTypeFlag === '2') { + return `${window._CONFIG['domianURL']}/${this.url.importHoleTools}` + } else if (this.paraTypeFlag === '3') { + return `${window._CONFIG['domianURL']}/${this.url.importThreading}` + } else if (this.paraTypeFlag === '4') { + return `${window._CONFIG['domianURL']}/${this.url.importMillTool}` + } else if (this.paraTypeFlag === '5') { + return `${window._CONFIG['domianURL']}/${this.url.importTurning}` + } else if (this.paraTypeFlag === '6') { + return `${window._CONFIG['domianURL']}/${this.url.importBlade}` + } }, - computed: { - importExcelUrl: function(){ - if(this.paraTypeFlag === "1"){ - return `${window._CONFIG['domianURL']}/${this.url.importCommonTool}`; - }else if(this.paraTypeFlag === "2"){ - return `${window._CONFIG['domianURL']}/${this.url.importHoleTools}`; - }else if(this.paraTypeFlag === "3"){ - return `${window._CONFIG['domianURL']}/${this.url.importThreading}`; - }else if(this.paraTypeFlag === "4"){ - return `${window._CONFIG['domianURL']}/${this.url.importMillTool}`; - }else if(this.paraTypeFlag === "5"){ - return `${window._CONFIG['domianURL']}/${this.url.importTurning}`; - }else if(this.paraTypeFlag === "6"){ - return `${window._CONFIG['domianURL']}/${this.url.importBlade}`; - } - }, + }, + methods: { + handleAdd(entity) { + if (!this.nodeSelected) { + this.$message.warning('璇峰厛閫夋嫨涓�涓伐鍏峰垎绫�') + return + } + // 鎵撳紑鏂板妯℃�佹锛屽苟浼犻�掑綋鍓嶉�変腑鐨勮妭鐐� + if (this.paraTypeFlag === '1') { + this.$refs.paraCommonToolModal.add(this.nodeSelected) + this.$refs.paraCommonToolModal.title = '鏂板閫氱敤鍙傛暟绫诲瀷宸ュ叿' + this.$refs.paraCommonToolModal.disableSubmit = false + } else if (this.paraTypeFlag === '2') { + this.$refs.paraHoleToolsModal.add(this.nodeSelected) + this.$refs.paraHoleToolsModal.title = '鏂板瀛斿姞宸ュ伐鍏�' + this.$refs.paraHoleToolsModal.disableSubmit = false + } else if (this.paraTypeFlag === '3') { + this.$refs.paraThreadingToolModal.add(this.nodeSelected) + this.$refs.paraThreadingToolModal.title = '鏂板铻虹汗宸ュ叿' + this.$refs.paraThreadingToolModal.disableSubmit = false + } else if (this.paraTypeFlag === '4') { + this.$refs.paraMillToolModal.add(this.nodeSelected) + this.$refs.paraMillToolModal.title = '鏂板閾e墛宸ュ叿' + this.$refs.paraMillToolModal.disableSubmit = false + } else if (this.paraTypeFlag === '5') { + this.$refs.paraTurningToolsModal.add(this.nodeSelected) + this.$refs.paraTurningToolsModal.title = '鏂板杞﹀墛宸ュ叿' + this.$refs.paraTurningToolsModal.disableSubmit = false + } else if (this.paraTypeFlag === '6') { + this.$refs.paraBladeModal.add(this.nodeSelected) + this.$refs.paraBladeModal.title = '鏂板鍒�鐗�' + this.$refs.paraBladeModal.disableSubmit = false + } }, - methods: { - - handleAdd(entity) { - if (!this.nodeSelected ) { - this.$message.warning('璇峰厛閫夋嫨涓�涓伐鍏峰垎绫�'); - return; - } - // 鎵撳紑鏂板妯℃�佹锛屽苟浼犻�掑綋鍓嶉�変腑鐨勮妭鐐� - if(this.paraTypeFlag === "1"){ - this.$refs.paraCommonToolModal.add(this.nodeSelected); - this.$refs.paraCommonToolModal.title = "鏂板閫氱敤鍙傛暟绫诲瀷宸ュ叿"; - this.$refs.paraCommonToolModal.disableSubmit = false; - }else if(this.paraTypeFlag === "2"){ - this.$refs.paraHoleToolsModal.add(this.nodeSelected); - this.$refs.paraHoleToolsModal.title = "鏂板瀛斿姞宸ュ伐鍏�"; - this.$refs.paraHoleToolsModal.disableSubmit = false; - }else if(this.paraTypeFlag === "3"){ - this.$refs.paraThreadingToolModal.add(this.nodeSelected); - this.$refs.paraThreadingToolModal.title = "鏂板铻虹汗宸ュ叿"; - this.$refs.paraThreadingToolModal.disableSubmit = false; - }else if(this.paraTypeFlag === "4"){ - this.$refs.paraMillToolModal.add(this.nodeSelected); - this.$refs.paraMillToolModal.title = "鏂板閾e墛宸ュ叿"; - this.$refs.paraMillToolModal.disableSubmit = false; - }else if(this.paraTypeFlag === "5"){ - this.$refs.paraTurningToolsModal.add(this.nodeSelected); - this.$refs.paraTurningToolsModal.title = "鏂板杞﹀墛宸ュ叿"; - this.$refs.paraTurningToolsModal.disableSubmit = false; - }else if(this.paraTypeFlag === "6"){ - this.$refs.paraBladeModal.add(this.nodeSelected); - this.$refs.paraBladeModal.title = "鏂板鍒�鐗�"; - this.$refs.paraBladeModal.disableSubmit = false; - } - }, - handleDelete(id) { - deleteAction(this.url.delete, {id: id}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - this.loadData() - this.$message.success(res.message); - this.$bus.$emit('queryTreeData') - this.clearPara() - } else { - this.$message.warning(res.message); - } - }); - }, - modalFormOk() { - this.loadData(); // 鍒锋柊琛ㄦ牸鏁版嵁 - this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� - }, - - onSelectChange(selectedRowKeys) { - this.selectedRowKeys = selectedRowKeys; - //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� - getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { - if (res.success) { - if(this.paraTypeFlag === "1"){ - this.$refs.paraCommonToolList.getPara(res.result); - }else if(this.paraTypeFlag === "2"){ - this.$refs.paraHoleToolsList.getPara(res.result); - }else if(this.paraTypeFlag === "3"){ - this.$refs.paraThreadingToolList.getPara(res.result); - }else if(this.paraTypeFlag === "4"){ - this.$refs.paraMillToolList.getPara(res.result); - }else if(this.paraTypeFlag === "5"){ - this.$refs.paraTurningToolsList.getPara(res.result); - }else if(this.paraTypeFlag === "6"){ - this.$refs.paraBladeList.getPara(res.result); - } - } else { - this.$message.warning(res.message); - } - }) - getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { - if (res.success) { - this.$refs.toolsConfigPropertyList.getPara(res.result); - } else { - this.$message.warning(res.message); - } - }) - - }, - // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 - handleEditSelected() { - if (this.selectedRowKeys.length === 0) { - this.$message.warning('璇烽�夋嫨涓�鏉¤褰曡繘琛岀紪杈�'); - return; - } - const selectedRecord = this.dataSource.find(item => item.id === this.selectedRowKeys[0]); - if (selectedRecord) { - this.handleEdit(selectedRecord); - } - }, - //缂栬緫 - handleEdit(record) { - if(record.paramaTableName === "1"){ - this.$refs.paraCommonToolModal.edit(record); - this.$refs.paraCommonToolModal.title = "缂栬緫"; - this.$refs.paraCommonToolModal.disableSubmit = false; - }else if(record.paramaTableName === "2"){ - this.$refs.paraHoleToolsModal.edit(record); - this.$refs.paraHoleToolsModal.title = "缂栬緫"; - this.$refs.paraHoleToolsModal.disableSubmit = false; - }else if(record.paramaTableName === "3"){ - this.$refs.paraThreadingToolModal.edit(record); - this.$refs.paraThreadingToolModal.title = "缂栬緫"; - this.$refs.paraThreadingToolModal.disableSubmit = false; - }else if(record.paramaTableName === "4"){ - this.$refs.paraMillToolModal.edit(record); - this.$refs.paraMillToolModal.title = "缂栬緫"; - this.$refs.paraMillToolModal.disableSubmit = false; - }else if(record.paramaTableName === "5"){ - this.$refs.paraTurningToolsModal.edit(record); - this.$refs.paraTurningToolsModal.title = "缂栬緫"; - this.$refs.paraTurningToolsModal.disableSubmit = false; - }else if(record.paramaTableName === "6"){ - this.$refs.paraBladeModal.edit(record); - this.$refs.paraBladeModal.title = "缂栬緫"; - this.$refs.paraBladeModal.disableSubmit = false; - } - }, - //璇︽儏 - handleDetail:function(record){ - if(record.paramaTableName === "1"){ - this.$refs.paraCommonToolModal.edit(record); - this.$refs.paraCommonToolModal.title="璇︽儏"; - this.$refs.paraCommonToolModal.disableSubmit = true; - - }else if(record.paramaTableName === "2"){ - this.$refs.paraHoleToolsModal.edit(record); - this.$refs.paraHoleToolsModal.title="璇︽儏"; - this.$refs.paraHoleToolsModal.disableSubmit = true; - - }else if(record.paramaTableName === "3"){ - this.$refs.paraThreadingToolModal.edit(record); - this.$refs.paraThreadingToolModal.title="璇︽儏"; - this.$refs.paraThreadingToolModal.disableSubmit = true; - - }else if(record.paramaTableName === "4"){ - this.$refs.paraMillToolModal.edit(record); - this.$refs.paraMillToolModal.title="璇︽儏"; - this.$refs.paraMillToolModal.disableSubmit = true; - - }else if(record.paramaTableName === "5"){ - this.$refs.paraTurningToolsModal.edit(record); - this.$refs.paraTurningToolsModal.title="璇︽儏"; - this.$refs.paraTurningToolsModal.disableSubmit = true; - - }else if(record.paramaTableName === "6"){ - this.$refs.paraBladeModal.edit(record); - this.$refs.paraBladeModal.title="璇︽儏"; - this.$refs.paraBladeModal.disableSubmit = true; - - } - }, - //绂佺敤鐘舵�佹牱寮� - tableRowClass(record, index) { - if (record.status != "1") { - return "frozenRowClass"; - } - return ""; - }, - loadData() { - let params = this.getQueryParams(); - if (this.nodeSelected && this.nodeSelected.key !== '-1') { - // 鍔犺浇閫変腑鑺傜偣鐨勫瓙绫� - params.classifyId = this.nodeSelected.key; - this.loading = true; - let httpUrl = '' - if(this.paraTypeFlag === '1'){ - httpUrl = this.url.paraCommonToolList - }else if(this.paraTypeFlag === '2'){ - httpUrl = this.url.paraHolesToolsList - }else if(this.paraTypeFlag === '3'){ - httpUrl = this.url.paraThreadingToolList - }else if(this.paraTypeFlag === '4'){ - httpUrl = this.url.paraMillToolList - }else if(this.paraTypeFlag === '5'){ - httpUrl = this.url.paraTurningToolsList - }else if(this.paraTypeFlag === '6'){ - httpUrl = this.url.paraBladeList - }else{ - this.dataSource = []; + handleDelete(id) { + deleteAction(this.url.delete, { id: id }).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + this.loadData() + this.$message.success(res.message) + this.$bus.$emit('queryTreeData') this.clearPara() - this.loading = false; - return + } else { + this.$message.warning(res.message) + } + }) + }, + modalFormOk() { + this.loadData() // 鍒锋柊琛ㄦ牸鏁版嵁 + this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� + }, + + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: this.selectedRowKeys[0], + paraTypeFlag: this.selectionRows[0].paraTypeFlag, + }).then((res) => { + if (res.success) { + if (this.selectionRows[0].paraTypeFlag === '1') { + //鏄剧ず褰撳墠閫変腑绫诲瀷鍙傛暟 + this.$refs.paraCommonToolList.getPara(res.result) + //闅愯棌鍏朵粬绫诲瀷鍙傛暟 + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + } else if (this.selectionRows[0].paraTypeFlag === '2') { + this.$refs.paraHoleToolsList.getPara(res.result) + this.$refs.paraCommonToolList.visable = false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + } else if (this.selectionRows[0].paraTypeFlag === '3') { + this.$refs.paraThreadingToolList.getPara(res.result) + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + } else if (this.selectionRows[0].paraTypeFlag === '4') { + this.$refs.paraMillToolList.getPara(res.result) + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + } else if (this.selectionRows[0].paraTypeFlag === '5') { + this.$refs.paraTurningToolsList.getPara(res.result) + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraBladeList.visable = false + } else if (this.selectionRows[0].paraTypeFlag === '6') { + this.$refs.paraBladeList.getPara(res.result) + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + } + } else { + this.$message.warning(res.message) + } + }) + getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0] }).then((res) => { + if (res.success) { + this.$refs.toolsConfigPropertyList.getPara(res.result) + } else { + this.$message.warning(res.message) + } + }) + }, + // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 + handleEditSelected() { + if (this.selectedRowKeys.length === 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曡繘琛岀紪杈�') + return + } + const selectedRecord = this.dataSource.find((item) => item.id === this.selectedRowKeys[0]) + if (selectedRecord) { + this.handleEdit(selectedRecord) + } + }, + //缂栬緫 + handleEdit(record) { + if (record.paraTypeFlag === '1') { + this.$refs.paraCommonToolModal.edit(record) + this.$refs.paraCommonToolModal.title = '缂栬緫' + this.$refs.paraCommonToolModal.disableSubmit = false + } else if (record.paraTypeFlag === '2') { + this.$refs.paraHoleToolsModal.edit(record) + this.$refs.paraHoleToolsModal.title = '缂栬緫' + this.$refs.paraHoleToolsModal.disableSubmit = false + } else if (record.paraTypeFlag === '3') { + this.$refs.paraThreadingToolModal.edit(record) + this.$refs.paraThreadingToolModal.title = '缂栬緫' + this.$refs.paraThreadingToolModal.disableSubmit = false + } else if (record.paraTypeFlag === '4') { + this.$refs.paraMillToolModal.edit(record) + this.$refs.paraMillToolModal.title = '缂栬緫' + this.$refs.paraMillToolModal.disableSubmit = false + } else if (record.paraTypeFlag === '5') { + this.$refs.paraTurningToolsModal.edit(record) + this.$refs.paraTurningToolsModal.title = '缂栬緫' + this.$refs.paraTurningToolsModal.disableSubmit = false + } else if (record.paraTypeFlag === '6') { + this.$refs.paraBladeModal.edit(record) + this.$refs.paraBladeModal.title = '缂栬緫' + this.$refs.paraBladeModal.disableSubmit = false + } + }, + //璇︽儏 + handleDetail: function (record) { + if (record.paraTypeFlag === '1') { + this.$refs.paraCommonToolModal.edit(record) + this.$refs.paraCommonToolModal.title = '璇︽儏' + this.$refs.paraCommonToolModal.disableSubmit = true + } else if (record.paraTypeFlag === '2') { + this.$refs.paraHoleToolsModal.edit(record) + this.$refs.paraHoleToolsModal.title = '璇︽儏' + this.$refs.paraHoleToolsModal.disableSubmit = true + } else if (record.paraTypeFlag === '3') { + this.$refs.paraThreadingToolModal.edit(record) + this.$refs.paraThreadingToolModal.title = '璇︽儏' + this.$refs.paraThreadingToolModal.disableSubmit = true + } else if (record.paraTypeFlag === '4') { + this.$refs.paraMillToolModal.edit(record) + this.$refs.paraMillToolModal.title = '璇︽儏' + this.$refs.paraMillToolModal.disableSubmit = true + } else if (record.paraTypeFlag === '5') { + this.$refs.paraTurningToolsModal.edit(record) + this.$refs.paraTurningToolsModal.title = '璇︽儏' + this.$refs.paraTurningToolsModal.disableSubmit = true + } else if (record.paraTypeFlag === '6') { + this.$refs.paraBladeModal.edit(record) + this.$refs.paraBladeModal.title = '璇︽儏' + this.$refs.paraBladeModal.disableSubmit = true + } + }, + //绂佺敤鐘舵�佹牱寮� + tableRowClass(record, index) { + if (record.status != '1') { + return 'frozenRowClass' + } + return '' + }, + loadData() { + let params = this.getQueryParams() + if (this.nodeSelected) { + this.clearPara() + // 鍔犺浇閫変腑鑺傜偣鐨勫瓙绫� + params.classifyId = this.nodeSelected.key + this.loading = true + let httpUrl = '' + if (this.paraTypeFlag === '1') { + httpUrl = this.url.paraCommonToolList + } else if (this.paraTypeFlag === '2') { + httpUrl = this.url.paraHolesToolsList + } else if (this.paraTypeFlag === '3') { + httpUrl = this.url.paraThreadingToolList + } else if (this.paraTypeFlag === '4') { + httpUrl = this.url.paraMillToolList + } else if (this.paraTypeFlag === '5') { + httpUrl = this.url.paraTurningToolsList + } else if (this.paraTypeFlag === '6') { + httpUrl = this.url.paraBladeList + } else { + //this.dataSource = []; + // this.clearPara() + // this.loading = false; + // return + httpUrl = this.url.paraCommonToolList } getAction(httpUrl, params) .then((res) => { if (res.success) { - this.dataSource = res.result.records; // 鏇存柊琛ㄦ牸鏁版嵁 + this.dataSource = res.result.records // 鏇存柊琛ㄦ牸鏁版嵁 this.ipagination.total = res.result.total //榛樿閫変腑绗竴鏉℃暟鎹� this.selectedRowKeys[0] = res.result.records[0].id - this.onSelectChange(this.selectedRowKeys) + this.selectionRows[0] = res.result.records[0] + this.onSelectChange(this.selectedRowKeys, this.selectionRows) } else { //this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); this.ipagination.total = 0 } }) .finally(() => { - this.loading = false; - }); - } else { - //this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); - } - }, - onClearSelected() { - this.selectedKeys = []; - this.nodeSelected = {}; // 娓呯┖閫変腑鐨勮妭鐐� - this.dataSource = []; // 娓呯┖琛ㄦ牸鏁版嵁 - }, - //閲嶇疆 - searchReset() { - this.queryParam = {} - this.loadData(1); - this.clearPara() - }, - //娓呯┖閫変腑鍙婂弬鏁� - clearPara(){ - this.selectedRowKeys = [] - this.$refs.paraCommonToolList.visable = false - this.$refs.paraHoleToolsList.visable = false - this.$refs.paraThreadingToolList.visable = false - this.$refs.paraMillToolList.visable = false - this.$refs.paraTurningToolsList.visable = false - this.$refs.paraBladeList.visable = false - this.$refs.toolsConfigPropertyList.visable = false - }, - customRow(record) { - return { - on: { - click: () => { - this.onSelectChange(record.id.split(","), [record]); - } - } - } - }, - exportToExcel(fileName) { + this.loading = false + }) + } else { + //this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); + } + }, + onClearSelected() { + this.selectedKeys = [] + this.nodeSelected = {} // 娓呯┖閫変腑鐨勮妭鐐� + this.dataSource = [] // 娓呯┖琛ㄦ牸鏁版嵁 + }, + //閲嶇疆 + searchReset() { + this.queryParam = {} + this.loadData(1) + this.clearPara() + }, + //娓呯┖閫変腑鍙婂弬鏁� + clearPara() { + this.selectedRowKeys = [] + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable = false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + this.$refs.toolsConfigPropertyList.visable = false + }, + customRow(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(','), [record]) + }, + }, + } + }, + exportToExcel(fileName) { this.loading = true // 鏄剧ず鍔犺浇閬僵 this.queryParam.paraTypeFlag = this.paraTypeFlag var params = this.getQueryParams() - downFile(this.url.loadTemplate,params).then((data)=>{ + downFile(this.url.loadTemplate, params).then((data) => { if (!data) { - this.$message.warning("鏂囦欢涓嬭浇澶辫触") + this.$message.warning('鏂囦欢涓嬭浇澶辫触') return } if (typeof window.navigator.msSaveBlob !== 'undefined') { - window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}), fileName+'.xlsx') - }else{ - let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'})) + window.navigator.msSaveBlob( + new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }), + fileName + '.xlsx' + ) + } else { + let url = window.URL.createObjectURL( + new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) + ) let link = document.createElement('a') link.style.display = 'none' link.href = url - link.setAttribute('download', fileName+'.xlsx') + link.setAttribute('download', fileName + '.xlsx') document.body.appendChild(link) link.click() - document.body.removeChild(link); //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 - window.URL.revokeObjectURL(url); //閲婃斁鎺塨lob瀵硅薄 + document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄 } this.loading = false // 闅愯棌閬僵 }) }, + searchHeightQuery() { + if (this.paraTypeFlag === '2') { + this.$refs.paraHoleToolsSearchModal.show() + } else if (this.paraTypeFlag === '3') { + this.$refs.paraThreadingToolSearchModal.show() + } else if (this.paraTypeFlag === '4') { + this.$refs.paraMillToolSearchModal.show() + } else if (this.paraTypeFlag === '5') { + this.$refs.paraTurningToolsSearchModal.show() + } else if (this.paraTypeFlag === '6') { + this.$refs.paraBladeSearchModal.show() + } }, - } + paraHoleToolsOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.diameter = data.diameter + this.queryParam.coneAngle = data.coneAngle + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.handleSpecifications = data.handleSpecifications + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.bladeCount = data.bladeCount + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData() + }, + paraBladeOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.bladeShape = data.bladeShape + this.queryParam.bladeLength = data.bladeLength + this.queryParam.cuttingEdgeCount = data.cuttingEdgeCount + this.queryParam.bladeThickness = data.bladeThickness + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.clampingType = data.clampingType + this.queryParam.noseAngleR = data.noseAngleR + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData() + }, + paraThreadingToolOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.threadCode = data.threadCode + this.queryParam.pitch = data.pitch + this.queryParam.rotationDirection = data.rotationDirection + this.queryParam.tolerancezoneLevel = data.tolerancezoneLevel + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.externalDimensions = data.externalDimensions + this.queryParam.handleSpecifications = data.handleSpecifications + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData() + }, + paraMillToolOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.diameter = data.diameter + this.queryParam.noseAngleR = data.noseAngleR + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.clampingSpecifications = data.clampingSpecifications + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.numberOfTeeth = data.numberOfTeeth + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData() + }, + paraTurningToolsOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.headSpecifications = data.headSpecifications + this.queryParam.matchingNumber = data.matchingNumber + this.queryParam.leadAngle = data.leadAngle + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.crossSectionalSize = data.crossSectionalSize + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.cuttingDirection = data.cuttingDirection + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData() + }, + }, +} </script> <style scoped> - @import '~@assets/less/common.less'; - .enable { - color: green; - } - .disable { - color: red; - } +@import '~@assets/less/common.less'; +.enable { + color: green; +} +.disable { + color: red; +} </style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaBladeList.vue b/src/views/tms/modules/baseTools/ParaBladeList.vue index 8498951..f911afd 100644 --- a/src/views/tms/modules/baseTools/ParaBladeList.vue +++ b/src/views/tms/modules/baseTools/ParaBladeList.vue @@ -3,6 +3,9 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绠�绉�">{{ this.para == null || this.para.shortCalled == null ? '' : this.para.shortCalled }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃缂栫爜">{{ this.para == null || this.para.groupCompanyCode == null ? '' : this.para.groupCompanyCode }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃鏍囪">{{ this.para == null || this.para.groupCompanySign == null ? '' : this.para.groupCompanySign }}</a-descriptions-item> <a-descriptions-item label="鍒�鐗囧舰鐘�">{{ this.para == null || this.para.bladeShape == null ? '' : this.para.bladeShape }}</a-descriptions-item> <a-descriptions-item label="鍒�鐗囬暱搴�">{{ this.para == null || this.para.bladeLength == null ? '' : this.para.bladeLength }}</a-descriptions-item> <a-descriptions-item label="鍒囧墛鍒冩暟">{{ this.para == null || this.para.cuttingEdgeCount == null ? '' : this.para.cuttingEdgeCount }}</a-descriptions-item> @@ -11,7 +14,7 @@ <a-descriptions-item label="鍒�灏朢">{{ this.para == null || this.para.noseAngleR == null ? '' : this.para.noseAngleR }}</a-descriptions-item> <a-descriptions-item label="鍒�鐗囨潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> - <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag == '1' ? '鏄�' : '鍚�' }}</a-descriptions-item> <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> <a-descriptions-item label="闄勫姞鎶�鏈潯浠惰鏄�">{{ this.para == null || this.para.conditionsInfo == null ? '' : this.para.conditionsInfo }}</a-descriptions-item> <a-descriptions-item label="鍝佺墝">{{ this.para == null || this.para.brand == null ? '' : this.para.brand }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ParaBladeModal.vue b/src/views/tms/modules/baseTools/ParaBladeModal.vue index aa2a9f8..a9cfb17 100644 --- a/src/views/tms/modules/baseTools/ParaBladeModal.vue +++ b/src/views/tms/modules/baseTools/ParaBladeModal.vue @@ -68,6 +68,7 @@ :placeholder="disableSubmit ? '' : '璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" + @change="e => chineseNameChange(e.target.value)" /> </a-form-model-item> </a-col> @@ -90,6 +91,7 @@ :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" + @change="e => toolModelChange(e.target.value)" /> </a-form-model-item> </a-col> @@ -131,17 +133,6 @@ </a-col> </a-row> </a-col> - <a-col :span="8"> - <a-form-model-item prop="accuracyClass" label="绮惧害绛夌骇"> - <j-dict-select-tag - type="list" - v-model="model.accuracyClass" - :triggerChange="true" - dictCode="accuracy_class" - :placeholder="disableSubmit ? '' : '璇烽�夋嫨绮惧害绛夌骇'" - /> - </a-form-model-item> - </a-col> <a-col :span="6"> <a-row> @@ -162,7 +153,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> <j-dict-select-tag - dict-code="equipment_category" + dict-code="application_type" :placeholder="disableSubmit ? '' : '璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" @@ -204,15 +195,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input - :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" - v-model="model.storageLocation" - :disabled="disableSubmit" - /> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit ? '' : '璇疯緭鍏ユ渶浣庡簱瀛�'" @@ -230,9 +212,6 @@ /> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group @@ -245,6 +224,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input @@ -263,9 +245,6 @@ /> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input @@ -275,6 +254,9 @@ /> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input @@ -297,11 +279,41 @@ <a-row :gutter="24"> <a-col :span="6"> + <a-form-model-item label="宸ュ叿绠�绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled"> + <a-input + v-model="model.shortCalled" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风畝绉�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆嗗洟鍏徃缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> <a-form-model-item label="鍒�鐗囧舰鐘�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape"> <a-input v-model="model.bladeShape" :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囧舰鐘�'" :disabled="disableSubmit" + @change="e => bladeShapeChange(e.target.value)" ></a-input> </a-form-model-item> </a-col> @@ -311,6 +323,7 @@ v-model="model.bladeLength" :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁鐗囬暱搴�'" :disabled="disableSubmit" + @change="e => bladeLengthChange(e.target.value)" ></a-input> </a-form-model-item> </a-col> @@ -320,6 +333,7 @@ v-model="model.cuttingEdgeCount" :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垏鍓婂垉鏁�'" :disabled="disableSubmit" + @change="e => cuttingEdgeCountChange(e.target.value)" ></a-input> </a-form-model-item> </a-col> @@ -350,6 +364,7 @@ v-model="model.noseAngleR" :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ垁灏朢'" :disabled="disableSubmit" + @change="e => noseAngleRChange(e.target.value)" ></a-input> </a-form-model-item> </a-col> @@ -402,8 +417,8 @@ <a-col :span="6"> <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + :labelCol="{span:12}" + :wrapperCol="{span:12}" prop="conditionsInfo" > <a-input @@ -530,8 +545,8 @@ <a-col :span="6"> <a-form-model-item label="鏈�灏忓姞宸ュ唴铻虹汗鍏О鐩村緞" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + :labelCol="{span:15}" + :wrapperCol="{span:9}" prop="minInternalThread" > <a-input @@ -612,12 +627,20 @@ toolMaterial: [{ required: true, message: '璇疯緭鍏ュ垁鐗囨潗鏂�' }], paintcoatFlag: [{ required: true, message: '璇烽�夋嫨鏄惁娑傚眰' }], technicalConditions: [{ required: true, message: '璇疯緭鍏ラ檮鍔犳妧鏈潯浠�' }], + shortCalled: [{ required: true, message: '璇疯緭鍏ュ伐鍏风畝绉�' }], }, url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, locationCodeOptions: [], + chineseNameChange1:'', + toolModelChange1:'', + bladeShapeChange1:'', + bladeLengthChange1:'', + cuttingEdgeCountChange1:'', + noseAngleRChange1:'' } }, created() { @@ -637,7 +660,7 @@ this.editable = false //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -648,12 +671,27 @@ edit(record) { this.editable = true this.model = Object.assign({}, record) + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: record.toolCodeId, + paraTypeFlag: record.paraTypeFlag, + }).then((res) => { + if (res.success) { + this.model = Object.assign({}, res.result) + } + }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.bladeShapeChange1 = '', + this.bladeLengthChange1 = '', + this.cuttingEdgeCountChange1 = '', + this.noseAngleRChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -727,6 +765,36 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + }, + bladeShapeChange(bladeShapeChange){ + this.bladeShapeChange1 = bladeShapeChange == '' ? '' : '-'+bladeShapeChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + }, + bladeLengthChange(bladeLengthChange){ + this.bladeLengthChange1 = bladeLengthChange == '' ? '' : '-'+bladeLengthChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + }, + cuttingEdgeCountChange(cuttingEdgeCountChange){ + this.cuttingEdgeCountChange1 = cuttingEdgeCountChange == '' ? '' : '-'+cuttingEdgeCountChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + }, + noseAngleRChange(noseAngleRChange){ + this.noseAngleRChange1 = noseAngleRChange == '' ? '' : '-'+noseAngleRChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.bladeShapeChange1+this.bladeLengthChange1 + +this.cuttingEdgeCountChange1+this.noseAngleRChange1 + } }, } </script> diff --git a/src/views/tms/modules/baseTools/ParaBladeSearchModal.vue b/src/views/tms/modules/baseTools/ParaBladeSearchModal.vue new file mode 100644 index 0000000..df7d32b --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaBladeSearchModal.vue @@ -0,0 +1,299 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + centered + :confirmLoading="confirmLoading" + switchFullscreen + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ヤ腑鏂囧悕绉�'" + v-model="model.chineseName" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ュ鏂囧悕绉�'" + v-model="model.foreignLanguageName" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="shortCalled" label="宸ュ叿绠�绉�"> + <a-input + :placeholder="'璇疯緭鍏ュ伐鍏风畝绉�'" + v-model="model.shortCalled" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="groupCompanyCode" label="闆嗗洟鍏徃缂栫爜"> + <a-input + :placeholder="'璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + v-model="model.groupCompanyCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="standardLevel" label="鏍囧噯绾у埆"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗙骇鍒�'" + v-model="model.standardLevel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗗彿'" + v-model="model.standardCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input + :placeholder="'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" + v-model="model.toolModel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�鐗囧舰鐘�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeShape"> + <a-input + v-model="model.bladeShape" + :placeholder="'璇疯緭鍏ュ垁鐗囧舰鐘�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鐗囬暱搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeLength"> + <a-input + v-model="model.bladeLength" + :placeholder="'璇疯緭鍏ュ垁鐗囬暱搴�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鍒冩暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingEdgeCount"> + <a-input + v-model="model.cuttingEdgeCount" + :placeholder="'璇疯緭鍏ュ垏鍓婂垉鏁�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鐗囧帤搴�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeThickness"> + <a-input + v-model="model.bladeThickness" + :placeholder="'璇疯緭鍏ュ垁鐗囧帤搴�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input + v-model="model.toolMaterial" + :placeholder="'璇疯緭鍏ュ垁鍏锋潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input + v-model="model.partMaterial" + :placeholder="'璇疯緭鍏ラ浂浠舵潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group + v-model="model.paintcoatFlag" + :placeholder="'璇烽�夋嫨鏄惁娑傚眰'" + > + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="澶瑰浐鍨嬪紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clampingType"> + <a-input + v-model="model.clampingType" + :placeholder="'璇疯緭鍏ュす鍥哄瀷寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="鍒�灏朢" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="noseAngleR" + > + <a-input + v-model="model.noseAngleR" + :placeholder="'璇疯緭鍏ュ垁灏朢'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input + v-model="model.technicalConditions" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input + v-model="model.conditionsInfo" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + <template slot="footer"> + <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-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button> + </template> + </j-modal> +</template> + +<script> + +export default { + name: 'ParaHoleToolsSearchModal', + data() { + return { + title: '宸ュ叿淇℃伅-楂樼骇鏌ヨ', + visible: false, + confirmLoading: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 }, + }, + searchParams:{} + } + }, + created() { + }, + mounted() { + + }, + methods: { + show() { + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + + searchQuery(){ + this.searchParams.chineseName = this.model.chineseName + this.searchParams.foreignLanguageName = this.model.foreignLanguageName + this.searchParams.standardLevel = this.model.standardLevel + this.searchParams.standardCode = this.model.standardCode + this.searchParams.bladeShape = this.model.bladeShape + this.searchParams.bladeLength = this.model.bladeLength + this.searchParams.cuttingEdgeCount = this.model.cuttingEdgeCount + this.searchParams.bladeThickness = this.model.bladeThickness + this.searchParams.toolMaterial = this.model.toolMaterial + this.searchParams.partMaterial = this.model.partMaterial + this.searchParams.paintcoatFlag = this.model.paintcoatFlag + this.searchParams.clampingType = this.model.clampingType + this.searchParams.noseAngleR = this.model.noseAngleR + this.searchParams.technicalConditions = this.model.technicalConditions + this.searchParams.conditionsInfo = this.model.conditionsInfo + this.searchParams.toolModel = this.model.toolModel + this.searchParams.shortCalled = this.model.shortCalled + this.searchParams.groupCompanyCode = this.model.groupCompanyCode + this.close() + this.$emit('searchParams',this.searchParams) + }, + searchReset(){ + this.model = {} + } + }, +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaCommonToolList.vue b/src/views/tms/modules/baseTools/ParaCommonToolList.vue index c3234c9..79cba93 100644 --- a/src/views/tms/modules/baseTools/ParaCommonToolList.vue +++ b/src/views/tms/modules/baseTools/ParaCommonToolList.vue @@ -3,7 +3,7 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> - <a-descriptions-item label="宸ュ叿缂栧彿">{{ this.para == null || this.para.toolCode == null ? '' : this.para.toolCode }}</a-descriptions-item> + <!-- <a-descriptions-item label="宸ュ叿缂栧彿">{{ this.para == null || this.para.toolCode == null ? '' : this.para.toolCode }}</a-descriptions-item> --> <a-descriptions-item label="搴忓彿">{{ this.para == null || this.para.signCode == null ? '' : this.para.signCode }}</a-descriptions-item> <a-descriptions-item label="涓枃鍚嶇О">{{ this.para == null || this.para.chineseName == null ? '' : this.para.chineseName }}</a-descriptions-item> <a-descriptions-item label="澶栨枃鍚嶇О">{{ this.para == null || this.para.foreignLanguageName == null ? '' : this.para.foreignLanguageName }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ParaCommonToolModal.vue b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue index aad3851..8852fb2 100644 --- a/src/views/tms/modules/baseTools/ParaCommonToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaCommonToolModal.vue @@ -123,7 +123,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -156,11 +156,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -170,9 +165,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> @@ -181,6 +173,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -191,14 +186,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="8"> + <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsList.vue b/src/views/tms/modules/baseTools/ParaHoleToolsList.vue index 07b6b79..cd5f5cc 100644 --- a/src/views/tms/modules/baseTools/ParaHoleToolsList.vue +++ b/src/views/tms/modules/baseTools/ParaHoleToolsList.vue @@ -3,13 +3,16 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绠�绉�">{{ this.para == null || this.para.shortCalled == null ? '' : this.para.shortCalled }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃缂栫爜">{{ this.para == null || this.para.groupCompanyCode == null ? '' : this.para.groupCompanyCode }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃鏍囪">{{ this.para == null || this.para.groupCompanySign == null ? '' : this.para.groupCompanySign }}</a-descriptions-item> <a-descriptions-item label="鐩村緞">{{ this.para == null || this.para.diameter == null ? '' : this.para.diameter }}</a-descriptions-item> <a-descriptions-item label="鍒囧墛鍒冮敟瑙�">{{ this.para == null || this.para.coneAngle == null ? '' : this.para.coneAngle }}</a-descriptions-item> <a-descriptions-item label="鍒囧墛鍒冮暱">{{ this.para == null || this.para.edgeLength == null ? '' : this.para.edgeLength }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> - <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag == '1' ? '鏄�' : '鍚�' }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> <a-descriptions-item label="鏌勯儴瑙勬牸">{{ this.para == null || this.para.handleSpecifications == null ? '' : this.para.handleSpecifications }}</a-descriptions-item> <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> @@ -35,6 +38,8 @@ <a-descriptions-item label="鏈�澶ч晽瀛旂洿寰�">{{ this.para == null || this.para.maxBoringDiameter == null ? '' : this.para.maxBoringDiameter }}</a-descriptions-item> <a-descriptions-item label="鍔犲伐鏂瑰紡">{{ this.para == null || this.para.processingmethod == null ? '' : this.para.processingmethod }}</a-descriptions-item> <a-descriptions-item label="鍒�澶存暟">{{ this.para == null || this.para.headsNumber == null ? '' : this.para.headsNumber }}</a-descriptions-item> + <a-descriptions-item label="瀵煎悜闀垮害">{{ this.para == null || this.para.guidanceLength == null ? '' : this.para.guidanceLength }}</a-descriptions-item> + <a-descriptions-item label="瀵煎悜鐩村緞">{{ this.para == null || this.para.guidanceDiameter == null ? '' : this.para.guidanceDiameter }}</a-descriptions-item> </a-descriptions> diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue index 9520948..d92cfc2 100644 --- a/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue +++ b/src/views/tms/modules/baseTools/ParaHoleToolsModal.vue @@ -59,7 +59,7 @@ <a-col :span="24"> <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +75,7 @@ <a-col :span="24"> <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -123,7 +123,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -156,11 +156,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -170,10 +165,7 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="8"> + <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> <a-radio :value="'1'">鏄�</a-radio> @@ -181,6 +173,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -191,14 +186,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> @@ -216,8 +211,37 @@ <a-row :gutter="24"> <a-col :span="6"> + <a-form-model-item label="宸ュ叿绠�绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled"> + <a-input + v-model="model.shortCalled" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风畝绉�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆嗗洟鍏徃缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="6"> <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> - <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit" @change="e => diameterChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -232,7 +256,7 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> - <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit" @change="e => totalLengthChange(e.target.value)"></a-input> </a-form-model-item> </a-col> </a-row> @@ -279,7 +303,7 @@ </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="conditionsInfo"> <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> @@ -330,7 +354,7 @@ </a-row> <a-row> <a-col :span="6"> - <a-form-model-item label="閫傞厤鍒�鐗�-鍒�澶�-鍒�鏉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fitterPart"> + <a-form-model-item label="閫傞厤鍒�鐗�-鍒�澶�-鍒�鏉�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="fitterPart"> <a-input v-model="model.fitterPart" :placeholder="disableSubmit?'':'璇疯緭鍏ラ�傞厤鍒�鐗�-鍒�澶�-鍒�鏉�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> @@ -391,6 +415,18 @@ <a-col :span="6"> <a-form-model-item label="鍒�澶存暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headsNumber"> <a-input v-model="model.headsNumber" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶存暟'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="6"> + <a-form-model-item label="瀵煎悜闀垮害" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guidanceLength"> + <a-input v-model="model.guidanceLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ鍚戦暱搴�'" :disabled="disableSubmit" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="瀵煎悜鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guidanceDiameter"> + <a-input v-model="model.guidanceDiameter" :placeholder="disableSubmit?'':'璇疯緭鍏ュ鍚戠洿寰�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> </a-row> @@ -493,8 +529,13 @@ url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, - locationCodeOptions:[] + locationCodeOptions:[], + chineseNameChange1:'', + toolModelChange1:'', + diameterChange1:'', + totalLengthChange1:'', } }, created() { @@ -514,7 +555,7 @@ this.editable = false; //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -525,12 +566,25 @@ edit(record) { this.editable = true; this.model = Object.assign({}, record) + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: record.toolCodeId, + paraTypeFlag: record.paraTypeFlag, + }).then((res) => { + if (res.success) { + this.model = Object.assign({}, res.result) + } + }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.diameterChange1 = '', + this.totalLengthChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -604,6 +658,22 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.totalLengthChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.totalLengthChange1 + }, + diameterChange(diameterChange){ + this.diameterChange1 = diameterChange == '' ? '' : '-'+diameterChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.totalLengthChange1 + }, + totalLengthChange(totalLengthChange){ + this.totalLengthChange1 = totalLengthChange == '' ? '' : '-'+totalLengthChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.totalLengthChange1 + } } } </script> diff --git a/src/views/tms/modules/baseTools/ParaHoleToolsSearchModal.vue b/src/views/tms/modules/baseTools/ParaHoleToolsSearchModal.vue new file mode 100644 index 0000000..9dc5525 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaHoleToolsSearchModal.vue @@ -0,0 +1,319 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + centered + :confirmLoading="confirmLoading" + switchFullscreen + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ヤ腑鏂囧悕绉�'" + v-model="model.chineseName" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ュ鏂囧悕绉�'" + v-model="model.foreignLanguageName" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="shortCalled" label="宸ュ叿绠�绉�"> + <a-input + :placeholder="'璇疯緭鍏ュ伐鍏风畝绉�'" + v-model="model.shortCalled" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="groupCompanyCode" label="闆嗗洟鍏徃缂栫爜"> + <a-input + :placeholder="'璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + v-model="model.groupCompanyCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="standardLevel" label="鏍囧噯绾у埆"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗙骇鍒�'" + v-model="model.standardLevel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗗彿'" + v-model="model.standardCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input + :placeholder="'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" + v-model="model.toolModel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> + <a-input + v-model="model.diameter" + :placeholder="'璇疯緭鍏ョ洿寰�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鍒冮敟瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coneAngle"> + <a-input + v-model="model.coneAngle" + :placeholder="'璇疯緭鍏ュ垏鍓婂垉閿ヨ'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input + v-model="model.edgeLength" + :placeholder="'璇疯緭鍏ュ垏鍓婂垉闀�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input + v-model="model.totalLength" + :placeholder="'璇疯緭鍏ュ垁鍏锋�婚暱'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input + v-model="model.toolMaterial" + :placeholder="'璇疯緭鍏ュ垁鍏锋潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input + v-model="model.partMaterial" + :placeholder="'璇疯緭鍏ラ浂浠舵潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group + v-model="model.paintcoatFlag" + :placeholder="'璇烽�夋嫨鏄惁娑傚眰'" + > + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input + v-model="model.toolPattern" + :placeholder="'璇疯緭鍏ュ垁鍏峰瀷寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="鏌勯儴瑙勬牸" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="handleSpecifications" + > + <a-input + v-model="model.handleSpecifications" + :placeholder="'璇疯緭鍏ユ焺閮ㄨ鏍�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input + v-model="model.coolingMethod" + :placeholder="'璇疯緭鍏ュ喎鍗存柟寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒冩暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bladeCount"> + <a-input + v-model="model.bladeCount" + :placeholder="'璇疯緭鍏ュ垉鏁�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input + v-model="model.technicalConditions" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input + v-model="model.conditionsInfo" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + <template slot="footer"> + <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-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button> + </template> + </j-modal> +</template> + +<script> + +export default { + name: 'ParaHoleToolsSearchModal', + data() { + return { + title: '宸ュ叿淇℃伅-楂樼骇鏌ヨ', + visible: false, + confirmLoading: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 }, + }, + searchParams:{} + } + }, + created() { + }, + mounted() { + + }, + methods: { + show() { + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + + searchQuery(){ + this.searchParams.chineseName = this.model.chineseName + this.searchParams.foreignLanguageName = this.model.foreignLanguageName + this.searchParams.standardLevel = this.model.standardLevel + this.searchParams.standardCode = this.model.standardCode + this.searchParams.diameter = this.model.diameter + this.searchParams.coneAngle = this.model.coneAngle + this.searchParams.edgeLength = this.model.edgeLength + this.searchParams.totalLength = this.model.totalLength + this.searchParams.toolMaterial = this.model.toolMaterial + this.searchParams.partMaterial = this.model.partMaterial + this.searchParams.paintcoatFlag = this.model.paintcoatFlag + this.searchParams.toolPattern = this.model.toolPattern + this.searchParams.handleSpecifications = this.model.handleSpecifications + this.searchParams.coolingMethod = this.model.coolingMethod + this.searchParams.bladeCount = this.model.bladeCount + this.searchParams.technicalConditions = this.model.technicalConditions + this.searchParams.conditionsInfo = this.model.conditionsInfo + this.searchParams.toolModel = this.model.toolModel + this.searchParams.shortCalled = this.model.shortCalled + this.searchParams.groupCompanyCode = this.model.groupCompanyCode + this.close() + this.$emit('searchParams',this.searchParams) + }, + searchReset(){ + this.model = {} + } + }, +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaMillToolList.vue b/src/views/tms/modules/baseTools/ParaMillToolList.vue index 7e82034..970d00f 100644 --- a/src/views/tms/modules/baseTools/ParaMillToolList.vue +++ b/src/views/tms/modules/baseTools/ParaMillToolList.vue @@ -3,6 +3,9 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绠�绉�">{{ this.para == null || this.para.shortCalled == null ? '' : this.para.shortCalled }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃缂栫爜">{{ this.para == null || this.para.groupCompanyCode == null ? '' : this.para.groupCompanyCode }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃鏍囪">{{ this.para == null || this.para.groupCompanySign == null ? '' : this.para.groupCompanySign }}</a-descriptions-item> <a-descriptions-item label="鐩村緞">{{ this.para == null || this.para.diameter == null ? '' : this.para.diameter }}</a-descriptions-item> <a-descriptions-item label="鍒�灏栬R">{{ this.para == null || this.para.noseAngleR == null ? '' : this.para.noseAngleR }}</a-descriptions-item> <a-descriptions-item label="榻挎暟">{{ this.para == null || this.para.numberOfTeeth == null ? '' : this.para.numberOfTeeth }}</a-descriptions-item> @@ -10,7 +13,7 @@ <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> - <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag == '1' ? '鏄�' : '鍚�' }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> <a-descriptions-item label="瑁呭す瑙勬牸">{{ this.para == null || this.para.clampingSpecifications == null ? '' : this.para.clampingSpecifications }}</a-descriptions-item> <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ParaMillToolModal.vue b/src/views/tms/modules/baseTools/ParaMillToolModal.vue index 220ca01..158637a 100644 --- a/src/views/tms/modules/baseTools/ParaMillToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaMillToolModal.vue @@ -59,7 +59,7 @@ <a-col :span="24"> <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +75,7 @@ <a-col :span="24"> <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -123,7 +123,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -156,11 +156,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -170,9 +165,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> @@ -181,6 +173,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -191,14 +186,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> - <a-col :span="8"> + <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> @@ -216,13 +211,41 @@ <a-row :gutter="24"> <a-col :span="6"> + <a-form-model-item label="宸ュ叿绠�绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled"> + <a-input + v-model="model.shortCalled" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风畝绉�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆嗗洟鍏徃缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="6"> <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> - <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.diameter" :placeholder="disableSubmit?'':'璇疯緭鍏ョ洿寰�'" :disabled="disableSubmit" @change="e => diameterChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="鍒�灏栬R" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleR"> - <a-input v-model="model.noseAngleR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏栬R'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.noseAngleR" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁灏栬R'" :disabled="disableSubmit" @change="e => noseAngleRChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -232,7 +255,7 @@ </a-col> <a-col :span="6"> <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> - <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.totalLength" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁鍏锋�婚暱'" :disabled="disableSubmit" @change="e => totalLengthChange(e.target.value)"></a-input> </a-form-model-item> </a-col> </a-row> @@ -283,8 +306,10 @@ <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> - <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + </a-row> + <a-row> + <a-col :span="24"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="{span:3}" :wrapperCol="{span:21}" prop="conditionsInfo"> <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> @@ -507,8 +532,14 @@ url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, - locationCodeOptions:[] + locationCodeOptions:[], + chineseNameChange1:'', + toolModelChange1:'', + diameterChange1:'', + totalLengthChange1:'', + noseAngleRChange1:'' } }, mounted() { @@ -528,7 +559,7 @@ this.editable = false; //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -539,12 +570,26 @@ edit(record) { this.editable = true; this.model = Object.assign({}, record) + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: record.toolCodeId, + paraTypeFlag: record.paraTypeFlag, + }).then((res) => { + if (res.success) { + this.model = Object.assign({}, res.result) + } + }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.diameterChange1 = '', + this.totalLengthChange1 = '', + this.noseAngleRChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -618,6 +663,26 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.noseAngleRChange1+this.totalLengthChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.noseAngleRChange1+this.totalLengthChange1 + }, + diameterChange(diameterChange){ + this.diameterChange1 = diameterChange == '' ? '' : '-'+diameterChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.noseAngleRChange1+this.totalLengthChange1 + }, + totalLengthChange(totalLengthChange){ + this.totalLengthChange1 = totalLengthChange == '' ? '' : '-'+totalLengthChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.noseAngleRChange1+this.totalLengthChange1 + }, + noseAngleRChange(noseAngleRChange){ + this.noseAngleRChange1 = noseAngleRChange == '' ? '' : '-'+noseAngleRChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.diameterChange1+this.noseAngleRChange1+this.totalLengthChange1 + } } } </script> diff --git a/src/views/tms/modules/baseTools/ParaMillToolSearchModal.vue b/src/views/tms/modules/baseTools/ParaMillToolSearchModal.vue new file mode 100644 index 0000000..fb4c946 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaMillToolSearchModal.vue @@ -0,0 +1,319 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + centered + :confirmLoading="confirmLoading" + switchFullscreen + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ヤ腑鏂囧悕绉�'" + v-model="model.chineseName" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ュ鏂囧悕绉�'" + v-model="model.foreignLanguageName" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="shortCalled" label="宸ュ叿绠�绉�"> + <a-input + :placeholder="'璇疯緭鍏ュ伐鍏风畝绉�'" + v-model="model.shortCalled" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="groupCompanyCode" label="闆嗗洟鍏徃缂栫爜"> + <a-input + :placeholder="'璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + v-model="model.groupCompanyCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="standardLevel" label="鏍囧噯绾у埆"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗙骇鍒�'" + v-model="model.standardLevel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗗彿'" + v-model="model.standardCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input + :placeholder="'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" + v-model="model.toolModel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐩村緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="diameter"> + <a-input + v-model="model.diameter" + :placeholder="'璇疯緭鍏ョ洿寰�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="榻挎暟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="numberOfTeeth"> + <a-input + v-model="model.numberOfTeeth" + :placeholder="'璇疯緭鍏ラ娇鏁�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input + v-model="model.edgeLength" + :placeholder="'璇疯緭鍏ュ垏鍓婂垉闀�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input + v-model="model.totalLength" + :placeholder="'璇疯緭鍏ュ垁鍏锋�婚暱'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input + v-model="model.toolMaterial" + :placeholder="'璇疯緭鍏ュ垁鍏锋潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input + v-model="model.partMaterial" + :placeholder="'璇疯緭鍏ラ浂浠舵潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group + v-model="model.paintcoatFlag" + :placeholder="'璇烽�夋嫨鏄惁娑傚眰'" + > + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input + v-model="model.toolPattern" + :placeholder="'璇疯緭鍏ュ垁鍏峰瀷寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="瑁呭す瑙勬牸" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="clampingSpecifications" + > + <a-input + v-model="model.clampingSpecifications" + :placeholder="'璇疯緭鍏ヨ澶硅鏍�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input + v-model="model.coolingMethod" + :placeholder="'璇疯緭鍏ュ喎鍗存柟寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�灏栬R" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noseAngleR"> + <a-input + v-model="model.noseAngleR" + :placeholder="'璇疯緭鍏ュ垁灏栬R'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input + v-model="model.technicalConditions" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input + v-model="model.conditionsInfo" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + <template slot="footer"> + <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-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button> + </template> + </j-modal> +</template> + +<script> + +export default { + name: 'ParaHoleToolsSearchModal', + data() { + return { + title: '宸ュ叿淇℃伅-楂樼骇鏌ヨ', + visible: false, + confirmLoading: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 }, + }, + searchParams:{} + } + }, + created() { + }, + mounted() { + + }, + methods: { + show() { + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + + searchQuery(){ + this.searchParams.chineseName = this.model.chineseName + this.searchParams.foreignLanguageName = this.model.foreignLanguageName + this.searchParams.standardLevel = this.model.standardLevel + this.searchParams.standardCode = this.model.standardCode + this.searchParams.diameter = this.model.diameter + this.searchParams.noseAngleR = this.model.noseAngleR + this.searchParams.edgeLength = this.model.edgeLength + this.searchParams.totalLength = this.model.totalLength + this.searchParams.toolMaterial = this.model.toolMaterial + this.searchParams.partMaterial = this.model.partMaterial + this.searchParams.paintcoatFlag = this.model.paintcoatFlag + this.searchParams.toolPattern = this.model.toolPattern + this.searchParams.clampingSpecifications = this.model.clampingSpecifications + this.searchParams.coolingMethod = this.model.coolingMethod + this.searchParams.numberOfTeeth = this.model.numberOfTeeth + this.searchParams.technicalConditions = this.model.technicalConditions + this.searchParams.conditionsInfo = this.model.conditionsInfo + this.searchParams.toolModel = this.model.toolModel + this.searchParams.shortCalled = this.model.shortCalled + this.searchParams.groupCompanyCode = this.model.groupCompanyCode + this.close() + this.$emit('searchParams',this.searchParams) + }, + searchReset(){ + this.model = {} + } + }, +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolList.vue b/src/views/tms/modules/baseTools/ParaThreadingToolList.vue index ef48cb2..2674e79 100644 --- a/src/views/tms/modules/baseTools/ParaThreadingToolList.vue +++ b/src/views/tms/modules/baseTools/ParaThreadingToolList.vue @@ -3,6 +3,9 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绠�绉�">{{ this.para == null || this.para.shortCalled == null ? '' : this.para.shortCalled }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃缂栫爜">{{ this.para == null || this.para.groupCompanyCode == null ? '' : this.para.groupCompanyCode }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃鏍囪">{{ this.para == null || this.para.groupCompanySign == null ? '' : this.para.groupCompanySign }}</a-descriptions-item> <a-descriptions-item label="铻虹汗浠e彿">{{ this.para == null || this.para.threadCode == null ? '' : this.para.threadCode }}</a-descriptions-item> <a-descriptions-item label="铻鸿窛">{{ this.para == null || this.para.pitch == null ? '' : this.para.pitch }}</a-descriptions-item> <a-descriptions-item label="铻虹汗鏃嬪悜">{{ this.para == null || this.para.rotationDirection == null ? '' : this.para.rotationDirection }}</a-descriptions-item> @@ -11,7 +14,7 @@ <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> - <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag == '1' ? '鏄�' : '鍚�' }}</a-descriptions-item> <a-descriptions-item label="澶栧瀷灏哄">{{ this.para == null || this.para.externalDimensions == null ? '' : this.para.externalDimensions }}</a-descriptions-item> <a-descriptions-item label="鏌勯儴瑙勬牸">{{ this.para == null || this.para.handleSpecifications == null ? '' : this.para.handleSpecifications }}</a-descriptions-item> <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue index 82a61ad..5bf56a5 100644 --- a/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue +++ b/src/views/tms/modules/baseTools/ParaThreadingToolModal.vue @@ -59,7 +59,7 @@ <a-col :span="24"> <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +75,7 @@ <a-col :span="24"> <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -123,7 +123,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -156,11 +156,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -170,9 +165,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> @@ -181,6 +173,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -191,14 +186,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> @@ -216,13 +211,41 @@ <a-row :gutter="24"> <a-col :span="6"> + <a-form-model-item label="宸ュ叿绠�绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled"> + <a-input + v-model="model.shortCalled" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风畝绉�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆嗗洟鍏徃缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="6"> <a-form-model-item label="铻虹汗浠e彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadCode"> - <a-input v-model="model.threadCode" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾逛唬鍙�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.threadCode" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾逛唬鍙�'" :disabled="disableSubmit" @change="e => threadCodeChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> - <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.pitch" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪璺�'" :disabled="disableSubmit" @change="e => pitchChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -231,7 +254,7 @@ </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="铻虹汗鍏樊甯︿唬鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tolerancezoneLevel"> + <a-form-model-item label="铻虹汗鍏樊甯︿唬鍙�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="tolerancezoneLevel"> <a-input v-model="model.tolerancezoneLevel" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾瑰叕宸甫浠e彿'" :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> @@ -283,13 +306,13 @@ <a-input v-model="model.technicalConditions" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> + </a-row> + <a-row> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="conditionsInfo"> <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> - </a-row> - <a-row> <a-col :span="6"> <a-form-model-item label="鍝佺墝" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> <a-input v-model="model.brand" :placeholder="disableSubmit?'':'璇疯緭鍏ュ搧鐗�'" :disabled="disableSubmit" ></a-input> @@ -305,13 +328,13 @@ <a-input v-model="model.coolingMethod" :placeholder="disableSubmit?'':'璇疯緭鍏ュ喎鍗存柟寮�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> - <a-col :span="6"> + </a-row> + <a-row> + <a-col :span="6"> <a-form-model-item label="铻虹汗鏍囧噯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadStandard"> <a-input v-model="model.threadStandard" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ灪绾规爣鍑�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> - </a-row> - <a-row> <a-col :span="6"> <a-form-model-item label="鎺掑睉妲藉瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fluteSoltType"> <a-input v-model="model.fluteSoltType" :placeholder="disableSubmit?'':'璇疯緭鍏ユ帓灞戞Ы鍨�'" :disabled="disableSubmit" ></a-input> @@ -327,13 +350,13 @@ <a-input v-model="model.guidingSize" :placeholder="disableSubmit?'':'璇疯緭鍏ュ鍚戝昂瀵�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> + </a-row> + <a-row> <a-col :span="6"> <a-form-model-item label="杩炴帴瀛斿緞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="connectionAperture"> <a-input v-model="model.connectionAperture" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ繛鎺ュ瓟寰�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> - </a-row> - <a-row> <a-col :span="6"> <a-form-model-item label="杩炴帴閿Ы" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="connectingKeyway"> <a-input v-model="model.connectingKeyway" :placeholder="disableSubmit?'':'璇疯緭鍏ヨ繛鎺ラ敭妲�'" :disabled="disableSubmit" ></a-input> @@ -445,8 +468,13 @@ url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, - locationCodeOptions:[] + locationCodeOptions:[], + chineseNameChange1:'', + toolModelChange1:'', + threadCodeChange1:'', + pitchChange1:'', } }, created() { @@ -466,7 +494,7 @@ this.editable = false; //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -477,12 +505,25 @@ edit(record) { this.editable = true; this.model = Object.assign({}, record) + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: record.toolCodeId, + paraTypeFlag: record.paraTypeFlag, + }).then((res) => { + if (res.success) { + this.model = Object.assign({}, res.result) + } + }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.threadCodeChange1 = '', + this.pitchChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -556,6 +597,22 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1 + }, + threadCodeChange(threadCodeChange){ + this.threadCodeChange1 = threadCodeChange == '' ? '' : '-'+threadCodeChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1 + }, + pitchChange(pitchChange){ + this.pitchChange1 = pitchChange == '' ? '' : '-'+pitchChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.threadCodeChange1+this.pitchChange1 + } } } </script> diff --git a/src/views/tms/modules/baseTools/ParaThreadingToolSearchModal.vue b/src/views/tms/modules/baseTools/ParaThreadingToolSearchModal.vue new file mode 100644 index 0000000..a916f3b --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaThreadingToolSearchModal.vue @@ -0,0 +1,264 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + centered + :confirmLoading="confirmLoading" + switchFullscreen + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input :placeholder="'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input :placeholder="'璇疯緭鍏ュ鏂囧悕绉�'" v-model="model.foreignLanguageName" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="shortCalled" label="宸ュ叿绠�绉�"> + <a-input + :placeholder="'璇疯緭鍏ュ伐鍏风畝绉�'" + v-model="model.shortCalled" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="groupCompanyCode" label="闆嗗洟鍏徃缂栫爜"> + <a-input + :placeholder="'璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + v-model="model.groupCompanyCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="standardLevel" label="鏍囧噯绾у埆"> + <a-input :placeholder="'璇疯緭鍏ユ爣鍑嗙骇鍒�'" v-model="model.standardLevel" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input :placeholder="'璇疯緭鍏ユ爣鍑嗗彿'" v-model="model.standardCode" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input :placeholder="'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="铻虹汗浠e彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="threadCode"> + <a-input v-model="model.threadCode" :placeholder="'璇疯緭鍏ヨ灪绾逛唬鍙�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="铻鸿窛" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pitch"> + <a-input v-model="model.pitch" :placeholder="'璇疯緭鍏ヨ灪璺�'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="铻虹汗鏃嬪悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rotationDirection"> + <a-input v-model="model.rotationDirection" :placeholder="'璇疯緭鍏ヨ灪绾规棆鍚�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="铻虹汗鍏樊甯︿唬鍙�/绮惧害绛夌骇" + :labelCol="{span:12}" + :wrapperCol="{span:10}" + prop="tolerancezoneLevel" + > + <a-input v-model="model.tolerancezoneLevel" :placeholder="'璇疯緭鍏ヨ灪绾瑰叕宸甫浠e彿/绮惧害绛夌骇'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鍒冮暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="edgeLength"> + <a-input v-model="model.edgeLength" :placeholder="'璇疯緭鍏ュ垏鍓婂垉闀�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input v-model="model.totalLength" :placeholder="'璇疯緭鍏ュ垁鍏锋�婚暱'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group v-model="model.paintcoatFlag" :placeholder="'璇烽�夋嫨鏄惁娑傚眰'"> + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input v-model="model.toolMaterial" :placeholder="'璇疯緭鍏ュ垁鍏锋潗鏂�'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input v-model="model.partMaterial" :placeholder="'璇疯緭鍏ラ浂浠舵潗鏂�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="澶栧瀷灏哄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalDimensions"> + <a-input v-model="model.externalDimensions" :placeholder="'璇疯緭鍏ュ鍨嬪昂瀵�'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="鏌勯儴瑙勬牸" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="handleSpecifications" + > + <a-input v-model="model.handleSpecifications" :placeholder="'璇疯緭鍏ユ焺閮ㄨ鏍�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input v-model="model.technicalConditions" :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'"></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input v-model="model.conditionsInfo" :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'"></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + <template slot="footer"> + <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-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button> + </template> + </j-modal> +</template> + +<script> +export default { + name: 'ParaHoleToolsSearchModal', + data() { + return { + title: '宸ュ叿淇℃伅-楂樼骇鏌ヨ', + visible: false, + confirmLoading: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 }, + }, + searchParams: {}, + } + }, + created() {}, + mounted() {}, + methods: { + show() { + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + + searchQuery() { + this.searchParams.chineseName = this.model.chineseName + this.searchParams.foreignLanguageName = this.model.foreignLanguageName + this.searchParams.threadCode = this.model.threadCode + this.searchParams.pitch = this.model.pitch + this.searchParams.rotationDirection = this.model.rotationDirection + this.searchParams.tolerancezoneLevel = this.model.tolerancezoneLevel + this.searchParams.edgeLength = this.model.edgeLength + this.searchParams.totalLength = this.model.totalLength + this.searchParams.toolMaterial = this.model.toolMaterial + this.searchParams.partMaterial = this.model.partMaterial + this.searchParams.paintcoatFlag = this.model.paintcoatFlag + this.searchParams.externalDimensions = this.model.externalDimensions + this.searchParams.handleSpecifications = this.model.handleSpecifications + this.searchParams.technicalConditions = this.model.technicalConditions + this.searchParams.conditionsInfo = this.model.conditionsInfo + this.searchParams.toolModel = this.model.toolModel + this.searchParams.shortCalled = this.model.shortCalled + this.searchParams.groupCompanyCode = this.model.groupCompanyCode + this.close() + this.$emit('searchParams', this.searchParams) + }, + searchReset() { + this.model = {} + }, + }, +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsList.vue b/src/views/tms/modules/baseTools/ParaTurningToolsList.vue index e9f14aa..dc244a4 100644 --- a/src/views/tms/modules/baseTools/ParaTurningToolsList.vue +++ b/src/views/tms/modules/baseTools/ParaTurningToolsList.vue @@ -3,6 +3,9 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿鍙傛暟璇︽儏"> + <a-descriptions-item label="宸ュ叿绠�绉�">{{ this.para == null || this.para.shortCalled == null ? '' : this.para.shortCalled }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃缂栫爜">{{ this.para == null || this.para.groupCompanyCode == null ? '' : this.para.groupCompanyCode }}</a-descriptions-item> + <a-descriptions-item label="闆嗗洟鍏徃鏍囪">{{ this.para == null || this.para.groupCompanySign == null ? '' : this.para.groupCompanySign }}</a-descriptions-item> <a-descriptions-item label="鍒�澶磋鏍�">{{ this.para == null || this.para.headSpecifications == null ? '' : this.para.headSpecifications }}</a-descriptions-item> <a-descriptions-item label="閰嶅鍒�鐗囧彿">{{ this.para == null || this.para.matchingNumber == null ? '' : this.para.matchingNumber }}</a-descriptions-item> <a-descriptions-item label="涓诲亸瑙�">{{ this.para == null || this.para.leadAngle == null ? '' : this.para.leadAngle }}</a-descriptions-item> @@ -11,7 +14,7 @@ <a-descriptions-item label="鍒�鍏锋�婚暱">{{ this.para == null || this.para.totalLength == null ? '' : this.para.totalLength }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏锋潗鏂�">{{ this.para == null || this.para.toolMaterial == null ? '' : this.para.toolMaterial }}</a-descriptions-item> <a-descriptions-item label="闆朵欢鏉愭枡">{{ this.para == null || this.para.partMaterial == null ? '' : this.para.partMaterial }}</a-descriptions-item> - <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag }}</a-descriptions-item> + <a-descriptions-item label="鏄惁娑傚眰">{{ this.para == null || this.para.paintcoatFlag == null ? '' : this.para.paintcoatFlag == '1' ? '鏄�' : '鍚�' }}</a-descriptions-item> <a-descriptions-item label="鍒�鍏峰瀷寮�">{{ this.para == null || this.para.toolPattern == null ? '' : this.para.toolPattern }}</a-descriptions-item> <a-descriptions-item label="鍐峰嵈鏂瑰紡">{{ this.para == null || this.para.coolingMethod == null ? '' : this.para.coolingMethod }}</a-descriptions-item> <a-descriptions-item label="闄勫姞鎶�鏈潯浠�">{{ this.para == null || this.para.technicalConditions == null ? '' : this.para.technicalConditions }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue index 6cd8e17..a42c541 100644 --- a/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue +++ b/src/views/tms/modules/baseTools/ParaTurningToolsModal.vue @@ -59,7 +59,7 @@ <a-col :span="24"> <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit"/> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヤ腑鏂囧悕绉�'" v-model="model.chineseName" :disabled="disableSubmit" @change="e => chineseNameChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -75,7 +75,7 @@ <a-col :span="24"> <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" /> + <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" v-model="model.toolModel" :disabled="disableSubmit" @change="e => toolModelChange(e.target.value)"/> </a-form-model-item> </a-col> </a-row> @@ -124,7 +124,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -157,11 +157,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -171,9 +166,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> @@ -182,6 +174,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -192,14 +187,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> @@ -214,11 +209,38 @@ <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 鍙傛暟淇℃伅 </a-divider> - + <a-row :gutter="24"> + <a-col :span="6"> + <a-form-model-item label="宸ュ叿绠�绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shortCalled"> + <a-input + v-model="model.shortCalled" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ュ伐鍏风畝绉�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="6"> + <a-form-model-item label="闆嗗洟鍏徃缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupCompanyCode"> + <a-input + v-model="model.groupCompanyCode" + :placeholder="disableSubmit ? '' : '璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + :disabled="disableSubmit" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="闆嗗洟鍏徃鏍囪" :labelCol="{span:4}" :wrapperCol="{span:20}" prop="groupCompanySign"> + <a-input + v-model="model.groupCompanySign" + :disabled="true" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> <a-row :gutter="24"> <a-col :span="6"> <a-form-model-item label="鍒�澶磋鏍�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headSpecifications"> - <a-input v-model="model.headSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶磋鏍�'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.headSpecifications" :placeholder="disableSubmit?'':'璇疯緭鍏ュ垁澶磋鏍�'" :disabled="disableSubmit" @change="e => headSpecificationsChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -228,7 +250,7 @@ </a-col> <a-col :span="6"> <a-form-model-item label="涓诲亸瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leadAngle"> - <a-input v-model="model.leadAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚'" :disabled="disableSubmit"></a-input> + <a-input v-model="model.leadAngle" :placeholder="disableSubmit?'':'璇疯緭鍏ヤ富鍋忚'" :disabled="disableSubmit" @change="e => leadAngleChange(e.target.value)"></a-input> </a-form-model-item> </a-col> <a-col :span="6"> @@ -281,7 +303,7 @@ </a-form-model-item> </a-col> <a-col :span="6"> - <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditionsInfo"> + <a-form-model-item label="闄勫姞鎶�鏈潯浠惰鏄�" :labelCol="{span:12}" :wrapperCol="{span:12}" prop="conditionsInfo"> <a-input v-model="model.conditionsInfo" :placeholder="disableSubmit?'':'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" :disabled="disableSubmit" ></a-input> </a-form-model-item> </a-col> @@ -523,8 +545,13 @@ url: { add: '/tms/baseTools/add', edit: '/tms/baseTools/edit', + queryParaByToolCode: '/tms/baseTools/queryByToolCode', }, - locationCodeOptions:[] + locationCodeOptions:[], + chineseNameChange1:'', + toolModelChange1:'', + headSpecificationsChange1:'', + leadAngleChange1:'', } }, mounted() { @@ -544,7 +571,7 @@ this.editable = false; //鍒濆鍖栭粯璁ゅ�� this.model = { - positionCode: '' + positionCode: '' }; this.model.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId @@ -555,12 +582,25 @@ edit(record) { this.editable = true; this.model = Object.assign({}, record) + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { + toolCode: record.toolCodeId, + paraTypeFlag: record.paraTypeFlag, + }).then((res) => { + if (res.success) { + this.model = Object.assign({}, res.result) + } + }) this.visible = true }, close() { this.$emit('close') this.visible = false this.$refs.form.clearValidate() + this.chineseNameChange1 = '', + this.toolModelChange1 = '', + this.headSpecificationsChange1 = '', + this.leadAngleChange1 = '' }, positionCodeSearch() { let positionCode = [] @@ -634,6 +674,22 @@ } }) }, + chineseNameChange(chineseNameChange){ + this.chineseNameChange1 = chineseNameChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + toolModelChange(toolModelChange){ + this.toolModelChange1 = toolModelChange == '' ? '' : '-'+toolModelChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + headSpecificationsChange(headSpecificationsChange){ + this.headSpecificationsChange1 = headSpecificationsChange == '' ? '' : '-'+headSpecificationsChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + }, + leadAngleChange(leadAngleChange){ + this.leadAngleChange1 = leadAngleChange == '' ? '' : '-'+leadAngleChange + this.model.groupCompanySign = this.chineseNameChange1+this.toolModelChange1+this.headSpecificationsChange1+this.leadAngleChange1 + } } } </script> diff --git a/src/views/tms/modules/baseTools/ParaTurningToolsSearchModal.vue b/src/views/tms/modules/baseTools/ParaTurningToolsSearchModal.vue new file mode 100644 index 0000000..f0b7392 --- /dev/null +++ b/src/views/tms/modules/baseTools/ParaTurningToolsSearchModal.vue @@ -0,0 +1,319 @@ +<template> + <j-modal + :title="title" + :width="800" + :visible="visible" + centered + :confirmLoading="confirmLoading" + switchFullscreen + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="chineseName" label="涓枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ヤ腑鏂囧悕绉�'" + v-model="model.chineseName" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="foreignLanguageName" label="澶栨枃鍚嶇О"> + <a-input + :placeholder="'璇疯緭鍏ュ鏂囧悕绉�'" + v-model="model.foreignLanguageName" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="shortCalled" label="宸ュ叿绠�绉�"> + <a-input + :placeholder="'璇疯緭鍏ュ伐鍏风畝绉�'" + v-model="model.shortCalled" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="groupCompanyCode" label="闆嗗洟鍏徃缂栫爜"> + <a-input + :placeholder="'璇疯緭鍏ラ泦鍥㈠叕鍙哥紪鐮�'" + v-model="model.groupCompanyCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="standardLevel" label="鏍囧噯绾у埆"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗙骇鍒�'" + v-model="model.standardLevel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="standardCode" label="鏍囧噯鍙�"> + <a-input + :placeholder="'璇疯緭鍏ユ爣鍑嗗彿'" + v-model="model.standardCode" + /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="toolModel" label="鍨嬪彿/鍥惧彿"> + <a-input + :placeholder="'璇疯緭鍏ュ瀷鍙�/鍥惧彿'" + v-model="model.toolModel" + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�澶磋鏍�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headSpecifications"> + <a-input + v-model="model.headSpecifications" + :placeholder="'璇疯緭鍏ュ垁澶磋鏍�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="閰嶅鍒�鐗囧彿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="matchingNumber"> + <a-input + v-model="model.matchingNumber" + :placeholder="'璇疯緭鍏ラ厤濂楀垁鐗囧彿'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="涓诲亸瑙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leadAngle"> + <a-input + v-model="model.leadAngle" + :placeholder="'璇疯緭鍏ヤ富鍋忚'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋�婚暱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalLength"> + <a-input + v-model="model.totalLength" + :placeholder="'璇疯緭鍏ュ垁鍏锋�婚暱'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏锋潗鏂�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolMaterial"> + <a-input + v-model="model.toolMaterial" + :placeholder="'璇疯緭鍏ュ垁鍏锋潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="闆朵欢鏉愭枡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partMaterial"> + <a-input + v-model="model.partMaterial" + :placeholder="'璇疯緭鍏ラ浂浠舵潗鏂�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏄惁娑傚眰" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paintcoatFlag"> + <a-radio-group + v-model="model.paintcoatFlag" + :placeholder="'璇烽�夋嫨鏄惁娑傚眰'" + > + <a-radio :value="'1'">鏄�</a-radio> + <a-radio :value="'2'">鍚�</a-radio> + </a-radio-group> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒�鍏峰瀷寮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolPattern"> + <a-input + v-model="model.toolPattern" + :placeholder="'璇疯緭鍏ュ垁鍏峰瀷寮�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="鍒�鍏锋埅闈㈠昂瀵�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="crossSectionalSize" + > + <a-input + v-model="model.crossSectionalSize" + :placeholder="'璇疯緭鍏ュ垁鍏锋埅闈㈠昂瀵�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍒囧墛鏂瑰悜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuttingDirection"> + <a-input + v-model="model.cuttingDirection" + :placeholder="'璇疯緭鍏ュ垏鍓婃柟鍚�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鍐峰嵈鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="coolingMethod"> + <a-input + v-model="model.coolingMethod" + :placeholder="'璇疯緭鍏ュ喎鍗存柟寮�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="technicalConditions" + > + <a-input + v-model="model.technicalConditions" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠�'" + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item + label="闄勫姞鎶�鏈潯浠惰鏄�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="conditionsInfo" + > + <a-input + v-model="model.conditionsInfo" + :placeholder="'璇疯緭鍏ラ檮鍔犳妧鏈潯浠惰鏄�'" + ></a-input> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + <template slot="footer"> + <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-button :style="{ marginRight: '8px' }" @click="handleCancel">鍏抽棴</a-button> + </template> + </j-modal> +</template> + +<script> + +export default { + name: 'ParaHoleToolsSearchModal', + data() { + return { + title: '宸ュ叿淇℃伅-楂樼骇鏌ヨ', + visible: false, + confirmLoading: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 9 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 }, + }, + searchParams:{} + } + }, + created() { + }, + mounted() { + + }, + methods: { + show() { + this.visible = true + }, + close() { + this.$emit('close') + this.visible = false + }, + handleCancel() { + this.close() + }, + + searchQuery(){ + this.searchParams.chineseName = this.model.chineseName + this.searchParams.foreignLanguageName = this.model.foreignLanguageName + this.searchParams.standardLevel = this.model.standardLevel + this.searchParams.standardCode = this.model.standardCode + this.searchParams.headSpecifications = this.model.headSpecifications + this.searchParams.matchingNumber = this.model.matchingNumber + this.searchParams.leadAngle = this.model.leadAngle + this.searchParams.totalLength = this.model.totalLength + this.searchParams.toolMaterial = this.model.toolMaterial + this.searchParams.partMaterial = this.model.partMaterial + this.searchParams.paintcoatFlag = this.model.paintcoatFlag + this.searchParams.toolPattern = this.model.toolPattern + this.searchParams.crossSectionalSize = this.model.crossSectionalSize + this.searchParams.coolingMethod = this.model.coolingMethod + this.searchParams.cuttingDirection = this.model.cuttingDirection + this.searchParams.technicalConditions = this.model.technicalConditions + this.searchParams.conditionsInfo = this.model.conditionsInfo + this.searchParams.toolModel = this.model.toolModel + this.searchParams.shortCalled = this.model.shortCalled + this.searchParams.groupCompanyCode = this.model.groupCompanyCode + this.close() + this.$emit('searchParams',this.searchParams) + }, + searchReset(){ + this.model = {} + } + }, +} +</script> + +<style lang="less" scoped> +/deep/ .ant-modal-body { + padding: 0 24px; +} + +/deep/ .ant-upload { + width: 185px; + height: 185px; +} + +/deep/ .img { + display: flex; + justify-content: center; + + .ant-upload-picture-card-wrapper { + width: auto; + } +} + +/deep/ .ant-upload-list-picture-card-container { + width: 185px; + height: 185px; +} + +/deep/ .ant-upload-list-item { + width: 185px; + height: 185px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue b/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue index 85df2cf..566cbd7 100644 --- a/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue +++ b/src/views/tms/modules/baseTools/ToolsConfigPropertyList.vue @@ -3,13 +3,12 @@ <!-- 褰撳墠椤甸潰涓氬姟閮ㄥ垎 --> <a-card :bordered="false" :title="title" v-show="visable"> <a-descriptions title="宸ュ叿绠$悊鍙傛暟璇︽儏"> - <a-descriptions-item label="宸ュ叿绫诲瀷">{{ this.para == null || this.para.applicationType == null ? '' : this.para.applicationType }}</a-descriptions-item> + <a-descriptions-item label="宸ュ叿绫诲瀷">{{ this.para == null || this.para.applicationType == null ? '' : this.para.applicationType == '1' ? '閫氱敤宸ュ叿' : '涓撶敤宸ュ叿' }}</a-descriptions-item> <a-descriptions-item label="鏍囧噯绾у埆">{{ this.para == null || this.para.standardLevel == null ? '' : this.para.standardLevel }}</a-descriptions-item> <a-descriptions-item label="鏍囧噯鍙�">{{ this.para == null || this.para.standardCode == null ? '' : this.para.standardCode }}</a-descriptions-item> <a-descriptions-item label="鍘傚">{{ this.para == null || this.para.supplierId == null ? '' : this.para.supplierId }}</a-descriptions-item> <a-descriptions-item label="浠撳簱鐪佷唤鍩庡競">{{ this.para == null || this.para.provinceCity == null ? '' : this.para.provinceCity }}</a-descriptions-item> <a-descriptions-item label="搴撲綅鍙�">{{ this.para == null || this.para.positionCode == null ? '' : this.para.positionCode }}</a-descriptions-item> - <a-descriptions-item label="瀛樺偍浣嶇疆">{{ this.para == null || this.para.storageLocation == null ? '' : this.para.storageLocation }}</a-descriptions-item> <a-descriptions-item label="璁¢噺涓诲崟浣�">{{ this.para == null || this.para.mainUnit == null ? '' : this.para.mainUnit }}</a-descriptions-item> <a-descriptions-item label="璁¢噺杈呭崟浣�">{{ this.para == null || this.para.auxiliaryUnit == null ? '' : this.para.auxiliaryUnit }}</a-descriptions-item> <a-descriptions-item label="鍗曚环">{{ this.para == null || this.para.price == null ? '' : this.para.price }}</a-descriptions-item> diff --git a/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue index d0a3225..a68ea28 100644 --- a/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue +++ b/src/views/tms/modules/baseTools/ToolsConfigPropertyModal.vue @@ -123,7 +123,7 @@ <a-col :span="8"> <a-form-model-item prop="applicationType" label="宸ュ叿绫诲瀷"> - <j-dict-select-tag dict-code="equipment_category" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" + <j-dict-select-tag dict-code="application_type" :placeholder="disableSubmit?'':'璇烽�夋嫨宸ュ叿绫诲瀷'" v-model="model.applicationType" :disabled="disableSubmit" /> </a-form-model-item> </a-col> @@ -141,11 +141,6 @@ <a-row :gutter="24"> <a-col :span="8"> - <a-form-model-item prop="storageLocation" label="瀛樺偍浣嶇疆"> - <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ瓨鍌ㄤ綅缃�'" v-model="model.storageLocation" :disabled="disableSubmit"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> <a-form-model-item prop="lowerInventory" label="鏈�浣庡簱瀛�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶浣庡簱瀛�'" v-model="model.lowerInventory" :disabled="disableSubmit"/> </a-form-model-item> @@ -155,9 +150,6 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ユ渶楂樺簱瀛�'" v-model="model.highestInventory" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="auxiliaryUnitFlag" label="鏄惁鏈夎閲忚緟鍗曚綅"> <a-radio-group v-model="model.auxiliaryUnitFlag" :placeholder="disableSubmit?'':'璇烽�夋嫨鏄惁鏈夎閲忚緟鍗曚綅'" :disabled="disableSubmit"> @@ -166,6 +158,9 @@ </a-radio-group> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="mainUnit" label="璁¢噺涓诲崟浣�"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忎富鍗曚綅'" v-model="model.mainUnit" :disabled="disableSubmit"/> @@ -176,14 +171,14 @@ <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ヨ閲忚緟鍗曚綅'" v-model="model.auxiliaryUnit" :disabled="disableSubmit"/> </a-form-model-item> </a-col> - </a-row> - - <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="supplierId" label="鍘傚"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ巶瀹�'" v-model="model.supplierId" :disabled="disableSubmit"/> </a-form-model-item> </a-col> + </a-row> + + <a-row :gutter="24"> <a-col :span="8"> <a-form-model-item prop="price" label="鍗曚环"> <a-input :placeholder="disableSubmit?'':'璇疯緭鍏ュ崟浠�'" v-model="model.price" :disabled="disableSubmit"/> diff --git a/src/views/tms/modules/inbound/InboundListRight.vue b/src/views/tms/modules/inbound/InboundListRight.vue index be65891..6735275 100644 --- a/src/views/tms/modules/inbound/InboundListRight.vue +++ b/src/views/tms/modules/inbound/InboundListRight.vue @@ -9,7 +9,7 @@ :sm="8" > <a-form-item - label="宸ュ叿缂栧彿" + label="宸ュ叿缂栫爜" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}" > @@ -99,23 +99,14 @@ </a-button> </template> - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + <span + slot="action" + slot-scope="text, record" + > + <a + href="javascript:;" + @click="handlePrint(record)" + >鎵撳嵃浜岀淮鐮�</a> </span> </a-table> @@ -147,6 +138,13 @@ <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model> <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list> + <div id="printArea" style="display: block;"> + <div v-for="(item, index) in qrList" :key="index" class="qrcode-item"> + <p>{{ item.onlyCode }}</p> + <p>{{ item.toolName }}</p> + <img :src="item.base64" alt="QR Code"> + </div> + </div> </a-card> </template> @@ -166,6 +164,7 @@ import ParaBladeList from '.././baseTools/ParaBladeList' import InboundModel from './InboundModel' import InboundApplyModelList from './InboundApplyModelList.vue' + import printJS from 'print-js'; export default { name: 'InboundListRight', @@ -258,14 +257,14 @@ return !text?"":(text.length>10?text.substr(0,10):text) } }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align:"center", - // fixed:"right", - // width:147, - // scopedSlots: { customRender: 'action' } - // } + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } ], url: { list: "/tms/inStoreDetail/list", @@ -281,13 +280,15 @@ exportXlsUrl: "/tms/baseTools/exportXls", importExcelUrl: "tms/baseTools/importExcel", queryParaByToolCode:"/tms/baseTools/queryByToolCode", - queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode" + queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode", + print:'/tms/inStoreDetail/print' }, dictOptions:{}, superFieldList:[], nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� paraTypeFlag:'', - disableMixinCreated:true + disableMixinCreated:true, + qrList: [] } }, created() { @@ -350,6 +351,7 @@ }, onSelectChange(selectedRowKeys,selectionRows) { + this.qrList = [] this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� @@ -527,7 +529,47 @@ this.$refs.paraTurningToolsList.visable = false this.$refs.paraBladeList.visable = false this.$refs.toolsConfigPropertyList.visable = false - } + }, + handlePrint(record){ + this.loading = true + getAction(this.url.print, {onlyCode:record.onlyCode}) + .then((res) => { + if (res.success) { + this.qrList = res.result.map((content, i) => ({ + onlyCode:res.result[i].onlyCode, + toolName:res.result[i].toolName, + base64: res.result[i].image + })); + this.handleBacthPrint(); + this.$emit('ok', new Date()) + } else { + this.$message.warning(res.message) + } + }) + .finally(() => { + this.loading = false + this.close() + this.qrList = [] + }) + }, + // 鎵ц鎵撳嵃 + handleBacthPrint() { + this.$nextTick(() => { + printJS({ + printable: 'printArea', + type: 'html', + style: ` + .qrcode-item { + page-break-inside: avoid; + margin: 10px; + text-align: center; + } + img { width: 100px; height: 100px; } + `, + scanStyles: false + }); + }); + } }, } diff --git a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue index bd76e80..049dc6f 100644 --- a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue +++ b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue @@ -20,13 +20,13 @@ </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 label="鏍囪"> + <a-input placeholder="璇疯緭鍏ユ爣璁�,鏀寔妯$硦鏌ヨ" v-model="queryParam.groupCompanySign"></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 label="宸ュ叿绠�绉�"> + <a-input placeholder="璇疯緭鍏ュ伐鍏风畝绉�" v-model="queryParam.shortCalled"></a-input> </a-form-item> </a-col> @@ -90,6 +90,16 @@ dataIndex: 'chineseName', }, { + title: '宸ュ叿绠�绉�', + align: 'center', + dataIndex: 'shortCalled', + }, + { + title: '鏍囪', + align: 'center', + dataIndex: 'groupCompanySign', + }, + { title: '搴撲綅鍙�', align: 'center', dataIndex: 'positionCode', @@ -132,7 +142,7 @@ loading: false, url: { // list: '/base/tooling/list', - list: '/tms/baseTools/paraCommonToolList', + list: '/tms/baseTools/selectToolList', }, } }, diff --git a/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue b/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue index db9be59..ea3a476 100644 --- a/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue +++ b/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue @@ -19,6 +19,16 @@ <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.groupCompanySign"></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.shortCalled"></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> @@ -74,15 +84,31 @@ dataIndex: 'toolId' }, { - title:'鍙敤搴撳瓨鏁伴噺', + title:'鍨嬪彿/鍥惧彿', align:"center", - dataIndex: 'quantity' + dataIndex: 'toolModel' }, { - title:'鎵�鍦ㄤ粨搴�', + title:'宸ュ叿绠�绉�', align:"center", - dataIndex: 'warehouseName' + dataIndex: 'shortCalled' }, + { + title:'鏍囪', + align:"center", + dataIndex: 'groupCompanySign' + }, + + // { + // title:'鍙敤搴撳瓨鏁伴噺', + // align:"center", + // dataIndex: 'quantity' + // }, + // { + // title:'鎵�鍦ㄤ粨搴�', + // align:"center", + // dataIndex: 'warehouseName' + // }, { title:'鎵�鍦ㄥ簱浣嶅彿', align:"center", @@ -127,7 +153,7 @@ loading: false, prepareKnifeDetailList:[], url: { - list: '/tms/outboundOrder/selectBorrowOutboundToolPageList' + list: '/tms/outboundOrder/selectBorrowToolPageList' }, } }, diff --git a/src/views/tms/modules/toolLedger/ToolLedgerDetailList.vue b/src/views/tms/modules/toolLedger/ToolLedgerDetailList.vue index 60432f6..13903e7 100644 --- a/src/views/tms/modules/toolLedger/ToolLedgerDetailList.vue +++ b/src/views/tms/modules/toolLedger/ToolLedgerDetailList.vue @@ -60,7 +60,7 @@ { title: '宸ュ叿鍒嗙被', - dataIndex: 'applicationType', + dataIndex: 'typeName', align: 'center', } ], diff --git a/src/views/tms/modules/toolLedger/ToolLedgerListLeft.vue b/src/views/tms/modules/toolLedger/ToolLedgerListLeft.vue index 4c6c91e..e3ff18c 100644 --- a/src/views/tms/modules/toolLedger/ToolLedgerListLeft.vue +++ b/src/views/tms/modules/toolLedger/ToolLedgerListLeft.vue @@ -241,7 +241,7 @@ //鐩戝惉 watch: { currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 - this.$bus.$emit('getCurrSelected', val) + this.$bus.$emit('getToolLedgerListSelected', val) }, } } diff --git a/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue b/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue index 6a257e2..071f244 100644 --- a/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue +++ b/src/views/tms/modules/toolLedger/ToolLedgerListRight.vue @@ -38,6 +38,21 @@ <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-button + type="primary" + @click="searchHeightQuery" + icon="search" + style="margin-left: 8px" + :disabled=" + !nodeSelected.key || + nodeSelected.entity.leafFlag === '2' || + (this.paraTypeFlag != '2' && + this.paraTypeFlag != '3' && + this.paraTypeFlag != '4' && + this.paraTypeFlag != '5' && + this.paraTypeFlag != '6') + " + >楂樼骇鏌ヨ</a-button> </span> </a-col> @@ -171,6 +186,23 @@ <stocktaking-list ref="stocktakingList"></stocktaking-list> </a-tab-pane> </a-tabs> + <para-hole-tools-search-modal + ref="paraHoleToolsSearchModal" + @searchParams="paraHoleToolsOk" + ></para-hole-tools-search-modal> + <para-turning-tools-search-modal + ref="paraTurningToolsSearchModal" + @searchParams="paraTurningToolsOk" + ></para-turning-tools-search-modal> + <para-threading-tool-search-modal + ref="paraThreadingToolSearchModal" + @searchParams="paraThreadingToolOk" + ></para-threading-tool-search-modal> + <para-mill-tool-search-modal + ref="paraMillToolSearchModal" + @searchParams="paraMillToolOk" + ></para-mill-tool-search-modal> + <para-blade-search-modal ref="paraBladeSearchModal" @searchParams="paraBladeOk"></para-blade-search-modal> </a-card> </template> @@ -194,6 +226,11 @@ import StocktakingList from './StocktakingList' import InStoreDetailList from './InStoreDetailList' import OutStoreDetailList from './OutStoreDetailList' + import ParaHoleToolsSearchModal from '../baseTools/ParaHoleToolsSearchModal' +import ParaMillToolSearchModal from '../baseTools/ParaMillToolSearchModal' +import ParaThreadingToolSearchModal from '../baseTools/ParaThreadingToolSearchModal' +import ParaTurningToolsSearchModal from '../baseTools/ParaTurningToolsSearchModal' +import ParaBladeSearchModal from '../baseTools/ParaBladeSearchModal' export default { name: 'ToolLedgerListRight', @@ -212,7 +249,12 @@ ToolSharpenList, StocktakingList, InStoreDetailList, - OutStoreDetailList + OutStoreDetailList, + ParaHoleToolsSearchModal, + ParaMillToolSearchModal, + ParaThreadingToolSearchModal, + ParaTurningToolsSearchModal, + ParaBladeSearchModal, }, data () { return { @@ -282,15 +324,15 @@ dataIndex: 'applicationType' }, { - title:'绠$悊绛夌骇', + title:'绮惧害绛夌骇', align:"center", - dataIndex: 'accuracyClass' + dataIndex: 'accuracyClassName' }, - { - title:'瀛樺偍浣嶇疆', - align:"center", - dataIndex: 'storageLocation' - }, + // { + // title:'瀛樺偍浣嶇疆', + // align:"center", + // dataIndex: 'storageLocation' + // }, { title:'搴撲綅鍙�', align:"center", @@ -386,12 +428,12 @@ } }, created() { - this.$bus.$on('getCurrSelected', (data) => { - //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 + this.$bus.$on('getToolLedgerListSelected', (data) => { + //getToolLedgerListSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 this.nodeType = (data.type == undefined ? 0 : data.type); this.paraTypeFlag = (data.entity == undefined ? 0 : data.entity.paraTypeFlag) this.nodeSelected = data; - this.loadData() + this.loadData(1) this.clearPara() }) }, @@ -403,35 +445,66 @@ methods: { modalFormOk() { - this.loadData(); // 鍒锋柊琛ㄦ牸鏁版嵁 + this.loadData(1); // 鍒锋柊琛ㄦ牸鏁版嵁 this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� }, onSelectChange(selectedRowKeys,selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows - console.log("22222",selectedRowKeys) //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� - getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { + getAction(this.url.queryParaByToolCode, { toolCode: this.selectionRows[0].toolCodeId,paraTypeFlag:this.selectionRows[0].paraTypeFlag}).then((res) => { if (res.success) { - if(this.paraTypeFlag === "1"){ + if(this.selectionRows[0].paraTypeFlag === "1"){ this.$refs.paraCommonToolList.getPara(res.result); - }else if(this.paraTypeFlag === "2"){ + //闅愯棌鍏朵粬绫诲瀷鍙傛暟 + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + }else if(this.selectionRows[0].paraTypeFlag === "2"){ this.$refs.paraHoleToolsList.getPara(res.result); - }else if(this.paraTypeFlag === "3"){ + this.$refs.paraCommonToolList.visable = false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + }else if(this.selectionRows[0].paraTypeFlag === "3"){ this.$refs.paraThreadingToolList.getPara(res.result); - }else if(this.paraTypeFlag === "4"){ + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + }else if(this.selectionRows[0].paraTypeFlag === "4"){ this.$refs.paraMillToolList.getPara(res.result); - }else if(this.paraTypeFlag === "5"){ + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + }else if(this.selectionRows[0].paraTypeFlag === "5"){ this.$refs.paraTurningToolsList.getPara(res.result); - }else if(this.paraTypeFlag === "6"){ + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraBladeList.visable = false + }else if(this.selectionRows[0].paraTypeFlag === "6"){ this.$refs.paraBladeList.getPara(res.result); + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable =false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false } } else { this.$message.warning(res.message); } }) - getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { + getAction(this.url.queryByToolCode, { toolCode: this.selectionRows[0].toolCodeId}).then((res) => { if (res.success) { this.$refs.toolsConfigPropertyList.getPara(res.result); } else { @@ -447,7 +520,11 @@ } return ""; }, - loadData() { + loadData(arg) { + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } let params = this.getQueryParams(); if (this.nodeSelected && this.nodeSelected.key !== '-1') { // 鍔犺浇閫変腑鑺傜偣鐨勫瓙绫� @@ -461,8 +538,8 @@ this.ipagination.total = res.result.total //榛樿閫変腑绗竴鏉℃暟鎹� this.selectedRowKeys[0] = res.result.records[0].id + this.selectionRows[0] = res.result.records[0] this.onSelectChange(this.selectedRowKeys,this.selectionRows) - console.log("1111111",this.selectedRowKeys,this.selectionRows) } else { //this.$message.warning("璇烽�夋嫨鍙跺瓙鑺傜偣杩涜鏌ヨ"); this.ipagination.total = 0 @@ -506,7 +583,130 @@ } } }, - + searchHeightQuery() { + if (this.paraTypeFlag === '2') { + this.$refs.paraHoleToolsSearchModal.show() + } else if (this.paraTypeFlag === '3') { + this.$refs.paraThreadingToolSearchModal.show() + } else if (this.paraTypeFlag === '4') { + this.$refs.paraMillToolSearchModal.show() + } else if (this.paraTypeFlag === '5') { + this.$refs.paraTurningToolsSearchModal.show() + } else if (this.paraTypeFlag === '6') { + this.$refs.paraBladeSearchModal.show() + } + }, + paraHoleToolsOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.diameter = data.diameter + this.queryParam.coneAngle = data.coneAngle + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.handleSpecifications = data.handleSpecifications + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.bladeCount = data.bladeCount + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData(1) + }, + paraBladeOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.bladeShape = data.bladeShape + this.queryParam.bladeLength = data.bladeLength + this.queryParam.cuttingEdgeCount = data.cuttingEdgeCount + this.queryParam.bladeThickness = data.bladeThickness + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.clampingType = data.clampingType + this.queryParam.noseAngleR = data.noseAngleR + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData(1) + }, + paraThreadingToolOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.threadCode = data.threadCode + this.queryParam.pitch = data.pitch + this.queryParam.rotationDirection = data.rotationDirection + this.queryParam.tolerancezoneLevel = data.tolerancezoneLevel + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.externalDimensions = data.externalDimensions + this.queryParam.handleSpecifications = data.handleSpecifications + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData(1) + }, + paraMillToolOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.diameter = data.diameter + this.queryParam.noseAngleR = data.noseAngleR + this.queryParam.edgeLength = data.edgeLength + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.clampingSpecifications = data.clampingSpecifications + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.numberOfTeeth = data.numberOfTeeth + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData(1) + }, + paraTurningToolsOk(data) { + this.queryParam.chineseName = data.chineseName + this.queryParam.foreignLanguageName = data.foreignLanguageName + this.queryParam.standardLevel = data.standardLevel + this.queryParam.standardCode = data.standardCode + this.queryParam.headSpecifications = data.headSpecifications + this.queryParam.matchingNumber = data.matchingNumber + this.queryParam.leadAngle = data.leadAngle + this.queryParam.totalLength = data.totalLength + this.queryParam.toolMaterial = data.toolMaterial + this.queryParam.partMaterial = data.partMaterial + this.queryParam.paintcoatFlag = data.paintcoatFlag + this.queryParam.toolPattern = data.toolPattern + this.queryParam.crossSectionalSize = data.crossSectionalSize + this.queryParam.coolingMethod = data.coolingMethod + this.queryParam.cuttingDirection = data.cuttingDirection + this.queryParam.technicalConditions = data.technicalConditions + this.queryParam.conditionsInfo = data.conditionsInfo + this.queryParam.toolModel = data.toolModel + this.queryParam.shortCalled = data.shortCalled + this.queryParam.groupCompanyCode = data.groupCompanyCode + this.loadData(1) + }, }, } </script> diff --git a/src/views/tms/modules/toolLedger/ToolSharpenList.vue b/src/views/tms/modules/toolLedger/ToolSharpenList.vue index eff61b3..9c931d5 100644 --- a/src/views/tms/modules/toolLedger/ToolSharpenList.vue +++ b/src/views/tms/modules/toolLedger/ToolSharpenList.vue @@ -61,22 +61,22 @@ }, { title: '璐d换浜�', - dataIndex: 'toolModel', + dataIndex: 'responsiblePerson', align: 'center', }, { title: '鍒冪(鏃堕棿', - dataIndex: 'toolModel', + dataIndex: 'sharpeningTime', align: 'center', }, { title: '鍒冪(缁撴灉鍙婂缓璁�', - dataIndex: 'toolModel', + dataIndex: 'sharpeningResult', align: 'center', }, { title: '鍒冪(鐘舵��', - dataIndex: 'toolModel', + dataIndex: 'sharpeningStatusName', align: 'center', }, ], diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue index d79f132..e20a71e 100644 --- a/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyForm.vue @@ -161,12 +161,16 @@ this.leafFlagShow = false if(record.leafFlag == "1"){ this.paraTypeFlagShow = true + }else{ + this.validatorRules.paraTypeFlag[0].required = false + this.paraTypeFlagShow = false } }, submitForm () { const that = this; // 瑙﹀彂琛ㄥ崟楠岃瘉 this.$refs.form.validate(valid => { + console.log("111111",valid) if (valid) { that.confirmLoading = true; let httpurl = ''; diff --git a/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue b/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue index 0c018fb..4efb255 100644 --- a/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue +++ b/src/views/tms/modules/toolsClassify/ToolsClassifyListLeft.vue @@ -3,7 +3,6 @@ :loading="cardLoading" :bordered="false" title="宸ュ叿鍒嗙被" - style="height: 100%;" > <a-spin :spinning="loading"> <a-alert @@ -20,7 +19,7 @@ >鍙栨秷</a> </div> </a-alert> - <div class="drawer-bootom-button"> + <!-- <div class="drawer-bootom-button"> <a-dropdown :trigger="['click']" placement="bottomCenter" @@ -43,7 +42,7 @@ <a-icon type="bars" /> </a-button> </a-dropdown> - </div> + </div> --> <a-input-search @search="handleSearch" @@ -55,13 +54,12 @@ /> <!-- showLine --> + <div style="flex: 1;overflow:auto;margin-top: 10px;max-height: 500px; min-height: 500px"> <a-tree :checkStrictly="checkStrictly" - :expandedKeys.sync="expandedKeys" :selectedKeys="selectedKeys" - :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" :treeData="treeDataSource" - :autoExpandParent="autoExpandParent" + :defaultExpandAll="true" @select="onSelect" @expand="onExpand" > @@ -89,6 +87,7 @@ </template> </a-tree> + </div> </a-spin> </a-card> </template> diff --git a/src/views/tms/modules/verification/JSelectTools.vue b/src/views/tms/modules/verification/JSelectTools.vue new file mode 100644 index 0000000..671f9c5 --- /dev/null +++ b/src/views/tms/modules/verification/JSelectTools.vue @@ -0,0 +1,207 @@ +<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.onlyCode"></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: 'JSelectTools', + 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: 'onlyCode' + }, + { + title: '閲忓叿缂栫爜', + align: 'center', + dataIndex: 'toolCode' + }, + { + title: '閲忓叿鍚嶇О', + align: 'center', + dataIndex: 'toolName' + }, + { + title: '鍨嬪彿/鍥惧彿', + align: 'center', + dataIndex: 'toolModel' + }, + ], + url: { + list: '/tms/baseTools/verificationToolsList' + } + + } + }, + 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.$emit('sendSelectionRows', this.selectionRows[0]) + 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/modules/verification/ToolVerificationRecordModal.vue b/src/views/tms/modules/verification/ToolVerificationRecordModal.vue new file mode 100644 index 0000000..b5f1f26 --- /dev/null +++ b/src/views/tms/modules/verification/ToolVerificationRecordModal.vue @@ -0,0 +1,212 @@ +<template> + <j-modal + :title="title" + :width="1200" + :confirmLoading="confirmLoading" + switchFullscreen + centered + :visible="visible" + :mask-closable="false" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴"> + + + + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="onlyCode" :labelCol="labelCol" :wrapperCol="wrapperCol" label="鍞竴缂栫爜"> + <a-input-search v-model="model.onlyCode" placeholder="璇烽�夋嫨鍞竴缂栫爜" :disabled="disableSubmit" + @search="selectTools" enter-button + /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="toolCode" :labelCol="labelCol" :wrapperCol="wrapperCol" label="閲忓叿缂栧彿"> + <a-input placeholder="閫夋嫨鍞竴缂栫爜鍚庤嚜鍔ㄥ甫鍑�" v-model="model.toolCode" :disabled="true" /> + </a-form-model-item> + </a-col> + + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="paramaTableName" :labelCol="labelCol" :wrapperCol="wrapperCol" label="閲忓叿鍚嶇О"> + <a-input placeholder="閫夋嫨鍞竴缂栫爜鍚庤嚜鍔ㄥ甫鍑�" v-model="model.toolName" + :disabled="true" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="瑙勬牸" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input placeholder="閫夋嫨鍞竴缂栫爜鍚庤嚜鍔ㄥ甫鍑�" v-model="model.toolModel" + :disabled="true" /> + </a-form-model-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-model-item prop="personResponsible" :labelCol="labelCol" :wrapperCol="wrapperCol" label="璐d换浜�"> + <j-dict-select-tag type="list" v-model="model.personResponsible" dictCode="sys_user,realname,id" + placeholder="璇烽�夋嫨璐d换浜�" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="妫�瀹氭姤鍛婃棩鏈�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verificationReportDate"> + <j-date placeholder="璇烽�夋嫨妫�瀹氭姤鍛婃棩鏈�" date-format="YYYY-MM-DD" v-model="model.verificationReportDate" + style="width: 100%" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item label="璁¢噺鍙�" :labelCol="{span:3}" :wrapperCol="{span:19}"> + <a-input placeholder="璇峰~鍐欒閲忓彿" v-model="model.measureNumber" :disabled="disableSubmit" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item label="妫�瀹氱粨鏋滃強寤鸿" :labelCol="{span:3}" :wrapperCol="{span:19}" prop="result"> + <a-textarea placeholder="璇峰~鍐欐瀹氱粨鏋滃強寤鸿" v-model="model.result" + :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> + <j-select-tools ref="toolListModel" @sendSelectionRows="getRows"></j-select-tools> + + + </j-modal> +</template> + +<script> + +import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' +import JSelectTools from './JSelectTools' +import { requestPut, postAction, httpAction } from '@/api/manage' +export default { + name: 'ToolVerificationRecordModal', + mixins: [JVxeTableModelMixin], + components: { + JSelectTools + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + confirmLoading: false, + spinning: false, + disabled: false, + disableSubmit: false, + validatorRules: { + onlyCode: [ + { required: true, message: '璇烽�夋嫨鍞竴缂栫爜!' } + ] + }, + lastSelectionData: null, + url: { + add: '/tms/toolVerificationRecord/add', + edit: '/tms/toolVerificationRecord/edit' + } + } + }, + created() { + }, + + methods: { + getRows(item) { + console.log(item) + if (item.id) { + this.$set(this.model, 'onlyCode', item.onlyCode) + this.$set(this.model, 'toolCode', item.toolCode) + this.$set(this.model, 'toolName', item.toolName) + this.$set(this.model, 'toolModel', item.toolModel) + } + }, + + selectTools: function() { + this.$refs.toolListModel.showModals() + this.$refs.toolListModel.title = '閫夋嫨閲忓叿淇℃伅' + this.$refs.toolListModel.disableSubmit = false + }, + + add() { + this.edit({}) + }, + edit(record) { + let that = this + that.visible = true + that.model = Object.assign({}, record) + }, + + close() { + this.$emit('close') + this.visible = false + }, + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + let formData = Object.assign(this.model) + that.confirmLoading = true + let httpurl = '' + let method = '' + if (!this.model.id) { + httpurl += this.url.add + method = 'post' + } else { + httpurl += this.url.edit + method = 'put' + } + httpAction(httpurl, this.model, method,formData).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> + +<style lang="less" scoped> + +</style> + + + diff --git a/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue b/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue index c07bfe8..28184ab 100644 --- a/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue +++ b/src/views/tms/stocktakingBound/modules/ToolsStocktakingBoundModal.vue @@ -83,7 +83,7 @@ <a-input-number :disabled="disableSubmit" :value="text" v-if="col.dataIndex == 'practicalQuantity'" :min="0" :max="99999" @change="(e) => handleChange(e, record.key, col, index)" style="width: 100%;" /> - <a-input-number :value="text" v-if="col.dataIndex == 'differenceValue'" :min="0" :max="99999" + <a-input-number :value="text" v-if="col.dataIndex == 'differenceValue'" :disabled="true" @change="(e) => handleChange(e, record.key, col, index)" style="width: 100%;" /> <j-dict-select-tag :value="text" v-if="col.dataIndex == 'surplusDeficit'" diff --git a/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue index 189bab2..b62598d 100644 --- a/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue +++ b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue @@ -242,7 +242,7 @@ dataIndex: 'availableQuantity' }, { - title:'鐘舵��;', + title:'鐘舵��', align:"center", dataIndex: 'status' }, -- Gitblit v1.9.3