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