From 437b40045ce48b28e2817b0f9f9998d3a881ebe1 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 05 九月 2023 16:39:02 +0800
Subject: [PATCH] modified: src/components/experiment/template_testReport/index.vue modified: src/utils/GlobalClickMixin.js modified: src/views/experiment/passRateStatistics/index.vue modified: src/views/experiment/planAssignments/plan.vue modified: src/views/laboratory/measure/index.vue modified: src/views/laboratory/personnel/index.vue modified: src/views/standardLibrary/index.vue
---
src/views/inspectionManagement/commissionInspection/addCommision.vue | 98 +++++++++++++++++++++++++++++-------------------
1 files changed, 59 insertions(+), 39 deletions(-)
diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 5874594..a68cbc8 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -21,13 +21,12 @@
:data="detectionInfo" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" label="搴忓彿" min-width="10%" />
<el-table-column prop="sampleNumber" label="鏍峰搧缂栧彿" min-width="8%" />
-
<el-table-column prop="sampleName" label="鏍峰搧鍚嶇О" min-width="10%" />
-
- <el-table-column prop="specificationsModels" label="瑙勬牸鍨嬪彿" min-width="10%" />
+ <el-table-column prop="speName" label="瑙勬牸鍨嬪彿" min-width="10%">
+ </el-table-column>
<el-table-column prop="unit" label="鍗曚綅" min-width="8%" />
<el-table-column prop="samplesNumber" label="鏁伴噺" min-width="8%" />
- <el-table-column prop="addway" label="娣诲姞鏂瑰紡" min-width="8%">
+ <!-- <el-table-column prop="addway" label="娣诲姞鏂瑰紡" min-width="8%">
<template slot-scope="scope">
<div v-if="scope.row.addway === 0">
<el-tag type="success" disable-transitions>鎵弿</el-tag>
@@ -37,7 +36,7 @@
</div>
<div v-else></div>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column prop="remarks" label="澶囨敞" min-width="8%" />
<el-table-column label="鎿嶄綔" min-width="8%">
<template slot-scope="scope">
@@ -102,8 +101,8 @@
<el-col :span="5">
<el-form-item label="閫佹牱鏂瑰紡锛�">
<el-select style="width: 200px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
- <el-option v-for="options in sampleDeliveryMode" :key="options.key"
- :value="options.value">{{ options.value }}</el-option>
+ <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.key"
+ :label="options.value">{{ options.value }}</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -229,7 +228,9 @@
getlink,
addInspection,
isIfViewUUID,
- getProductList
+ getProductList,
+ getContractsSampleInfo,
+ getSpecificationsName
} from '@/api/inspection/commisioninspection'
export default {
data() {
@@ -261,30 +262,9 @@
experiment: [],
addway: ''
},
- experList: [{
- key: '1',
- label: '澶栬妫�鏌�'
- }, {
- key: '2',
- label: '鍔ㄤ綔鐢靛帇璇曢獙'
- }, {
- key: '3',
- label: '鐢甸樆绠℃硠婕忕數娴佽瘯楠�'
- }, {
- key: '4',
- label: '缁濈紭閮ㄥ垎浜ゆ祦鑰愬帇璇曢獙'
- }],
- sampleoptions: [{
- key: '1',
- value: '閫夐」1'
- }, {
- key: '2',
- value: '閫夐」2'
- }],
- samplecodeoptions: [{
- key: '1',
- value: ''
- }],
+ experList: [],
+ sampleoptions: [],
+ samplecodeoptions: [],
model_spe_options: [],
model_sta_options: [],
model_options: [],
@@ -325,6 +305,7 @@
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()
@@ -342,7 +323,14 @@
if (!res.data) {
this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
this.$router.push('/404')
+ } else {
+ this.getContractsSampleInfo()
}
+ })
+ },
+ async getContractsSampleInfo(viewId) {
+ let res = await getContractsSampleInfo({
+ viewId
})
},
async getSampleName() {
@@ -369,14 +357,16 @@
},
addInspection() {
let exper = this.addPointerForm.experiment[0]
- this.addPointerForm.addway = 1
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
+ this.sampleoptions.forEach(a => {
+ if (a.key == tmp.sampleName) tmp.sampleName = a.value
+ })
+ tmp.speName = tmp.addway + '-' + tmp.speName
+ tmp.addway = 1
this.detectionInfo.push(tmp)
this.dialogueFormVisible = false
this.addPointerForm = {
@@ -387,7 +377,8 @@
samplesNumber: '',
remarks: '',
experiment: [],
- addway: ''
+ addway: '',
+ speName: ''
}
},
async submitInspection() {
@@ -409,12 +400,13 @@
reportNumber: parseInt(this.infoForm.num),
sampleDeliveryMode: sampledeliveryway,
sampleDeliveryPhone: this.infoForm.sendertel,
- sampleSender: this.infoForm.sender
+ sampleSender: this.infoForm.sender,
+ speName: this.infoForm.speName
})
this.infoForm.commisioncode = res.data
if (res.data) {
this.$message({
- message: '鎭枩浣�!',
+ message: '娣诲姞鎴愬姛!',
type: 'success'
})
this.showDetail = true
@@ -447,7 +439,35 @@
return item.name
})
})
- }
+ this.model_sta_options.forEach(a => {
+ if (a.key == val) {
+ this.addPointerForm.speName = a.value
+ }
+ })
+ },
+ getContractsSampleInfo() {
+ getContractsSampleInfo({
+ viewId: this.viewId
+ }).then(res => {
+ if (res.data == null) return
+ this.infoForm = {
+ commisioncode: res.data.entrustCoding,
+ deadline: res.data.completionDeadline,
+ address: res.data.contactAddress,
+ tel: res.data.contactNumber,
+ contacter: res.data.contacts,
+ other: res.data.entrustRemarks,
+ department: res.data.entrusted,
+ time: res.data.inspectionTime,
+ detectionInfo: res.data.linkDetectionList,
+ num: res.data.reportNumber,
+ way: '' + res.data.sampleDeliveryMode,
+ sendertel: res.data.sampleDeliveryPhone,
+ sender: res.data.sampleSender
+ }
+ this.detectionInfo = res.data.linkDetectionList
+ })
+ },
}
}
</script>
--
Gitblit v1.9.3