From 5cd744dcc854a9203234fc95d55521c8caa8dd6d Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期三, 30 八月 2023 09:25:29 +0800
Subject: [PATCH] 委托查询信息
---
src/views/inspectionManagement/commissionInspection/addCommision.vue | 45 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 224952b..d3888f7 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -177,12 +177,11 @@
<el-col :span="11">
<el-form-item label="瑙勬牸鍨嬪彿锛�">
<el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="璇峰厛閫夋嫨鏍峰搧鍚嶇О">
- <el-option v-for="options in model_spe_options" :value="options.value"
+ <el-option v-for="options in model_sta_options" :value="options.value"
:key="options.key">{{ options.value }}</el-option>
</el-select>
</el-form-item>
</el-col>
-
</el-row>
<el-row :gutter="50">
@@ -191,13 +190,11 @@
<el-input type="text" v-model="addPointerForm.unit" placeholder="璇疯緭鍏ュ崟浣�" autocomplete="off" />
</el-form-item>
</el-col>
-
<el-col :span="11">
<el-form-item label="鏍峰搧鏁伴噺锛�">
<el-input type="text" v-model="addPointerForm.samplesNumber" placeholder="璇疯緭鍏ユ暟閲�" autocomplete="off" />
</el-form-item>
</el-col>
-
</el-row>
<el-row :gutter="50">
<el-col :span="9">
@@ -210,7 +207,8 @@
</el-col>
<el-col :span="41">
<el-form-item label="澶囨敞锛�">
- <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;" v-model="addPointerForm.remarks" placeholder="璇疯緭鍏ュ娉�" autocomplete="off" />
+ <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}" style="width: 200px;"
+ v-model="addPointerForm.remarks" placeholder="璇疯緭鍏ュ娉�" autocomplete="off" />
</el-form-item>
</el-col>
</el-row>
@@ -231,7 +229,8 @@
getModelSpecification,
getlink,
addInspection,
- isIfViewUUID
+ isIfViewUUID,
+ getContractsSampleInfo
} from '@/api/inspection/commisioninspection'
export default {
data() {
@@ -288,6 +287,8 @@
value: ''
}],
model_spe_options: [],
+ model_sta_options: [],
+ model_options: [],
sampleDeliveryMode: [{
key: '1',
value: '閫佹牱'
@@ -300,10 +301,31 @@
viewId: null
}
},
+ watch: {
+ addPointerForm: {
+ handler: function(val) {
+ if(val.addway!=""){
+ this.model_sta_options = []
+ this.model_options.forEach(a=>{
+ if(a.specificationsName==val.addway){
+ this.model_sta_options = a.children.map(item=>{
+ return{
+ key: item.modelId,
+ value: item.modelName
+ }
+ })
+ }
+ })
+ }
+ },
+ deep: true
+ }
+ },
created() {
this.viewId = this.$route.params.viewId
this.$store.commit('settings/SAVE_LINK', this.viewId)
this.getlink(this.$route.params.viewId)
+ this.getContractsSampleInfo(this.$route.params.viewId)
},
mounted() {
this.getSampleName()
@@ -324,6 +346,10 @@
}
})
},
+ async getContractsSampleInfo(viewId){
+ let res=await getContractsSampleInfo({viewId})
+ console.log(res.data);
+ },
async getSampleName() {
const res = await getSampleName()
this.sampleoptions = res.data.map((item) => {
@@ -338,6 +364,7 @@
const res = await getModelSpecification({
materialId: val
})
+ this.model_options = res.data
this.model_spe_options = res.data.map((item) => {
return {
key: item.specificationsId,
@@ -351,7 +378,7 @@
for (let i = 1; i < this.addPointerForm.experiment.length; i++) {
exper += ',' + this.addPointerForm.experiment[i]
}
-
+
// console.log(exper)
this.addPointerForm.experiment = exper
let tmp = this.addPointerForm
@@ -429,6 +456,10 @@
background-color: #f0f2f5;
width: 100%;
height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ // align-items: center;
.firstBox {
.title {
--
Gitblit v1.9.3