Commit d54672ff authored by chenzj's avatar chenzj

退料申请打印二维码

parent fe2186ae
......@@ -708,12 +708,17 @@
<view class="list-bar">
<u-form :model="materialReturnFormData" label-width="100px">
<u-row>
<u-col span="6">
<u-col span="4">
<u-form-item label="编排单号">
{{ curTaskInfo.arrangeCode }}
</u-form-item>
</u-col>
<u-col span="6">
<u-col span="4">
<u-form-item label="打印">
<u-input v-model="materialReturnFormData.number"></u-input>
</u-form-item>
</u-col>
<u-col span="4">
<u-form-item label="生产工单" prop="workorderCode">
<uni-data-select v-model="materialReturnFormData.workorderCode" @change="materialReturnWorkorderChange"
:localdata="curTaskInfo.workorderOption"></uni-data-select>
......@@ -1332,7 +1337,8 @@ export default {
materialReturnFormData: {
itemName: null,
applyNum: 1,
workorderCode: null
workorderCode: null,
number: 1,
},
materialReturnProcessItemData: {
itemName: null,
......@@ -2745,8 +2751,9 @@ export default {
return `SN${year}${month}${day}${randomNumber}`
},
materialReturnSave() {
const taskInfo = this.tableSelectData[0];
const apply_no = this.formatDateRandom()
let a=null;
const taskInfo = this.tableSelectData[0];
const apply_no = this.formatDateRandom()
const rst = this.materialReturnList.map((s) => {
let data = {
itemId: s.itemId,
......@@ -2760,6 +2767,7 @@ export default {
applyNo: apply_no,
isQualified: s.isQualified
};
a=a+s.applyNum;
if (this.materialReturnFormData.workorderCode) {
data.workorderCode = this.materialReturnFormData.workorderCode;
} else {
......@@ -2777,7 +2785,33 @@ export default {
t.$u.toast('保存成功');
}
});
if(this.materialReturnFormData.number>=1&a>0){
for(let i=0; i<this.materialReturnFormData.number ;i++){
this.printPdfSocket({
reportName: 'mysql:qrcode-50*50-2',
values:{
detail:[
{
barcode: apply_no,
showText: '单号:'+apply_no,
gp: i+1
},
{
barcode: apply_no,
showText: '单号:'+apply_no,
gp: i+1
}
]
}
});
}
}
},
stockInShow() {
this.stockInVisible = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment