From ea7c19b7bfd7a5260fa321579e6941f28ef2eb46 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 27 八月 2026 11:36:30 +0800
Subject: [PATCH] fix(order): 解决实验室字段必填验证和数据源问题
---
src/views/business/productOrder/index.vue | 53 ++++++++++++++++++++++++++++-------------------------
1 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index b674f14..1f24b24 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -130,11 +130,11 @@
</div>
</el-col>
<el-col class="search_thing" style="width: 95%;">
- <div class="search_label"><span class="required-span">* </span>璇曢獙瀹わ細</div>
+ <div class="search_label">璇曢獙瀹わ細</div>
<div class="search_input">
<el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="璇烽�夋嫨" size="small"
style="width: 100%;">
- <el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label"
+ <el-option v-for="(item, i) in newJuLaboratoryList" :key="i + 'oooo'" :label="item.label"
:value="item.value">
</el-option>
</el-select>
@@ -166,7 +166,7 @@
<div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;">
<lims-table :tableData="componentDataDelete" :column="columnDelete" :isSelection="true"
:handleSelectionChange="selectDelete" @pagination="paginationDelete" height="500px"
- key="componentDataDelete" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
+ :key="orderId" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
</div>
<span slot="footer" class="dialog-footer">
<el-row>
@@ -330,9 +330,12 @@
import {
checkUpdate, delInsOrder, getSampleByOrderId,
rawAllInsOrderExport,
- selectInsOrderParameter, selectNoProducts, selectOrderManDay,
+ selectInsOrderParameter,
+ selectNoProducts,
+ getRevocationInsProductList,
+ selectOrderManDay,
updateInspected,
- updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2
+ updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
@@ -762,7 +765,6 @@
],
qrData: [],
multipleSelection: [],
- sonLaboratoryList: [],
printDialog: false,
addInspectionDia: false,
dialogVisible: false,
@@ -780,8 +782,12 @@
}
}
},
+ dicts: ['sys_sub_lab'],
computed: {
...mapGetters(["nickName"]),
+ newJuLaboratoryList() {
+ return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
+ },
},
mounted() {
if (this.checkPermi(['get:raw:await'])) {
@@ -1167,7 +1173,20 @@
this.orderId = row.id
this.revocationInsProductIds = row.revocationInsProductIds
this.deleteTilte = '鎾ら攢瀹℃牳'
+ // this.getRevocationInsProductList()
this.deleteDialogVisible = true;
+ },
+ getRevocationInsProductList(){
+ this.tableLoadingDelete = true
+ getRevocationInsProductList({orderId:this.orderId}).then(res=>{
+ if(res.code===200){
+ this.componentDataDelete = res.data
+ }
+ this.tableLoadingDelete = false
+ }).catch(error=>{
+ console.error(error)
+ this.tableLoadingDelete = false
+ })
},
handleNo() {
if (this.deleteTilte == '鎾ら攢') {
@@ -1186,6 +1205,7 @@
// 涓嬪彂
handleIssued(row) {
this.issuedDialogVisible = true;
+ this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
selectOrderManDay({
id: row.id
}).then(res => {
@@ -1193,19 +1213,6 @@
this.distributeData.sampleId = row.sampleId
this.distributeData.appointed = res.data
this.distributeData.type = row.type
- })
- upPlanUser2({
- orderId: row.id,
- }).then(res => {
- if (res.code === 200 && res.data.length > 0) {
- this.sonLaboratoryList = [];
- res.data.forEach(m => {
- this.sonLaboratoryList.push({
- value: m,
- label: m
- })
- })
- }
})
},
submitForm2() {
@@ -1216,10 +1223,6 @@
//
if (this.distributeData.userId == null || this.distributeData.userId == '') {
this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
- return
- }
- if (this.distributeData.userId && (this.distributeData.sonLaboratory == null || this.distributeData.sonLaboratory == '')) {
- this.$message.error('璇曢獙瀹ゆ湭濉啓')
return
}
this.upLoad = true;
@@ -1321,8 +1324,8 @@
this.InspectionKey++
},
changeUser() {
- if (this.sonLaboratoryList.length > 0) {
- this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
+ if (this.newJuLaboratoryList.length > 0) {
+ this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
}
},
handleDelete(row) {
--
Gitblit v1.9.3