Browse Source

Merge branch 'hella_online_20240803' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into hella_online_20240803

hella_online_20240803
lijuncheng 4 weeks ago
parent
commit
92384f0cce
  1. 4
      src/manifest.json
  2. 16
      src/mycomponents/scan/winScanButton.vue
  3. 110
      src/pages/fg/receiptByPlan.vue

4
src/manifest.json

@ -3,8 +3,8 @@
"package" : "uni.UNI43932FE",
"appid" : "__UNI__C9CF4BF",
"description" : "",
"versionName" : "1.0.68",
"versionCode" : 68,
"versionName" : "1.0.69",
"versionCode" : 69,
"transformPx" : false,
/* 5+App */
"app-plus" : {

16
src/mycomponents/scan/winScanButton.vue

@ -1,6 +1,6 @@
<template>
<view>
<view class="scan_float" @click="goScan('bottom')">
<view class="scan_float" ref="scanRef" @click="goScan('bottom')" @touchstart="handleTouchStart" @touchmove.prevent="handleTouchMove">
<image src="@/static/icons_ui/icon_scan_white.svg"></image>
<view>扫描</view>
</view>
@ -19,7 +19,9 @@
old: {
x: 0,
y: 0
}
},
btnX:20,
btnY:20,
}
},
props: {
@ -30,6 +32,16 @@
},
methods: {
handleTouchStart(e) {
this.btnX = e.changedTouches[0].clientX-e.currentTarget.offsetLeft
this.btnY = e.changedTouches[0].clientY-e.currentTarget.offsetTop
},
handleTouchMove(e) {
console.log("handleTouchMove",e);
this.$refs.scanRef.$el.style.left = e.changedTouches[0].clientX-this.btnX+'px'
this.$refs.scanRef.$el.style.top = e.changedTouches[0].clientY-this.btnY+'px'
},
goScan(content) {
this.$emit("goScan", '');
},

110
src/pages/fg/receiptByPlan.vue

@ -275,43 +275,30 @@
console.log(JSON.stringify(params))
let list = []
try {
var planData = await planReceiptSubmit(params)
console.log('planData', planData)
if (planData.data) {
planData.data.forEach(item => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
})
var planData = await planReceiptSubmit(params)
console.log('planData', planData)
if (planData.data && planData.data.length > 0) {
planData.data.forEach(item => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, //ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, //线
barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
})
} else {
throw new Error("提交失败")
}
} catch (error) {
console.log('异常', error)
if (error.indexOf('请返回开工阶段') > -1) {
uni.hideLoading()
this.showErrorMessage('计划已完成')
this.clearData()
this.openFg();
return
}
})
} else {
throw new Error("提交失败")
}
//
@ -324,15 +311,17 @@
// }
//
if (createProductputawaySwitch) {
createPutawayRequestByPlan(list[0].requestNumber).then(res => {
createInspectRequestByPlan(list[0].requestNumber)
})
if (list.length > 0 && list[0].requestNumber) {
createPutawayRequestByPlan(list[0].requestNumber).then(res => {
createInspectRequestByPlan(list[0].requestNumber)
})
}
} else { //
createInspectRequestByPlan(list[0].requestNumber)
if (list.length > 0 && list[0].requestNumber) {
createInspectRequestByPlan(list[0].requestNumber)
}
}
var queryParams = {
filters: [{
column: "number",
@ -375,15 +364,24 @@
this.index = 1;
this.dataContent.handleQty = 0;
}
var hintMsg ="提交成功\n生成装配收货记录\n";
if(list.length>0&&list[0].requestNumber){
hintMsg += list[0].requestNumber
}
nextTick(() => {
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
this.showCommitSuccessMessage(hintMsg, list)
})
} catch (error) {
uni.hideLoading()
var hint = error.message ? error.message : error
this.showErrorMessage(hint)
if (hint.indexOf('请返回开工阶段') > -1) {
this.showErrorMessage('计划已完成')
this.clearData()
this.openFg();
} else {
this.showErrorMessage(hint)
}
}
},
@ -490,7 +488,7 @@
batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable)
uni.hideLoading()
if(resLable.data){
if (resLable.data) {
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712`
const webData = {
token: storage.getStorage(storage.constant.token),
@ -499,8 +497,8 @@
uni.navigateTo({
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}`
});
}else {
_this.showErrorMessage(number+"批量打印标签 H5失败")
} else {
_this.showErrorMessage(number + "批量打印标签 H5失败")
}
}).catch(error => {
uni.hideLoading()
@ -527,22 +525,22 @@
return
}
uni.showLoading({
title:"正在获取打印信息",
mask:true
title: "正在获取打印信息",
mask: true
})
getBalanceToPackage({
packingNumber: packingNumber.join(',')
}).then(res => {
console.log('PC打印', res)
if(res.data&&res.data.number){
if (res.data && res.data.number) {
_this.getH5BatchPrintingLable(res.data.number)
}else {
} else {
uni.hideLoading()
var hint =""
packingNumber.forEach(item=>{
hint+=item
var hint = ""
packingNumber.forEach(item => {
hint += item
})
hint+"根据库存余额获取包装信息"
hint + "根据库存余额获取包装信息"
_this.showErrorMessage(hint)
}

Loading…
Cancel
Save