王志国
2 weeks ago
4 changed files with 1182 additions and 533 deletions
@ -0,0 +1,51 @@ |
|||
<template> |
|||
<view class=""> |
|||
<productPutawayRecordByBatch :title="title" ref="productPutawayRecordByBatch" |
|||
putawayType='assemble'></productPutawayRecordByBatch> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import ProductPutawayRecordByBatch from '@/pages/productPutaway/record/productPutawayRecordByBatch.vue' |
|||
|
|||
import {ref} from 'vue'; |
|||
import {onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap} from '@dcloudio/uni-app' |
|||
|
|||
const title = ref(''); |
|||
const productPutawayRecordByBatch = ref(null); |
|||
|
|||
onLoad((option) => { |
|||
title.value = option.title; |
|||
}); |
|||
|
|||
// 页面显示时的处理 |
|||
onShow(() => { |
|||
if (productPutawayRecordByBatch.value) { |
|||
// productPutawayRecordByBatch.value.refresh(); |
|||
} |
|||
}); |
|||
|
|||
// 下拉刷新 |
|||
onPullDownRefresh(() => { |
|||
if (productPutawayRecordByBatch.value) { |
|||
// productPutawayRecordByBatch.value.refresh(); |
|||
} |
|||
}); |
|||
|
|||
// 导航栏按钮点击事件 |
|||
onNavigationBarButtonTap((e) => { |
|||
if (e.index === 0) { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.toHome(); |
|||
} |
|||
} else if (e.index === 1) { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.openFilter(); |
|||
} |
|||
} |
|||
}); |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
File diff suppressed because it is too large
@ -0,0 +1,603 @@ |
|||
<template> |
|||
<view class="page-wraper"> |
|||
<view class=""> |
|||
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> |
|||
</view> |
|||
<view class="page-wraper" v-if="detailSource.length>0" style="height: calc(100vh - 44px);"> |
|||
<view class="page-main"> |
|||
<scroll-view scroll-y="true" class="page-main-scroll"> |
|||
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
|||
<view class=""> |
|||
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" |
|||
:isShowStatus="true" :isShowToLocation='false' |
|||
@removeItem="removeItem(index,item)" |
|||
:isShowModifedLocation="true" |
|||
@updateData="updateData" @removePack="removePack" |
|||
@editLocation="showScanToLocation" |
|||
> |
|||
</record-com-detail-card> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
|
|||
<view class="page-footer" v-if="detailSource.length>0"> |
|||
<view class="uni-flex u-col-center space-between padding_10" |
|||
style="background-color:ghostwhite; width: 100%; "> |
|||
<view class=""> |
|||
|
|||
</view> |
|||
<view class=" uni-flex uni-row"> |
|||
<button class="btn_single_reject" style="margin-right:5px ;" hover-class="btn_commit_after" |
|||
@click="cancel">取消 |
|||
</button> |
|||
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
<win-scan-button v-if="detailSource.length>0" @goScan='openScanPopup'></win-scan-button> |
|||
|
|||
|
|||
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> |
|||
</winComScanBalance> |
|||
|
|||
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode' |
|||
:locationAreaTypeList="toLocationAreaTypeList"></win-scan-location> |
|||
|
|||
<win-scan-pack-and-location ref="winScanPackAndLocationRef" @getResult='getScanResult' :allowModifyLocation='false'> |
|||
</win-scan-pack-and-location> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
<win-scan-location ref="winScanFromLocation" title="来源库位" @getLocation='getLocation' |
|||
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { |
|||
productPutawayRecordSubmit, |
|||
getrecommendLocationExpectin, |
|||
recommendLocationRemoveExpectin, |
|||
getBalanceByFilter |
|||
} from '@/api/request2.js'; |
|||
import { |
|||
goHome, |
|||
getPackingNumberAndBatchByList, |
|||
deepCopyData |
|||
} from '@/common/basic.js'; |
|||
import { |
|||
getPrecisionStrategyList, |
|||
getManagementPrecisions |
|||
} from '@/common/balance.js'; |
|||
|
|||
import { |
|||
getInventoryStatusDesc, |
|||
getDirectoryItemArray |
|||
} from '@/common/directory.js'; |
|||
|
|||
import { |
|||
getBusinessType, |
|||
createItemInfo, |
|||
createDetailInfo, |
|||
calcHandleQty, |
|||
} from '@/common/record.js'; |
|||
|
|||
import { |
|||
calc |
|||
} from '@/common/calc.js'; |
|||
|
|||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|||
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' |
|||
import comProductionRecord from '@/pages/productionReceipt/coms/comProductionRecord.vue' |
|||
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|||
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' |
|||
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue' |
|||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|||
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
|||
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" |
|||
import { |
|||
updateTitle |
|||
} from '@/common/basic.js'; |
|||
|
|||
|
|||
import { ref, onMounted ,nextTick} from 'vue'; |
|||
import { onLoad, onShow, onPullDownRefresh, onBackPress, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
|||
|
|||
const props = defineProps({ |
|||
putawayType: { |
|||
type: String, |
|||
default: 'assemble' |
|||
} |
|||
}); |
|||
|
|||
const id = ref(''); |
|||
const scanCount = ref(0); |
|||
const dataContent = ref({}); |
|||
const subList = ref([]); |
|||
const detailSource = ref([]); |
|||
const fromLocationCode = ref(''); |
|||
const toLocationCode = ref(''); |
|||
const fromLocationAreaTypeList = ref([]); |
|||
const tolocationTypeList = ref([]); |
|||
const toLocationAreaTypeList = ref([]); |
|||
const inInventoryStatus = ref(''); |
|||
const outInventoryStatus = ref(''); |
|||
const businessTypeCode = ref('ProductPutaway'); |
|||
const businessType = ref({}); |
|||
const managementList = ref([]); |
|||
const type = ref(''); |
|||
const editItem = ref(null); |
|||
const managementType = ref(''); |
|||
|
|||
const scanPopup = ref(null); |
|||
const comMessage = ref(null); |
|||
const winScanPackAndLocationRef = ref(null); |
|||
const winScanFromLocation = ref(null); |
|||
|
|||
onNavigationBarButtonTap((e) => { |
|||
if (e.index === 0) { |
|||
goHome(); |
|||
} |
|||
}); |
|||
|
|||
onMounted(() => { |
|||
getBusinessType(businessTypeCode.value, (res) => { |
|||
if (res.success) { |
|||
businessType.value = res.businessType; |
|||
fromInventoryStatuses.value = getDirectoryItemArray(res.fromInventoryStatuses); |
|||
fromLocationAreaTypeList.value = res.fromLocationAreaTypeList; |
|||
openScanPopup(); |
|||
} else { |
|||
showErrorMessage(res.message); |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
const getScanResult = (result, managementTypeParams) => { |
|||
managementType.value = managementTypeParams; |
|||
if (managementTypeParams === "BY_BATCH" || managementTypeParams === "BY_QUANTITY") { |
|||
setDataBatch(result); |
|||
} else { |
|||
setData(result); |
|||
} |
|||
}; |
|||
|
|||
const setData = async (result) => { |
|||
const balance = result.balance; |
|||
const label = result.label; |
|||
const pack = result.package; |
|||
|
|||
const item = detailSource.value.find(res => res.itemCode === balance.itemCode); |
|||
if (!item) { |
|||
const itemp = createItemInfo(balance, pack); |
|||
const newDetail = createDetailInfo(balance, pack); |
|||
newDetail.fromLocationCode = balance.locationCode; |
|||
newDetail.parentNumber = pack.parentNumber; |
|||
newDetail.packingNumber = pack.number; |
|||
newDetail.packUnit = pack.packUnit; |
|||
newDetail.packQty = pack.packQty; |
|||
if (balance.lableQty) { |
|||
newDetail.handleQty = balance.lableQty; |
|||
} |
|||
itemp.subList.push(newDetail); |
|||
detailSource.value.push(itemp); |
|||
fromLocationCode.value = balance.locationCode; |
|||
await getRecommendLocation(balance, result); |
|||
await scanPopupGetFocus(); |
|||
} else { |
|||
const detail = item.subList.find(r => r.packingNumber === pack.parentNumber && |
|||
r.batch === balance.batch && |
|||
r.fromLocationCode === balance.locationCode && |
|||
r.inventoryStatus === balance.inventoryStatus); |
|||
|
|||
if (!detail) { |
|||
const newDetail = createDetailInfo(balance, pack); |
|||
newDetail.parentNumber = pack.parentNumber; |
|||
newDetail.packingNumber = pack.number; |
|||
newDetail.packUnit = pack.packUnit; |
|||
newDetail.packQty = pack.packQty; |
|||
newDetail.fromLocationCode = balance.locationCode; |
|||
if (balance.lableQty) { |
|||
newDetail.handleQty = balance.lableQty; |
|||
} |
|||
item.subList.push(newDetail); |
|||
await scanPopupGetFocus(); |
|||
} else { |
|||
if (detail.scaned) { |
|||
showErrorMessage(`箱码[${detail.packingNumber}]批次[${balance.batch}]重复扫描`); |
|||
} |
|||
} |
|||
} |
|||
calcHandleQty(detailSource.value); |
|||
}; |
|||
|
|||
const setDataBatch = async (result) => { |
|||
const balance = result.balance; |
|||
const label = result.label; |
|||
const pack = result.package; |
|||
|
|||
const item = detailSource.value.find(res => res.itemCode === balance.itemCode); |
|||
if (!item) { |
|||
const itemp = createItemInfo(balance, pack); |
|||
const newDetail = createDetailInfo(balance, pack); |
|||
newDetail.fromLocationCode = balance.locationCode; |
|||
newDetail.parentNumber = pack.parentNumber; |
|||
newDetail.packingNumber = pack.number; |
|||
newDetail.packUnit = pack.packUnit; |
|||
newDetail.packQty = pack.packQty; |
|||
if (balance.lableQty) { |
|||
newDetail.handleQty = balance.lableQty; |
|||
} |
|||
itemp.subList.push(newDetail); |
|||
detailSource.value.push(itemp); |
|||
fromLocationCode.value = balance.locationCode; |
|||
await getRecommendLocation(balance, result); |
|||
await scanPopupGetFocus(); |
|||
} else { |
|||
const detail = item.subList.find(r => r.packingNumber === pack.parentNumber && |
|||
r.batch === balance.batch && |
|||
r.fromLocationCode === balance.locationCode && |
|||
r.inventoryStatus === balance.inventoryStatus); |
|||
|
|||
if (!detail) { |
|||
const newDetail = createDetailInfo(balance, pack); |
|||
newDetail.parentNumber = pack.parentNumber; |
|||
newDetail.packingNumber = pack.number; |
|||
newDetail.packUnit = pack.packUnit; |
|||
newDetail.packQty = pack.packQty; |
|||
newDetail.fromLocationCode = balance.locationCode; |
|||
if (balance.lableQty) { |
|||
newDetail.handleQty = balance.lableQty; |
|||
} |
|||
item.subList.push(newDetail); |
|||
await scanPopupGetFocus(); |
|||
} else { |
|||
detail.handleQty = calc.add(detail.handleQty, result.label.qty); |
|||
} |
|||
} |
|||
calcHandleQty(detailSource.value); |
|||
}; |
|||
|
|||
const getRecommendLocation = async (balance, result) => { |
|||
uni.showLoading({ |
|||
title: '扫描中...', |
|||
mask: true |
|||
}); |
|||
|
|||
const param = { |
|||
expectinNumber: `${balance.packingNumber}-${Date.now()}`, |
|||
itemCode: balance.itemCode, |
|||
inventoryStatus: balance.inventoryStatus, |
|||
batch: balance.batch |
|||
}; |
|||
|
|||
try { |
|||
const result1 = await getrecommendLocationExpectin(param); |
|||
uni.hideLoading(); |
|||
const item = detailSource.value.find(res => res.itemCode === balance.itemCode); |
|||
item.toLocationCode = result1.data.code; |
|||
item.expectinNumber = result1.data.expectinNumber; |
|||
await getToLocationBalance(item.toLocationCode, result); |
|||
} catch (error) { |
|||
uni.hideLoading(); |
|||
showErrorMessage(error); |
|||
} |
|||
}; |
|||
|
|||
const getToLocationBalance = async (toLocationCode, result) => { |
|||
uni.showLoading({ |
|||
title: '查询中', |
|||
mask: true |
|||
}); |
|||
|
|||
const filters = []; |
|||
if (result.package.parentNumber) { |
|||
filters.push({ |
|||
column: "packingNumber", |
|||
action: "in", |
|||
value: `${result.package.parentNumber},${result.package.number}` |
|||
}); |
|||
} else { |
|||
filters.push({ |
|||
column: "packingNumber", |
|||
action: "==", |
|||
value: result.package.number |
|||
}); |
|||
} |
|||
|
|||
filters.push({ |
|||
column: "itemCode", |
|||
action: "==", |
|||
value: result.package.itemCode |
|||
}); |
|||
filters.push({ |
|||
column: "batch", |
|||
action: "==", |
|||
value: result.package.batch |
|||
}); |
|||
filters.push({ |
|||
column: "areaType", |
|||
action: "in", |
|||
value: toLocationAreaTypeList.value.join(',') |
|||
}); |
|||
|
|||
const params = { |
|||
filters, |
|||
pageNo: 1, |
|||
pageSize: 100 |
|||
}; |
|||
|
|||
try { |
|||
const res = await getManagementPrecisions([result.package.itemCode], toLocationCode); |
|||
if (res.success) { |
|||
managementList.value = res.list; |
|||
managementType.value = managementList.value.some(item => item.ManagementPrecision === 'BY_BATCH') ? 'BY_BATCH' : ''; |
|||
if (managementType.value === 'BY_BATCH') { |
|||
uni.hideLoading(); |
|||
} else { |
|||
const res2 = await getBalanceByFilter(params); |
|||
uni.hideLoading(); |
|||
if (res2.data.list.length > 0) { |
|||
showErrorMessage(`包装在库位【${res2.data.list[0].locationCode}】已有库存余额`); |
|||
} |
|||
} |
|||
} |
|||
} catch (err) { |
|||
uni.hideLoading(); |
|||
showErrorMessage(err.message); |
|||
} |
|||
}; |
|||
|
|||
const removeRecommendLocation = (lst) => { |
|||
const param = { |
|||
expectinNumberList: lst, |
|||
}; |
|||
recommendLocationRemoveExpectin(param).then(() => { |
|||
// 成功处理 |
|||
}).catch((err) => { |
|||
showErrorMessage(`【${lst.join(',')}】移除预占用失败,请在PC端的预占用中移除`); |
|||
}); |
|||
}; |
|||
|
|||
const showScanToLocation = (item) => { |
|||
editItem.value = item; |
|||
setTimeout(() => { |
|||
scanPopup.value.openScanPopup(); |
|||
}); |
|||
}; |
|||
|
|||
const showErrorMessage = (message) => { |
|||
scanPopupLoseFocus(); |
|||
comMessage.value.showErrorMessage(message, () => { |
|||
scanPopupGetFocus(); |
|||
}); |
|||
}; |
|||
|
|||
const calcHandleQty = () => { |
|||
calcHandleQty(detailSource.value); |
|||
}; |
|||
|
|||
const removeItem = (index, item) => { |
|||
removeRecommendLocation([item.expectinNumber]); |
|||
detailSource.value.splice(index, 1); |
|||
}; |
|||
|
|||
const removePack = () => { |
|||
for (let i = 0; i < detailSource.value.length; i++) { |
|||
const item = detailSource.value[i]; |
|||
if (item.subList.length === 0) { |
|||
detailSource.value.splice(i, 1); |
|||
removeRecommendLocation([item.expectinNumber]); |
|||
} |
|||
} |
|||
updateData(); |
|||
}; |
|||
|
|||
const openScanPopup = () => { |
|||
if (businessType.value) { |
|||
toLocationAreaTypeList.value = getDirectoryItemArray(businessType.value.inAreaTypes); |
|||
openFromLocationScanPopup(); |
|||
} else { |
|||
getBusinessType(); |
|||
} |
|||
}; |
|||
|
|||
const closeScanPopup = () => { |
|||
if (scanPopup.value) { |
|||
scanPopup.value.closeScanPopup(); |
|||
} |
|||
}; |
|||
|
|||
const scanPopupGetFocus = () => { |
|||
if (scanPopup.value) { |
|||
scanPopup.value.getfocus(); |
|||
} |
|||
}; |
|||
|
|||
const scanPopupLoseFocus = () => { |
|||
if (scanPopup.value) { |
|||
scanPopup.value.losefocus(); |
|||
} |
|||
}; |
|||
|
|||
const openFromLocationScanPopup = () => { |
|||
if (fromLocationCode.value === '') { |
|||
showFromLocationPopup(); |
|||
return; |
|||
} |
|||
winScanPackAndLocationRef.value.openScanPopupForType(fromLocationCode.value, businessType.value); |
|||
}; |
|||
|
|||
const showFromLocationPopup = () => { |
|||
nextTick(() => { |
|||
winScanFromLocation.value.openScanPopup(); |
|||
}); |
|||
}; |
|||
|
|||
const scanLocationCode = (location, code) => { |
|||
toLocationCode.value = code; |
|||
detailSource.value.forEach(item => { |
|||
item.subList.forEach(detail => { |
|||
detail.toLocationCode = code; |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
const commit = () => { |
|||
if (detailSource.value.length > 0 && detailSource.value[0].subList.length > 0) { |
|||
uni.showLoading({ |
|||
title: "提交中....", |
|||
mask: true |
|||
}); |
|||
|
|||
const params = setParams(); |
|||
|
|||
console.log("提交" + JSON.stringify(params)); |
|||
const isHaveItem = params.subList.find(item => item.handleQty > item.balanceQty); |
|||
if (isHaveItem) { |
|||
showErrorMessage(`物料号${isHaveItem.itemCode}`); |
|||
comMessage.value.showConfirmWarningModal(`物料号${isHaveItem.itemCode}数量[${isHaveItem.handleQty}]不允许大于库存数量[${isHaveItem.balanceQty}]`); |
|||
uni.hideLoading(); |
|||
return; |
|||
} |
|||
|
|||
productPutawayRecordSubmit(params).then((res) => { |
|||
uni.hideLoading(); |
|||
if (res.data) { |
|||
showCommitSuccessMessage(`提交成功\n生成制品上架记录\n${res.data}`); |
|||
const removeId = detailSource.value.map(r => r.expectinNumber); |
|||
removeRecommendLocation(removeId); |
|||
} else { |
|||
showErrorMessage(`提交失败[${res.msg}]`); |
|||
} |
|||
}).catch((error) => { |
|||
uni.hideLoading(); |
|||
showErrorMessage(error); |
|||
}); |
|||
} else { |
|||
showErrorMessage("没有要提交的数据,请先扫描"); |
|||
} |
|||
}; |
|||
|
|||
const setPrecisionStrategParams = () => { |
|||
const itemList = []; |
|||
detailSource.value.forEach(item => { |
|||
item.subList.forEach(detail => { |
|||
if (detail.scaned) { |
|||
detail.toLocationCode = toLocationCode.value; |
|||
const filterResult = itemList.filter(res => res.itemCode === item.itemCode && detail.toLocationCode === res.locationCode); |
|||
if (filterResult.length === 0) { |
|||
itemList.push({ |
|||
itemCode: item.itemCode, |
|||
locationCode: detail.toLocationCode |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
return itemList; |
|||
}; |
|||
|
|||
const setParams = () => { |
|||
const subList = []; |
|||
const creator = store.state.user.id; |
|||
detailSource.value.forEach(item => { |
|||
item.subList.forEach(detail => { |
|||
if (detail.scaned) { |
|||
const submitItem = deepCopyData(detail); |
|||
submitItem.itemCode = detail.itemCode; |
|||
submitItem.itemName = detail.package.itemName; |
|||
submitItem.itemDesc1 = detail.package.itemDesc1; |
|||
submitItem.itemDesc2 = detail.package.itemDesc2; |
|||
submitItem.inventoryStatus = detail.inventoryStatus; |
|||
|
|||
submitItem.fromPackingNumber = detail.packingNumber; |
|||
submitItem.toPackingNumber = detail.packingNumber; |
|||
|
|||
submitItem.fromParentPackingNumber = detail.parentNumber; |
|||
submitItem.fromBatch = detail.package.batch; |
|||
submitItem.toBatch = detail.package.batch; |
|||
|
|||
submitItem.fromLocationCode = detail.locationCode; |
|||
submitItem.toLocationCode = item.toLocationCode; |
|||
|
|||
submitItem.qty = detail.handleQty; |
|||
submitItem.package = ''; |
|||
subList.push(submitItem); |
|||
} |
|||
}); |
|||
}); |
|||
dataContent.value.subList = subList; |
|||
dataContent.value.creator = creator; |
|||
dataContent.value.type = props.putawayType; |
|||
return dataContent.value; |
|||
}; |
|||
|
|||
const showMessage = (message) => { |
|||
comMessage.value.showMessage(message, () => { |
|||
// 处理回调 |
|||
}); |
|||
}; |
|||
|
|||
const showScanMessage = (message) => { |
|||
comMessage.value.showScanMessage(message); |
|||
}; |
|||
|
|||
const afterCloseMessage = () => { |
|||
scanPopupGetFocus(); |
|||
}; |
|||
|
|||
const closeScanMessage = () => { |
|||
scanPopupGetFocus(); |
|||
}; |
|||
|
|||
const getToLocationCode = (location, code) => { |
|||
editItem.value.toLocationCode = code; |
|||
}; |
|||
|
|||
const getLocation = (location, code) => { |
|||
getFromLocationCode(location, code); |
|||
}; |
|||
|
|||
const getFromLocationCode = (location, code) => { |
|||
fromLocationInfo.value = location; |
|||
fromLocationCode.value = code; |
|||
openScanPopup(); |
|||
}; |
|||
|
|||
const showCommitSuccessMessage = (hint) => { |
|||
comMessage.value.showSuccessMessage(hint, () => { |
|||
clearData(); |
|||
}); |
|||
}; |
|||
|
|||
const clearData = () => { |
|||
fromLocationCode.value = ''; |
|||
subList.value = []; |
|||
detailSource.value = []; |
|||
toLocationCode.value = ''; |
|||
dataContent.value = {}; |
|||
}; |
|||
|
|||
const updateData = () => { |
|||
calcHandleQty(); |
|||
for (let i = 0; i < detailSource.value.length; i++) { |
|||
const item = detailSource.value[i]; |
|||
if (item.qty === 0) { |
|||
detailSource.value.splice(i, 1); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
const cancel = () => { |
|||
clearData(); |
|||
openScanPopup(); |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
@ -0,0 +1,48 @@ |
|||
<template> |
|||
<view class=""> |
|||
<productPutawayRecordByBatch :title="title" ref="productPutawayRecordByBatch" |
|||
putawayType='predict'></productPutawayRecordByBatch> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import ProductPutawayRecordByBatch from '@/pages/productPutaway/record/productPutawayRecordByBatch.vue' |
|||
import {onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap} from '@dcloudio/uni-app' |
|||
|
|||
import {ref} from 'vue'; |
|||
|
|||
const title = ref(''); |
|||
const productPutawayRecordByBatch = ref(null); |
|||
|
|||
onLoad((option) => { |
|||
title.value = option.title; |
|||
}); |
|||
|
|||
onShow(() => { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.refresh(); |
|||
} |
|||
}); |
|||
|
|||
onPullDownRefresh(() => { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.refresh(); |
|||
} |
|||
}); |
|||
|
|||
onNavigationBarButtonTap((e) => { |
|||
if (e.index === 0) { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.toHome(); |
|||
} |
|||
} else if (e.index === 1) { |
|||
if (productPutawayRecordByBatch.value) { |
|||
productPutawayRecordByBatch.value.openFilter(); |
|||
} |
|||
} |
|||
}); |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
</style> |
Loading…
Reference in new issue