Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
3bc1ee9b37
  1. 2
      src/api/production.js
  2. 3
      src/views/modules/production/generateReport.vue
  3. 2
      src/views/modules/production/inspect.vue
  4. 51
      src/views/modules/production/scheduleForShopOrder.vue
  5. 9
      src/views/modules/production/stockPrint.vue

2
src/api/production.js

@ -17,7 +17,7 @@ export const getWorkPlanData=data => createAPI(`dailyPlan/getWorkPlanData`, 'pos
//删除日计划
export const delPlan=data => createAPI(`dailyPlan/delPlan`, 'post', data);
export const getSPBomQtyAssembly=data => createAPI(`dailyPlan/getSPBomQtyAssembly`, 'post', data);

3
src/views/modules/production/generateReport.vue

@ -796,6 +796,7 @@
}
this.saveHeaderData.reportWeight=Number(this.KGApprove)-boxWeightKG+Number(this.KGReported)
}
this.setUp.saveButton=true;
saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
@ -815,6 +816,7 @@
printTransNoLabel(inList);
}
} else {
this.setUp.saveButton=false;
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
@ -1115,6 +1117,7 @@
this.approveFlag=false;
this.scanModalFlag=false;
this.setUp.reviewFlag = true;
this.setUp.saveButton=false;
this.setUp.disabled = true;
getSOScheduleRoutingData(inData).then(({data}) => {
if( data.rows){

2
src/views/modules/production/inspect.vue

@ -392,6 +392,7 @@
},
height2:600,
inspectData:{
user:this.$store.state.user.name,
transNo:'',
orderNo:'',
partNo:'',
@ -483,6 +484,7 @@
this.inspectData.seqNo=row.seqNo;
this.inspectData.newDate='';
this.inspectData.confirmedTransNo=row.confirmedTransNo
this.inspectData.user=this.$store.state.user.name
this.inspectFlag=true;
},
inspectSave(){

51
src/views/modules/production/scheduleForShopOrder.vue

@ -423,6 +423,17 @@
</el-date-picker>
</template>
</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
prop="scheduleQty"
header-align="center"
@ -441,7 +452,7 @@
min-width="80"
label="转化重量">
<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>
</template>
</el-table-column>
@ -517,6 +528,7 @@
getWorkCenterOperatorList,
getAvailableResourceList,
scheduleForShopOrder,
getSPBomQtyAssembly,
} from "@/api/production.js"
import {
searchLastApproveQty,
@ -577,6 +589,7 @@
userId:this.$store.state.user.name,
},
weightFactorFlag:false,
materialWeightFactorFlag:false,
schedulingModalData: {
remark:'',
weightFactor:'',
@ -600,6 +613,7 @@
qty1:'',
lastApproveQty:'',
partPlanQty:'',
qtyAssembly:'',
},
scheduledModalFlag: false,
availableResourceList: [],
@ -689,7 +703,9 @@
sumQty: 0,
lastApproveQty:null,
qty1:'',
qtyAssembly:'',
}
this.materialWeightFactorFlag=true
if(this.schedulingModalData.weightFactor==null||this.schedulingModalData.weightFactor==''||this.schedulingModalData.weightFactor=='0'){
this.weightFactorFlag=true;
this.schedulingModalData.weightFactor='ERP未维护数据'
@ -699,11 +715,20 @@
this.schedulingModalTableData = []
this.getAvailableResourceList(row)
this.getWorkCenterOperatorList(row);
let inData={
site:row.site,
orderNo:row.orderNo,
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}) => {
if(data.code===0&&data.row.lastApproveQty!=null) {
this.schedulingModalData.lastApproveQty = data.row.lastApproveQty;
@ -733,7 +758,8 @@
shiftNo: this.schedulingModalData.shiftNo,
scheduleDate: null,
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){
data.scheduleQty=this.schedulingModalData.partPlanQty;
@ -741,10 +767,12 @@
}else {
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.changeSum ();
this.changeSum();
},
changeSum () {
let sum = 0
@ -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){
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.scheduleQty!=''){
row.weight=(row.scheduleQty*this.schedulingModalData.weightFactor).toFixed(1)
if(!this.materialWeightFactorFlag){
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1)
}
}
if(row.scheduleQty==''){
row.weight=''
row.materialWeight=''
}
},
weightBlur(row){
if(this.schedulingModalData.weightFactor&&this.schedulingModalData.weightFactor!=0&&this.weightFactorFlag==false&&row.weight!=''){
row.scheduleQty=(row.weight/this.schedulingModalData.weightFactor).toFixed(1)
if(!this.materialWeightFactorFlag){
row.materialWeight=(row.scheduleQty*this.schedulingModalData.qtyAssembly).toFixed(1)
}
}
if(row.weight==''){
row.scheduleQty=''
row.materialWeight=''
}
},
tableRowClassName ({row, rowIndex}) {

9
src/views/modules/production/stockPrint.vue

@ -83,7 +83,14 @@
header-align="center"
align="right"
min-width="80"
label="数量">
label="入库数量">
</el-table-column>
<el-table-column
prop="qtyOnHand"
header-align="center"
align="right"
min-width="80"
label="当前库存">
</el-table-column>
<el-table-column
prop="orderNo"

Loading…
Cancel
Save