From d20654ba067e5c0621d4d7d95915cbe47a10fe87 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 08 八月 2024 17:23:48 +0800
Subject: [PATCH] 1.正清和 增加页面缓存处理
---
src/views/qualityManager/qualityPlaning.vue | 99 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 81 insertions(+), 18 deletions(-)
diff --git a/src/views/qualityManager/qualityPlaning.vue b/src/views/qualityManager/qualityPlaning.vue
index b7b1a58..7b714f7 100644
--- a/src/views/qualityManager/qualityPlaning.vue
+++ b/src/views/qualityManager/qualityPlaning.vue
@@ -296,11 +296,29 @@
/>
</el-select>
</el-form-item>
+ <el-form-item label="鎵�灞炶溅闂�" prop="wkshopcode">
+ <el-select
+ v-model="dialogForm.wkshopcode"
+ filterable
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @change="getStepSelect"
+ >
+
+ <el-option
+ v-for="item in WorkShopArr"
+ :key="item.code"
+ :label="item.name"
+ :value="item.code"
+ />
+ </el-select>
+ </el-form-item>
<br>
<el-form-item prop="checktype" label="璐ㄦ绫诲瀷">
<el-radio-group v-model="dialogForm.checktype">
- <el-radio label="InCheck">鍏ュ巶妫�楠�</el-radio>
- <el-radio label="OutCheck">鍑哄巶妫�楠�</el-radio>
+ <!-- <el-radio label="InCheck">鍏ュ巶妫�楠�</el-radio>-->
+ <!-- <el-radio label="OutCheck">鍑哄巶妫�楠�</el-radio>-->
<el-radio label="FirstCheck">棣栨妫�楠�</el-radio>
<el-radio label="PatroCheck">宸℃</el-radio>
<el-radio label="EndCheck">瀹屽伐妫�</el-radio>
@@ -336,7 +354,6 @@
style="width: 200px"
multiple
filterable
-
collapse-tags
placeholder="璇烽�夋嫨"
:popper-append-to-body="false"
@@ -345,7 +362,7 @@
v-for="item in PartSelectArr"
v-if="dialogForm.suitobject==='P'"
:key="item.partcode"
- :label="item.partname"
+ :label="item.partname+'/'+item.partcode"
:value="item.partcode"
/>
<el-option
@@ -378,10 +395,10 @@
/>
</el-select>
</el-form-item>
-
<el-form-item label="妫�楠屾柟妗堟弿杩�">
<el-input v-model="dialogForm.descr" type="textarea" :autosize="{ minRows: 2 }" />
</el-form-item>
+
</el-form>
<div style="display: flex;align-items: center;margin-bottom: 10px;">
@@ -712,9 +729,10 @@
StepCheckItemSelect
} from '@/api/qualityManager'
import TableColumnSettings from '@/components/TableColumnSettings'
+import { WorkShopSelect } from '@/api/deviceManager'
export default {
- name: 'Zzjg',
+ name: 'QualityPlaning',
components: {
Pagination, TableColumnSettings
},
@@ -816,12 +834,33 @@
fixed: false,
sortable: true
},
+
+ {
+ minWidth: false,
+ width: 110,
+ prop: 'org_code',
+ label: '鎵�灞炶溅闂寸紪鐮�',
+ id: 9,
+ show: false,
+ fixed: false,
+ sortable: true
+ }, {
+ minWidth: false,
+ width: 110,
+ prop: 'org_name',
+ label: '鎵�灞炶溅闂�',
+ id: 10,
+ show: true,
+ fixed: false,
+ sortable: true
+ },
+
{
minWidth: false,
width: 110,
prop: 'stepcode',
label: '宸ュ簭缂栫爜',
- id: 9,
+ id: 11,
show: false,
fixed: false,
sortable: true
@@ -830,7 +869,7 @@
width: false,
prop: 'stepname',
label: '宸ュ簭鍚嶇О',
- id: 10,
+ id: 12,
show: true,
fixed: false,
sortable: true
@@ -840,7 +879,7 @@
width: 110,
prop: 'username',
label: '鍒涘缓浜哄憳',
- id: 11,
+ id: 13,
show: true,
fixed: false,
sortable: true
@@ -850,7 +889,7 @@
width: 160,
prop: 'lm_date',
label: '鍒涘缓鏃堕棿',
- id: 12,
+ id: 14,
show: true,
fixed: false,
sortable: true
@@ -869,6 +908,7 @@
suitobject: 'P', // 閫傜敤瀵硅薄
suitpart: [], // 閫傜敤鐗╂枡
stepcode: '', // 宸ュ簭
+ wkshopcode: '', // 鎵�灞炶溅闂�
descr: '' // /鎻忚堪
},
operation: '',
@@ -902,6 +942,9 @@
],
stepcode: [
{ required: true, message: '璇烽�夋嫨宸ュ簭鍚嶇О', trigger: ['blur', 'change'] }
+ ],
+ wkshopcode: [
+ { required: true, message: '璇烽�夋嫨鎵�灞炶溅闂�', trigger: ['blur', 'change'] }
]
},
checkitem: [],
@@ -918,6 +961,7 @@
CheckItemSelectArr: [], // 妫�楠岄」鐩�
StepSelectArr: [], // 宸ュ簭鍚嶇О涓嬫媺鎵�鏈�
+ WorkShopArr: [], // 鎵�灞炶溅闂存暟缁�
isCancel: true// 鏄惁鍙彇娑�
}
@@ -942,16 +986,25 @@
this.getQualityInspectionSearch().then(res => {
if (res.code === '200') {
// this.getUomSelect()
- this.getStepCheckItemSelect()
+ // this.getStepCheckItemSelect()
this.getPartSelect()
this.getStockTypeSelect()
- this.getStepSelect()
+
+ this.getWorkShopSelect()
}
})
},
- async getStepSelect() {
- const { data: res } = await StepSelect()
+ // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+ async getWorkShopSelect() {
+ const { data: res } = await WorkShopSelect()
+ this.WorkShopArr = res
+ },
+ async getStepSelect(val) {
+ this.dialogForm.stepcode = ''
+ const { data: res } = await StepSelect({ WorkShop: val })
this.StepSelectArr = res
+
+ await this.getStepCheckItemSelect(val)
},
async getQualityInspectionSearch() {
const res = await QualityInspectionSearch(this.form)
@@ -1017,6 +1070,7 @@
this.dialogForm.suitobject = row.suitobject
this.dialogForm.suitpart = row.suitpart.split(',')
this.dialogForm.descr = row.descr
+ this.dialogForm.wkshopcode = row.org_code
this.checkitem = res
this.$refs.tableDataRef2.doLayout()
@@ -1060,6 +1114,7 @@
this.dialogForm.suitobject = row.suitobject
this.dialogForm.suitpart = row.suitpart.split(',')
this.dialogForm.descr = row.descr
+ this.dialogForm.wkshopcode = row.org_code
this.checkitem = res
// console.log(this.checkitem, 2)
this.$refs.tableDataRef2.doLayout()
@@ -1105,9 +1160,9 @@
this.dialogForm.suitpart = []
},
// 鑾峰彇妫�楠岄」鐩笅鎷夋帴鍙�
- async getStepCheckItemSelect() {
- const { data: res } = await StepCheckItemSelect()
-
+ async getStepCheckItemSelect(val) {
+ const { data: res } = await StepCheckItemSelect({ WorkShop: val })
+ this.CheckItemSelectArr = []
res.forEach(i => {
this.CheckItemSelectArr.push({
code: i.code,
@@ -1210,7 +1265,8 @@
sampscale: '',
suitobject: 'P',
suitpart: [],
- descr: ''
+ descr: '',
+ wkshopcode: ''
}
this.isCancel = true
@@ -1228,6 +1284,12 @@
if (valid) {
if (this.checkitem.length < 1) {
return this.$message.info('璐ㄦ鍒楄〃涓嶈兘涓虹┖锛�')
+ }
+ if (this.checkitem.find(i => i.isVisible === 1)) {
+ return this.$message.info('璇峰厛淇濆瓨璐ㄦ鍒楄〃锛�')
+ }
+ if (this.dialogForm.checktype === 'InCheck' || this.dialogForm.checktype === 'OutCheck') {
+ this.dialogForm.stepcode = ''
}
const checkitem = []
@@ -1257,6 +1319,7 @@
suitpart: this.dialogForm.suitpart.join(','),
type: this.operation === 'add' ? 'Add' : 'Update',
descr: this.dialogForm.descr,
+ wkshopcode: this.dialogForm.wkshopcode,
checkitem
}
--
Gitblit v1.9.3