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