添加了"样品型号"输入框,支持自动完成

添加了"硬件版本号"输入框,支持自动完成
这两个字段会应用到所有批量添加的样品上
每个字段都有提示说明
main
risingLee 2026-01-05 19:34:05 +08:00
parent c72c71ff13
commit efd2d003da
1 changed files with 32 additions and 2 deletions

View File

@ -316,6 +316,30 @@
<!-- 批量添加样品对话框 --> <!-- 批量添加样品对话框 -->
<el-dialog title="批量添加样品" :visible.sync="batchSampleOpen" width="600px" append-to-body :close-on-click-modal="false"> <el-dialog title="批量添加样品" :visible.sync="batchSampleOpen" width="600px" append-to-body :close-on-click-modal="false">
<el-form label-width="120px"> <el-form label-width="120px">
<el-form-item label="样品型号">
<el-autocomplete
v-model="batchSampleModel"
:fetch-suggestions="querySampleModelForReceipt"
placeholder="请输入样品型号"
style="width: 100%"
:trigger-on-focus="false"
/>
<div style="margin-top: 5px; color: #909399; font-size: 12px">
<i class="el-icon-info"></i> 提示该型号将应用于所有批量添加的样品
</div>
</el-form-item>
<el-form-item label="硬件版本号">
<el-autocomplete
v-model="batchHardwareVersion"
:fetch-suggestions="queryHardwareVersionForReceipt"
placeholder="请输入硬件版本号"
style="width: 100%"
:trigger-on-focus="false"
/>
<div style="margin-top: 5px; color: #909399; font-size: 12px">
<i class="el-icon-info"></i> 提示该版本号将应用于所有批量添加的样品
</div>
</el-form-item>
<el-form-item label="样品SN号"> <el-form-item label="样品SN号">
<el-input <el-input
v-model="batchSampleText" v-model="batchSampleText"
@ -365,6 +389,10 @@ export default {
batchSampleOpen: false, batchSampleOpen: false,
// //
batchSampleText: "", batchSampleText: "",
//
batchSampleModel: "",
//
batchHardwareVersion: "",
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -522,6 +550,8 @@ export default {
/** 批量添加样品 */ /** 批量添加样品 */
handleBatchAddSample() { handleBatchAddSample() {
this.batchSampleText = ""; this.batchSampleText = "";
this.batchSampleModel = "";
this.batchHardwareVersion = "";
this.batchSampleOpen = true; this.batchSampleOpen = true;
}, },
/** 提交批量添加样品 */ /** 提交批量添加样品 */
@ -544,9 +574,9 @@ export default {
const exists = this.form.samples.some(sample => sample.sampleSn === sn); const exists = this.form.samples.some(sample => sample.sampleSn === sn);
if (!exists) { if (!exists) {
this.form.samples.push({ this.form.samples.push({
sampleModel: null, sampleModel: this.batchSampleModel || null,
sampleSn: sn, sampleSn: sn,
hardwareVersion: null, hardwareVersion: this.batchHardwareVersion || null,
externalStatus: null, externalStatus: null,
testDeadline: null, testDeadline: null,
testItems: null, testItems: null,