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

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

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

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

@ -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,10 +767,12 @@
}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();
}, },
changeSum () { changeSum () {
let sum = 0 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){ 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}) {

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

@ -83,7 +83,14 @@
header-align="center" header-align="center"
align="right" align="right"
min-width="80" 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>
<el-table-column <el-table-column
prop="orderNo" prop="orderNo"

Loading…
Cancel
Save