From a48ded866d223f581944ea9043df1b296b3425e3 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 21 十二月 2023 13:17:46 +0800 Subject: [PATCH] modified: src/views/basic/company/index.vue modified: src/views/basic/customizeparamtemplatetype/index.vue modified: src/views/basic/division/index.vue modified: src/views/basic/factory/index.vue modified: src/views/basic/location/index.vue modified: src/views/basic/param/index.vue modified: src/views/basic/part/index.vue modified: src/views/basic/post/index.vue modified: src/views/basic/shift/index.vue modified: src/views/basic/staff/index.vue modified: src/views/basic/template/index.vue modified: src/views/basic/warehouse/index.vue modified: src/views/basic/workstation/index.vue modified: src/views/plan/manufacturingorder/index.vue modified: src/views/plan/masterproductionschedule/index.vue modified: src/views/plan/operationtask/index.vue modified: src/views/plan/productionschedul/index.vue modified: src/views/quality/finishedProductInspection/index.vue modified: src/views/quality/rawMaterial/index.vue modified: src/views/technology/completeproductstructure/index.vue modified: src/views/technology/document/index.vue modified: src/views/technology/operation/index.vue modified: src/views/technology/routing/index.vue modified: src/views/technology/structure/index.vue modified: src/views/warehouse/FinishedWarehousing/index.vue modified: src/views/warehouse/changestock/index.vue modified: src/views/warehouse/pallettransports/index.vue --- src/views/technology/routing/index.vue | 179 +++++++++++++++++++++++------------------------------------ 1 files changed, 71 insertions(+), 108 deletions(-) diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue index 1dca9cb..748d0bb 100644 --- a/src/views/technology/routing/index.vue +++ b/src/views/technology/routing/index.vue @@ -13,20 +13,21 @@ ref="routingTable" > <template #toolbar> - <el-button - v-if="permissions.technology_routing_ifssync" - type="primary" - :loading="ifsSynsLoading" - @click="syncIfs" - >IFS鍚屾</el-button - > - <el-button - v-if="permissions.technology_routing_advancecalc" - type="primary" - :loading="preCalcLoading" - @click="calcTech" - >鎻愬墠璁$畻</el-button - > + <el-button v-if="permissions.technology_routing_add" + type="primary" @click="addOrUpdateHandle">鏂板</el-button> + <el-button @click="() => {this.approveHandle('ACCEPT')}" + :disabled="uniqueStateArr.includes('01draft')" + v-if="permissions.technology_routing_accept">鎵瑰噯</el-button> + <el-button @click="() => {this.approveHandle('REVOKE')}" + :disabled="uniqueStateArr.includes('02accepted')" + v-if="permissions.technology_routing_revoke">鎾ゅ洖</el-button> + <el-button @click="() => {this.approveHandle('CANCEL')}" + :disabled="uniqueStateArr.includes('02accepted')" + v-if="permissions.technology_routing_cancel">鎷掔粷</el-button> + <el-button @click="copyRouting" + v-if="permissions.technology_routing_cancel">澶嶅埗</el-button> + <el-button @click="() => {this.deleteAll()}" type="primary" + v-if="permissions.technology_routing_batch_del">鎵归噺鍒犻櫎</el-button> </template> </ttable> <el-dialog title="瀵煎叆" :visible.sync="importRoutingVisible" width="50%"> @@ -114,7 +115,6 @@ import { fetchList, delObj, - changeState, changeStateBatch, exportRoutingTemplate, routingIfsSync, @@ -132,13 +132,14 @@ data() { return { ids: [], + uniqueStateArr: [], ajaxFun: fetchList, multipleSelection: [], isShowQuery: false, customUpload: true, uploadInfo: { // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl - isShow: true, + isShow: false, url: '/mes/routing/uploadExcel' }, prelang: 'routing', @@ -196,7 +197,7 @@ noShowTip: false }, // 鏄惁涓轰富宸ヨ壓 - { + /* { minWidth: '120', prop: 'master', label: '涓诲伐鑹�', @@ -210,7 +211,7 @@ formatter: (row, column, cellValue) => { return cellValue == true ? '鏄�' : '鍚�' } - }, + }, */ // 鐘舵�� { minWidth: '120', @@ -266,19 +267,19 @@ searchInfoType: 'text' }, // 宸ヨ壓绫诲瀷 - { - minWidth: '120', - prop: 'bomTypeDb', - label: '宸ヨ壓绫诲瀷', - sort: true, - isTrue: true, - isSearch: true, - searchInfoType: 'select', - formatter: this.formatBomTypeDbType, - optList: () => { - return this.bomTypeDbOptions - } - }, + // { + // minWidth: '120', + // prop: 'bomTypeDb', + // label: '宸ヨ壓绫诲瀷', + // sort: true, + // isTrue: true, + // isSearch: true, + // searchInfoType: 'select', + // formatter: this.formatBomTypeDbType, + // optList: () => { + // return this.bomTypeDbOptions + // } + // }, // 閫愭閲囩敤鏃ユ湡 { minWidth: '200', @@ -300,7 +301,7 @@ searchInfoType: 'datetimerange' }, // 鏇夸唬 - { + /* { minWidth: '120', prop: 'alternativeNo', label: '鏇夸唬', @@ -308,9 +309,9 @@ isTrue: true, isSearch: true, searchInfoType: 'text' - }, + }, */ // 鏇夸唬鎻忚堪 - { + /* { minWidth: '120', prop: 'alternativeDesc', label: '鏇夸唬鎻忚堪', @@ -318,7 +319,7 @@ isTrue: true, isSearch: true, searchInfoType: 'text' - }, + }, */ // 鏄惁宸插悓姝ヨ嚦IFS // { // minWidth: '120', @@ -356,65 +357,8 @@ searchInfoType: 'datetimerange' } ], - toolbar: [ - { - text: '鏂板', - type: 'primary', - fun: this.addOrUpdateHandle, - disabled: false, - permitArr: [] - }, - { - text: '鎵瑰噯', - fun: () => { - this.approveHandle('ACCEPT') - }, - disabled: false, - permitArr: ['01draft'] - }, - { - text: '鎾ゅ洖', - fun: () => { - this.approveHandle('REVOKE') - }, - disabled: false, - permitArr: ['02accepted'] - }, - { - text: '鎷掔粷', - fun: () => { - this.approveHandle('CANCEL') - }, - disabled: false, - permitArr: ['02accepted'] - }, - { - text: '澶嶅埗', - fun: this.copyRouting, - disabled: false, - permitArr: [] - }, - { - text: '鍒犻櫎', - fun: () => { - this.deleteAll() - }, - disabled: false, - permitArr: [] - } - ], - operator: [ - { - text: '鍒犻櫎', - type: 'text', - size: 'small', - fun: this.deleteHandle - // show: { - // val: ['01draft'], - // key: 'state' - // } - } - ], + toolbar: [], + operator: null, operatorConfig: { fixed: 'right', label: '鎿嶄綔', @@ -491,6 +435,20 @@ this.getData() }, created() { + if(this.permissions.technology_routing_del){ + this.table.operator = [ + { + text: '鍒犻櫎', + type: 'text', + size: 'small', + fun: this.deleteHandle + // show: { + // val: ['01draft'], + // key: 'state' + // } + } + ] + } this.getBomTypeDbOptions() }, methods: { @@ -508,6 +466,10 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { + if(!this.permissions.technology_routing_edit && row.id!=null){ + this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�") + return + } this.$router.push({ name: 'routingForm', query: { id: row == null ? null : row.id } @@ -613,21 +575,22 @@ uniqueStateArr.push(stateArr[i]) } } + this.uniqueStateArr = uniqueStateArr // 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆 - var toolbar = this.table.toolbar - for (var j = 0; j < toolbar.length; j++) { - if ( - uniqueStateArr.every((val) => - toolbar[j].permitArr.length <= 0 - ? true - : toolbar[j].permitArr.includes(val) - ) - ) { - toolbar[j].disabled = false - } else { - toolbar[j].disabled = true - } - } + // var toolbar = this.table.toolbar + // for (var j = 0; j < toolbar.length; j++) { + // if ( + // uniqueStateArr.every((val) => + // toolbar[j].permitArr.length <= 0 + // ? true + // : toolbar[j].permitArr.includes(val) + // ) + // ) { + // toolbar[j].disabled = false + // } else { + // toolbar[j].disabled = true + // } + // } // 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection this.multipleSelection = val }, -- Gitblit v1.9.3