fix:工艺步骤序号自动填充

This commit is contained in:
shijing 2025-09-23 14:27:11 +08:00
parent 371326913e
commit 641731dceb
2 changed files with 13 additions and 2 deletions

View File

@ -320,6 +320,7 @@ const defaultForm = {
};
export default {
props: {
count: { type: Number, default : 0 },
routepack: { type: String, default: "" },
},
emits: ["success", "closed"],
@ -455,8 +456,14 @@ export default {
},
//
open(mode = "add") {
this.mode = mode;
this.visible = true;
let that = this;
that.mode = mode;
that.visible = true;
that.$nextTick(() => {
if(that.count){
that.form.sort = that.count+1;
}
})
return this;
},
//

View File

@ -185,6 +185,7 @@
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:count = "count"
:routepack="routepack"
@success="handleSaveSuccess"
@closed="dialog.save = false"
@ -337,6 +338,9 @@ export default {
})
},
table_add() {
let that = this;
that.count = this.$refs.tables.total;
console.log("count",that.count);
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add");