From 617d2ad422a2ae5badc0572b06f33c2791cb95ad Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 29 十二月 2023 14:38:45 +0800
Subject: [PATCH] 质检代码调整
---
src/views/technology/routing/index.vue | 199 +++++++++++++++++++++++++------------------------
1 files changed, 103 insertions(+), 96 deletions(-)
diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index 1dca9cb..d281799 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -12,22 +12,7 @@
:ajaxFun="ajaxFun"
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
- >
- </template>
+ <template #toolbar></template>
</ttable>
<el-dialog title="瀵煎叆" :visible.sync="importRoutingVisible" width="50%">
<span>
@@ -114,7 +99,6 @@
import {
fetchList,
delObj,
- changeState,
changeStateBatch,
exportRoutingTemplate,
routingIfsSync,
@@ -138,7 +122,7 @@
customUpload: true,
uploadInfo: {
// 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
- isShow: true,
+ isShow: false,
url: '/mes/routing/uploadExcel'
},
prelang: 'routing',
@@ -196,7 +180,7 @@
noShowTip: false
},
// 鏄惁涓轰富宸ヨ壓
- {
+ /* {
minWidth: '120',
prop: 'master',
label: '涓诲伐鑹�',
@@ -210,7 +194,7 @@
formatter: (row, column, cellValue) => {
return cellValue == true ? '鏄�' : '鍚�'
}
- },
+ }, */
// 鐘舵��
{
minWidth: '120',
@@ -266,19 +250,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 +284,7 @@
searchInfoType: 'datetimerange'
},
// 鏇夸唬
- {
+ /* {
minWidth: '120',
prop: 'alternativeNo',
label: '鏇夸唬',
@@ -308,9 +292,9 @@
isTrue: true,
isSearch: true,
searchInfoType: 'text'
- },
+ }, */
// 鏇夸唬鎻忚堪
- {
+ /* {
minWidth: '120',
prop: 'alternativeDesc',
label: '鏇夸唬鎻忚堪',
@@ -318,7 +302,7 @@
isTrue: true,
isSearch: true,
searchInfoType: 'text'
- },
+ }, */
// 鏄惁宸插悓姝ヨ嚦IFS
// {
// minWidth: '120',
@@ -356,65 +340,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,7 +418,82 @@
this.getData()
},
created() {
+ if(this.permissions.technology_routing_add){
+ this.table.toolbar.push({
+ text: '鏂板',
+ disabled: false,
+ type: 'primary',
+ fun: ()=>{this.addOrUpdateHandle()},
+ permitArr: []
+ })
+ }
+ if(this.permissions.technology_routing_accept){
+ this.table.toolbar.push({
+ text: '鎵瑰噯',
+ disabled: true,
+ fun: ()=>{this.approveHandle('ACCEPT')},
+ permitArr: ['01draft'],
+ })
+ }
+ if(this.permissions.technology_routing_revoke){
+ this.table.toolbar.push({
+ text: '鎾ゅ洖',
+ disabled: true,
+ fun: () => {this.approveHandle('REVOKE')},
+ permitArr: ['02accepted'],
+ })
+ }
+ if(this.permissions.technology_routing_cancel){
+ this.table.toolbar.push({
+ text: '鎷掔粷',
+ disabled: true,
+ fun: ()=>{this.approveHandle('CANCEL')},
+ permitArr: ['02accepted'],
+ })
+ }
+ if(this.permissions.technology_routing_copy){
+ this.table.toolbar.push({
+ text: '澶嶅埗',
+ disabled: false,
+ fun: ()=>{this.copyRouting()},
+ permitArr: []
+ })
+ }
+ if(this.permissions.technology_routing_batch_del){
+ this.table.toolbar.push({
+ text: '鎵归噺鍒犻櫎',
+ type:'primary',
+ disabled: false,
+ permitArr: [],
+ fun: ()=>{this.deleteAll()},
+ })
+ }
+ if(this.permissions.technology_routing_del){
+ this.table.operator = [
+ {
+ text: '鍒犻櫎',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ // show: {
+ // val: ['01draft'],
+ // key: 'state'
+ // }
+ }
+ ]
+ }
this.getBomTypeDbOptions()
+ },
+ watch:{
+ multipleSelection(newVal){
+ if(newVal.length==0){
+ this.table.toolbar.forEach(ele=>{
+ if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ゅ洖'){
+ ele.disabled = true
+ }
+ })
+ }
+ }
},
methods: {
getData() {
@@ -508,6 +510,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,6 +619,7 @@
uniqueStateArr.push(stateArr[i])
}
}
+ // this.uniqueStateArr = uniqueStateArr
// 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
var toolbar = this.table.toolbar
for (var j = 0; j < toolbar.length; j++) {
--
Gitblit v1.9.3