Commit d54672ff authored by chenzj's avatar chenzj

退料申请打印二维码

parent fe2186ae
...@@ -708,12 +708,17 @@ ...@@ -708,12 +708,17 @@
<view class="list-bar"> <view class="list-bar">
<u-form :model="materialReturnFormData" label-width="100px"> <u-form :model="materialReturnFormData" label-width="100px">
<u-row> <u-row>
<u-col span="6"> <u-col span="4">
<u-form-item label="编排单号"> <u-form-item label="编排单号">
{{ curTaskInfo.arrangeCode }} {{ curTaskInfo.arrangeCode }}
</u-form-item> </u-form-item>
</u-col> </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"> <u-form-item label="生产工单" prop="workorderCode">
<uni-data-select v-model="materialReturnFormData.workorderCode" @change="materialReturnWorkorderChange" <uni-data-select v-model="materialReturnFormData.workorderCode" @change="materialReturnWorkorderChange"
:localdata="curTaskInfo.workorderOption"></uni-data-select> :localdata="curTaskInfo.workorderOption"></uni-data-select>
...@@ -1332,7 +1337,8 @@ export default { ...@@ -1332,7 +1337,8 @@ export default {
materialReturnFormData: { materialReturnFormData: {
itemName: null, itemName: null,
applyNum: 1, applyNum: 1,
workorderCode: null workorderCode: null,
number: 1,
}, },
materialReturnProcessItemData: { materialReturnProcessItemData: {
itemName: null, itemName: null,
...@@ -2745,6 +2751,7 @@ export default { ...@@ -2745,6 +2751,7 @@ export default {
return `SN${year}${month}${day}${randomNumber}` return `SN${year}${month}${day}${randomNumber}`
}, },
materialReturnSave() { materialReturnSave() {
let a=null;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
const apply_no = this.formatDateRandom() const apply_no = this.formatDateRandom()
const rst = this.materialReturnList.map((s) => { const rst = this.materialReturnList.map((s) => {
...@@ -2760,6 +2767,7 @@ export default { ...@@ -2760,6 +2767,7 @@ export default {
applyNo: apply_no, applyNo: apply_no,
isQualified: s.isQualified isQualified: s.isQualified
}; };
a=a+s.applyNum;
if (this.materialReturnFormData.workorderCode) { if (this.materialReturnFormData.workorderCode) {
data.workorderCode = this.materialReturnFormData.workorderCode; data.workorderCode = this.materialReturnFormData.workorderCode;
} else { } else {
...@@ -2777,7 +2785,33 @@ export default { ...@@ -2777,7 +2785,33 @@ export default {
t.$u.toast('保存成功'); 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() { stockInShow() {
this.stockInVisible = true; 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