Browse Source

page/fg 文件迁移 8/8-10/25

hella_vue3
王志国 1 month ago
parent
commit
b3d5a0aae1
  1. 57
      src/pages/fg/coms/comNoReceiptPopup.vue
  2. 55
      src/pages/fg/coms/comReceiptPopup.vue
  3. 135
      src/pages/fg/receiptByPlan.vue
  4. 81
      src/pages/fg/receiptNoPlan.vue

57
src/pages/fg/coms/comNoReceiptPopup.vue

@ -99,6 +99,28 @@
</view> </view>
</view> </view>
</view> </view>
<view class='split_line'></view>
<view class="uni-flex uni-row" style="align-items: center; margin-top: 20rpx; margin-bottom: 20rpx; margin-left: 10rpx;justify-content: space-between;">
<view class="title" >
创建上架申请
</view>
<view class="" style="margin-right: 20rpx;">
<u-switch v-model="putAwayRequestSwitch" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchPutAwayRequest"></u-switch>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row" style="align-items: center; margin-top: 20rpx; margin-bottom: 20rpx; margin-left: 10rpx; justify-content: space-between;" v-if="EnableQms">
<view class="title" >
创建检验申请
</view>
<view class="" style="margin-right: 20rpx;">
<u-switch v-model="putAwayInspectSwitch" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchPutAwayInspect"></u-switch>
</view>
</view>
</view> </view>
<view class="uni-flex uni-row hide_border"> <view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> <button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
@ -127,7 +149,8 @@ import {
getCurrDate, getCurrDate,
getBatch8, getBatch8,
dateFormatData, dateFormatData,
lastThreeDays lastThreeDays,
getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -176,6 +199,9 @@ export default {
rawLocationCode: "", rawLocationCode: "",
workshop: "", workshop: "",
bomVersion: "", bomVersion: "",
putAwayRequestSwitch:true,
putAwayInspectSwitch:true,
EnableQms:true
} }
}, },
props: { props: {
@ -188,8 +214,10 @@ export default {
default: [] default: []
}, },
}, },
mounted() {
this.EnableQms = getSwitchInfoByCode('EnableQms')
},
methods: { methods: {
openRequestPopup() { openRequestPopup() {
this.initData(); this.initData();
this.planDate = getCurrDate() this.planDate = getCurrDate()
@ -210,7 +238,7 @@ export default {
this.productLineCode = "" this.productLineCode = ""
this.batch = "" this.batch = ""
this.packUnitName = "请选择包装规格" this.packUnitName = "请选择包装规格"
this.packUnit = "", this.packUnit = ""
this.packQtyHint = "" this.packQtyHint = ""
this.showPackUnitSelect = false this.showPackUnitSelect = false
// this.packUnitList = [] // this.packUnitList = []
@ -223,7 +251,9 @@ export default {
this.fgLocationCode = "" this.fgLocationCode = ""
this.rawLocationCode = "" this.rawLocationCode = ""
this.workshop = "" this.workshop = ""
this.bomVersion = ""
this.putAwayRequestSwitch = true
this.putAwayInspectSwitch = true
}, },
closeRequestPopup() { closeRequestPopup() {
@ -263,7 +293,9 @@ export default {
this.showErrorMessage("请选择包装规格") this.showErrorMessage("请选择包装规格")
return return
} }
if (!this.EnableQms) {
this.putAwayInspectSwitch = false
}
this.callback(); this.callback();
}, },
@ -285,7 +317,10 @@ export default {
workStationCode: this.workStationCode, workStationCode: this.workStationCode,
fgLocationCode: this.fgLocationCode, fgLocationCode: this.fgLocationCode,
rawLocationCode: this.rawLocationCode, rawLocationCode: this.rawLocationCode,
workshop: this.workshop workshop: this.workshop,
bomVersion: this.bomVersion,
putAwayRequestSwitch: this.putAwayRequestSwitch,
putAwayInspectSwitch: this.putAwayInspectSwitch
}; };
this.closeRequestPopup(); this.closeRequestPopup();
this.$emit("confirm", item); this.$emit("confirm", item);
@ -474,6 +509,16 @@ export default {
return item.label return item.label
} }
}, },
switchPutAwayRequest(value){
console.log(value)
console.log("打印"+this.putAwayRequestSwitch)
this.putAwayRequestSwitch = value;
},
switchPutAwayInspect(value){
console.log(value)
this.putAwayInspectSwitch = value;
}
} }
} }
</script> </script>

55
src/pages/fg/coms/comReceiptPopup.vue

@ -78,6 +78,27 @@
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectLine"> </image> <image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectLine"> </image>
</view> </view>
</view> </view>
<view class='split_line'></view>
<view class="uni-flex uni-row" style="align-items: center; margin-top: 20rpx; margin-bottom: 20rpx; margin-left: 10rpx;justify-content: space-between;">
<view class="title" >
创建上架申请
</view>
<view class="" style="margin-right: 20rpx;">
<u-switch v-model="putAwayRequestSwitch" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchPutAwayRequest"></u-switch>
</view>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-row" style="align-items: center; margin-top: 20rpx; margin-bottom: 20rpx; margin-left: 10rpx; justify-content: space-between;" v-if="EnableQms">
<view class="title" >
创建检验申请
</view>
<view class="" style="margin-right: 20rpx;">
<u-switch v-model="putAwayInspectSwitch" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchPutAwayInspect"></u-switch>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -95,7 +116,7 @@
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js' import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js'
import { getPackUnitName, getUomInfo } from '@/common/directory.js' import { getPackUnitName, getUomInfo } from '@/common/directory.js'
import { getCurrDate, getBatch8, dateFormatData, lastThreeDays } from '@/common/basic.js' import { getCurrDate, getBatch8, dateFormatData, lastThreeDay, getSwitchInfoByCode } from '@/common/basic.js'
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
@ -138,7 +159,10 @@ export default {
showDateSelect: false, showDateSelect: false,
planDateList: [], planDateList: [],
fgLocationCode: '', fgLocationCode: '',
rawLocationCode: '' rawLocationCode: '',
putAwayRequestSwitch:true,
putAwayInspectSwitch:true,
EnableQms:true
} }
}, },
props: { props: {
@ -151,6 +175,10 @@ export default {
default: [] default: []
} }
}, },
mounted() {
this.EnableQms = getSwitchInfoByCode('EnableQms')
console.log(777,this.EnableQms)
},
methods: { methods: {
openRequestPopup() { openRequestPopup() {
this.initData() this.initData()
@ -185,6 +213,8 @@ export default {
this.planDateList = [] this.planDateList = []
this.fgLocationCode = '' this.fgLocationCode = ''
this.rawLocationCode = '' this.rawLocationCode = ''
this.putAwayRequestSwitch=true
this.putAwayInspectSwitch=true
}, },
closeRequestPopup() { closeRequestPopup() {
@ -220,7 +250,9 @@ export default {
this.showErrorMessage('请选择包装规格') this.showErrorMessage('请选择包装规格')
return return
} }
if (!this.EnableQms) {
this.putAwayInspectSwitch = false
}
this.callback() this.callback()
}, },
@ -240,7 +272,9 @@ export default {
planNumber: this.planNumber, planNumber: this.planNumber,
workStationCode: this.workStationCode, workStationCode: this.workStationCode,
fgLocationCode: this.fgLocationCode, fgLocationCode: this.fgLocationCode,
rawLocationCode: this.rawLocationCode rawLocationCode: this.rawLocationCode,
putAwayRequestSwitch:this.putAwayRequestSwitch,
putAwayInspectSwitch:this.putAwayInspectSwitch
} }
this.closeRequestPopup() this.closeRequestPopup()
this.$emit('confirm', item) this.$emit('confirm', item)
@ -336,6 +370,8 @@ export default {
// this.packUnitList = [] // this.packUnitList = []
this.itemCodeList = [] this.itemCodeList = []
this.showSelectItemCode() this.showSelectItemCode()
this.putAwayRequestSwitch=true
this.putAwayInspectSwitch=true
}, },
showItemList() { showItemList() {
@ -466,7 +502,18 @@ export default {
return uom return uom
} }
return item.label return item.label
},
switchPutAwayRequest(value){
console.log(value)
console.log("打印"+this.putAwayRequestSwitch)
this.putAwayRequestSwitch =value;
},
switchPutAwayInspect(value){
console.log(value)
this.putAwayInspectSwitch =value;
} }
} }
} }
</script> </script>

135
src/pages/fg/receiptByPlan.vue

@ -102,12 +102,13 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { isCheckMesCode, planReceiptSubmit, import { isCheckMesCode, planReceiptSubmit,
createPutawayRequestByPlan, createInspectRequestByPlan, createPutawayRequestByPlan, createInspectRequestByPlan,
getPlanByNumber,getBalanceToPackage, getPlanByNumber,getBalanceToPackage,createByPlanSubmit,
batchPrintingLable } from '@/api/request2.js' batchPrintingLable } from '@/api/request2.js'
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
import storage from '@/common/utils/storage.js' import storage from '@/common/utils/storage.js'
import { getRemoveOption, deepCopyData, import { getRemoveOption, deepCopyData,
getCurrDateTime, compare,getSwitchInfoByCode} from '@/common/basic.js' getCurrDateTime, compare,getSwitchInfoByCode} from '@/common/basic.js'
import {Exception} from 'sass';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue' import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue'
@ -129,7 +130,8 @@ const pageSize = ref(500)
const comReceiptPopupRef = ref() const comReceiptPopupRef = ref()
const scanPopup = ref() const scanPopup = ref()
const comMessageRef = ref() const comMessageRef = ref()
const settingPutAwayRequestSwitch = ref(true)
const settingPutAwayInspectSwitch = ref(true)
onLoad(() => { onLoad(() => {
options.value = getRemoveOption() options.value = getRemoveOption()
openFg() openFg()
@ -174,8 +176,12 @@ const requestConfirm = (result) => {
packUnit: result.packUnit, packUnit: result.packUnit,
workStationCode: result.workStationCode, workStationCode: result.workStationCode,
fgLocationCode: result.fgLocationCode, fgLocationCode: result.fgLocationCode,
putAwayRequestSwitch: result.putAwayRequestSwitch,
putAwayInspectSwitch: result.putAwayInspectSwitch,
subList: [] subList: []
} }
settingPutAwayRequestSwitch.value = result.putAwayRequestSwitch
settingPutAwayInspectSwitch.value = result.putAwayInspectSwitch
} }
const initList = () => { const initList = () => {
index.value = 1 index.value = 1
@ -221,7 +227,9 @@ const submit = () => {
} }
const commit = async () => { const commit = async () => {
let list = []
try { try {
let startTime = new Date()
uni.showLoading({ uni.showLoading({
title: '提交中...', title: '提交中...',
mask: true mask: true
@ -230,9 +238,9 @@ const commit = async () => {
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
const list = [] const list = []
const planData = await planReceiptSubmit(params) const planData = await createByPlanSubmit(params)
if (planData.data) { if (planData.data.tb1 && planData.data.tb1.length > 0) {
planData.data.forEach((item) => { planData.data.tb1.forEach((item) => {
list.push({ list.push({
itemCode: item.itemCode, // itemCode: item.itemCode, //
itemName: item.itemName, // itemName: item.itemName, //
@ -252,73 +260,67 @@ const commit = async () => {
}) })
}) })
} else { } else {
throw new Error('提交失败') throw new Error('提交失败未获取到打印信息')
} }
// if (planData.data.tb2 && planData.data.tb2.list.length > 0) {
let createProductputawaySwitch = getSwitchInfoByCode( let planInfo = planData.data.tb2.list[0]
"CreateProductputawayRequestAfterProductreceiptRecordCreated") if (planInfo.goodQty >= planInfo.planQty) {
if (createProductputawaySwitch) { uni.showToast({
createPutawayRequestByPlan(list[0].requestNumber).then(res => { title:"计划已完成",
createInspectRequestByPlan(list[0].requestNumber) duration:2000
}) })
} else { // clearData()
createInspectRequestByPlan(list[0].requestNumber)
}
const queryParams = {
filters: [
{
column: 'plan_type',
action: '==',
value: 'assemble'
},
{
column: 'number',
action: '==',
value: dataContent.value.planNumber
}
],
pageNo: 1,
pageSize: 100
}
let isAllSubmit = Number(Number(dataContent.value.goodQty)+ Number(showList.value.length))==Number(dataContent.value.planQty)
const planeInfo = await getPlanByNumber(queryParams)
if (planeInfo.data && planeInfo.data.list.length > 0) {
if (planeInfo.data.list[0].goodQty >= planeInfo.data.list[0].planQty) {
clear()
} else { } else {
dataContent.value.planNumber = planeInfo.data.list[0].number //
dataContent.value.handleQty = 0 dataContent.value.planQty = planInfo.data.list[0].planQty
dataContent.value.planQty = planeInfo.data.list[0].planQty dataContent.value.goodQty = planInfo.data.list[0].goodQty
dataContent.value.goodQty = planeInfo.data.list[0].goodQty dataContent.value.noGoodQty = calc.sub(planInfo.planQty, planInfo.goodQty)
;(dataContent.value.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[0].goodQty)), (dataContent.value.subList = []) dataContent.value.handleQty = 0;
dataContent.value.subList = []
showList.value = [] showList.value = []
allList.value = [] allList.value = []
index.value = 1 index.value = 1
} }
} else { } else {
throw new Error('未查找到单据信息') throw new Error('提交失败未获取到计划信息')
} }
uni.hideLoading() uni.hideLoading()
let hintMsg = "提交成功\n生成装配收货记录\n";
// showCommitSuccessMessage('<br><br>', list) // showCommitSuccessMessage('<br><br>', list)
if(isAllSubmit){ if (list.length > 0 && list[0].requestNumber) {
clearData() hintMsg += list[0].requestNumber
}else {
showList.value = [];
allList.value = [];
index.value = 1;
dataContent.value.handleQty = 0;
} }
nextTick(() => { nextTick(() => {
showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list) showCommitSuccessMessage(hintMsg, list)
}) })
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
const hint = error.message ? error.message : error const hint = error.message ? error.message : error
if (hint.indexOf('请返回开工阶段') > -1) {
showMessage('计划已完成')
clearData()
} else {
showErrorMessage(hint) showErrorMessage(hint)
} }
} }
startSetting(list)
}
const startSetting = async (list)=> {
//
if (settingPutAwayRequestSwitch.value) {
if (list.length > 0 && list[0].requestNumber) {
await createPutawayRequestByPlan(list[0].requestNumber)
}
}
//
if (settingPutAwayInspectSwitch.value) {
if (list.length > 0 && list[0].requestNumber) {
await createInspectRequestByPlan(list[0].requestNumber)
}
}
}
const setParams = () => { const setParams = () => {
allList.value.forEach((res) => { allList.value.forEach((res) => {
res.outsideItemCode = res.itemCode res.outsideItemCode = res.itemCode
@ -407,6 +409,8 @@ const scanPopupLoseFocus = () => {
const getH5BatchPrintingLable = (number)=> { const getH5BatchPrintingLable = (number)=> {
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable) console.log('batchPrintingLable', resLable)
uni.hideLoading()
if(resLable.data){
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712`
const webData = { const webData = {
token: storage.getStorage(storage.constant.token), token: storage.getStorage(storage.constant.token),
@ -415,7 +419,11 @@ const getH5BatchPrintingLable = (number)=> {
uni.navigateTo({ uni.navigateTo({
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}`
}); });
}else {
showErrorMessage(number + "批量打印标签 H5失败")
}
}).catch(error => { }).catch(error => {
uni.hideLoading()
showErrorMessage(error) showErrorMessage(error)
}) })
} }
@ -436,13 +444,27 @@ const print = (pointData)=> {
showErrorMessage('包装号不能为空!') showErrorMessage('包装号不能为空!')
return return
} }
uni.showLoading({
title: "正在获取打印信息",
mask: true
})
getBalanceToPackage({ getBalanceToPackage({
packingNumber: packingNumber.join(',') packingNumber: packingNumber.join(',')
}).then(res => { }).then(res => {
console.log('PC打印', res) console.log('PC打印', res)
if (res.data && res.data.number) {
getH5BatchPrintingLable(res.data.number) getH5BatchPrintingLable(res.data.number)
} else {
uni.hideLoading()
let hint = ""
packingNumber.forEach(item => {
hint += item
})
hint += "根据库存余额获取包装信息"
showErrorMessage(hint)
}
}).catch(error => { }).catch(error => {
uni.hideLoading()
showErrorMessage(error) showErrorMessage(error)
}) })
// #endif // #endif
@ -459,11 +481,16 @@ const showErrorMessage = (message) => {
} }
}) })
} }
const showMessage = (message)=> {
comMessageRef.value.showMessage(message, res => {
if (res) {
openFg();
}
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {
background-color: #fff; background-color: #fff;
} }

81
src/pages/fg/receiptNoPlan.vue

@ -102,11 +102,10 @@ import {
createInspectRequestByPlan, createInspectRequestByPlan,
getPlanByNumber, getPlanByNumber,
getBalanceToPackage, getBalanceToPackage,
batchPrintingLable batchPrintingLable,
createByPlanSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {calc} from '@/common/calc.js';
calc
} from '@/common/calc.js';
import storage from '@/common/utils/storage.js' import storage from '@/common/utils/storage.js'
import { import {
getRemoveOption, getRemoveOption,
@ -124,9 +123,6 @@ import pack from '@/mycomponents/balance/pack.vue'
import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue" import winScanFgLabel from "@/mycomponents/scan/winScanFgLabel.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue" import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import light from '@/mycomponents/balance/light.vue' import light from '@/mycomponents/balance/light.vue'
import {
Exception
} from 'sass';
export default { export default {
components: { components: {
@ -149,7 +145,9 @@ export default {
index: 1, index: 1,
loadingType: "", loadingType: "",
pageSize: 20, pageSize: 20,
scanedQty: 0 scanedQty: 0,
settingPutAwayRequestSwitch:true,
settingPutAwayInspectSwitch :true
}; };
}, },
@ -210,8 +208,12 @@ export default {
bomVersion: result.bomVersion, bomVersion: result.bomVersion,
workshop: result.workshop, workshop: result.workshop,
team: "", team: "",
shift: "" shift: "",
putAwayRequestSwitch:result.putAwayRequestSwitch,
putAwayInspectSwitch:result.putAwayInspectSwitch
} }
this.settingPutAwayRequestSwitch = result.putAwayRequestSwitch
this.settingPutAwayInspectSwitch = result.putAwayInspectSwitch
}, },
initList() { initList() {
@ -262,6 +264,7 @@ export default {
}, },
async commit() { async commit() {
let list = []
try { try {
uni.showLoading({ uni.showLoading({
title: "提交中...", title: "提交中...",
@ -269,12 +272,10 @@ export default {
}) })
let params = this.setParams() let params = this.setParams()
console.log(JSON.stringify(params))
let list = [] var planData = await createByPlanSubmit(params)
var planData = await planReceiptSubmit(params) if (planData.data.tb1&&planData.data.tb1.length>0) {
if (planData.data) { planData.data.tb1.forEach(item => {
planData.data.forEach(item => {
list.push({ list.push({
itemCode: item.itemCode, // itemCode: item.itemCode, //
itemName: item.itemName, // itemName: item.itemName, //
@ -296,18 +297,12 @@ export default {
} else { } else {
throw new Error("提交失败") throw new Error("提交失败")
} }
var hintMsg ="提交成功\n生成装配收货记录\n";
let createProductputawaySwitch = getSwitchInfoByCode( if(list.length>0&&list[0].requestNumber){
"CreateProductputawayRequestAfterProductreceiptRecordCreated") hintMsg += list[0].requestNumber
//
if (createProductputawaySwitch) {
createPutawayRequestByPlan(list[0].requestNumber).then(res => {
createInspectRequestByPlan(list[0].requestNumber)
})
} else { //
createInspectRequestByPlan(list[0].requestNumber)
} }
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list)
this.showCommitSuccessMessage(hintMsg, list)
this.scanedQty = this.scanedQty + this.showList.length; this.scanedQty = this.scanedQty + this.showList.length;
this.showList = []; this.showList = [];
this.dataContent.handleQty = 0; this.dataContent.handleQty = 0;
@ -318,6 +313,24 @@ export default {
var hint = error.message ? error.message : error var hint = error.message ? error.message : error
this.showErrorMessage(hint) this.showErrorMessage(hint)
} }
this.startSetting(list)
},
async startSetting(list){
//
if (this.settingPutAwayRequestSwitch) {
if (list.length > 0 && list[0].requestNumber) {
await createPutawayRequestByPlan(list[0].requestNumber)
}
}
//
if (this.settingPutAwayInspectSwitch) {
if (list.length > 0 && list[0].requestNumber) {
await createInspectRequestByPlan(list[0].requestNumber)
}
}
console.log("提交所有完成"+getCurrDateTime())
}, },
setParams() { setParams() {
@ -395,12 +408,21 @@ export default {
calcFgQty() { calcFgQty() {
this.dataContent.handleQty = this.showList.length; this.dataContent.handleQty = this.showList.length;
if (this.dataContent.handleQty == this.dataContent.packQty) { if(parseFloat(this.dataContent.planQty) -parseFloat(this.scanedQty) <= parseFloat(this.dataContent.packQty)){
if(parseFloat(this.dataContent.handleQty) == parseFloat(this.dataContent.planQty) -parseFloat(this.scanedQty)){
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
} }
this.commit() this.commit()
} }
}else{
if (parseFloat(this.dataContent.handleQty) == parseFloat(this.dataContent.packQty)) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup();
}
this.commit()
}
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
@ -416,15 +438,20 @@ export default {
getH5BatchPrintingLable( number) { getH5BatchPrintingLable( number) {
let _this = this let _this = this
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable)
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712`
const webData = { const webData = {
token: storage.getStorage(storage.constant.token), token: storage.getStorage(storage.constant.token),
asn_number: resLable.data asn_number: resLable.data
} }
if ( this.scanedQty + this.showList.length == this.dataContent.planQty) {
uni.redirectTo({
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}`
});
}else{
uni.navigateTo({ uni.navigateTo({
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}`
}); });
}
}) })
}, },

Loading…
Cancel
Save