|
|
|
@ -82,7 +82,7 @@ |
|
|
|
<el-form-item :label="'物料编码:'"> |
|
|
|
<el-input v-model="searchData.partNo" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'排产情况:'"> |
|
|
|
<el-form-item :label="'派工情况:'"> |
|
|
|
<el-select filterable v-model="searchData.planStatus" style="width: 120px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="未派工完" value="ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)"></el-option> |
|
|
|
@ -266,7 +266,7 @@ |
|
|
|
<el-form-item label="订单数量:"> |
|
|
|
<el-input v-model="schedulingModalData.lotSize" disabled style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="待排产数:"> |
|
|
|
<el-form-item label="待派工数:"> |
|
|
|
<el-input v-model="schedulingModalData.qtyToSchedule" disabled style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -288,30 +288,38 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="排产机台:"> |
|
|
|
<el-form-item label="派工机台:"> |
|
|
|
<el-select v-model="schedulingModalData.resourceId" style="width: 120px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="(item,index) in availableResourceList" |
|
|
|
:key="index" |
|
|
|
:label="item.resourceID" |
|
|
|
:value="item.resourceID" |
|
|
|
:label="item.ResouceDesc" |
|
|
|
:value="item.ResourceID" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="排产班次:"> |
|
|
|
<el-form-item label="派工班次:"> |
|
|
|
<el-select v-model="schedulingModalData.shiftNo" style="width: 120px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option label="白班" value="白班"></el-option> |
|
|
|
<el-option label="晚班" value="晚班"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="本次累计排产数量:"> |
|
|
|
<el-form-item label="派工人员:"> |
|
|
|
<el-select v-model="schedulingModalData.operatorId" style="width: 120px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName" |
|
|
|
:value="item.operatorId"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="本次累计派工数量:"> |
|
|
|
<el-input v-model="schedulingModalData.sumQty" type="number" disabled style="width: 120px"></el-input> |
|
|
|
<el-button type="primary" @click="addPlans()" style="margin-left: 10px;">添加</el-button> |
|
|
|
<el-button type="primary" @click="savePlans()">保存</el-button> |
|
|
|
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button> |
|
|
|
<el-button type="primary" @click="saveSchedule()">保存</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div class="inputTable "> |
|
|
|
@ -325,7 +333,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="100" |
|
|
|
label="排产日期"> |
|
|
|
label="派工日期"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 95%" |
|
|
|
@ -343,7 +351,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="排产数量"> |
|
|
|
label="派工数量"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.scheduleQty" type="number" @change="changeSum" placeholder="请输入数量" |
|
|
|
style="width:98%"></el-input> |
|
|
|
@ -354,12 +362,12 @@ |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
label="排产机台"> |
|
|
|
label="派工机台"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable |
|
|
|
allow-create> |
|
|
|
<el-option v-for="item in availableResourceList " :key="index" :label="item.resourceID" |
|
|
|
:value="item.resourceID"> |
|
|
|
<el-option v-for="item in availableResourceList " :key="index" :label="item.ResouceDesc" |
|
|
|
:value="item.ResourceID"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
@ -370,7 +378,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
label="排产班次"> |
|
|
|
label="派工班次"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.shiftNo" placeholder="请选择" style="height: 12px;padding: 0px " filterable |
|
|
|
allow-create> |
|
|
|
@ -384,7 +392,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="排产人员"> |
|
|
|
label="派工人员"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.operatorId" placeholder="请选择" style="height: 12px;padding: 0px " filterable |
|
|
|
allow-create> |
|
|
|
@ -417,7 +425,10 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getShopOrderRoutingData |
|
|
|
getShopOrderRoutingData, |
|
|
|
getWorkCenterOperatorList, |
|
|
|
getAvailableResourceList, |
|
|
|
|
|
|
|
} from "@/api/production.js" |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -484,6 +495,7 @@ |
|
|
|
resourceId: '', |
|
|
|
shiftNo: '', |
|
|
|
sumQty: '', |
|
|
|
operatorId:'', |
|
|
|
}, |
|
|
|
scheduledModalFlag: false, |
|
|
|
availableResourceList: [], |
|
|
|
@ -546,10 +558,12 @@ |
|
|
|
scheduleQty: '', |
|
|
|
resourceId: '', |
|
|
|
shiftNo: '', |
|
|
|
operatorId:'', |
|
|
|
sumQty: 0, |
|
|
|
} |
|
|
|
this.schedulingModalTableData = [] |
|
|
|
// this.getAvailableResourceList(row) |
|
|
|
this.getAvailableResourceList(row) |
|
|
|
this.getWorkCenterOperatorList(row); |
|
|
|
this.scheduledModalFlag = true |
|
|
|
}, |
|
|
|
addPlans () { |
|
|
|
@ -561,7 +575,7 @@ |
|
|
|
// return false |
|
|
|
// } |
|
|
|
// if (this.schedulingModalData.shiftNo == '') { |
|
|
|
// this.$alert('请选择排产班次!', '错误', { |
|
|
|
// this.$alert('请选择派工班次!', '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// return false |
|
|
|
@ -571,8 +585,7 @@ |
|
|
|
resourceId: this.schedulingModalData.resourceId, |
|
|
|
shiftNo: this.schedulingModalData.shiftNo, |
|
|
|
scheduleDate: null, |
|
|
|
operatorId:'', |
|
|
|
selectList: [] |
|
|
|
operatorId:this.schedulingModalData.operatorId, |
|
|
|
}) |
|
|
|
this.sumQty += this.schedulingModalData.scheduleQty |
|
|
|
}, |
|
|
|
@ -592,6 +605,88 @@ |
|
|
|
this.schedulingModalTableData.splice(index, 1) |
|
|
|
this.changeSum() |
|
|
|
}, |
|
|
|
getWorkCenterOperatorList(row){ |
|
|
|
let inData={ |
|
|
|
site:row.site, |
|
|
|
workCenterNo:row.workCenterNo, |
|
|
|
} |
|
|
|
getWorkCenterOperatorList(inData).then(({data}) => { |
|
|
|
this.operatorIdList = data.rows; |
|
|
|
}) |
|
|
|
}, |
|
|
|
getAvailableResourceList(row){ |
|
|
|
let inData={ |
|
|
|
site:row.site, |
|
|
|
orderNo:row.orderNo, |
|
|
|
itemNo:row.itemNo, |
|
|
|
} |
|
|
|
getAvailableResourceList(inData).then(({data}) => { |
|
|
|
this.availableResourceList = data.rows; |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveSchedule(){ |
|
|
|
if(this.schedulingModalTableData.length==0){ |
|
|
|
this.$alert('请添加派工记录!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(this.schedulingModalData.qtyToSchedule<this.schedulingModalData.sumQty){ |
|
|
|
this.$alert('实际派工数量大于可派工数量!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
for (let i = 0; i <this.schedulingModalTableData.length; i++) { |
|
|
|
if(''==this.schedulingModalTableData[i].scheduleQty||this.schedulingModalTableData[i].scheduleQty==null){ |
|
|
|
this.$alert('存在派工记录没有填写派工数量!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(''==this.schedulingModalTableData[i].resourceId||this.schedulingModalTableData[i].resourceId==null){ |
|
|
|
this.$alert('存在派工记录没有选择机台!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(''==this.schedulingModalTableData[i].shiftNo||this.schedulingModalTableData[i].shiftNo==null){ |
|
|
|
this.$alert('存在派工记录没有选择班次!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(''==this.schedulingModalTableData[i].scheduleDate||this.schedulingModalTableData[i].scheduleDate==null){ |
|
|
|
this.$alert('存在派工记录没有填写日期!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
if(''==this.schedulingModalTableData[i].operatorId||this.schedulingModalTableData[i].operatorId==null){ |
|
|
|
this.$alert('存在派工记录没有选择操作员!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
this.doSchedule(); |
|
|
|
}, |
|
|
|
doSchedule(){ |
|
|
|
let indata={ |
|
|
|
orderNo: this.schedulingModalData.orderNo, |
|
|
|
site: this.schedulingModalData.site, |
|
|
|
needDate: this.schedulingModalData.needDate, |
|
|
|
lotSize: this.schedulingModalData.lotSize, |
|
|
|
qtyToSchedule: this.schedulingModalData.qtyToSchedule, |
|
|
|
partNo: this.schedulingModalData.partNo, |
|
|
|
partDescription: this.schedulingModalData.partDescription, |
|
|
|
itemNo: this.schedulingModalData.itemNo, |
|
|
|
operationDesc: this.schedulingModalData.operationDesc, |
|
|
|
workCenterNo: this.schedulingModalData.workCenterNo, |
|
|
|
sumQty: this.schedulingModalData.sumQty, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
} |
|
|
|
|