|
|
|
@ -388,13 +388,15 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<el-form-item label="选择设备:">
|
|
|
|
|
<el-cascader
|
|
|
|
|
@focus="changeEquipment"
|
|
|
|
|
:options="eRouteOptions"
|
|
|
|
|
:props="eRouteProps"
|
|
|
|
|
v-model="splitForm.prodLineCodeArray"
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
|
|
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="1" :span="7">
|
|
|
|
|
<el-form-item label="工单排序(插单<=0)" label-width="130px">
|
|
|
|
|
<el-input type="number" v-model="splitForm.sortNo"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -416,11 +418,17 @@
|
|
|
|
|
<el-input required type="number" @input="splitNumChange" v-model="splitForm.splitNum"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :offset="1" :span="5">
|
|
|
|
|
<!-- 工单日期 -->
|
|
|
|
|
<el-form-item size="small" label="工单日期: ">
|
|
|
|
|
<el-date-picker @change="checkDate" v-model="splitForm.productDate" type="date" placeholder="选择日期"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item label="选择设备:">
|
|
|
|
|
<div style="height: 130px;overflow-y: auto;">
|
|
|
|
|
<el-cascader
|
|
|
|
|
:options="eRouteOptions"
|
|
|
|
|
:props="eRouteProps"
|
|
|
|
|
v-model="splitForm.prodLineCodeArray"
|
|
|
|
|
clearable></el-cascader>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -483,7 +491,7 @@
|
|
|
|
|
import {
|
|
|
|
|
getCascadeProOrder,
|
|
|
|
|
getProEquipment,
|
|
|
|
|
getProRoutes,
|
|
|
|
|
getProRoutes,getProSortNo,
|
|
|
|
|
getProShifts,
|
|
|
|
|
getWorkOrderList,
|
|
|
|
|
subSplitOrder,
|
|
|
|
@ -801,6 +809,7 @@ export default {
|
|
|
|
|
splitBtn(e) {
|
|
|
|
|
// 获取级联订单信息
|
|
|
|
|
var row;
|
|
|
|
|
let _this = this;
|
|
|
|
|
getCascadeProOrder(e.orderCode).then(response => {
|
|
|
|
|
row = response.data
|
|
|
|
|
|
|
|
|
@ -843,6 +852,12 @@ export default {
|
|
|
|
|
this.routes = response.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
|
|
|
|
|
// 获取工单生产顺序
|
|
|
|
|
getProSortNo(ymd).then(response => {
|
|
|
|
|
_this.splitForm.sortNo = response
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.workerLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
// 获取历史拆分工单信息
|
|
|
|
|
getWorkOrderList(row.id).then(response => {
|
|
|
|
@ -946,7 +961,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 拆分-校验工单日期
|
|
|
|
|
checkDate(e) {
|
|
|
|
|
var now = new Date()
|
|
|
|
|
var now = new Date();
|
|
|
|
|
let _this = this;
|
|
|
|
|
if (e < now) {
|
|
|
|
|
e = now
|
|
|
|
|
this.splitForm.productDate = now
|
|
|
|
@ -954,6 +970,12 @@ export default {
|
|
|
|
|
message: "工单日期不能早于今天",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
var ymd = moment(this.splitForm.productDate).format('YYYY-MM-DD')
|
|
|
|
|
// 获取工单生产顺序
|
|
|
|
|
getProSortNo(ymd).then(response => {
|
|
|
|
|
_this.splitForm.sortNo = response
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 拆分-校验拆分批次号是否重复
|
|
|
|
@ -1068,6 +1090,13 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.sortNo == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '工单生产顺序不能为空!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.splitForm.prodLineCodeArray.length == 0) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择各流程节点的设备!',
|
|
|
|
@ -1139,7 +1168,8 @@ export default {
|
|
|
|
|
shiftId: this.splitForm.shiftId,
|
|
|
|
|
splitNum: this.splitForm.splitNum,
|
|
|
|
|
product: this.productData[0],
|
|
|
|
|
routeCode: this.splitForm.routeCode
|
|
|
|
|
routeCode: this.splitForm.routeCode,
|
|
|
|
|
sortNo: this.splitForm.sortNo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
subSplitOrder(data).then(response => {
|
|
|
|
@ -1160,7 +1190,7 @@ export default {
|
|
|
|
|
splitNum: null,
|
|
|
|
|
productDate: null,
|
|
|
|
|
shiftId: null,
|
|
|
|
|
formFields: []
|
|
|
|
|
formFields: [],
|
|
|
|
|
}
|
|
|
|
|
this.formFields = [{
|
|
|
|
|
batchCode: '',
|
|
|
|
@ -1256,11 +1286,13 @@ export default {
|
|
|
|
|
handleSyncSAP() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let _this = this;
|
|
|
|
|
this.$modal.confirm('是否确认SAP同步操作步骤?').then(function () {
|
|
|
|
|
return syncSAP()
|
|
|
|
|
this.$modal.confirm('是否确认SAP同步操作步骤?执行后,需要一分钟后查看同步结果').then(function () {
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
syncSAP()
|
|
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList()
|
|
|
|
|
this.loading = false;
|
|
|
|
|
//this.getList()
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
this.$modal.msgSuccess('同步成功')
|
|
|
|
|
}).catch(
|
|
|
|
|
function (e) {
|
|
|
|
|