From 47cf5518f0f61dbf8066c2273b9f77c2cd7b1751 Mon Sep 17 00:00:00 2001
From: YLouie <929705085@qq.com>
Date: 星期五, 19 九月 2025 17:56:03 +0800
Subject: [PATCH] 销售订单plm同步
---
src/views/quality/teststandard/index.vue | 200 +++++++++++++++++++++++++++++--------------------
1 files changed, 118 insertions(+), 82 deletions(-)
diff --git a/src/views/quality/teststandard/index.vue b/src/views/quality/teststandard/index.vue
index 709f3b4..7b8f74a 100644
--- a/src/views/quality/teststandard/index.vue
+++ b/src/views/quality/teststandard/index.vue
@@ -8,6 +8,7 @@
@handleSelectionChange="handleCurrentChange"
:uploadInfo="uploadInfo"
:prelang="prelang"
+ :toolbarMaxLength="3"
:options="options"
:ajaxFun="ajaxFun"
@dbClickRow="handleDbClickRow"
@@ -23,22 +24,23 @@
<el-col :span="8">
<span>鏍囧噯鍙傛暟</span>
</el-col>
- <el-col :span="8" :offset="4">
+ <!-- <el-col :span="8" :offset="4">
<el-button
+ v-if="permissions.quality_teststandard_layout"
style="float: right; padding: 3px 0"
type="text"
@click="beginItemLayOut"
>
甯冨眬
</el-button>
- </el-col>
- <el-col :span="2">
+ </el-col> -->
+ <el-col :span="14">
<el-button
style="float: right; padding: 3px 0"
type="text"
:disabled="isSubmit"
v-thinclick="`dataFormTestStandardParam`"
- v-if="editable"
+ v-if="editable && permissions.quality_teststandard_save"
>淇濆瓨
</el-button>
</el-col>
@@ -47,7 +49,7 @@
style="float: right; padding: 3px 0"
type="text"
@click="relateOperationParam()"
- v-if="editable"
+ v-if="editable && permissions.quality_teststandard_insert"
>娣诲姞
</el-button>
</el-col>
@@ -78,7 +80,7 @@
align="center"
width="50"
/>
- <el-table-column
+ <!-- <el-table-column
label="鏄惁寮曠敤宸ヨ壓鍙傛暟"
prop="isReference"
align="center"
@@ -125,7 +127,7 @@
<template slot-scope="scope">
<el-input v-model="scope.row.wireCore"></el-input>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column label="鍙傛暟缂栧彿" prop="code" align="center" />
<el-table-column
label="鍙傛暟椤�"
@@ -158,7 +160,7 @@
></el-input>
</template>
</el-table-column>
- <el-table-column
+ <!-- <el-table-column
label="鍙傛暟椤圭被鍨�"
prop="paramType"
align="center"
@@ -178,7 +180,7 @@
</el-option>
</el-select>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
label="鍙傛暟鏍煎紡"
prop="parameterFormat"
@@ -188,8 +190,28 @@
<template slot-scope="scope">
<el-input v-model="scope.row.parameterFormat"></el-input>
</template>
+ </el-table-column><el-table-column
+ label="娴嬭瘯鏂规硶"
+ prop="method"
+ align="center"
+ width="80"
+ >
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.method"></el-input>
+ </template>
</el-table-column>
<el-table-column
+ label="娴嬭瘯鐩殑"
+ prop="purpose"
+ align="center"
+ width="80"
+ >
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.purpose"></el-input>
+ </template>
+ </el-table-column>
+
+ <!-- <el-table-column
label="閫氶亾"
prop="aisle"
align="center"
@@ -208,10 +230,10 @@
<template slot-scope="scope">
<el-input v-model="scope.row.position"></el-input>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column label="鍗曚綅" prop="unit" align="center" />
<!--<el-table-column label="鍙傛暟绫诲瀷" prop="type" align="center" :formatter="getParam"/>-->
- <el-table-column label="鎿嶄綔" align="center">
+ <el-table-column label="鎿嶄綔" align="center" v-if="permissions.quality_teststandard_table_operate">
<template slot-scope="scope">
<el-button
type="text"
@@ -220,13 +242,13 @@
v-if="editable"
>鎻掑叆
</el-button>
- <el-button
+ <!-- <el-button
type="text"
size="mini"
@click.stop="editTestStandardParam(scope.row)"
v-if="editable && scope.row.id != null"
>鍏紡
- </el-button>
+ </el-button> -->
<el-button
type="text"
size="mini"
@@ -287,6 +309,7 @@
import { copyTestStandard } from '../../../api/quality/teststandard'
import EditParamForm from './edit-param-form'
import itemLayout from './item-layout'
+import { mapGetters } from 'vuex'
export default {
data() {
return {
@@ -301,7 +324,7 @@
isShowQuery: false,
uploadInfo: {
// 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
- isShow: true,
+ isShow: false,
url: '/mes/testStandard/upload'
},
prelang: 'operation',
@@ -359,7 +382,7 @@
return this.getInspectionTypeOptionList()
}
},
- {
+ /* {
minWidth: '120',
prop: 'operationName',
label: '宸ュ簭鍚嶇О',
@@ -367,7 +390,7 @@
isTrue: true,
isSearch: true,
searchInfoType: 'text'
- },
+ }, */
{
minWidth: '120',
prop: 'state',
@@ -403,71 +426,8 @@
searchInfoType: 'text'
}
],
- toolbar: [
- {
- text: '鏂板',
- type: 'primary',
- fun: this.addOrUpdateHandle
- },
- {
- text: '澶嶅埗',
- type: 'primary',
- fun: this.copy
- },
- {
- text: '鎵瑰噯',
- fun: () => {
- this.changeState('accept')
- },
- disabled: false,
- permitArr: []
- },
- {
- text: '鎷掔粷',
- fun: () => {
- this.changeState('reject')
- },
- disabled: false,
- permitArr: []
- },
- {
- text: '鎾ら攢',
- fun: () => {
- this.changeState('cancel')
- },
- disabled: false,
- permitArr: []
- },
- {
- text: '澶辨晥',
- fun: () => {
- this.changeState('disabled')
- },
- disabled: false,
- permitArr: []
- },
- {
- text: '鍒犻櫎',
- fun: () => {
- this.deleteAll()
- },
- disabled: false,
- permitArr: []
- }
- ],
- operator: [
- {
- text: '鍒犻櫎',
- icon: 'el-icon-delete',
- type: 'text',
- size: 'small',
- fun: this.deleteHandle
- // show: {
- // val: ['01draft'],
- // key: 'state'
- // }
- }
- ],
+ toolbar: [],
+ operator: null,
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
@@ -536,10 +496,12 @@
itemLayout
},
computed: {
- editable: function() {
+ ...mapGetters(['permissions']),
+ editable : function() {
if (!this.currentTestStandard) {
return true
}
+ console.log('99999999999', this.currentTestStandard)
if (
this.currentTestStandard.id &&
this.currentTestStandard.state === '01draft'
@@ -554,6 +516,74 @@
this.rowDrop()
},
created() {
+ if(this.permissions.quality_teststandard_add){
+ this.table.toolbar.push({
+ text: '鏂板',
+ disabled: false,
+ type: 'primary',
+ fun: ()=>{this.addOrUpdateHandle()},
+ permitArr: []
+ })
+ }
+ if(this.permissions.quality_teststandard_copy){
+ this.table.toolbar.push({
+ text: '澶嶅埗',
+ type: 'primary',
+ disabled: false,
+ fun: ()=>{this.copy()},
+ permitArr: []
+ })
+ }
+ if(this.permissions.quality_teststandard_accept){
+ this.table.toolbar.push({
+ text: '鎵瑰噯',
+ disabled: false,
+ fun: ()=>{this.changeState('accept')},
+ permitArr: [],
+ })
+ }
+ if(this.permissions.quality_teststandard_revoke){
+ this.table.toolbar.push({
+ text: '鎷掔粷',
+ disabled: false,
+ fun: ()=>{this.changeState('reject')},
+ permitArr: [],
+ })
+ }
+ if(this.permissions.quality_teststandard_cancel){
+ this.table.toolbar.push({
+ text: '鎾ら攢',
+ disabled: false,
+ fun: () => {this.changeState('cancel')},
+ permitArr: [],
+ })
+ }
+ if(this.permissions.quality_teststandard_lose){
+ this.table.toolbar.push({
+ text: '澶辨晥',
+ disabled: false,
+ fun: () => {this.changeState('disabled')},
+ permitArr: [],
+ })
+ }
+ if(this.permissions.quality_teststandard_del){
+ this.table.toolbar.push({
+ text: '鎵归噺鍒犻櫎',
+ type:'primary',
+ disabled: false,
+ permitArr: [],
+ fun: ()=>{this.deleteAll()},
+ })
+ }
+ if(this.permissions.quality_teststandard_del){
+ this.table.operator = [{
+ text: '鍒犻櫎',
+ icon: 'el-icon-delete',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ }]
+ }
this.initDirParamType()
this.initDirInspectionType()
},
@@ -837,6 +867,12 @@
dataFormTestStandardParam() {
this.isSubmit = true
if (this.testStandardParams.length > 0) {
+ this.testStandardParams.map(m=>{
+ if(m.referenceValue != undefined) {
+ m.referenceValue = m.referenceValue.replace(',','锛�').replace('(','锛�').replace(')','锛�')
+ return m
+ }
+ })
addTestStandardParam(this.testStandardParams)
.then((response) => {
this.$message.success('妫�娴嬫爣鍑嗗弬鏁颁繚瀛樻垚鍔�')
--
Gitblit v1.9.3