From 742802d7db6fbf3efbcef817569f0ee463baef7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Fri, 10 Apr 2026 08:22:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(PdiList):=20=E4=BF=AE=E6=94=B9=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=9F=BA=E4=BA=8E=E5=89=8D=E4=B8=80=E6=9D=A1?= =?UTF-8?q?=E8=AE=B0=E5=BD=95+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除自动生成的批次编号和顺序号逻辑,改为在前一条记录的顺序号基础上+1 --- frontend/src/views/PdiList.vue | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/PdiList.vue b/frontend/src/views/PdiList.vue index 40c3938..ff520e9 100644 --- a/frontend/src/views/PdiList.vue +++ b/frontend/src/views/PdiList.vue @@ -362,20 +362,24 @@ export default { this.form.coilid = newCoilid } } - // 批次编号:如果是新批次则使用自动生成的,否则+1 - if (nextNums.rollprogramnb) { - this.form.rollprogramnb = nextNums.rollprogramnb + // 顺序号自动+1 + if (lastRecord.sequencenb) { + this.form.sequencenb = lastRecord.sequencenb + 1 } + // 批次编号:如果是新批次则使用自动生成的,否则+1 + // if (nextNums.rollprogramnb) { + // this.form.rollprogramnb = nextNums.rollprogramnb + // } // 顺序号:使用自动生成的顺序号 - this.form.sequencenb = nextNums.sequencenb + // this.form.sequencenb = nextNums.sequencenb } else { this.form = EMPTY() // 批次编号:使用自动生成的批次编号 - if (nextNums.rollprogramnb) { - this.form.rollprogramnb = nextNums.rollprogramnb - } + // if (nextNums.rollprogramnb) { + // this.form.rollprogramnb = nextNums.rollprogramnb + // } // 顺序号:默认为1 - this.form.sequencenb = nextNums.sequencenb + // this.form.sequencenb = nextNums.sequencenb } this.dialogVisible = true this.$nextTick(() => this.$refs.pdiForm && this.$refs.pdiForm.clearValidate()) @@ -426,7 +430,7 @@ export default { if (this.config.quickAdd) { // 不关闭弹窗,继续新增下一个 // 获取下一个批次编号和顺序号 - const nextNums = await this.loadNextNumbers() + // const nextNums = await this.loadNextNumbers() // 卷号自动+1 if (this.form.coilid) { const coilid = this.form.coilid @@ -438,11 +442,15 @@ export default { this.form.coilid = newCoilid } } - // 批次编号和顺序号使用自动生成的 - if (nextNums.rollprogramnb) { - this.form.rollprogramnb = nextNums.rollprogramnb + // 顺序号自动+1 + if (this.form.sequencenb) { + this.form.sequencenb = this.form.sequencenb + 1 } - this.form.sequencenb = nextNums.sequencenb + // 批次编号和顺序号使用自动生成的 + // if (nextNums.rollprogramnb) { + // this.form.rollprogramnb = nextNums.rollprogramnb + // } + // this.form.sequencenb = nextNums.sequencenb // 清空表单验证 this.$nextTick(() => this.$refs.pdiForm && this.$refs.pdiForm.clearValidate()) } else {