Browse Source

PDA打印功能

hella_online_20240829
yufei0306 7 months ago
parent
commit
220ba45e18
  1. 19
      src/api/request2.js
  2. 37
      src/pages/package/job/overPackageJobDetail.vue
  3. 69
      src/pages/point/index.vue

19
src/api/request2.js

@ -4077,3 +4077,22 @@ export function overPageSubmit(params) {
data: params, data: params,
}); });
} }
export function getPackageLabel(packageCode) {
var params = {
name: name,
pageNo: 1,
pageSize: 10,
sort:"",
filters:[{
action: "==",
column:"relateNumber",
value: packageCode
}]
}
return request({
url: baseApi + "/wms/barbasic/senior",
method: "post",
data: params,
});
}

37
src/pages/package/job/overPackageJobDetail.vue

@ -59,7 +59,8 @@
takeOverPageJob, takeOverPageJob,
cancleTakeOverPageJob, cancleTakeOverPageJob,
getOverPageJobDetail, getOverPageJobDetail,
overPageSubmit overPageSubmit,
getPackageLabel
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -328,7 +329,17 @@
overPageSubmit(params).then(res => { overPageSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>",res.data.map(item=>({
itemNumber: item.itemCode, //
itemName: item.itemName, //
referenceOrderRow: item.poLine, //
referenceOrderCode: item.poNumber, //
supplierCode: item.supplierCode, //
packageCode: item.number, //
amount: item.qty, //
barcodeString: '', //
barcodeBase64: ''
})))
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -508,9 +519,25 @@
this.$refs.comMessage.showCommitSuccess(); this.$refs.comMessage.showCommitSuccess();
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint,pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => { Promise.all(pointData.map(item=>{
navigateBack(1) return getPackageLabel(item.packageCode)
})).then(res=>{
res.forEach(item=>{
const point = pointData.find(pointItem=>pointItem.packageCode==item.data.list[0].relateNumber)
point.barcodeString = item.data.list[0].barcodeString
})
this.$refs.comMessage.showSuccessMessage(hint, res => {
if(pointData.length>0){
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
});
}else{
navigateBack(1)
}
})
}) })
}, },

69
src/pages/point/index.vue

@ -57,6 +57,7 @@
// #endif // #endif
export default { export default {
name: 'point',
data() { data() {
return { return {
data: {}, data: {},
@ -143,40 +144,44 @@
} }
} }
}, },
onLoad(option) {
if (option.points) {
this.data = JSON.parse(option.points);
}
},
async onShow() { async onShow() {
// //
this.data = [{ // this.data = [{
itemNumber: '555555', // itemNumber: '555555',
itemName: 'hahah', // itemName: 'hahah',
referenceOrderRow: '55', // referenceOrderRow: '55',
referenceOrderCode: '55', // referenceOrderCode: '55',
supplierCode: '555', // supplierCode: '555',
packageCode: '9999-8888', // packageCode: '9999-8888',
amount: '55', // amount: '55',
barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;', // barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;',
barcodeBase64: '' // barcodeBase64: ''
}, { // }, {
itemNumber: '66', // itemNumber: '66',
itemName: 'hahah', // itemName: 'hahah',
referenceOrderRow: '66', // referenceOrderRow: '66',
referenceOrderCode: '666', // referenceOrderCode: '666',
supplierCode: '66', // supplierCode: '66',
packageCode: '66666', // packageCode: '66666',
amount: '666666', // amount: '666666',
barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;', // barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;B20240403;PPN0403-000005;I399.960-12;Q5.000000;UEA;',
barcodeBase64: '' // barcodeBase64: ''
}, { // }, {
itemNumber: '66', // itemNumber: '66',
itemName: 'hahah', // itemName: 'hahah',
referenceOrderRow: '66', // referenceOrderRow: '66',
referenceOrderCode: '666', // referenceOrderCode: '666',
supplierCode: '66', // supplierCode: '66',
packageCode: '66666', // packageCode: '66666',
amount: '666666', // amount: '666666',
barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;', // barcodeString: 'HMQ;V1.0;Dwork1-line1;F;R2024-04-03T08:28:41;',
barcodeBase64: '' // barcodeBase64: ''
}] // }]
this.$nextTick(async () => { this.$nextTick(async () => {
// //
const el = this.$refs['qrcodeRef'] const el = this.$refs['qrcodeRef']

Loading…
Cancel
Save