This commit is contained in:
zds
2022-12-26 10:39:06 +08:00
parent 63ff53ac84
commit 18f773cabb
3 changed files with 60 additions and 15 deletions

View File

@@ -431,6 +431,7 @@ export default {
mstrow: {},
tabledis: [],
XLList: [],
ball_time: '0',
chunfen_qty: '0',
form: { waste_limit_down: 0, waste_limit_uo: 0 },
form2: {
@@ -1104,11 +1105,16 @@ export default {
.then(_ => {
this.form.workorder_qty = parseFloat(this.chunfen_qty)
this.fullscreenLoading = true
autoformula.autoCalculation(this.form).then(res => {
autoformula.autoCalculation(this.form).then(res2 => {
this.crud.notify('自动计算成功!')
this.tableDtl = res.tableDtl
debugger
this.tableDtl = res2.tableDtl
this.form2.total_qty1 = 0
this.form2.add_qty1 = 0
this.ball_time = res2.ball_time
if ((parseFloat(this.ball_time) > 0)) {
this.form.ball_time = parseFloat(this.ball_time)
}
for (let i = 0; i < this.tableDtl.length; i++) {
const row = this.tableDtl[i]
row.edit = true
@@ -1119,19 +1125,6 @@ export default {
}
this.tableDtl.splice(i, 1, row)
}
/* this.tabledis = res.tabledis
this.form2.total_qty2 = 0
this.form2.add_qty2 = 0
for (let i = 0; i < this.tabledis.length; i++) {
const row = this.tabledis[i]
row.edit = true
if (row.is_need_manage === '1') {
this.form2.total_qty2 = this.form2.total_qty2 + parseFloat(row.formula_qty)
} else {
this.form2.add_qty2 = this.form2.add_qty2 + parseFloat(row.formula_qty)
}
this.tabledis.splice(i, 1, row)
}*/
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false