|
|
|
@ -115,14 +115,14 @@
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-edit" size="mini"
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-guide" size="mini"
|
|
|
|
|
@click="handleAutoSplit"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
v-hasPermi="['mes:pro:order:edit']">辅助排产
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>--->
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
@ -584,7 +584,7 @@
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button style="margin-top: 12px;" @click="next" v-if="this.activeSplit < 2">下一步</el-button>
|
|
|
|
|
<el-button style="margin-top: 12px;" @click="prev" v-if="this.activeSplit > 0">上一步</el-button>
|
|
|
|
|
<el-button type="primary">完 成</el-button>
|
|
|
|
|
<el-button type="primary" @click="autoSplitCommit" v-if="this.activeSplit==2">确 认</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
@ -597,14 +597,14 @@ import {
|
|
|
|
|
getProEquipment,
|
|
|
|
|
getProRoutes,getProSortNo,
|
|
|
|
|
getProShifts,
|
|
|
|
|
getWorkOrderList,
|
|
|
|
|
getWorkOrderList,getWorkOrderListCG,
|
|
|
|
|
subSplitOrder,checkRepeatBatchCodes,
|
|
|
|
|
listOrder,
|
|
|
|
|
addOrder,
|
|
|
|
|
updateOrder,
|
|
|
|
|
syncSAP, selectMaterielList,getAutoSplitList,
|
|
|
|
|
deleteOrder,getCanProductLine,
|
|
|
|
|
autoSplitOrder
|
|
|
|
|
autoSplitOrder,autoSplitOrderCancel,autoSplitOrderOk
|
|
|
|
|
} from '@/api/plan/order'
|
|
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
|
@ -726,10 +726,11 @@ export default {
|
|
|
|
|
openAutoSplit:false,
|
|
|
|
|
orderCodes:[],
|
|
|
|
|
autoSplitList:[],
|
|
|
|
|
autoSplitLoading: true,
|
|
|
|
|
openAutoSplit: false,
|
|
|
|
|
activeSplit: 0,
|
|
|
|
|
autoSplitform1:{
|
|
|
|
|
productDate:new Date()
|
|
|
|
|
productDate:null,
|
|
|
|
|
sortNo:null
|
|
|
|
|
},
|
|
|
|
|
autoSplitform2: {lineCodes:[]},
|
|
|
|
|
lineCodes:[]
|
|
|
|
@ -1374,6 +1375,9 @@ export default {
|
|
|
|
|
this.dialogVisible = false;
|
|
|
|
|
this.splitOpen = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
this.openAutoSplit = false;
|
|
|
|
|
this.activeSplit = 0;
|
|
|
|
|
autoSplitOrderCancel(Object.assign({},this.autoSplitList[0])).then(response => {});
|
|
|
|
|
},
|
|
|
|
|
// 判空、空串
|
|
|
|
|
checkNull(entity) {
|
|
|
|
@ -1492,17 +1496,23 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//排产优先级
|
|
|
|
|
handleAutoSplit(row) {
|
|
|
|
|
this.autoSplitLoading = true;
|
|
|
|
|
this.openAutoSplit = true;
|
|
|
|
|
this.autoSplitList = this.orderCodes;
|
|
|
|
|
|
|
|
|
|
if(this.autoSplitList[0] == 'o2'){
|
|
|
|
|
this.$modal.msgError("已经拆分结束!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.autoSplitform1.productDate = this.autoSplitList[0].planProDate;
|
|
|
|
|
// 获取工艺信息(工艺选最新的)
|
|
|
|
|
getProRoutes(this.autoSplitList[0].prodCode).then(response => {
|
|
|
|
|
this.routes = response.data;
|
|
|
|
|
this.autoSplitform1.routeCode = response.data[0].routeCode
|
|
|
|
|
this.autoSplitform1.routeCode = response.data[0].routeCode;
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
var ymd = moment(this.autoSplitform1.productDate).format('YYYY-MM-DD')
|
|
|
|
|
//var ymd = moment(this.autoSplitform1.productDate).format('YYYY-MM-DD')
|
|
|
|
|
// 获取工单生产顺序
|
|
|
|
|
getProSortNo(ymd).then(response => {
|
|
|
|
|
getProSortNo(this.autoSplitform1.productDate).then(response => {
|
|
|
|
|
this.autoSplitform1.sortNo = response
|
|
|
|
|
})
|
|
|
|
|
// 获取生产线体列表
|
|
|
|
@ -1513,7 +1523,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.openAutoSplit = true;
|
|
|
|
|
this.autoSplitLoading = false;
|
|
|
|
|
},
|
|
|
|
|
//判断勾选
|
|
|
|
|
selectable(row, index) {
|
|
|
|
@ -1555,9 +1564,20 @@ export default {
|
|
|
|
|
if (this.activeSplit++ > 2) this.activeSplit = 0;
|
|
|
|
|
//选完线体后的下一步,会进行模拟拆分
|
|
|
|
|
if(this.activeSplit == 2){
|
|
|
|
|
debugger
|
|
|
|
|
autoSplitOrder(Object.assign({},this.autoSplitform1,this.autoSplitform2,this.autoSplitList[0])).then(response => {
|
|
|
|
|
autoSplitOrder(Object.assign({},this.autoSplitList[0],this.autoSplitform1,this.autoSplitform2)).then(response => {
|
|
|
|
|
this.workerLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
// 获取历史拆分工单信息
|
|
|
|
|
getWorkOrderListCG(this.autoSplitList[0].id).then(response => {
|
|
|
|
|
var data = response.data
|
|
|
|
|
this.splitData = data
|
|
|
|
|
|
|
|
|
|
this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -1565,10 +1585,17 @@ export default {
|
|
|
|
|
if (this.activeSplit-- > 2) this.activeSplit = 2;
|
|
|
|
|
//会进行模拟拆分的取消
|
|
|
|
|
if(this.activeSplit == 1){
|
|
|
|
|
autoSplitOrderCancel(Object.assign({},autoSplitform2)).then(response => {
|
|
|
|
|
|
|
|
|
|
autoSplitOrderCancel(Object.assign({},this.autoSplitList[0])).then(response => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
autoSplitCommit(){
|
|
|
|
|
autoSplitOrderOk(Object.assign({},this.autoSplitList[0])).then(response => {
|
|
|
|
|
this.$modal.msgSuccess('提交成功')
|
|
|
|
|
this.getList();
|
|
|
|
|
this.openAutoSplit = false;
|
|
|
|
|
this.activeSplit = 0;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|