From dbeff3bbf8d59b41c301f2ea723ff4171445ef2d Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期一, 25 十二月 2023 17:23:53 +0800
Subject: [PATCH] modified: src/views/common/qrCodeApp.vue
---
src/views/technology/routing/index.vue | 209 +++++++++++++++++++++------------------------------
1 files changed, 86 insertions(+), 123 deletions(-)
diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index 87bf396..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,23 +319,23 @@
isTrue: true,
isSearch: true,
searchInfoType: 'text'
- },
+ }, */
// 鏄惁宸插悓姝ヨ嚦IFS
- {
- minWidth: '120',
- prop: 'ifsSync',
- label: '宸插悓姝ヨ嚦IFS',
- sort: true,
- isTrue: true,
- isSearch: true,
- searchInfoType: 'select',
- optList: () => {
- return this.getIfsSyncOptionList()
- },
- formatter: (row, column, cellValue) => {
- return cellValue == true ? '鏄�' : '鍚�'
- }
- },
+ // {
+ // minWidth: '120',
+ // prop: 'ifsSync',
+ // label: '宸插悓姝ヨ嚦IFS',
+ // sort: true,
+ // isTrue: true,
+ // isSearch: true,
+ // searchInfoType: 'select',
+ // optList: () => {
+ // return this.getIfsSyncOptionList()
+ // },
+ // formatter: (row, column, cellValue) => {
+ // return cellValue == true ? '鏄�' : '鍚�'
+ // }
+ // },
// 鏇存柊鏃堕棿
{
minWidth: '200',
@@ -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