优化
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -80,6 +80,7 @@
|
|||||||
style="width: 210px"
|
style="width: 210px"
|
||||||
placeholder="是否二次投料"
|
placeholder="是否二次投料"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
|
disabled
|
||||||
@change="storChange2"
|
@change="storChange2"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -314,15 +315,6 @@
|
|||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="添加物料重量" prop="add_qty2">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form2.add_qty2"
|
|
||||||
:controls="false"
|
|
||||||
:precision="3"
|
|
||||||
:min="0"
|
|
||||||
disabled
|
|
||||||
/>
|
|
||||||
</el-form-item>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<span class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
@@ -439,6 +431,7 @@ export default {
|
|||||||
mstrow: {},
|
mstrow: {},
|
||||||
tabledis: [],
|
tabledis: [],
|
||||||
XLList: [],
|
XLList: [],
|
||||||
|
chunfen_qty: '0',
|
||||||
form: { waste_limit_down: 0, waste_limit_uo: 0 },
|
form: { waste_limit_down: 0, waste_limit_uo: 0 },
|
||||||
form2: {
|
form2: {
|
||||||
total_qty1: '0',
|
total_qty1: '0',
|
||||||
@@ -480,6 +473,7 @@ export default {
|
|||||||
this.button1 = true
|
this.button1 = true
|
||||||
this.button2 = false
|
this.button2 = false
|
||||||
}
|
}
|
||||||
|
this.form.is_again_put = '0'
|
||||||
if (this.form.is_again_put === '1' && this.form.formula_type === '00') {
|
if (this.form.is_again_put === '1' && this.form.formula_type === '00') {
|
||||||
this.button3 = false
|
this.button3 = false
|
||||||
} else {
|
} else {
|
||||||
@@ -498,7 +492,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.tableDtl.splice(i, 1, row)
|
this.tableDtl.splice(i, 1, row)
|
||||||
}
|
}
|
||||||
this.tabledis = res.tabledis
|
/* this.tabledis = res.tabledis
|
||||||
this.form2.total_qty2 = 0
|
this.form2.total_qty2 = 0
|
||||||
this.form2.add_qty2 = 0
|
this.form2.add_qty2 = 0
|
||||||
for (let i = 0; i < this.tabledis.length; i++) {
|
for (let i = 0; i < this.tabledis.length; i++) {
|
||||||
@@ -510,7 +504,7 @@ export default {
|
|||||||
this.form2.add_qty2 = this.form2.add_qty2 + parseFloat(row.formula_qty)
|
this.form2.add_qty2 = this.form2.add_qty2 + parseFloat(row.formula_qty)
|
||||||
}
|
}
|
||||||
this.tabledis.splice(i, 1, row)
|
this.tabledis.splice(i, 1, row)
|
||||||
}
|
}*/
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
moveUp(index, item) {
|
moveUp(index, item) {
|
||||||
@@ -1099,39 +1093,106 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoCalculation() {
|
autoCalculation() {
|
||||||
this.fullscreenLoading = true
|
if (this.form.formula_type === '03') {
|
||||||
autoformula.autoCalculation(this.form).then(res => {
|
this.fullscreenLoading = true
|
||||||
this.crud.notify('自动计算成功!')
|
autoformula.autoCalculation(this.form).then(res => {
|
||||||
this.tableDtl = res.tableDtl
|
this.crud.notify('自动计算成功!')
|
||||||
this.form2.total_qty1 = 0
|
this.chunfen_qty = res.chunfen_qty
|
||||||
this.form2.add_qty1 = 0
|
this.fullscreenLoading = false
|
||||||
for (let i = 0; i < this.tableDtl.length; i++) {
|
if ((parseFloat(this.chunfen_qty) > 0) && (parseFloat(this.chunfen_qty) < parseFloat(this.form.workorder_qty))) {
|
||||||
const row = this.tableDtl[i]
|
this.$confirm('软废纯粉重量为' + parseFloat(this.chunfen_qty) + '公斤,不足工令重量,是否继续?')
|
||||||
row.edit = true
|
.then(_ => {
|
||||||
if (row.is_need_manage === '1') {
|
this.form.workorder_qty = parseFloat(this.chunfen_qty)
|
||||||
this.form2.total_qty1 = this.form2.total_qty1 + parseFloat(row.formula_qty)
|
this.fullscreenLoading = true
|
||||||
|
autoformula.autoCalculation(this.form).then(res => {
|
||||||
|
this.crud.notify('自动计算成功!')
|
||||||
|
this.tableDtl = res.tableDtl
|
||||||
|
this.form2.total_qty1 = 0
|
||||||
|
this.form2.add_qty1 = 0
|
||||||
|
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||||
|
const row = this.tableDtl[i]
|
||||||
|
row.edit = true
|
||||||
|
if (row.is_need_manage === '1') {
|
||||||
|
this.form2.total_qty1 = this.form2.total_qty1 + parseFloat(row.formula_qty)
|
||||||
|
} else {
|
||||||
|
this.form2.add_qty1 = this.form2.add_qty1 + parseFloat(row.formula_qty)
|
||||||
|
}
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.form2.add_qty1 = this.form2.add_qty1 + parseFloat(row.formula_qty)
|
this.tableDtl = res.tableDtl
|
||||||
|
this.form2.total_qty1 = 0
|
||||||
|
this.form2.add_qty1 = 0
|
||||||
|
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||||
|
const row = this.tableDtl[i]
|
||||||
|
row.edit = true
|
||||||
|
if (row.is_need_manage === '1') {
|
||||||
|
this.form2.total_qty1 = this.form2.total_qty1 + parseFloat(row.formula_qty)
|
||||||
|
} else {
|
||||||
|
this.form2.add_qty1 = this.form2.add_qty1 + parseFloat(row.formula_qty)
|
||||||
|
}
|
||||||
|
this.tableDtl.splice(i, 1, row)
|
||||||
|
}
|
||||||
|
this.fullscreenLoading = false
|
||||||
}
|
}
|
||||||
this.tableDtl.splice(i, 1, row)
|
}).catch(() => {
|
||||||
}
|
this.fullscreenLoading = false
|
||||||
this.tabledis = res.tabledis
|
})
|
||||||
this.form2.total_qty2 = 0
|
} else {
|
||||||
this.form2.add_qty2 = 0
|
this.fullscreenLoading = true
|
||||||
for (let i = 0; i < this.tabledis.length; i++) {
|
autoformula.autoCalculation(this.form).then(res => {
|
||||||
const row = this.tabledis[i]
|
this.crud.notify('自动计算成功!')
|
||||||
row.edit = true
|
this.tableDtl = res.tableDtl
|
||||||
if (row.is_need_manage === '1') {
|
this.form2.total_qty1 = 0
|
||||||
this.form2.total_qty2 = this.form2.total_qty2 + parseFloat(row.formula_qty)
|
this.form2.add_qty1 = 0
|
||||||
} else {
|
for (let i = 0; i < this.tableDtl.length; i++) {
|
||||||
this.form2.add_qty2 = this.form2.add_qty2 + parseFloat(row.formula_qty)
|
const row = this.tableDtl[i]
|
||||||
|
row.edit = true
|
||||||
|
if (row.is_need_manage === '1') {
|
||||||
|
this.form2.total_qty1 = this.form2.total_qty1 + parseFloat(row.formula_qty)
|
||||||
|
} else {
|
||||||
|
this.form2.add_qty1 = this.form2.add_qty1 + parseFloat(row.formula_qty)
|
||||||
|
}
|
||||||
|
this.tableDtl.splice(i, 1, row)
|
||||||
}
|
}
|
||||||
this.tabledis.splice(i, 1, row)
|
/* this.tabledis = res.tabledis
|
||||||
}
|
this.form2.total_qty2 = 0
|
||||||
this.fullscreenLoading = false
|
this.form2.add_qty2 = 0
|
||||||
}).catch(() => {
|
for (let i = 0; i < this.tabledis.length; i++) {
|
||||||
this.fullscreenLoading = false
|
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
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.tableDtl.length === 0) {
|
if (this.tableDtl.length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user