|
|
|
@ -65,6 +65,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button> |
|
|
|
<el-button @click="openScan()" style="margin-left: 0px;margin-top:0px" type="primary">扫描派工单</el-button> |
|
|
|
<download-excel |
|
|
|
:fields="exportDataStandard" |
|
|
|
:data="tableData" |
|
|
|
@ -80,6 +81,7 @@ |
|
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
|
{{'导出'}} |
|
|
|
</download-excel> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
@ -211,7 +213,17 @@ |
|
|
|
label="加工中心编码"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-dialog title="扫描派工单" :close-on-click-modal="false" v-drag :visible.sync="scanModalFlag" width="215px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'派工单号:'"> |
|
|
|
<el-input v-model="scanSeqNo" ref="input" type="number" style="width: 130px;" @keyup.enter.native="searchSeqNo()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="searchSeqNo()">搜索</el-button> |
|
|
|
<el-button type="primary" @click="printModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog @close="closeDialog" :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="报告信息" :visible.sync="setUp.reviewFlag" width="615px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item label="派工单号"> |
|
|
|
@ -274,19 +286,30 @@ |
|
|
|
<el-form-item label="上工序报工数"> |
|
|
|
<el-input style="width: 130px;" :disabled="setUp.disabled" v-model="qty2"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="单位重量"> |
|
|
|
<el-input style="width: 130px;" disabled v-model="qty3"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item label="报告数量"> |
|
|
|
<el-input type="number" oninput="value=value.replace(/[^\d]/g,'')" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyReported"></el-input> |
|
|
|
<!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.qtyRework" size="medium" :min="0" :controls="false"></el-input-number>--> |
|
|
|
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyReported" @blur="qtyReportedBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="合格数量"> |
|
|
|
<el-input type="number" style="width: 178px;" oninput="value=value.replace(/[^\d]/g,'')" class="input_reight" v-model="saveHeaderData.qtyApprove"></el-input> |
|
|
|
<!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.qtyRework" size="medium" :min="0" :controls="false"></el-input-number>--> |
|
|
|
<el-input type="number" style="width: 178px;" class="input_reight" v-model="saveHeaderData.qtyApprove" @blur="qtyApproveBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="返工数量"> |
|
|
|
<el-input type="number" style="width: 178px;" oninput="value=value.replace(/[^\d]/g,'')" v-model="saveHeaderData.qtyRework"></el-input> |
|
|
|
<!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.qtyRework" size="medium" :min="0" :controls="false"></el-input-number>--> |
|
|
|
<el-input type="number" style="width: 178px;" v-model="saveHeaderData.qtyRework" @blur="qtyReworkBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item label="报告重量(KG)"> |
|
|
|
<el-input type="number" class="input_left" style="width: 178px;" :disabled="factorFlag" v-model="KGReported" @blur="KGReportedBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="合格重量(KG)"> |
|
|
|
<el-input type="number" style="width: 178px;" class="input_reight" :disabled="factorFlag" v-model="KGApprove" @blur="KGApproveBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="返工重量(KG)"> |
|
|
|
<el-input type="number" style="width: 178px;" v-model="KGRework" :disabled="factorFlag" @blur="KGReworkBlur()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<fieldset class="customer-fieldset" style="width: 597px;margin-left: -10px;"> |
|
|
|
@ -306,7 +329,7 @@ |
|
|
|
</fieldset> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item label="准备时间"> |
|
|
|
<el-input type="number" style="width: 178px;text-align: right;" v-model="saveHeaderData.preparationTime"></el-input> <!--oninput ="value=value.replace(/[^0-9.]/g,'')"--> |
|
|
|
<el-input type="number" style="width: 178px;text-align: right;" v-model="saveHeaderData.preparationTime" ></el-input> <!--oninput ="value=value.replace(/[^0-9.]/g,'')"--> |
|
|
|
<!-- <el-input-number style="width: 178px;text-align: right;" v-model="saveHeaderData.preparationTime" size="medium" :min="0" :controls="false"></el-input-number>--> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="制造时间"> |
|
|
|
@ -386,7 +409,8 @@ |
|
|
|
import { |
|
|
|
getSOScheduleRoutingData |
|
|
|
, saveGenerateReportForSchedule, |
|
|
|
searchReportedQty |
|
|
|
searchReportedQty, |
|
|
|
searchSeqNo |
|
|
|
} from '@/api/production/generateReport.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import { |
|
|
|
@ -405,6 +429,10 @@ |
|
|
|
readonlyFlag: false, |
|
|
|
disabled: false |
|
|
|
}, |
|
|
|
factorFlag:false, |
|
|
|
KGReported:'', |
|
|
|
KGApprove:'', |
|
|
|
KGRework:'', |
|
|
|
saveHeaderData: { |
|
|
|
site: '', |
|
|
|
seqNo: '', |
|
|
|
@ -433,8 +461,10 @@ |
|
|
|
scheduleType:'', |
|
|
|
userId:'', |
|
|
|
}, |
|
|
|
scanSeqNo:'', |
|
|
|
qty1:'', |
|
|
|
qty2:'', |
|
|
|
qty3:'', |
|
|
|
sopFlag:false, |
|
|
|
site: this.$store.state.user.site, |
|
|
|
operatorType: 0, |
|
|
|
@ -486,6 +516,7 @@ |
|
|
|
site:'', |
|
|
|
partNo:'', |
|
|
|
}, |
|
|
|
scanModalFlag:false, |
|
|
|
partDescription:'', |
|
|
|
fileTitle:'', |
|
|
|
fileName:'', |
|
|
|
@ -505,6 +536,7 @@ |
|
|
|
this.height2 = window.innerHeight -100 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
saveReport () { |
|
|
|
if (this.saveHeaderData.qtyReported == null || this.saveHeaderData.qtyReported <= 0) { |
|
|
|
@ -626,6 +658,12 @@ |
|
|
|
this.setUp.reviewFlag = true; |
|
|
|
this.setUp.disabled = true; |
|
|
|
let currentData = JSON.parse(JSON.stringify(row)); |
|
|
|
this.KGReported=0 |
|
|
|
this.KGApprove=0 |
|
|
|
this.KGRework=0 |
|
|
|
this.saveHeaderData.qtyApprove=0 |
|
|
|
this.saveHeaderData.qtyReported=0 |
|
|
|
this.saveHeaderData.qtyRework=0 |
|
|
|
this.saveHeaderData.site = currentData.site; |
|
|
|
this.saveHeaderData.seqNo = currentData.seqNo; |
|
|
|
this.saveHeaderData.itemNo = currentData.itemNo; |
|
|
|
@ -635,6 +673,7 @@ |
|
|
|
this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo; |
|
|
|
this.saveHeaderData.workCenterDesc = currentData.workCenterDesc; |
|
|
|
this.saveHeaderData.orderRef1=currentData.orderRef1; |
|
|
|
this.saveHeaderData.orderNo=currentData.orderNo; |
|
|
|
this.saveHeaderData.scheduleType=currentData.scheduleType; |
|
|
|
this.saveHeaderData.operatorId=currentData.operatorId; |
|
|
|
this.saveHeaderData.operatorName=currentData.operatorName; |
|
|
|
@ -645,6 +684,16 @@ |
|
|
|
searchReportedQty(this.saveHeaderData).then(({data}) => { |
|
|
|
this.qty1 = data.row.qtyReported; |
|
|
|
this.qty2 =data.row.lastApproveQty; |
|
|
|
if(data.row.weightFactor==-1){ |
|
|
|
this.qty3 ="erp未维护数据" |
|
|
|
this.KGReported='' |
|
|
|
this.KGApprove='' |
|
|
|
this.KGRework='' |
|
|
|
this.factorFlag=true; |
|
|
|
}else { |
|
|
|
this.qty3 =data.row.weightFactor |
|
|
|
this.factorFlag=false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeDialog () { |
|
|
|
@ -723,13 +772,13 @@ |
|
|
|
this.num=this.num+1; |
|
|
|
} |
|
|
|
this.fileName=this.photoDatas[this.num-1].attaFileNameDb; |
|
|
|
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; |
|
|
|
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; |
|
|
|
this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; |
|
|
|
// this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; |
|
|
|
}, |
|
|
|
lastPicture(){ |
|
|
|
if(this.photoDatas.length==0){ |
|
|
|
this.fileTitle="文件名 ("+0+"/"+0+")"; |
|
|
|
this.fileTitle="文件名 ("+0+"/"+0+")"; |
|
|
|
this.fileName=''; |
|
|
|
this.photoUrl=''; |
|
|
|
this.$alert('该物料没有上传图片!', '错误', { |
|
|
|
@ -747,7 +796,134 @@ |
|
|
|
this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; |
|
|
|
// this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; |
|
|
|
}, |
|
|
|
openScan(){ |
|
|
|
this.scanSeqNo=''; |
|
|
|
this.scanModalFlag=true; |
|
|
|
this.$nextTick(() => { this.$refs.input.focus();}) |
|
|
|
}, |
|
|
|
searchSeqNo(){ |
|
|
|
if(this.scanSeqNo==''){ |
|
|
|
this.$alert("请扫描派工单!",'错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
site:this.$store.state.user.site, |
|
|
|
seqNo:this.scanSeqNo |
|
|
|
} |
|
|
|
searchSeqNo(inData).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
if(data.row==null){ |
|
|
|
this.$alert("派工单不存在!",'错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let currentData = data.row; |
|
|
|
if(currentData.closedFlag=='Y'){ |
|
|
|
this.$alert("该派工单已关闭!",'错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.KGReported=0 |
|
|
|
this.KGApprove=0 |
|
|
|
this.KGRework=0 |
|
|
|
this.saveHeaderData.qtyApprove=0 |
|
|
|
this.saveHeaderData.qtyReported=0 |
|
|
|
this.saveHeaderData.qtyRework=0 |
|
|
|
this.scanModalFlag=false; |
|
|
|
this.setUp.reviewFlag = true; |
|
|
|
this.setUp.disabled = true; |
|
|
|
this.saveHeaderData.site = currentData.site; |
|
|
|
this.saveHeaderData.seqNo = currentData.seqNo; |
|
|
|
this.saveHeaderData.itemNo = currentData.itemNo; |
|
|
|
this.saveHeaderData.operationDesc = currentData.itemDesc; |
|
|
|
this.saveHeaderData.partNo = currentData.partNo; |
|
|
|
this.saveHeaderData.partDescription = currentData.partSpec; |
|
|
|
this.saveHeaderData.workCenterNo = currentData.sWorkCenterNo; |
|
|
|
this.saveHeaderData.workCenterDesc = currentData.workCenterDesc; |
|
|
|
this.saveHeaderData.orderRef1=currentData.orderRef1; |
|
|
|
this.saveHeaderData.orderNo=currentData.orderNo; |
|
|
|
this.saveHeaderData.scheduleType=currentData.scheduleType; |
|
|
|
this.saveHeaderData.operatorId=currentData.operatorId; |
|
|
|
this.saveHeaderData.operatorName=currentData.operatorName; |
|
|
|
this.saveHeaderData.userId=this.$store.state.user.name; |
|
|
|
this.qty1=''; |
|
|
|
this.qty2 =''; |
|
|
|
this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') |
|
|
|
searchReportedQty(this.saveHeaderData).then(({data}) => { |
|
|
|
this.qty1 = data.row.qtyReported; |
|
|
|
this.qty2 =data.row.lastApproveQty; |
|
|
|
if(data.row.weightFactor==-1){ |
|
|
|
this.qty3 ="erp未维护数据" |
|
|
|
this.KGReported='' |
|
|
|
this.KGApprove='' |
|
|
|
this.KGRework='' |
|
|
|
this.factorFlag=true; |
|
|
|
}else { |
|
|
|
this.qty3 =data.row.weightFactor |
|
|
|
this.factorFlag=false; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
qtyReportedBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyReported!=''){ |
|
|
|
this.KGReported=(this.saveHeaderData.qtyReported*this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.saveHeaderData.qtyReported==''){ |
|
|
|
this.KGReported='' |
|
|
|
} |
|
|
|
}, |
|
|
|
qtyApproveBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyApprove!=''){ |
|
|
|
this.KGApprove=(this.saveHeaderData.qtyApprove*this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.saveHeaderData.qtyApprove==''){ |
|
|
|
this.KGApprove='' |
|
|
|
} |
|
|
|
}, |
|
|
|
qtyReworkBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.saveHeaderData.qtyRework!=''){ |
|
|
|
this.KGRework=(this.saveHeaderData.qtyRework*this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.saveHeaderData.qtyRework==''){ |
|
|
|
this.KGRework='' |
|
|
|
} |
|
|
|
}, |
|
|
|
KGReportedBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGReported!=''){ |
|
|
|
this.saveHeaderData.qtyReported=(this.KGReported/this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.KGReported==''){ |
|
|
|
this.saveHeaderData.qtyReported='' |
|
|
|
} |
|
|
|
}, |
|
|
|
KGApproveBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGApprove!=''){ |
|
|
|
this.saveHeaderData.qtyApprove=(this.KGApprove/this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.KGApprove==''){ |
|
|
|
this.saveHeaderData.qtyApprove='' |
|
|
|
} |
|
|
|
}, |
|
|
|
KGReworkBlur(){ |
|
|
|
if(this.qty3&&this.qty3!=0&&this.qty3!='erp未维护数据'&&this.KGRework!=''){ |
|
|
|
this.saveHeaderData.qtyRework=(this.KGRework/this.qty3).toFixed(1) |
|
|
|
} |
|
|
|
if(this.KGRework==''){ |
|
|
|
this.saveHeaderData.qtyRework='' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
} |
|
|
|
|