|
|
@ -565,7 +565,7 @@ import {
|
|
|
|
getProRoutes,getProSortNo,
|
|
|
|
getProRoutes,getProSortNo,
|
|
|
|
getProShifts,
|
|
|
|
getProShifts,
|
|
|
|
getWorkOrderList,
|
|
|
|
getWorkOrderList,
|
|
|
|
subSplitOrder,
|
|
|
|
subSplitOrder,checkRepeatBatchCodes,
|
|
|
|
listOrder,
|
|
|
|
listOrder,
|
|
|
|
addOrder,
|
|
|
|
addOrder,
|
|
|
|
updateOrder,
|
|
|
|
updateOrder,
|
|
|
@ -635,6 +635,8 @@ export default {
|
|
|
|
splitData: [],
|
|
|
|
splitData: [],
|
|
|
|
//选择产线list表
|
|
|
|
//选择产线list表
|
|
|
|
proline: [],
|
|
|
|
proline: [],
|
|
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
|
|
single: true,
|
|
|
|
//
|
|
|
|
//
|
|
|
|
splitnum: null,
|
|
|
|
splitnum: null,
|
|
|
|
// 班次
|
|
|
|
// 班次
|
|
|
@ -940,7 +942,8 @@ export default {
|
|
|
|
// 获取工艺信息
|
|
|
|
// 获取工艺信息
|
|
|
|
getProRoutes(row.prodCode).then(response => {
|
|
|
|
getProRoutes(row.prodCode).then(response => {
|
|
|
|
this.routes = response.data
|
|
|
|
this.routes = response.data
|
|
|
|
this.splitForm.routeCode = response.data[0]
|
|
|
|
this.splitForm.routeCode = response.data[0].routeCode
|
|
|
|
|
|
|
|
this.changeRoute(this.splitForm.routeCode)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
|
|
|
|
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
|
|
|
@ -1166,6 +1169,31 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 拆分-拆分提交按钮操作
|
|
|
|
// 拆分-拆分提交按钮操作
|
|
|
|
batchBtn() {
|
|
|
|
batchBtn() {
|
|
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
|
|
//批次号检验
|
|
|
|
|
|
|
|
var repeatBatchCodes = "";
|
|
|
|
|
|
|
|
checkRepeatBatchCodes({formFields: this.formFields}).then(response => {
|
|
|
|
|
|
|
|
if(response != ""){
|
|
|
|
|
|
|
|
this.$modal.confirm('出现重复使用的批次号'+response+',是否继续进行拆分?').then(function () {
|
|
|
|
|
|
|
|
_this.batchBtnFunc();
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
_this.getList()
|
|
|
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
|
|
|
}).catch(
|
|
|
|
|
|
|
|
function (e) {
|
|
|
|
|
|
|
|
if (e == 'cancel') {
|
|
|
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
|
|
|
} else if(e == 'close') {
|
|
|
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
batchBtnFunc(){
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
// 判断数据不能为空
|
|
|
|
// 判断数据不能为空
|
|
|
|
if (this.splitForm.splitNum == null) {
|
|
|
|
if (this.splitForm.splitNum == null) {
|
|
|
@ -1268,8 +1296,10 @@ export default {
|
|
|
|
if (response.code == 500) {
|
|
|
|
if (response.code == 500) {
|
|
|
|
this.$modal.msgError(response.msg)
|
|
|
|
this.$modal.msgError(response.msg)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.queryParams.status = "o1"
|
|
|
|
this.queryParams.status = "o1"
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
@ -1295,6 +1325,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 拆分-新增-取消按钮
|
|
|
|
// 拆分-新增-取消按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.dialogVisible = false;
|
|
|
|
this.dialogVisible = false;
|
|
|
@ -1403,7 +1434,7 @@ export default {
|
|
|
|
/**自动排产**/
|
|
|
|
/**自动排产**/
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleAutoSplitSelection(selection) {
|
|
|
|
handleAutoSplitSelection(selection) {
|
|
|
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
this.orderCodes = selection
|
|
|
|
this.orderCodes = selection
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//排产优先级
|
|
|
|
//排产优先级
|
|
|
@ -1431,7 +1462,6 @@ export default {
|
|
|
|
this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"?').then(function () {
|
|
|
|
this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"?').then(function () {
|
|
|
|
return deleteOrder(orderIds);
|
|
|
|
return deleteOrder(orderIds);
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
this.$modal.msgSuccess("关闭成功");
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
}).catch(
|
|
|
|
}).catch(
|
|
|
|