|
|
@ -423,6 +423,17 @@ |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="materialWeight" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="right" |
|
|
|
|
|
min-width="80" |
|
|
|
|
|
label="半成品数量"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input v-model="scope.row.materialWeight" type="number" :disabled="materialWeightFactorFlag" @blur="materialWeightBlur(scope.row)" |
|
|
|
|
|
style="width:98%"></el-input> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="scheduleQty" |
|
|
prop="scheduleQty" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
@ -441,7 +452,7 @@ |
|
|
min-width="80" |
|
|
min-width="80" |
|
|
label="转化重量"> |
|
|
label="转化重量"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input v-model="scope.row.weight" type="number" :disabled="weightFactorFlag" @change="changeSum" @blur="weightBlur(scope.row)" placeholder="请输入重量" |
|
|
|
|
|
|
|
|
<el-input v-model="scope.row.weight" type="number" :disabled="weightFactorFlag" @blur="weightBlur(scope.row)" placeholder="请输入重量" |
|
|
style="width:98%"></el-input> |
|
|
style="width:98%"></el-input> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -517,6 +528,7 @@ |
|
|
getWorkCenterOperatorList, |
|
|
getWorkCenterOperatorList, |
|
|
getAvailableResourceList, |
|
|
getAvailableResourceList, |
|
|
scheduleForShopOrder, |
|
|
scheduleForShopOrder, |
|
|
|
|
|
getSPBomQtyAssembly, |
|
|
} from "@/api/production.js" |
|
|
} from "@/api/production.js" |
|
|
import { |
|
|
import { |
|
|
searchLastApproveQty, |
|
|
searchLastApproveQty, |
|
|
@ -577,6 +589,7 @@ |
|
|
userId:this.$store.state.user.name, |
|
|
userId:this.$store.state.user.name, |
|
|
}, |
|
|
}, |
|
|
weightFactorFlag:false, |
|
|
weightFactorFlag:false, |
|
|
|
|
|
materialWeightFactorFlag:false, |
|
|
schedulingModalData: { |
|
|
schedulingModalData: { |
|
|
remark:'', |
|
|
remark:'', |
|
|
weightFactor:'', |
|
|
weightFactor:'', |
|
|
@ -600,6 +613,7 @@ |
|
|
qty1:'', |
|
|
qty1:'', |
|
|
lastApproveQty:'', |
|
|
lastApproveQty:'', |
|
|
partPlanQty:'', |
|
|
partPlanQty:'', |
|
|
|
|
|
qtyAssembly:'', |
|
|
}, |
|
|
}, |
|
|
scheduledModalFlag: false, |
|
|
scheduledModalFlag: false, |
|
|
availableResourceList: [], |
|
|
availableResourceList: [], |
|
|
@ -689,7 +703,9 @@ |
|
|
sumQty: 0, |
|
|
sumQty: 0, |
|
|
lastApproveQty:null, |
|
|
lastApproveQty:null, |
|
|
qty1:'', |
|
|
qty1:'', |
|
|
|
|
|
qtyAssembly:'', |
|
|
} |
|
|
} |
|
|
|
|
|
this.materialWeightFactorFlag=true |
|
|
if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){ |
|
|
if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){ |
|
|
this.weightFactorFlag=true; |
|
|
this.weightFactorFlag=true; |
|
|
this.schedulingModalData.weightFactor='ERP未维护数据' |
|
|
this.schedulingModalData.weightFactor='ERP未维护数据' |
|
|
@ -699,11 +715,20 @@ |
|
|
this.schedulingModalTableData = [] |
|
|
this.schedulingModalTableData = [] |
|
|
this.getAvailableResourceList(row) |
|
|
this.getAvailableResourceList(row) |
|
|
this.getWorkCenterOperatorList(row); |
|
|
this.getWorkCenterOperatorList(row); |
|
|
|
|
|
|
|
|
let inData={ |
|
|
let inData={ |
|
|
site:row.site, |
|
|
site:row.site, |
|
|
orderNo:row.orderNo, |
|
|
orderNo:row.orderNo, |
|
|
itemNo:row.itemNo, |
|
|
itemNo:row.itemNo, |
|
|
} |
|
|
} |
|
|
|
|
|
if(row.operationDesc.includes("修边")) { |
|
|
|
|
|
getSPBomQtyAssembly(inData).then(({data}) => { |
|
|
|
|
|
if (data.code === 0 && data.rows.length > 0) { |
|
|
|
|
|
this.materialWeightFactorFlag=false |
|
|
|
|
|
this.schedulingModalData.qtyAssembly = data.rows[0].qtyAssembly |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
searchLastApproveQty(inData).then(({data}) => { |
|
|
searchLastApproveQty(inData).then(({data}) => { |
|
|
if(data.code===0&&data.row.lastApproveQty!=null) { |
|
|
if(data.code===0&&data.row.lastApproveQty!=null) { |
|
|
this.schedulingModalData.lastApproveQty = data.row.lastApproveQty; |
|
|
this.schedulingModalData.lastApproveQty = data.row.lastApproveQty; |
|
|
@ -733,7 +758,8 @@ |
|
|
shiftNo: this.schedulingModalData.shiftNo, |
|
|
shiftNo: this.schedulingModalData.shiftNo, |
|
|
scheduleDate: null, |
|
|
scheduleDate: null, |
|
|
operatorId:this.schedulingModalData.operatorId, |
|
|
operatorId:this.schedulingModalData.operatorId, |
|
|
createBy:this.$store.state.user.name |
|
|
|
|
|
|
|
|
createBy:this.$store.state.user.name, |
|
|
|
|
|
materialWeight:'', |
|
|
} |
|
|
} |
|
|
if(this.schedulingModalData.partPlanQty!=null&&this.schedulingModalData.partPlanQty!=''&&this.schedulingModalData.partPlanQty!=0){ |
|
|
if(this.schedulingModalData.partPlanQty!=null&&this.schedulingModalData.partPlanQty!=''&&this.schedulingModalData.partPlanQty!=0){ |
|
|
data.scheduleQty=this.schedulingModalData.partPlanQty; |
|
|
data.scheduleQty=this.schedulingModalData.partPlanQty; |
|
|
@ -741,7 +767,9 @@ |
|
|
}else { |
|
|
}else { |
|
|
data.weight=Math.round( data.scheduleQty*this.schedulingModalData.weightFactor) |
|
|
data.weight=Math.round( data.scheduleQty*this.schedulingModalData.weightFactor) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!this.materialWeightFactorFlag){ |
|
|
|
|
|
data.materialWeight=(data.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.schedulingModalTableData.push(data) |
|
|
this.schedulingModalTableData.push(data) |
|
|
this.changeSum(); |
|
|
this.changeSum(); |
|
|
@ -899,21 +927,36 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
materialWeightBlur(row){ |
|
|
|
|
|
row.scheduleQty=(row.materialWeight/this.schedulingModalData.qtyAssembly).toFixed(1) |
|
|
|
|
|
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){ |
|
|
|
|
|
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
scheduleQtyBlur(row){ |
|
|
scheduleQtyBlur(row){ |
|
|
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){ |
|
|
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){ |
|
|
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1) |
|
|
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1) |
|
|
|
|
|
if(!this.materialWeightFactorFlag){ |
|
|
|
|
|
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(row.scheduleQty==''){ |
|
|
if(row.scheduleQty==''){ |
|
|
row.weight='' |
|
|
row.weight='' |
|
|
|
|
|
row.materialWeight='' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
weightBlur(row){ |
|
|
weightBlur(row){ |
|
|
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.weight!=''){ |
|
|
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.weight!=''){ |
|
|
row.scheduleQty=(row.weight/this.schedulingModalData.weightFactor).toFixed(1) |
|
|
row.scheduleQty=(row.weight/this.schedulingModalData.weightFactor).toFixed(1) |
|
|
|
|
|
if(!this.materialWeightFactorFlag){ |
|
|
|
|
|
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if(row.weight==''){ |
|
|
if(row.weight==''){ |
|
|
row.scheduleQty='' |
|
|
row.scheduleQty='' |
|
|
|
|
|
row.materialWeight='' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
tableRowClassName ({row, rowIndex}) { |
|
|
tableRowClassName ({row, rowIndex}) { |
|
|
|
|
|
|
|
|
|