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 {