From 890cd9ab8cfbd642c7240413a2f2f51b7f6f0fa5 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 21 三月 2024 13:37:26 +0800 Subject: [PATCH] 完善下单 --- src/components/view/a5-capacity-scope.vue | 80 +++++++++++++++++++++++++++++++++------ 1 files changed, 67 insertions(+), 13 deletions(-) diff --git a/src/components/view/a5-capacity-scope.vue b/src/components/view/a5-capacity-scope.vue index 05a36fd..bf6e2dd 100644 --- a/src/components/view/a5-capacity-scope.vue +++ b/src/components/view/a5-capacity-scope.vue @@ -148,9 +148,6 @@ inspectionItemType: { select: [] }, - valueType: { - select: [] - }, bsm:{ select: [] }, @@ -161,15 +158,18 @@ select:[] }, method:{select:[]}, - deviceGroup:{select:[]} + deviceGroup:{select:[]}, + templateId:{ + select:[] + }, + sonLaboratory: {select:[]}, + unit: {select:[]}, + sample: {select:[]}, }, selectField: { inspectionItemType: { select: [] }, - valueType: { - select: [] - }, bsm:{ select: [] }, @@ -179,11 +179,17 @@ laboratory:{ select:[] }, - method:{select:[]}, - deviceGroup:{select:[]} + templateId:{ + select:[] + }, + method:{select:[],choose: true}, + deviceGroup:{select:[]}, + sample: {select:[]}, + sonLaboratory: {select:[]}, + unit: {select:[]} }, - requiredAdd: ['inspectionItem', 'manHour', 'inspectionItemType','inspectionValueType','inspectionItemClassify','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','valueType'], - requiredUp: ['inspectionItem', 'manHour', 'inspectionItemType','inspectionValueType','inspectionItemClassify','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','valueType'] + requiredAdd: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample'], + requiredUp: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample'] }, testObjectData: { entity: { @@ -225,12 +231,16 @@ this.itemParameterEntityCopy = this.HaveJson(this.itemParameterData.entity) this.testObjectDataEntityCopy = this.HaveJson(this.testObjectData.entity) this.selectEnumByCategory() - this.selectEnumByCategoryForValue() + // this.selectEnumByCategoryForValue() this.selectEnumByCategoryForSpecial() this.selectEnumByCategoryForInspectionValueType() this.obtainItemParameterList() this.selectStandardMethods() this.selectEnumByCategoryForDevice() + this.selectTestObjectByName() + this.getStandardTemplate() + this.selectEnumByCategoryForSLaboratory() + this.selectEnumByCategoryForUnit() this.getPower('0') }, methods: { @@ -285,7 +295,7 @@ }, selectEnumByCategoryForSpecial() { this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "鐗规畩鏍囪瘑" + category: "鏄惁" }).then(res => { this.itemParameterData.selectField.bsm.select = res.data this.itemParameterData.tagField.bsm.select = res.data @@ -305,6 +315,22 @@ }).then(res => { this.itemParameterData.selectField.deviceGroup.select = res.data this.itemParameterData.tagField.deviceGroup.select = res.data + }) + }, + selectEnumByCategoryForSLaboratory() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "瀛愬疄楠屽" + }).then(res => { + this.itemParameterData.selectField.sonLaboratory.select = res.data + this.itemParameterData.tagField.sonLaboratory.select = res.data + }) + }, + selectEnumByCategoryForUnit() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "鍗曚綅" + }).then(res => { + this.itemParameterData.selectField.unit.select = res.data + this.itemParameterData.tagField.unit.select = res.data }) }, obtainItemParameterList() { @@ -333,6 +359,34 @@ this.itemParameterData.tagField.method.select = data }) }, + selectTestObjectByName() { + this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.specimenName, + value: a.id, + type: 'success' + }) + }) + this.itemParameterData.selectField.sample.select = data + this.itemParameterData.tagField.sample.select = data + }) + }, + getStandardTemplate() { + this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id, + type: 'success' + }) + }) + this.itemParameterData.selectField.templateId.select = data + this.itemParameterData.tagField.templateId.select = data + }) + }, // 鏉冮檺鍒嗛厤 getPower(radio) { let power = JSON.parse(sessionStorage.getItem('power')) -- Gitblit v1.9.3