From 75e035a10a0faeff6b2ec4b9fcbf98d1536274f2 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 07 十二月 2023 10:57:15 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/technology/completeproductstructure/index.vue | 177 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 91 insertions(+), 86 deletions(-) diff --git a/src/views/technology/completeproductstructure/index.vue b/src/views/technology/completeproductstructure/index.vue index 4af4a00..1be5f56 100644 --- a/src/views/technology/completeproductstructure/index.vue +++ b/src/views/technology/completeproductstructure/index.vue @@ -20,12 +20,13 @@ import { fetchList, delObj, - addByStructure + addByStructure, } from '@/api/technology/completeproductstructure' import ttable from '@/views/common/ztt-table.vue' import { mapGetters } from 'vuex' import { changeState } from '../../../api/technology/completeproductstructure' import { remote } from '@/api/admin/dict' + export default { data() { return { @@ -34,7 +35,7 @@ uploadInfo: { // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl isShow: true, - url: 'mes/bom/uploadExcel' + url: 'mes/bom/uploadExcel', }, prelang: 'completeProductStructure', options: { @@ -49,7 +50,7 @@ isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳 isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳 isSearch: false, // 楂樼骇鏌ヨ鎸夐挳 - defaultOrderBy: { column: 'id', direction: 'desc' } + defaultOrderBy: { column: 'id', direction: 'desc' }, }, table: { total: 0, @@ -67,7 +68,7 @@ isTrue: true, isSearch: true, searchInfoType: 'text', - render: { fun: this.addOrUpdateHandle } + render: { fun: this.addOrUpdateHandle }, }, // 闆朵欢鍚嶇О { @@ -77,7 +78,7 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'text' + searchInfoType: 'text', }, // 闆朵欢鍙� { @@ -87,7 +88,7 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'text' + searchInfoType: 'text', }, // 鐘舵�� @@ -112,7 +113,7 @@ formatVal = '宸插彇娑�' } return formatVal - } + }, }, // 绫诲瀷 @@ -127,7 +128,7 @@ formatter: this.formatBomTypeDbType, optList: () => { return this.bomTypeDbOptions - } + }, }, // 鐗堟湰鍙� { @@ -137,61 +138,61 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'text' + searchInfoType: 'text', }, // 鏇夸唬鍙� - { - minWidth: '120', - prop: 'alternativeNo', - label: '鏇夸唬鍙�', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'alternativeNo', + // label: '鏇夸唬鍙�', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text', + // }, // 鏇夸唬鎻忚堪 - { - minWidth: '120', - prop: 'alternativeDesc', - label: '鏇夸唬鎻忚堪', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'alternativeDesc', + // label: '鏇夸唬鎻忚堪', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text', + // }, // 缁濈紭棰滆壊 - { - minWidth: '120', - prop: 'insulationColor', - label: '缁濈紭棰滆壊', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'insulationColor', + // label: '缁濈紭棰滆壊', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text', + // }, // 鎶ゅ棰滆壊 - { - minWidth: '120', - prop: 'sheathColor', - label: '鎶ゅ棰滆壊', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'sheathColor', + // label: '鎶ゅ棰滆壊', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text', + // }, // 鐗规��1 - { - minWidth: '120', - prop: 'characteristicOne', - label: '鐗规��1', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'text' - }, + // { + // minWidth: '120', + // prop: 'characteristicOne', + // label: '鐗规��1', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'text', + // }, // 鍒涘缓浜� { minWidth: '120', @@ -200,7 +201,7 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'text' + searchInfoType: 'text', }, // 鍒涘缓鏃堕棿 { @@ -210,8 +211,8 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'datetimerange' - } + searchInfoType: 'datetimerange', + }, ], toolbar: [ // { @@ -226,7 +227,7 @@ text: '浜у搧缁撴瀯鐢熸垚BOM', fun: this.addByStructureHandle, disabled: false, - permitArr: [] + permitArr: [], }, { text: '鎵瑰噯', @@ -234,7 +235,7 @@ this.approveHandle('ACCEPT') }, disabled: false, - permitArr: ['01draft'] + permitArr: ['01draft'], }, { text: '鎾ゅ洖', @@ -242,7 +243,7 @@ this.approveHandle('REVOKE') }, disabled: false, - permitArr: ['02accepted'] + permitArr: ['02accepted'], }, { text: '鎷掔粷', @@ -250,7 +251,7 @@ this.approveHandle('CANCEL') }, disabled: false, - permitArr: ['02accepted'] + permitArr: ['02accepted'], }, { text: '鍒犻櫎', @@ -258,46 +259,46 @@ this.deleteAll() }, disabled: false, - permitArr: [] - } + permitArr: [], + }, ], operator: [ { text: '鍒犻櫎', type: 'text', size: 'small', - fun: this.deleteHandle - } + fun: this.deleteHandle, + }, ], operatorConfig: { fixed: 'right', label: '鎿嶄綔', width: 100, - minWidth: 100 - } + minWidth: 100, + }, }, stateOptionList: [ { value: '01draft', - label: '鑽夌' + label: '鑽夌', }, { value: '02accepted', - label: '宸叉帴鍙�' + label: '宸叉帴鍙�', }, { value: '03cancelled', - label: '宸插彇娑�' - } + label: '宸插彇娑�', + }, ], - bomTypeDbOptions: [] + bomTypeDbOptions: [], } }, components: { - ttable + ttable, }, computed: { - ...mapGetters(['permissions']) + ...mapGetters(['permissions']), }, activated() { this.getData() @@ -334,16 +335,20 @@ addOrUpdateHandle(row) { this.$router.push({ name: 'completeProductStructure', - params: { id: row == null ? null : row.id } + params: { id: row == null ? null : row.id }, }) }, // 鎸変骇鍝佺粨鏋勭敓鎴怋OM addByStructureHandle() { - addByStructure() - this.$message({ - message: '宸插湪鍚庡彴鐢熸垚BOM锛岃鎵ц缁撴潫鍚庡埛鏂伴〉闈�', - type: 'success' + addByStructure().then((res) => { + let result = Array.from(new Set(res.data.data)) + this.$message.success(result.join(',')) + this.getData() }) + // this.$message({ + // message: '宸插湪鍚庡彴鐢熸垚BOM锛岃鎵ц缁撴潫鍚庡埛鏂伴〉闈�', + // type: 'success', + // }) }, // 鍒犻櫎 deleteHandle(row) { @@ -351,9 +356,9 @@ confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning', - closeOnClickModal: false + closeOnClickModal: false, }) - .then(function() { + .then(function () { const ids = [] ids.push(row.id) return delObj(ids) @@ -375,9 +380,9 @@ confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning', - closeOnClickModal: false + closeOnClickModal: false, }) - .then(function() { + .then(function () { const ids = that.multipleSelection.map((item) => { return item.id }) @@ -428,7 +433,7 @@ handleSelectionChange(val) { // 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳 // 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬� - var stateArr = val.map(function(value, index) { + var stateArr = val.map(function (value, index) { return value.state }) // 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲� @@ -458,7 +463,7 @@ }, getStateOptionList() { return this.stateOptionList - } - } + }, + }, } </script> -- Gitblit v1.9.3