|
|
|
@ -565,7 +565,7 @@ import {
|
|
|
|
|
getProRoutes,getProSortNo,
|
|
|
|
|
getProShifts,
|
|
|
|
|
getWorkOrderList,
|
|
|
|
|
subSplitOrder,
|
|
|
|
|
subSplitOrder,checkRepeatBatchCodes,
|
|
|
|
|
listOrder,
|
|
|
|
|
addOrder,
|
|
|
|
|
updateOrder,
|
|
|
|
@ -635,6 +635,8 @@ export default {
|
|
|
|
|
splitData: [],
|
|
|
|
|
//选择产线list表
|
|
|
|
|
proline: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
//
|
|
|
|
|
splitnum: null,
|
|
|
|
|
// 班次
|
|
|
|
@ -940,7 +942,8 @@ export default {
|
|
|
|
|
// 获取工艺信息
|
|
|
|
|
getProRoutes(row.prodCode).then(response => {
|
|
|
|
|
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')
|
|
|
|
@ -1166,6 +1169,31 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 拆分-拆分提交按钮操作
|
|
|
|
|
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;
|
|
|
|
|
// 判断数据不能为空
|
|
|
|
|
if (this.splitForm.splitNum == null) {
|
|
|
|
@ -1268,8 +1296,10 @@ export default {
|
|
|
|
|
if (response.code == 500) {
|
|
|
|
|
this.$modal.msgError(response.msg)
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
|
}
|
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
|
|
|
|
|
|
this.queryParams.status = "o1"
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.getList()
|
|
|
|
@ -1295,6 +1325,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 拆分-新增-取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.dialogVisible = false;
|
|
|
|
@ -1403,7 +1434,7 @@ export default {
|
|
|
|
|
/**自动排产**/
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleAutoSplitSelection(selection) {
|
|
|
|
|
|
|
|
|
|
this.single = selection.length !== 1
|
|
|
|
|
this.orderCodes = selection
|
|
|
|
|
},
|
|
|
|
|
//排产优先级
|
|
|
|
@ -1431,7 +1462,6 @@ export default {
|
|
|
|
|
this.$modal.confirm('是否确认关闭订单"' + orderCodes + '"?').then(function () {
|
|
|
|
|
return deleteOrder(orderIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$modal.msgSuccess("关闭成功");
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).catch(
|
|
|
|
|