change - 生产工单排产修改

master
yinq 4 months ago
parent eaa4c9484b
commit b5e8f6a9f8

@ -326,8 +326,6 @@ let overtimeSearch = (arr, targets) => {
arr.forEach((element, k) => {
if (targets && element.planDateRange) {
if ((new Date(element.planDateRange[0]).getTime() < new Date(targets[0]).getTime()) || (new Date(element.planDateRange[1]).getTime() > new Date(targets[1]).getTime())) {
console.log(element.planDateRange)
console.log(targets)
results = true
}
}
@ -1012,14 +1010,13 @@ export default {
/** 保存按钮操作 */
handleSave() {
if(!overtimeSearch(this.productOrderList)){
// const extractedData = this.extractFields(this.productOrderList);
// batchEditingProductOrder(extractedData).then(response => {
// this.$modal.msgSuccess("");
// this.getList();
// });
const extractedData = this.extractFields(this.productOrderList);
batchEditingProductOrder(extractedData).then(response => {
this.$modal.msgSuccess("批量保存成功");
this.getList();
});
}else{
this.$message('时间错误')
this.$modal.msgError('生产派工单计划时间范围超出生产工单计划时间范围!')
}
},
extractFields(data) {

Loading…
Cancel
Save