From 049fda473cc178917a02f3a174dfd08a84b0cb8d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 17 九月 2026 10:52:28 +0800
Subject: [PATCH] 新疆——新聚lims 1.每个检验项都要有一个选择检测时间的地方,跟温湿度放在一起,还有检测地点,设备也要单独绑定检验项,最后导出模版再总结到一起 2.产品名称改为检测依据、加一个样品名称手输 3.下单时原始记录模板可以从标准库绑定的模板进行删减
---
src/views/business/inspectionTask/components/InspectionWord.vue | 130 +++++++++--
src/views/structural/premises/index.vue | 28 +-
src/views/business/productOrder/components/addOrder.vue | 177 ++++++++++-----
src/views/business/productOrder/components/addView.vue | 86 ++++---
src/views/business/inspectionTask/inspection.vue | 205 ++++++++++++------
src/views/business/productOrder/index.vue | 9
6 files changed, 435 insertions(+), 200 deletions(-)
diff --git a/src/views/business/inspectionTask/components/InspectionWord.vue b/src/views/business/inspectionTask/components/InspectionWord.vue
index 0b59485..666c720 100644
--- a/src/views/business/inspectionTask/components/InspectionWord.vue
+++ b/src/views/business/inspectionTask/components/InspectionWord.vue
@@ -26,18 +26,35 @@
</el-select>
</div>
</div>
- <div style="text-align: left; margin-top: 8px;">
- <el-form :inline="true" :model="currentOtherForm" class="form-inline" label-width="50px"
- style="text-align: left; display: inline">
- <el-form-item label="娓╁害:" style="margin-bottom: 0">
+ <div class="template-panel">
+ <el-form :inline="true" :model="currentOtherForm" class="form-inline" size="small" label-width="84px">
+ <el-form-item label="娓╁害:">
<el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small"
style="width: 90px" @change="m => subOtherForm(m, 'temperature')"></el-input>
- <span style="margin-left: 4px">鈩�</span>
+ <span class="template-panel__unit">鈩�</span>
</el-form-item>
- <el-form-item label="婀垮害:" style="margin-bottom: 0">
+ <el-form-item label="婀垮害:">
<el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small"
style="width: 90px" @change="m => subOtherForm(m, 'humidity')"></el-input>
- <span style="margin-left: 4px">%RH</span>
+ <span class="template-panel__unit">%RH</span>
+ </el-form-item>
+ <el-form-item label="妫�娴嬫椂闂�:">
+ <el-date-picker v-model="currentOtherForm.detectionTime" :disabled="state > 1" type="date"
+ value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨鏃ユ湡" size="small" style="width: 160px"
+ @change="m => subOtherForm(m, 'detectionTime')"></el-date-picker>
+ </el-form-item>
+ <el-form-item label="妫�娴嬪湴鐐�:">
+ <el-input v-model="currentOtherForm.detectionPlace" :disabled="state > 1" clearable
+ placeholder="璇疯緭鍏ユ娴嬪湴鐐�" size="small" style="width: 200px"
+ @change="m => subOtherForm(m, 'detectionPlace')"></el-input>
+ </el-form-item>
+ <el-form-item v-if="isDirectTemplateOrder()" label="璁惧:">
+ <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
+ size="small" placeholder="璇烽�夋嫨璁惧" style="width: 360px"
+ @change="m => subOtherForm(m, 'deviceIds')">
+ <el-option v-for="device in deviceOptions" :key="device.id" :label="device.label"
+ :value="device.id" />
+ </el-select>
</el-form-item>
</el-form>
</div>
@@ -356,8 +373,9 @@
numOptions: [],
temperatureOptions: [],
wareTableData: [],
- // 娓╁害銆佹箍搴︽寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, humidity } }
+ // 妫�娴嬫潯浠舵寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, humidity, detectionTime, detectionPlace, deviceIds } }
otherForm: {},
+ deviceOptions: [],
equipForm: {
value0: null,
code0: null,
@@ -433,11 +451,14 @@
action() {
return this.javaApi + "/insOrderPlan/uploadFile";
},
- // 褰撳墠妯℃澘瀵瑰簲鐨勬俯搴︺�佹箍搴�
+ // 褰撳墠妯℃澘瀵瑰簲鐨勬娴嬫潯浠�
currentOtherForm() {
return this.otherForm[this.currentTable] || {
temperature: null,
- humidity: null
+ humidity: null,
+ detectionTime: null,
+ detectionPlace: null,
+ deviceIds: []
}
}
},
@@ -474,19 +495,25 @@
this.sampleProduct = res.data.sampleProduct
this.currentSample = this.HaveJson(this.sampleProduct[0])
let insProduct = this.HaveJson(this.currentSample.insProduct)
- // 娓╁害銆佹箍搴﹁祴鍊硷細鎸夋ā鏉� id 鍒嗙粍鍥炴樉
+ // 妫�娴嬫潯浠惰祴鍊硷細鎸夋ā鏉� id 鍒嗙粍鍥炴樉
this.otherForm = {}
const conditionList = this.insOrder.templateConditions || []
conditionList.forEach(item => {
this.$set(this.otherForm, item.templateId, {
temperature: item.temperature != null ? item.temperature : null,
- humidity: item.humidity != null ? item.humidity : null
+ humidity: item.humidity != null ? item.humidity : null,
+ detectionTime: item.detectionTime != null ? item.detectionTime : null,
+ detectionPlace: item.detectionPlace != null ? item.detectionPlace : null,
+ deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : []
})
})
if (this.typeSource == '1') {
this.retestTag = '1'
}
this.getEquipOptions(1)
+ if (this.sonLaboratory === '鏂拌仛') {
+ this.loadDeviceOptions()
+ }
// 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
let list = await this.getCurrentProduct(this.currentSample.id, 0)
if (list === undefined) {
@@ -1318,6 +1345,21 @@
})
}
},
+ // 鏂拌仛鐩存帴缁戝畾妯℃澘鐨勫崟鎹紝璁惧鎸夋ā鏉块�夋嫨
+ isDirectTemplateOrder() {
+ return this.sonLaboratory === '鏂拌仛' && this.currentSample &&
+ (this.currentSample.insProduct || []).some(product => product.templateRowIndex != null)
+ },
+ loadDeviceOptions() {
+ search({ status: 0 }).then(res => {
+ this.deviceOptions = (res.data || []).map(device => ({
+ id: device.id,
+ label: `${device.deviceName}--${device.managementNumber}`
+ }))
+ }).catch(error => {
+ console.error(error)
+ })
+ },
getUserInfo() {
getUserNow().then(res => {
this.userId = res.data.id
@@ -1372,23 +1414,33 @@
this.$message.error('鏈緭鍏ヤ笉閫氳繃鍘熷洜')
}
},
- // 淇濊瘉妯℃澘鐨勬俯搴︺�佹箍搴︽Ы浣嶅瓨鍦�
+ // 淇濊瘉妯℃澘鐨勬娴嬫潯浠舵Ы浣嶅瓨鍦�
ensureOtherForm(templateId) {
if (templateId == null) return
if (!this.otherForm[templateId]) {
this.$set(this.otherForm, templateId, {
temperature: null,
- humidity: null
+ humidity: null,
+ detectionTime: null,
+ detectionPlace: null,
+ deviceIds: []
})
}
},
- // 淇濆瓨褰撳墠妯℃澘鐨勬俯搴︺�佹箍搴�
+ // 淇濆瓨褰撳墠妯℃澘鐨勬娴嬫潯浠�
subOtherForm(m, type) {
- write({
+ const payload = {
id: this.insOrder.id,
- templateId: this.currentTable,
- [type]: Number(m)
- }).then(res => {
+ templateId: this.currentTable
+ }
+ if (type === 'deviceIds') {
+ payload.deviceIds = Array.isArray(m) ? [...m] : []
+ } else if (type === 'detectionTime' || type === 'detectionPlace') {
+ payload[type] = m === '' || m == null ? null : m
+ } else {
+ payload[type] = Number(m)
+ }
+ write(payload).then(res => {
this.$message.success("淇濆瓨鎴愬姛")
})
},
@@ -1397,17 +1449,19 @@
this.$message.error("璇锋寚瀹氬鏍镐汉鍛�")
return
}
- const labels = { temperature: "娓╁害", humidity: "婀垮害" }
- const keys = ["temperature", "humidity"]
const missing = []
this.tableLists.forEach(m => {
const form = this.otherForm[m.templateId] || {}
- keys.forEach(key => {
- if (!form[key]) missing.push(`銆�${m.templateName}銆嶇殑${labels[key]}`)
- })
+ if (!form.temperature) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑娓╁害`)
+ if (!form.humidity) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑婀垮害`)
+ if (!form.detectionTime) missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑妫�娴嬫椂闂碻)
+ if (!form.detectionPlace) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑妫�娴嬪湴鐐筦)
+ if (this.isDirectTemplateOrder() && (!form.deviceIds || form.deviceIds.length === 0)) {
+ missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑璁惧`)
+ }
})
if (missing.length > 0) {
- this.$message.error(`璇峰~鍐�${missing[0]}`)
+ this.$message.error(missing[0])
return
}
this.submitLoading = true;
@@ -1737,6 +1791,32 @@
text-align: left;
}
+/* 褰撳墠妫�楠屾ā鏉跨殑妫�娴嬫潯浠� */
+.template-panel {
+ background-color: #f8f9fb;
+ border: 1px solid #ebeef5;
+ border-radius: 3px;
+ padding: 16px 16px 4px;
+ margin-top: 12px;
+ text-align: left;
+}
+
+/* form-item 鐢� inline-flex 淇濊瘉 label 涓庢帶浠跺悓琛岋紝涓嶄緷璧栬鐩掑搴︽帹绠� */
+.template-panel>>>.el-form-item {
+ display: inline-flex;
+ align-items: center;
+ margin-bottom: 12px;
+}
+
+.template-panel>>>.el-form-item__label {
+ flex: none;
+}
+
+.template-panel__unit {
+ margin-left: 4px;
+ color: #606266;
+}
+
.center {
width: calc(100% - 40px);
/* max-height: 580px; */
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index 0020801..eac01ab 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -1,22 +1,7 @@
<template>
<div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
<el-row class="title">
- <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left">
- <el-form :inline="true" :model="currentOtherForm" class="form-inline" label-width="50px"
- style="text-align: right; padding-top: 0; display: inline">
- <el-form-item label="娓╁害:" style="margin-bottom: 0">
- <el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small"
- style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'temperature')"></el-input>
- <span style="margin-left: 4px">鈩�</span>
- </el-form-item>
- <el-form-item label="婀垮害:" style="margin-bottom: 0">
- <el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small"
- style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'humidity')"></el-input>
- <span style="margin-left: 4px">%RH</span>
- </el-form-item>
- </el-form>
- </el-col>
- <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right">
+ <el-col :span="24" style="text-align: right">
<el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS鐗╂枡灞炴�ф洿鏂�</el-button>
<el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button>
<el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button>
@@ -106,8 +91,9 @@
</template>
<template v-else>
<el-descriptions-item label="濮旀墭缂栧彿">{{ insOrder.entrustCode }}</el-descriptions-item>
+ <el-descriptions-item label="妫�娴嬩緷鎹�">{{ insOrder.sample || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍚嶇О">{{ insOrder.sampleView || '-' }}</el-descriptions-item>
<el-descriptions-item label="鏍峰搧缂栧彿">{{ currentSample.sampleCode }}</el-descriptions-item>
- <el-descriptions-item label="鏍峰搧鍚嶇О">{{ currentSample.sample }}</el-descriptions-item>
<el-descriptions-item label="鏍峰搧鏁伴噺">{{ insOrder.testQuantity }}</el-descriptions-item>
<el-descriptions-item label="涓嬪彂鏃堕棿">{{ insOrder.sendTime }}</el-descriptions-item>
<el-descriptions-item label="绱ф�ョ▼搴�">{{ insOrder.typeName }}</el-descriptions-item>
@@ -117,18 +103,6 @@
<el-descriptions-item label="澶囨敞">
<el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="璇疯緭鍏�" size="small"
@blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
- </el-descriptions-item>
- <el-descriptions-item v-if="isDirectTemplateOrder()" label="璁惧" :span="2">
- <el-select v-model="selectedDeviceIds" multiple filterable clearable size="small" placeholder="璇烽�夋嫨璁惧"
- :disabled="state != 1" @change="saveOverviewDevices">
- <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" />
- </el-select>
- </el-descriptions-item>
- <el-descriptions-item label="妫�楠岀粨璁�">
- <el-radio-group v-model="reviewInsResult" :disabled="state != 2">
- <el-radio :label="1">鍚堟牸</el-radio>
- <el-radio :label="0">涓嶅悎鏍�</el-radio>
- </el-radio-group>
</el-descriptions-item>
</el-descriptions>
</div>
@@ -200,6 +174,50 @@
@click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "鍏抽棴缂栬緫" : "缂栬緫鏁伴噰"
}}</el-button>
</div>
+ </div>
+ <!-- 褰撳墠妫�楠屾ā鏉跨殑妫�娴嬫潯浠朵笌妫�楠岀粨璁� -->
+ <div class="template-panel">
+ <el-form v-if="showTemplateConditions" :inline="true" :model="currentOtherForm" class="form-inline"
+ size="small" label-width="84px">
+ <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="娓╁害:">
+ <el-input v-model="currentOtherForm.temperature" :disabled="state > 1" placeholder="" size="small"
+ style="width: 90px" @change="(m) => subOtherForm(m, 'temperature')"></el-input>
+ <span class="template-panel__unit">鈩�</span>
+ </el-form-item>
+ <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="婀垮害:">
+ <el-input v-model="currentOtherForm.humidity" :disabled="state > 1" placeholder="" size="small"
+ style="width: 90px" @change="(m) => subOtherForm(m, 'humidity')"></el-input>
+ <span class="template-panel__unit">%RH</span>
+ </el-form-item>
+ <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="妫�娴嬫椂闂�:">
+ <el-date-picker v-model="currentOtherForm.detectionTime" :disabled="state > 1" type="date"
+ value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨鏃ユ湡" size="small" style="width: 160px"
+ @change="(m) => subOtherForm(m, 'detectionTime')"></el-date-picker>
+ </el-form-item>
+ <el-form-item v-if="insOrder.ifsOrderType!=='02wg'" label="妫�娴嬪湴鐐�:">
+ <el-input v-model="currentOtherForm.detectionPlace" :disabled="state > 1" clearable placeholder="璇疯緭鍏ユ娴嬪湴鐐�"
+ size="small" style="width: 200px" @change="(m) => subOtherForm(m, 'detectionPlace')"></el-input>
+ </el-form-item>
+ <el-form-item v-if="isDirectTemplateOrder()" label="璁惧:">
+ <el-select v-model="currentOtherForm.deviceIds" :disabled="state != 1" multiple filterable clearable
+ size="small" placeholder="璇烽�夋嫨璁惧" style="width: 360px"
+ @change="(m) => subOtherForm(m, 'deviceIds')">
+ <el-option v-for="device in orderDeviceOptions" :key="device.id" :label="device.label" :value="device.id" />
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <!-- 澶嶆牳鏃舵墠鑳介�� -->
+ <el-form :inline="true" :model="currentOtherForm"
+ :class="['form-inline', { 'template-panel__conclusion--divided': showTemplateConditions }]"
+ size="small" label-width="84px">
+ <el-form-item label="妫�楠岀粨璁�:">
+ <el-radio-group v-model="currentOtherForm.insResult" :disabled="state != 2"
+ @change="(m) => subOtherForm(m, 'insResult')">
+ <el-radio :label="1">鍚堟牸</el-radio>
+ <el-radio :label="0">涓嶅悎鏍�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-form>
</div>
<!-- 甯歌妫�楠屽師濮嬭褰� -->
<div id="nav" v-loading="tableLoading" class="center-box">
@@ -583,8 +601,6 @@
submitPlan,
saveInsContext,
saveTemplateContext,
- getOrderDevices,
- saveOrderDevices,
selectUserCondition,
downFile,
getFileList,
@@ -668,11 +684,9 @@
excelMethodList: [],
equipOptions: [],
orderDeviceOptions: [],
- selectedDeviceIds: [],
reviewLoading: false,
reviewDia: false,
noReason: "",
- reviewInsResult: null,
tableWidth: 1000,
currentTable: null,
tableLists: [],
@@ -689,7 +703,7 @@
inspectionItem: 1,
inspectionItemSubclass: "20(甯告俯)",
},
- // 娓╁害銆佹箍搴︽寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, humidity } }
+ // 妫�娴嬫潯浠朵笌妫�楠岀粨璁烘寜妯℃澘 id 鍒嗙粍锛歿 [templateId]: { temperature, humidity, detectionTime, detectionPlace, deviceIds, insResult } }
otherForm: {},
equipForm: {
value0: null,
@@ -843,14 +857,22 @@
action() {
return this.javaApi + "/insOrderPlan/uploadFile";
},
- // 褰撳墠妯℃澘瀵瑰簲鐨勬俯搴︺�佹箍搴�
+ // 褰撳墠妯℃澘瀵瑰簲鐨勬娴嬫潯浠朵笌妫�楠岀粨璁�
currentOtherForm() {
return (
this.otherForm[this.currentTable] || {
temperature: null,
humidity: null,
+ detectionTime: null,
+ detectionPlace: null,
+ deviceIds: [],
+ insResult: null,
}
);
+ },
+ // 02wg 鍗曟病鏈夋俯婀垮害锛涙柊鑱氱洿鎺ョ粦瀹氭ā鏉跨殑鍗曞彧鏈夎澶�
+ showTemplateConditions() {
+ return this.insOrder.ifsOrderType !== "02wg" || this.isDirectTemplateOrder();
},
},
created() {
@@ -926,7 +948,7 @@
this.tableList = this.tableLists.filter(
(m) => m.templateId == val1
);
- // 妯℃澘闆嗗悎鍙兘鍙樺寲锛岃ˉ榻愭俯搴︺�佹箍搴︽Ы浣�
+ // 妯℃澘闆嗗悎鍙兘鍙樺寲锛岃ˉ榻愭娴嬫潯浠舵Ы浣�
this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId));
// 瀵规ā鏉胯繘琛屽鐞�
this.handleTableData();
@@ -1094,7 +1116,6 @@
laboratory: this.sonLaboratory,
}).then(async (res) => {
this.insOrder = res.data.insOrder;
- this.reviewInsResult = this.insOrder.insResult;
if(res.data.insOrder.ifsOrderType==='02wg'){
//鏌ヨ闆朵欢灞炴��
this.getPartProps(res.data.insOrder.ifsInventoryId)
@@ -1115,12 +1136,16 @@
this.sampleProduct = res.data.sampleProduct;
this.currentSample = this.HaveJson(this.sampleProduct[0]);
let insProduct = this.HaveJson(this.currentSample.insProduct);
- // 娓╁害銆佹箍搴﹁祴鍊硷細鎸夋ā鏉� id 鍒嗙粍鍥炴樉
+ // 妫�娴嬫潯浠朵笌妫�楠岀粨璁鸿祴鍊硷細鎸夋ā鏉� id 鍒嗙粍鍥炴樉
this.otherForm = {};
(this.insOrder.templateConditions || []).forEach((item) => {
this.$set(this.otherForm, item.templateId, {
temperature: item.temperature != null ? item.temperature : null,
humidity: item.humidity != null ? item.humidity : null,
+ detectionTime: item.detectionTime != null ? item.detectionTime : null,
+ detectionPlace: item.detectionPlace != null ? item.detectionPlace : null,
+ deviceIds: Array.isArray(item.deviceIds) ? [...item.deviceIds] : [],
+ insResult: item.insResult != null ? item.insResult : null,
});
});
this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId));
@@ -1130,7 +1155,7 @@
}
this.getEquipOptions(1);
if (this.sonLaboratory === "鏂拌仛") {
- this.loadOverviewDevices();
+ this.loadDeviceOptions();
}
// 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
let list = await this.getCurrentProduct(this.currentSample.id, 0);
@@ -1629,24 +1654,34 @@
this.worker0 = null;
}
},
- // 淇濊瘉妯℃澘鐨勬俯搴︺�佹箍搴︽Ы浣嶅瓨鍦�
+ // 淇濊瘉妯℃澘鐨勬娴嬫潯浠朵笌妫�楠岀粨璁烘Ы浣嶅瓨鍦�
ensureOtherForm(templateId) {
if (templateId == null) return;
if (!this.otherForm[templateId]) {
this.$set(this.otherForm, templateId, {
temperature: null,
humidity: null,
+ detectionTime: null,
+ detectionPlace: null,
+ deviceIds: [],
+ insResult: null,
});
}
},
- // 淇濆瓨褰撳墠妯℃澘鐨勬俯搴︺�佹箍搴︼紱澶囨敞鏄崟鎹骇锛屼笉甯︽ā鏉�
+ // 淇濆瓨褰撳墠妯℃澘鐨勬娴嬫潯浠朵笌妫�楠岀粨璁猴紱澶囨敞鏄崟鎹骇锛屼笉甯︽ā鏉�
subOtherForm(m, type) {
const payload = { id: this.insOrder.id };
if (type === "remark") {
payload.remark = m;
} else {
payload.templateId = this.currentTable;
- payload[type] = Number(m);
+ if (type === "deviceIds") {
+ payload.deviceIds = Array.isArray(m) ? [...m] : [];
+ } else if (type === "detectionTime" || type === "detectionPlace") {
+ payload[type] = m === "" || m == null ? null : m;
+ } else {
+ payload[type] = Number(m);
+ }
}
write(payload).then((res) => {
this.$message.success("淇濆瓨鎴愬姛");
@@ -1815,7 +1850,7 @@
this.tableList = null;
this.tableList = [this.tableLists[0]];
this.currentTable = this.tableLists[0].templateId;
- // 琛ラ綈姣忎釜妯℃澘鐨勬俯搴︺�佹箍搴︽Ы浣�
+ // 琛ラ綈姣忎釜妯℃澘鐨勬娴嬫潯浠舵Ы浣�
this.tableLists.forEach((m) => this.ensureOtherForm(m.templateId));
// 澶勭悊椤甸潰鍒楄〃鏁版嵁
this.handleTableData();
@@ -2214,8 +2249,15 @@
upInsReview(e) {
if (e == 1) {
// 閫氳繃
- if (this.reviewInsResult !== 0 && this.reviewInsResult !== 1) {
- this.$message.error("璇烽�夋嫨妫�楠岀粨璁�");
+ // 姣忎釜妯℃澘閮借鏈夌粨璁猴紱鍏ㄩ儴鍚堟牸鎵嶇畻鏁村崟鍚堟牸
+ const insResults = this.tableLists.map(
+ (m) => (this.otherForm[m.templateId] || {}).insResult
+ );
+ const missingIndex = insResults.findIndex((r) => r !== 0 && r !== 1);
+ if (missingIndex > -1) {
+ this.$message.error(
+ `璇烽�夋嫨銆�${this.tableLists[missingIndex].templateName}銆嶇殑妫�楠岀粨璁篳
+ );
return;
}
this.reviewLoading = true;
@@ -2225,7 +2267,7 @@
laboratory: this.sonLaboratory,
tell: null,
userId: this.checkUser,
- insResult: this.reviewInsResult,
+ insResult: insResults.every((r) => r === 1) ? 1 : 0,
}).then((res) => {
if (res.code === 200) {
this.$message.success("鎿嶄綔鎴愬姛");
@@ -2298,23 +2340,22 @@
this.$message.error("璇锋寚瀹氬鏍镐汉鍛�");
return;
}
- if (this.isDirectTemplateOrder() && (!this.selectedDeviceIds || this.selectedDeviceIds.length === 0)) {
- this.$message.error("璇烽�夋嫨璁惧");
- return;
- }
- if (this.insOrder.ifsOrderType !== "02wg") {
- const labels = { temperature: "娓╁害", humidity: "婀垮害" };
- const missing = [];
- this.tableLists.forEach((m) => {
- const form = this.otherForm[m.templateId] || {};
- ["temperature", "humidity"].forEach((key) => {
- if (!form[key]) missing.push(`銆�${m.templateName}銆嶇殑${labels[key]}`);
- });
- });
- if (missing.length > 0) {
- this.$message.error(`璇峰~鍐�${missing[0]}`);
- return;
+ const missing = [];
+ this.tableLists.forEach((m) => {
+ const form = this.otherForm[m.templateId] || {};
+ if (this.insOrder.ifsOrderType !== "02wg") {
+ if (!form.temperature) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑娓╁害`);
+ if (!form.humidity) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑婀垮害`);
+ if (!form.detectionTime) missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑妫�娴嬫椂闂碻);
+ if (!form.detectionPlace) missing.push(`璇峰~鍐欍��${m.templateName}銆嶇殑妫�娴嬪湴鐐筦);
}
+ if (this.isDirectTemplateOrder() && (!form.deviceIds || form.deviceIds.length === 0)) {
+ missing.push(`璇烽�夋嫨銆�${m.templateName}銆嶇殑璁惧`);
+ }
+ });
+ if (missing.length > 0) {
+ this.$message.error(missing[0]);
+ return;
}
if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') {
this.$message.error("璇峰~鍐橧FS搴撳瓨鐗╂枡鎵规灞炴��");
@@ -2540,18 +2581,13 @@
return this.sonLaboratory === "鏂拌仛" && this.currentSample &&
(this.currentSample.insProduct || []).some((product) => product.templateRowIndex != null);
},
- loadOverviewDevices() {
- Promise.all([search({ status: 0 }), getOrderDevices({ orderId: this.orderId })]).then(([devices, selected]) => {
+ loadDeviceOptions() {
+ search({ status: 0 }).then((devices) => {
this.orderDeviceOptions = (devices.data || []).map((device) => ({
id: device.id,
label: `${device.deviceName}--${device.managementNumber}`,
}));
- this.selectedDeviceIds = selected.data || [];
});
- },
- saveOverviewDevices() {
- return saveOrderDevices({ orderId: this.orderId, deviceIds: this.selectedDeviceIds })
- .then(() => this.$message.success("璁惧宸蹭繚瀛�"));
},
getAuthorizedPerson() {
selectUserCondition({ type: 1 }).then((res) => {
@@ -2724,6 +2760,37 @@
text-align: left;
}
+/* 褰撳墠妫�楠屾ā鏉跨殑妫�娴嬫潯浠朵笌妫�楠岀粨璁� */
+.template-panel {
+ background-color: #f8f9fb;
+ border: 1px solid #ebeef5;
+ border-radius: 3px;
+ padding: 16px 16px 4px;
+ margin-bottom: 12px;
+ text-align: left;
+}
+
+/* form-item 鐢� inline-flex 淇濊瘉 label 涓庢帶浠跺悓琛岋紝涓嶄緷璧栬鐩掑搴︽帹绠� */
+.template-panel>>>.el-form-item {
+ display: inline-flex;
+ align-items: center;
+ margin-bottom: 12px;
+}
+
+.template-panel>>>.el-form-item__label {
+ flex: none;
+}
+
+.template-panel__unit {
+ margin-left: 4px;
+ color: #606266;
+}
+
+.template-panel__conclusion--divided {
+ border-top: 1px dashed #e4e7ed;
+ padding-top: 12px;
+}
+
.center {
width: 100%;
/* max-height: 580px; */
diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index f2f0522..22f6a4c 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -1,77 +1,74 @@
<template>
<div class="app-container">
- <div v-show="!cableConfigShow&&!auxiliaryShow">
- <div style="display: flex;justify-content: space-between;align-items:center;">
- <div>濮旀墭鍗曚俊鎭�</div>
- <div>
- <el-cascader
- v-model="addObj.quarterItemId"
- :disabled="active>1"
- :options="quarterItemOptions"
- size="small"
- style="width: 380px"
- @focus="getQuarterOnOrderList"></el-cascader>
- <el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small"
- @change="selectInsOrderTemplateById">
- <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
- <div style="display: flex; align-items: center; justify-content: space-between;">
- <span>{{ a.name }}</span>
- <i class="el-icon-delete"
- style="color: #66b1ff; font-size: 16px; cursor: pointer;"
- @click.stop="handleDelete(a)">
- </i>
- </div>
- </el-option>
- </el-select>
- <el-button v-show="active==1" size="small" @click="templateDia=true">
- <span style="color: #3A7BFA;">淇濆瓨妯℃澘</span>
- </el-button>
- <el-button v-if="active==1&&addObj.sampleType!=undefined&&(addObj.sampleType.indexOf('鐢电紗')>-1 ||addObj.sampleType.indexOf('缁煎悎')>-1)" size="small" type="primary" @click="openCableConfig">鐢电紗閰嶇疆</el-button>
- <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1" size="small" type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
- <el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
- <!-- 瀹℃牳 -->
- <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small"
- @click="upInsOrderOfState(2)">涓嶉�氳繃</el-button>
- <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary"
- @click="upInsOrderOfState(1)">閫氳繃</el-button>
- <el-button size="small" @click="goBack">
- <span style="color: #3A7BFA;">杩斿洖</span>
- </el-button>
- </div>
+ <div v-show="!cableConfigShow&&!auxiliaryShow" class="order-header">
+ <span class="order-header__title">濮旀墭鍗曚俊鎭�</span>
+ <div class="order-header__actions">
+<!-- <el-cascader-->
+<!-- v-model="addObj.quarterItemId"-->
+<!-- :disabled="active>1"-->
+<!-- :options="quarterItemOptions"-->
+<!-- placeholder="璇烽�夋嫨瀛e害"-->
+<!-- size="small"-->
+<!-- class="order-header__quarter"-->
+<!-- @focus="getQuarterOnOrderList"></el-cascader>-->
+ <el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small"
+ class="order-header__template"
+ @change="selectInsOrderTemplateById">
+ <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
+ <div style="display: flex; align-items: center; justify-content: space-between;">
+ <span>{{ a.name }}</span>
+ <i class="el-icon-delete"
+ style="color: #66b1ff; font-size: 16px; cursor: pointer;"
+ @click.stop="handleDelete(a)">
+ </i>
+ </div>
+ </el-option>
+ </el-select>
+ <el-button v-show="active==1" size="small" @click="templateDia=true">淇濆瓨妯℃澘</el-button>
+ <el-button v-if="active==1&&addObj.sampleType!=undefined&&(addObj.sampleType.indexOf('鐢电紗')>-1 ||addObj.sampleType.indexOf('缁煎悎')>-1)" size="small" type="primary" plain @click="openCableConfig">鐢电紗閰嶇疆</el-button>
+ <el-button v-if="active==1&&addObj.sampleType!=undefined&&addObj.sampleType.indexOf('鐢电紗')>-1" size="small" type="primary" plain @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
+ <el-button v-show="active==1||(tabIndex==4&&active==2)" :loading="saveLoad" size="small" type="primary" @click="save">鎻愪氦</el-button>
+ <!-- 瀹℃牳 -->
+ <el-button v-show="active==3" :disabled="saveLoad" :loading="saveLoad" size="small"
+ @click="upInsOrderOfState(2)">涓嶉�氳繃</el-button>
+ <el-button v-show="active==3" :loading="saveLoad" size="small" type="primary"
+ @click="upInsOrderOfState(1)">閫氳繃</el-button>
+ <el-button size="small" @click="goBack">杩斿洖</el-button>
</div>
</div>
- <div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px">
- <div class="search">
- <el-form ref="newJuOrder" :inline="true" :model="addObj" label-width="108px" label-position="right">
- <el-row>
- <el-col :span="6"><el-form-item label="浜у搧鍚嶇О"><el-input v-model="addObj.sample" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="selectStandardTree = true" /></template></el-input></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鐢熶骇鍗曚綅"><el-input v-model="addObj.production" :disabled="active>1" size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="濮旀墭鍗曚綅"><el-input v-model="addObj.company" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="openCompanyList" /></template></el-input></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="妫�楠岀被鍒�"><el-select v-model="addObj.orderType" :disabled="active>1" size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col>
- </el-row>
- <el-row v-if="addObj.standardTreeId || boundTemplateList.length">
- <el-col :span="24">
+ <div v-show="!cableConfigShow&&!auxiliaryShow" class="order-body">
+ <el-card shadow="never" class="order-card">
+ <el-form ref="newJuOrder" :model="addObj" size="small" label-width="108px" label-position="right">
+ <el-row :gutter="16">
+ <el-col :span="6"><el-form-item label="妫�娴嬩緷鎹�"><el-input v-model="addObj.sample" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="selectStandardTree = true" /></template></el-input></el-form-item></el-col>
+ <el-col :span="18">
<el-form-item label="鍘熷璁板綍妯℃澘">
<div v-loading="templateBindingLoading" class="template-tag-list">
- <el-tag v-for="item in boundTemplateList" :key="item.templateId" size="small" effect="plain">{{ item.name }}</el-tag>
+ <el-tag v-for="(item, index) in boundTemplateList" :key="item.templateId" :closable="active==1" size="small" effect="plain" @close="removeBoundTemplate(index)">{{ item.name }}</el-tag>
<span v-if="!templateBindingLoading && boundTemplateList.length === 0" class="empty-template-text">鏆傛湭缁戝畾鍘熷璁板綍妯℃澘</span>
</div>
</el-form-item>
</el-col>
</el-row>
- <el-row>
+ <el-row :gutter="16">
+ <el-col :span="6"><el-form-item label="鏍峰搧鍚嶇О"><el-input v-model="addObj.sampleView" :disabled="active>1" size="small" /></el-form-item></el-col>
+ <el-col :span="6"><el-form-item label="鐢熶骇鍗曚綅"><el-input v-model="addObj.production" :disabled="active>1" size="small" /></el-form-item></el-col>
+ <el-col :span="6"><el-form-item label="濮旀墭鍗曚綅"><el-input v-model="addObj.company" disabled size="small"><template slot="append"><el-button :disabled="active>1" icon="el-icon-search" @click="openCompanyList" /></template></el-input></el-form-item></el-col>
+ <el-col :span="6"><el-form-item label="妫�楠岀被鍒�"><el-select v-model="addObj.orderType" :disabled="active>1" size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col>
+ </el-row>
+ <el-row :gutter="16">
<el-col :span="6"><el-form-item label="鏍峰搧鏁伴噺"><el-input v-model="addObj.testQuantity" :disabled="active>1" placeholder="濡傦細2妗躲��500mL" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="鏍峰搧缂栧彿"><el-input v-model="sampleCode" :disabled="active>1" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="鏍峰搧澶栬"><el-input v-model="addObj.sampleStatus" :disabled="active>1" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="閫佹牱浜�"><el-input v-model="addObj.prepareUser" :disabled="active>1" size="small" /></el-form-item></el-col>
</el-row>
- <el-row>
+ <el-row :gutter="16">
<el-col :span="6"><el-form-item label="鐢熶骇鏃ユ湡"><el-date-picker v-model="addObj.productionDate" type="date" value-format="yyyy-MM-dd" :disabled="active>1" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="鐢熶骇鎵瑰彿"><el-input v-model="addObj.productionBatch" :disabled="active>1" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="閫佹牱鏃ユ湡"><el-date-picker v-model="addObj.sampleDate" type="date" value-format="yyyy-MM-dd" :disabled="active>1" size="small" /></el-form-item></el-col>
<el-col :span="6"><el-form-item label="鑱旂郴鏂瑰紡"><el-input v-model="addObj.phone" :disabled="active>1" size="small" /></el-form-item></el-col>
</el-row>
- <el-row><el-col :span="12"><el-form-item label="澶囨敞"><el-input v-model="addObj.remark" :disabled="active>1" size="small" /></el-form-item></el-col></el-row>
+ <el-row :gutter="16"><el-col :span="12"><el-form-item label="澶囨敞"><el-input v-model="addObj.remark" :disabled="active>1" size="small" /></el-form-item></el-col></el-row>
</el-form>
<el-form v-if="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right">
<el-row>
@@ -235,7 +232,7 @@
</el-col>
</el-row>
</el-form>
- </div>
+ </el-card>
<div v-if="false">
<div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
<div v-if="active==1">
@@ -731,7 +728,7 @@
{ required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' }
],
sample: [
- { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' }
+ { required: true, message: '璇烽�夋嫨妫�娴嬩緷鎹�', trigger: 'change' }
],
sampleNum: [
{ required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' }
@@ -1194,7 +1191,7 @@
save() {
if (this.addObj.standardTreeId) {
if (!this.addObj.sample || !this.addObj.company || !this.addObj.orderType || !this.addObj.testQuantity) {
- this.$message.error('璇峰~鍐欎骇鍝佸悕绉般�佸鎵樺崟浣嶃�佹楠岀被鍒拰鏍峰搧鏁伴噺');
+ this.$message.error('璇峰~鍐欐娴嬩緷鎹�佸鎵樺崟浣嶃�佹楠岀被鍒拰鏍峰搧鏁伴噺');
return;
}
this.saveData([]);
@@ -1434,7 +1431,12 @@
delete newJuOrder.temperature
delete newJuOrder.humidity
const payload = this.addObj.standardTreeId
- ? { insOrder: newJuOrder, standardTreeId: this.addObj.standardTreeId, sampleCode: this.sampleCode }
+ ? {
+ insOrder: newJuOrder,
+ standardTreeId: this.addObj.standardTreeId,
+ sampleCode: this.sampleCode,
+ templateList: this.boundTemplateList.map((item, index) => ({ templateId: item.templateId, sort: index }))
+ }
: { insOrder: {...this.addObj,typeSource:-1}, sampleList: sampleList }
addInsOrder(payload).then(res => {
this.saveLoad = false
@@ -1578,6 +1580,10 @@
},
sortTemplateList(list) {
return (list || []).slice().sort((a, b) => (a.sort || 0) - (b.sort || 0))
+ },
+ // 涓嬪崟鏃朵粠鏍囧噯搴撶粦瀹氱殑妯℃澘閲屽垹鍑忥紝鎻愪氦鏃堕殢 templateList 涓�璧蜂笅鍙�
+ removeBoundTemplate(index) {
+ this.boundTemplateList.splice(index, 1)
},
async loadTemplateBindings(standardTreeId) {
this.boundTemplateList = []
@@ -2389,4 +2395,61 @@
.empty-template-text {
color: #909399;
}
+/* 濮旀墭鍗曚俊鎭細椤堕儴鎿嶄綔鏍� */
+.order-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ gap: 8px;
+ padding-bottom: 12px;
+ border-bottom: 1px solid #ebeef5;
+}
+.order-header__title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #303133;
+}
+.order-header__actions {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 8px;
+}
+/* 闂磋窛缁熶竴浜ょ粰 gap锛屽幓鎺夌浉閭绘寜閽嚜甯︾殑 margin-left */
+.order-header__actions>>>.el-button+.el-button {
+ margin-left: 0;
+}
+.order-header__quarter {
+ width: 220px;
+}
+.order-header__template {
+ width: 160px;
+}
+/* 濮旀墭鍗曚俊鎭細琛ㄥ崟鍗$墖 */
+.order-body {
+ margin-top: 12px;
+}
+.order-card>>>.el-card__body {
+ padding: 20px 20px 6px;
+}
+.order-card>>>.el-form-item {
+ margin-bottom: 16px;
+}
+/* 鎺т欢缁熶竴鍗犳弧鏍囩涔嬪鐨勬暣鍒楀搴︼細el-date-editor 榛樿鍐欐 220px銆�
+ el-select 瀹藉害鏀剁缉鎴愬浐鏈夊搴︼紝涓嶆寚瀹氬氨浼氬拰鍏朵粬杈撳叆妗嗗乏鍙宠竟缂樺涓嶉綈 */
+.order-card>>>.el-input,
+.order-card>>>.el-select {
+ width: 100%;
+}
+/* append 鍗曞厓鏍肩殑 20px 鍐呰竟璺� + 鎸夐挳 -10px 璐熻竟璺濇槸鎸夐粯璁� 40px 鎸夐挳鏍囧畾鐨勶紝
+ small 杈撳叆涓嬫寜閽細姣旇緭鍏ユ楂樸�佷笂涓嬫孩鍑猴紱鏀规垚鎸夐挳鐩存帴鎾戞弧鍗曞厓鏍� */
+.order-card>>>.el-input-group__append {
+ padding: 0;
+}
+.order-card>>>.el-input-group__append .el-button {
+ margin: 0;
+ padding: 9px 15px;
+ font-size: 12px;
+}
</style>
diff --git a/src/views/business/productOrder/components/addView.vue b/src/views/business/productOrder/components/addView.vue
index 59b6502..fbf92ef 100644
--- a/src/views/business/productOrder/components/addView.vue
+++ b/src/views/business/productOrder/components/addView.vue
@@ -2,7 +2,7 @@
<div class="app-container">
<div v-show="!cableConfigShow&&!auxiliaryShow">
<div style="display: flex;justify-content: space-between;align-items:center;">
- <div>濮旀墭鍗曚俊鎭�</div>
+ <div class="order-detail__title">濮旀墭鍗曚俊鎭�</div>
<div>
<el-cascader v-if="false"
v-model="addObj.quarterItemId"
@@ -38,38 +38,28 @@
</div>
<div v-show="!cableConfigShow&&!auxiliaryShow" style="margin-top: 10px">
<div class="search">
- <el-form :inline="true" :model="addObj" label-width="108px" label-position="right">
- <el-row>
- <el-col :span="6"><el-form-item label="浜у搧鍚嶇О"><el-input v-model="addObj.sample" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鐢熶骇鍗曚綅"><el-input v-model="addObj.production" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="濮旀墭鍗曚綅"><el-input v-model="addObj.company" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="妫�楠岀被鍒�"><el-select v-model="addObj.orderType" disabled size="small"><el-option v-for="item in dict.type.check_type1" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col>
- </el-row>
- <el-row v-if="boundTemplateList.length">
- <el-col :span="24">
- <el-form-item label="鍘熷璁板綍妯℃澘">
- <div class="template-tag-list">
- <el-tag v-for="item in boundTemplateList" :key="item.templateId" size="small" effect="plain">{{ item.name }}</el-tag>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6"><el-form-item label="鏍峰搧鏁伴噺"><el-input v-model="addObj.testQuantity" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鏍峰搧缂栧彿"><el-input v-model="sampleCode" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鏍峰搧澶栬"><el-input v-model="addObj.sampleStatus" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="閫佹牱浜�"><el-input v-model="addObj.prepareUser" disabled size="small" /></el-form-item></el-col>
- </el-row>
- <el-row>
- <el-col :span="6"><el-form-item label="鐢熶骇鏃ユ湡"><el-date-picker v-model="addObj.productionDate" type="date" value-format="yyyy-MM-dd" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鐢熶骇鎵瑰彿"><el-input v-model="addObj.productionBatch" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="閫佹牱鏃ユ湡"><el-date-picker v-model="addObj.sampleDate" type="date" value-format="yyyy-MM-dd" disabled size="small" /></el-form-item></el-col>
- <el-col :span="6"><el-form-item label="鑱旂郴鏂瑰紡"><el-input v-model="addObj.phone" disabled size="small" /></el-form-item></el-col>
- </el-row>
- <el-row>
- <el-col :span="12"><el-form-item label="澶囨敞"><el-input v-model="addObj.remark" disabled size="small" style="width: 520px" /></el-form-item></el-col>
- </el-row>
- </el-form>
+ <el-descriptions class="order-detail" :column="4" border>
+ <el-descriptions-item label="妫�娴嬩緷鎹�">{{ addObj.sample || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鍚嶇О">{{ addObj.sampleView || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鐢熶骇鍗曚綅">{{ addObj.production || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="濮旀墭鍗曚綅">{{ addObj.company || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="妫�楠岀被鍒�">{{ orderTypeLabel }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧鏁伴噺">{{ addObj.testQuantity || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧缂栧彿">{{ sampleCode || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鏍峰搧澶栬">{{ addObj.sampleStatus || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="閫佹牱浜�">{{ addObj.prepareUser || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鐢熶骇鏃ユ湡">{{ addObj.productionDate || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鐢熶骇鎵瑰彿">{{ addObj.productionBatch || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="閫佹牱鏃ユ湡">{{ addObj.sampleDate || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鑱旂郴鏂瑰紡">{{ addObj.phone || '-' }}</el-descriptions-item>
+ <el-descriptions-item label="鍘熷璁板綍妯℃澘" :span="4">
+ <div v-if="boundTemplateList.length" class="template-tag-list">
+ <el-tag v-for="item in boundTemplateList" :key="item.templateId" size="small" effect="plain">{{ item.name }}</el-tag>
+ </div>
+ <span v-else class="order-detail__empty">鏆傛湭缁戝畾鍘熷璁板綍妯℃澘</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="澶囨敞" :span="4">{{ addObj.remark || '-' }}</el-descriptions-item>
+ </el-descriptions>
<el-form v-show="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px" label-position="right">
<el-row>
<el-col :span="6">
@@ -643,6 +633,13 @@
newJuLaboratoryList() {
return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
},
+ // 妫�楠岀被鍒寜瀛楀吀鍚嶇О灞曠ず
+ orderTypeLabel() {
+ const hit = (this.dict.type.check_type1 || []).find(
+ item => String(item.value) === String(this.addObj.orderType)
+ )
+ return hit ? hit.label : (this.addObj.orderType || '-')
+ },
},
dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
data() {
@@ -706,7 +703,7 @@
{ required: true, message: '璇烽�夋嫨绱ф�ョ▼搴�', trigger: 'change' }
],
sample: [
- { required: true, message: '璇烽�夋嫨鏍峰搧鍚嶇О', trigger: 'change' }
+ { required: true, message: '璇烽�夋嫨妫�娴嬩緷鎹�', trigger: 'change' }
],
sampleNum: [
{ required: true, message: '璇峰~鍐欐牱鍝佹暟閲�', trigger: 'blur' }
@@ -1485,7 +1482,6 @@
} else {
this.addObj.sample = trees[3]
}
- this.addObj.sampleView = this.addObj.sample
this.addObj.sampleViewEn = this.sampleViewEn
this.addObj.model = (trees[4] == undefined ? null : trees[4])
this.selectStandardTree = false
@@ -2254,4 +2250,24 @@
flex-wrap: wrap;
gap: 8px;
}
+/* 濮旀墭鍗曚俊鎭細鍙璇︽儏 */
+.order-detail__title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #303133;
+}
+.order-detail>>>.el-descriptions-item__label.is-bordered-label {
+ width: 104px;
+ white-space: nowrap;
+}
+.order-detail>>>.el-descriptions-item__content {
+ color: #303133;
+}
+/* 鎻忚堪鍒楄〃鍐呬笉闇�瑕侀澶栫殑琛岄珮鍗犱綅锛屾爣绛捐涓庡叾瀹冭绛夐珮 */
+.order-detail .template-tag-list {
+ min-height: 0;
+}
+.order-detail__empty {
+ color: #c0c4cc;
+}
</style>
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 5f5624f..69d9738 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -362,6 +362,8 @@
linkMethod: "changeEntrustCode",
},
{ label: '濮旀墭鍗曚綅', prop: 'company' },
+ { label: '妫�娴嬩緷鎹�', prop: 'sample' },
+ { label: '鏍峰搧鍚嶇О', prop: 'sampleView' },
// {
// label: "鏍峰搧鍚嶇О",
// prop: "sampleName",
@@ -391,6 +393,13 @@
label: '鎿嶄綔',
operation: [
{
+ name: '鏌ョ湅璇︽儏',
+ type: 'text',
+ clickFun: (row) => {
+ this.selectAllByOne(row);
+ }
+ },
+ {
name: '鏁版嵁鏌ョ湅',
type: 'text',
clickFun: (row) => {
diff --git a/src/views/structural/premises/index.vue b/src/views/structural/premises/index.vue
index 2b9b750..e827953 100644
--- a/src/views/structural/premises/index.vue
+++ b/src/views/structural/premises/index.vue
@@ -3,11 +3,11 @@
<div class="search">
<div>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
- <el-form-item label="瀹為獙瀹ゅ悕绉�" prop="laboratoryName">
+ <el-form-item label="琛屼笟鍚嶇О" prop="laboratoryName">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.laboratoryName"
@keyup.enter.native="refreshTable"></el-input>
</el-form-item>
- <el-form-item label="瀹為獙瀹ょ紪鐮�" prop="laboratoryNumber">
+ <el-form-item label="琛屼笟缂栫爜" prop="laboratoryNumber">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.laboratoryNumber"
@keyup.enter.native="refreshTable"></el-input>
</el-form-item>
@@ -25,17 +25,17 @@
<lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
:page="page" :tableLoading="tableLoading"></lims-table>
</div>
- <!-- 鏂板瀹為獙瀹�-->
+ <!-- 鏂板琛屼笟-->
<el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
<el-form ref="laboratoryForm" :model="laboratoryForm" :rules="userRules" label-position="right"
label-width="100px">
- <el-form-item label="瀹為獙瀹ゅ悕绉�" prop="laboratoryName">
+ <el-form-item label="琛屼笟鍚嶇О" prop="laboratoryName">
<el-input v-model="laboratoryForm.laboratoryName" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="鍦烘墍缂栫爜" prop="laboratoryNumber">
<el-input v-model="laboratoryForm.laboratoryNumber" size="small" clearable></el-input>
</el-form-item>
- <el-form-item label="瀹為獙瀹や唬鍙�" prop="laboratoryCode">
+ <el-form-item label="琛屼笟浠e彿" prop="laboratoryCode">
<el-input v-model="laboratoryForm.laboratoryCode" size="small" clearable></el-input>
</el-form-item>
<el-form-item label="璐熻矗浜�" prop="head">
@@ -113,9 +113,9 @@
tableData: [],
tableLoading: false,
column: [
- { label: '瀹為獙瀹ゅ悕绉�', prop: 'laboratoryName' },
+ { label: '琛屼笟鍚嶇О', prop: 'laboratoryName' },
{ label: '鍦烘墍缂栫爜', prop: 'laboratoryNumber' },
- { label: '瀹為獙瀹や唬鍙�', prop: 'laboratoryCode' },
+ { label: '琛屼笟浠e彿', prop: 'laboratoryCode' },
{ label: '璐熻矗浜�', prop: 'head' },
{ label: '璐熻矗浜虹數璇�', prop: 'phoneNumber' },
{ label: '鍦板潃', prop: 'address' },
@@ -161,7 +161,7 @@
},
operationType: '',
userRules: {
- laboratoryName: [{ required: true, message: '璇疯緭鍏ュ疄楠屽鍚嶇О', trigger: 'blur' }],
+ laboratoryName: [{ required: true, message: '璇疯緭鍏ヨ涓氬悕绉�', trigger: 'blur' }],
laboratoryNumber: [{ required: true, message: '璇疯緭鍏ュ満鎵�缂栫爜', trigger: 'blur' }],
head: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉', trigger: 'blur' }],
phoneNumber: [{ required: true, message: '璇疯緭鍏ヨ礋璐d汉鐢佃瘽', trigger: 'blur' }],
@@ -170,7 +170,7 @@
fileComponentTableLoading: false,
fileComponentData: [],
fileComponentDataColumn: [
- { label: '瀹為獙瀹ゅ悕绉�', prop: 'laboratoryName' },
+ { label: '琛屼笟鍚嶇О', prop: 'laboratoryName' },
{ label: '鍗扮珷鍥剧墖', prop: 'address', dataType: 'image' },
{ label: '鍗扮珷绫诲瀷', prop: 'type' },
],
@@ -194,8 +194,8 @@
props: { multiple: false, emitPath: false, },
options: [
{
- value: '瀹為獙瀹よ祫璐�',
- label: '瀹為獙瀹よ祫璐�',
+ value: '琛屼笟璧勮川',
+ label: '琛屼笟璧勮川',
children: []
},
{
@@ -238,14 +238,14 @@
this.refreshTable()
},
openAdd(type, row) {
- this.formTitle = type === 'add' ? '鏂板瀹為獙瀹�' : '缂栬緫瀹為獙瀹�'
+ this.formTitle = type === 'add' ? '鏂板琛屼笟' : '缂栬緫琛屼笟'
this.operationType = type
if (type === 'edit') {
this.laboratoryForm = this.HaveJson(row)
}
this.addDia = true
},
- // 鎻愪氦鏂板銆佺紪杈戝疄楠屽琛ㄥ崟
+ // 鎻愪氦鏂板銆佺紪杈戣涓氳〃鍗�
customAdd() {
this.$refs['laboratoryForm'].validate((valid) => {
if (valid) {
@@ -278,7 +278,7 @@
this.resetForm('laboratoryForm')
this.addDia = false
},
- // 鍒犻櫎瀹為獙瀹�
+ // 鍒犻櫎琛屼笟
delete(row) {
this.$confirm('鏄惁鍒犻櫎褰撳墠鏁版嵁?', "璀﹀憡", {
confirmButtonText: "纭畾",
--
Gitblit v1.9.3