Browse Source

page/productReceipt/job 文件迁移 8/8-10/25

pull/1/head
test 5 months ago
parent
commit
04890c1922
  1. 63
      src/pages/productReceipt/job/ccProductReceiptDetail.vue
  2. 14
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  3. 447
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  4. 28
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  5. 27
      src/pages/productReceipt/job/fgProductReceiptJob.vue
  6. 56
      src/pages/productReceipt/job/productReceiptDetail.vue
  7. 113
      src/pages/productReceipt/job/productReceiptJob.vue
  8. 72
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  9. 27
      src/pages/productReceipt/job/scrapReceiptJob.vue
  10. 487
      src/pages/productReceipt/job/semiProductReceiptDetail.vue
  11. 27
      src/pages/productReceipt/job/semiProductReceiptJob.vue

63
src/pages/productReceipt/job/ccProductReceiptDetail.vue

@ -35,8 +35,12 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList" v-else>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
</view> </view>
@ -46,7 +50,7 @@
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> <view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class=""> <view class="">
<<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" <locationCompare ref="comScanLocation" title="收货库位"
:recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation='scanLocationCode' :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"> :locationAreaTypeList="toLocationAreaTypeList">
</locationCompare> </locationCompare>
@ -80,10 +84,9 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comDetailCard from '@/mycomponents/detail/comDetailCard.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue'
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
import { useCountStore } from '@/store' import { useCountStore } from '@/store'
// store // store
const store = useCountStore() const store = useCountStore()
@ -97,6 +100,7 @@
const detailSource = ref([])// const detailSource = ref([])//
const toLocationAreaTypeList = ref([]) const toLocationAreaTypeList = ref([])
const managementList = ref([]) const managementList = ref([])
const managementType = ref('')
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
@ -189,14 +193,24 @@
subList.value = res.data.subList subList.value = res.data.subList
jobStatus.value = res.data.status jobStatus.value = res.data.status
jobToLocationCode.value = subList.value[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode
if (jobContent.value.allowModifyLocation == 'FALSE') {
toLocationCode.value = subList.value[0].toLocationCode
}
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
if (scanMessage.value) { if (scanMessage.value) {
scanPopup.value.simulateScan(scanMessage.value); scanPopup.value.simulateScan(scanMessage.value);
} }
//
let itemCodes = []
detailSource.value.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, jobToLocationCode.value, res => {
if (res.success) {
managementList.value = res.list;
managementType.value = managementList.value.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -218,6 +232,7 @@
if (detail == undefined) { if (detail == undefined) {
showErrorMessage(`物料号【${itemCode}】不在列表中`) showErrorMessage(`物料号【${itemCode}】不在列表中`)
} else { } else {
detail.scaned = true
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`)
@ -226,11 +241,10 @@
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true
itemDetail.handleQty = Number(result.label.qty) itemDetail.handleQty = Number(result.label.qty)
itemDetail.toLocationCode = toLocationCode.value itemDetail.toLocationCode = toLocationCode.value?toLocationCode.value:jobToLocationCode.value
itemDetail.labelQty = Number(result.label.qty) itemDetail.labelQty = Number(result.label.qty)
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
continueScan() continueScan()
$forceUpdate()
} }
} }
} }
@ -246,7 +260,7 @@
} }
const updateData = () => { const updateData = () => {
calcHandleQty(detailSource.value) // calcHandleQty(detailSource.value)
} }
const openScanPopup = () => { const openScanPopup = () => {
@ -258,6 +272,19 @@
} }
const scanLocationCode = (location, code) => { const scanLocationCode = (location, code) => {
if(jobContent.value.allowModifyLocation=="TRUE"){
toLocationCode.value = code
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
detail.toLocationCode = code
})
})
}else {
//
if(code!=jobToLocationCode.value){
showMessageHint("任务中不允许修改库位\n扫描库位["+code+"]推荐库位是["+jobToLocationCode.value+"]",callBack=>{
})
}else {
toLocationCode.value = code toLocationCode.value = code
detailSource.value.forEach((item) => { detailSource.value.forEach((item) => {
item.subList.forEach((detail) => { item.subList.forEach((detail) => {
@ -265,6 +292,8 @@
}) })
}) })
} }
}
}
const checkLocation = () => { const checkLocation = () => {
let isPass = true let isPass = true
@ -278,7 +307,7 @@
return isPass return isPass
} }
const showMessageHint(hint, callback) { const showMessageHint = (hint, callback)=> {
comMessageRef.value.showErrorMessage(hint, (res) => { comMessageRef.value.showErrorMessage(hint, (res) => {
if (res) { if (res) {
callback() callback()
@ -298,9 +327,11 @@
return return
} }
}else{ }else{
this.toLocationCode = this.jobToLocationCode this.toLocationCode = toLocationCode.value?toLocationCode.value:jobToLocationCode.value
}
if(!toLocationCode.value){
return;
} }
// //
if (scanCount.value == subList.value.length) { if (scanCount.value == subList.value.length) {
if (checkCount()) { if (checkCount()) {
@ -315,7 +346,7 @@
} }
} else { } else {
// //
showMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`) showMessage('请完成扫描后,再进行提交\n' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`)
} }
} }
} }
@ -362,7 +393,7 @@
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data) showCommitSuccessMessage("提交成功\n生成装配收货记录<br>" + res.data)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }
@ -387,6 +418,8 @@
if (detail.scaned) { if (detail.scaned) {
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch)
detail.toPackingNumber = info.packingNumber detail.toPackingNumber = info.packingNumber
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch detail.toBatch = info.batch
detail.toContainerNumber = '' detail.toContainerNumber = ''
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus

14
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -96,13 +96,13 @@
} }
}) })
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap((e) =>{
if (e.index === 0) { if (e.index === 0) {
goHome() goHome()
} else if (e.index == 1) { } else if (e.index == 1) {
filter.value.openFilter() filter.value.openFilter()
} }
} })
onReachBottom(() => { onReachBottom(() => {
// //
@ -283,8 +283,14 @@
} }
const showMessage = (message) => { const showMessage = (message) => {
if(scanPopup.value){
scanPopup.value.packLoseFocus()
}
comMessageRef.value.showErrorMessage(message, (res) => { comMessageRef.value.showErrorMessage(message, (res) => {
if (res) { if (res) {
if(scanPopup.value){
scanPopup.value.packGetFocus()
}
} }
}) })
} }
@ -382,11 +388,11 @@
selectItem(list[0]) selectItem(list[0])
} }
} else { } else {
showMessage('未查找到任务<br>' + `扫描[${result.scanMessage}]`) showMessage('未查找到任务\n' + `扫描[${result.scanMessage}]`)
} }
}) })
.catch((error) => { .catch((error) => {
showMessage(`${error}<br>扫描[${result.scanMessage}]`) showMessage(`${error}\n扫描[${result.scanMessage}]`)
}) })
} catch (e) { } catch (e) {
showMessage(e.message) showMessage(e.message)

447
src/pages/productReceipt/job/completeReceiveJobDetail.vue

@ -43,7 +43,7 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
@ -81,335 +81,308 @@
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default { import { ref, onMounted, onBeforeUnmount } from 'vue';
name: 'receipt_detail', import { onLoad, onPullDownRefresh, onBackPress, onNavigationBarButtonTap } from '@dcloudio/uni-app';
components: {
winScanButton, //
comDetailCard, const id = ref('');
locationCompare, const receiptJob = ref({});
winScanPack, const toLocationCode = ref('');
jobTop, const isShowPackingCode = ref(true);
comProductDetailCard const scanCount = ref(0);
}, const jobContent = ref({}); //
data() { const subList = ref([]); // subList
return { const detailSource = ref([]); //
id: '', const toLocationAreaTypeList = ref([]);
receiptJob: {}, const managementList = ref([]);
toLocationCode: '', const jobStatus = ref("");
isShowPackingCode: true, const jobToLocationCode = ref("");
scanCount: 0,
jobContent: {}, // //
subList: [], //subList const scanPopupRef = ref(null);
detailSource: [], // const comMessageRef = ref(null);
toLocationAreaTypeList: [], const comScanLocationRef = ref(null);
managementList: [],
jobStatus:"", //
jobToLocationCode:"" onLoad((option) => {
id.value = option.id;
}; if (id.value !== undefined) {
}, //
onLoad(option) { if (option.status === "1") {
this.id = option.id; receive(() => {
if (this.id != undefined) { getDetail();
// });
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else { } else {
this.getDetail(); getDetail();
} }
} }
}, });
//
onNavigationBarButtonTap(e) { onNavigationBarButtonTap((e) => {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} }
}, });
//
onBackPress(e) { onBackPress((e) => {
// //
if (e.from == 'backbutton') { if (e.from === 'backbutton') {
if (this.jobStatus=="2") { if (jobStatus.value === "2") {
// //
cancleTakeProductReceiptJob(this.id).then(res => { cancleTakeProductReceiptJob(id.value).then(() => {
uni.navigateBack(); uni.navigateBack();
}).catch(error => { }).catch(() => {
uni.navigateBack(); uni.navigateBack();
}) });
} else { } else {
uni.navigateBack(); uni.navigateBack();
} }
return true; return true;
} }
});
}, onPullDownRefresh(() => {
getDetail();
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, });
mounted() {
}, //
methods: { const receive = (callback) => {
// if (id.value !== null) {
receive(callback) { takeProductReceiptJob(id.value).then(() => {
if (this.id != null) {
takeProductReceiptJob(this.id).then(res => {
callback(); callback();
}).catch(error => { }).catch((error) => {
this.showErrorMessage(error) showErrorMessage(error);
}) });
} }
}, };
getDetail() { const getDetail = () => {
var that = this;
uni.showLoading({ uni.showLoading({
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getProductReceiptJobDetail(that.id).then(res => { getProductReceiptJobDetail(id.value).then((res) => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data === null) {
that.showMessage('未获取到详情'); showMessage('未获取到详情');
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; jobContent.value = res.data;
that.subList = res.data.subList; subList.value = res.data.subList;
that.jobStatus = res.data.status jobStatus.value = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode;
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes);
that.detailSource = getDataSource(that.subList) detailSource.value = getDataSource(subList.value);
} else { } else {
that.showMessage('列表数据为0'); showMessage('列表数据为0');
} }
} }
}).catch(error => { }).catch((error) => {
uni.hideLoading() uni.hideLoading();
this.showErrorMessage(error) showErrorMessage(error);
}) });
}, };
getScanResult(result) { const getScanResult = (result) => {
let label = result.label; const label = result.label;
var packingNumber = label.packingNumber; const packingNumber = label.packingNumber;
var batch = label.batch; const batch = label.batch;
var qty = label.qty; const qty = label.qty;
var itemCode = label.itemCode; const itemCode = label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); const detail = detailSource.value.find((r) => r.itemCode === itemCode);
if (detail == undefined) { if (detail === undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") showErrorMessage(`物料号【${itemCode}】不在列表中`);
} else { } else {
var itemDetail = detail.subList.find(r => const itemDetail = detail.subList.find((r) =>
r.packingNumber == packingNumber && r.packingNumber === packingNumber && r.batch === batch
r.batch == batch); );
if (itemDetail == undefined) { if (itemDetail === undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中") showErrorMessage(`箱码[${packingNumber}]批次[${batch}]不在任务列表中`);
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") showErrorMessage(`箱码[${packingNumber}]批次[${batch}]已经扫描`);
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = toLocationCode.value;
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource); calcHandleQty(detailSource.value);
this.continueScan() continueScan();
this.$forceUpdate()
} }
} }
} }
}, };
// const continueScan = () => {
continueScan() { scanCount.value = getScanCount(subList.value);
this.scanCount = getScanCount(this.subList); if (scanCount.value === subList.value.length) {
if (this.scanCount == this.subList.length) { closeScanPopup();
this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}, };
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() { const updateData = () => {
this.$refs.scanPopup.closeScanPopup(); calcHandleQty(detailSource.value);
}, };
const openScanPopup = () => {
scanPopupRef.value.openScanPopup();
};
scanLocationCode(location, code) { const closeScanPopup = () => {
this.toLocationCode = code scanPopupRef.value.closeScanPopup();
this.detailSource.forEach(item => { };
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
checkLocation() { const scanLocationCode = (location, code) => {
var isPass = true; toLocationCode.value = code;
if (this.toLocationCode == "" || this.toLocationCode == null) { detailSource.value.forEach((item) => {
this.showMessageHint('请扫描收货库位', callback => { item.subList.forEach((detail) => {
this.$refs.comScanLocation.showLocation(); detail.toLocationCode = code;
}) });
});
};
return isPass = false; const checkLocation = () => {
let isPass = true;
if (toLocationCode.value === "" || toLocationCode.value === null) {
showMessageHint('请扫描收货库位', () => {
comScanLocationRef.value.showLocation();
});
isPass = false;
} }
return isPass; return isPass;
}, };
showMessageHint(hint, callback) { const showMessageHint = (hint, callback) => {
this.$refs.comMessage.showErrorMessage(hint, res => { comMessageRef.value.showErrorMessage(hint, (res) => {
if (res) { if (res) {
callback() callback();
} }
}); });
}, };
commit() { const commit = () => {
this.scanCount = getScanCount(this.subList); scanCount.value = getScanCount(subList.value);
if (this.scanCount == 0) { if (scanCount.value === 0) {
this.showErrorMessage("扫描数为0,请先扫描") showErrorMessage("扫描数为0,请先扫描");
return; return;
} }
// if (!checkLocation()) {
if (!this.checkLocation()) { return;
return
} }
if (scanCount.value === subList.value.length) {
// submitJob();
if (this.scanCount == this.subList.length) { } else if (scanCount.value < subList.value.length) {
this.submitJob(); if (jobContent.value.allowPartialComplete === "TRUE") {
} else if (this.scanCount < this.subList.length) { comMessageRef.value.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', (res) => {
// if (res) {
if (this.jobContent.allowPartialComplete == "TRUE") { submitJob();
// }
this.submitJob(); });
} else { } else {
// showMessage("任务明细未全部完成,不允许部分提交!");
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
} }
} }
};
}, const submitJob = () => {
submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var itemCodes = [] const itemCodes = [];
this.detailSource.forEach(item => { detailSource.value.forEach((item) => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode);
}) });
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, toLocationCode.value, (res) => {
if (res.success) { if (res.success) {
this.managementList = res.list; managementList.value = res.list;
var params = this.setParams(); const params = setParams();
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then((res) => {
uni.hideLoading() uni.hideLoading();
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, ) showCommitSuccessMessage(`提交成功\n生成制品收货记录\n${res.data}`);
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") showErrorMessage(`提交失败[${res.msg}]`);
} }
}).catch(error => { }).catch((error) => {
uni.hideLoading() uni.hideLoading();
this.showErrorMessage(error) showErrorMessage(error);
}) });
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); showErrorMessage(res.message);
} }
}); });
}, };
setParams() { const setParams = () => {
var subList = [] const subList = [];
var creator = this.$store.state.user.id const creator = store.state.user.id;
this.detailSource.forEach(item => { detailSource.value.forEach((item) => {
item.subList.forEach(detail => { item.subList.forEach((detail) => {
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch);
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus;
detail.toLocationCode = this.toLocationCode detail.toLocationCode = toLocationCode.value;
subList.push(detail) subList.push(detail);
} }
}) });
}) });
this.jobContent.subList = subList jobContent.value.subList = subList;
this.jobContent.creator = creator; jobContent.value.creator = creator;
return this.jobContent; return jobContent.value;
}, };
const scanPopupGetFocus = () => {
scanPopupGetFocus() { if (scanPopupRef.value) {
if (this.$refs.scanPopup != undefined) { scanPopupRef.value.getfocus();
this.$refs.scanPopup.getfocus();
} }
}, };
scanPopupLoseFocus() { const scanPopupLoseFocus = () => {
if (this.$refs.scanPopup != undefined) { if (scanPopupRef.value) {
this.$refs.scanPopup.losefocus(); scanPopupRef.value.losefocus();
} }
}, };
showMessage(message) { const showMessage = (message) => {
setTimeout(r => { setTimeout(() => {
this.scanPopupLoseFocus(); scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { comMessageRef.value.showMessage(message, (res) => {
if (res) { if (res) {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}); });
}) });
}, };
showErrorMessage(message) { const showErrorMessage = (message) => {
setTimeout(r => { setTimeout(() => {
this.scanPopupLoseFocus(); scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { comMessageRef.value.showErrorMessage(message, (res) => {
if (res) { if (res) {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}); });
}) });
}, };
showCommitSuccessMessage(hint) { const showCommitSuccessMessage = (hint) => {
this.$refs.comMessage.showSuccessMessage(hint, res => { comMessageRef.value.showSuccessMessage(hint, () => {
navigateBack(1) navigateBack(1);
}) });
}, };
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

28
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -29,7 +29,7 @@
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">班次</view> <view class="text_lightblue">班次</view>
<view> <view>
{{jobContent.shift}} {{jobContent.shiftName}}
</view> </view>
</view> </view>
</view> </view>
@ -52,7 +52,7 @@
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<locationCompare title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" <locationCompare title="收货库位" ref="comScanLocation" :isShowEdit="jobContent.allowModifyLocation=='TRUE'"
:recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode' :locationTypeList="toLocationTypeList"></locationCompare> @getLocation='scanLocationCode' :locationTypeList="toLocationTypeList"></locationCompare>
</view> </view>
@ -259,6 +259,7 @@ const calcFgQty = () => {
}) })
// //
if (pack.scaned && pack.qty == pack.fgList.length) { if (pack.scaned && pack.qty == pack.fgList.length) {
closeScanPopup()
commit() commit()
} }
}) })
@ -282,20 +283,34 @@ const closeScanPopup = () => {
} }
const scanLocationCode = (location, code) => { const scanLocationCode = (location, code) => {
//
if (this.jobContent.allowModifyLocation == "TRUE") {
toLocationCode.value = code toLocationCode.value = code
detailSource.value.forEach((item) => { detailSource.value.forEach((item) => {
item.subList.forEach((detail) => { item.subList.forEach((detail) => {
detail.toLocationCode = code detail.toLocationCode = code
}) })
}) })
} else {
//
if (code != this.jobToLocationCode) {
this.showMessageHint("任务中不允许修改库位\n扫描库位[" + code + "]推荐库位是[" + this.jobToLocationCode + "]",
callBack => {})
} else {
toLocationCode.value = code
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
detail.toLocationCode = code
})
})
}
}
} }
const checkLocation = () => { const checkLocation = () => {
let isPass = true let isPass = true
if (toLocationCode.value == '' || toLocationCode.value == null) { if (toLocationCode.value == '' || toLocationCode.value == null) {
showMessageHint('请扫描收货库位', (callback) => {
comScanLocation.value.showLocation() comScanLocation.value.showLocation()
})
return (isPass = false) return (isPass = false)
} }
return isPass return isPass
@ -390,6 +405,9 @@ const commit = () => {
}else{ }else{
this.toLocationCode = this.jobToLocationCode this.toLocationCode = this.jobToLocationCode
} }
if(!toLocationCode.value){
return;
}
detailSource.value.forEach((item) => { detailSource.value.forEach((item) => {
item.subList.forEach((subitem) => { item.subList.forEach((subitem) => {
if (valiDate) { if (valiDate) {
@ -429,7 +447,7 @@ const submitJob = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成装配收货记录<br>${res.data}`) showCommitSuccessMessage(`提交成功\n生成装配收货记录\n${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

27
src/pages/productReceipt/job/fgProductReceiptJob.vue

@ -6,23 +6,42 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue' 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,
onHide, onUnload
} from '@dcloudio/uni-app'
import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue' import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue'
const productreceiptjobRef = ref() const productreceiptjobRef = ref()
const title = ref('') const title = ref('')
onShow(() => { onShow(() => {
nextTick(() => { nextTick(() => {
if (productreceiptjobRef.value != undefined) { if (productreceiptjobRef.value) {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
} }
}) })
}) })
onHide(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onUnload(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onLoad((option) => { onLoad((option) => {
title.value = option.title title.value = option.title
}) })
onPullDownRefresh(() => { onPullDownRefresh(() => {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
}) })
onReachBottom(() => { onReachBottom(() => {
productreceiptjobRef.value.onReach() productreceiptjobRef.value.onReach()

56
src/pages/productReceipt/job/productReceiptDetail.vue

@ -31,7 +31,7 @@
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">班次</view> <view class="text_lightblue">班次</view>
<view> <view>
{{ jobContent.shift }} {{ jobContent.shiftName }}
</view> </view>
</view> </view>
</view> </view>
@ -40,7 +40,15 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> </comProductDetailCard> <comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard v-else :dataContent="item" :settingParam="jobContent"
:isShowLocation="false" @remove="updateData"
@updateData="updateData"
:locationAreaTypeList="toLocationAreaTypeList">
</comProductDetailCard>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -69,7 +77,7 @@ import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReach
import { getManagementPrecisions } from '@/common/balance.js' import { getManagementPrecisions } from '@/common/balance.js'
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit } from '@/api/request2.js' import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit } from '@/api/request2.js'
import { goHome, navigateBack, getPackingNumberAndBatch } from '@/common/basic.js' import { goHome, navigateBack, getPackingNumberAndBatch ,getSwitchInfoByCode} from '@/common/basic.js'
import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js' import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js'
@ -82,6 +90,7 @@ import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comDetailCard from '@/mycomponents/detail/comDetailCard.vue' import comDetailCard from '@/mycomponents/detail/comDetailCard.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue'
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
import { useCountStore } from '@/store' import { useCountStore } from '@/store'
// store // store
const store = useCountStore() const store = useCountStore()
@ -96,6 +105,7 @@ const subList = ref([]) // 接口返回的任务subList
const detailSource = ref([]) // const detailSource = ref([]) //
const toLocationAreaTypeList = ref([]) const toLocationAreaTypeList = ref([])
const managementList = ref([]) const managementList = ref([])
const managementType = ref('')
const jobStatus = ref('') const jobStatus = ref('')
const jobToLocationCode = ref('') const jobToLocationCode = ref('')
const status = ref('') const status = ref('')
@ -179,14 +189,30 @@ const getDetail = () => {
jobToLocationCode.value = subList.value[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode
productionLineCode.value = jobContent.value.subList[0].productionLineCode productionLineCode.value = jobContent.value.subList[0].productionLineCode
if (jobContent.value.allowModifyLocation == 'FALSE') { let valiDate = getSwitchInfoByCode("semiProductReceipCommitValidate")
toLocationCode.value = subList.value[0].toLocationCode if(valiDate){
jobContent.value.allowModifyLocation = 'TRUE'
}else{
jobContent.value.allowModifyLocation = 'FALSE'
} }
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes)
detailSource.value = getDataSource(subList.value) detailSource.value = getDataSource(subList.value)
if (scanMessage.value) { if (scanMessage.value) {
scanPopup.value.simulateScan(scanMessage.value) scanPopup.value.simulateScan(scanMessage.value)
} }
//
let itemCodes = []
detailSource.value.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, jobToLocationCode.value, res => {
if (res.success) {
managementList.value = res.list;
managementType.value = managementList.value.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
} }
@ -207,11 +233,12 @@ const getScanResult = (result) => {
if (detail == undefined) { if (detail == undefined) {
showErrorMessage(`物料号【${itemCode}】不在列表中`) showErrorMessage(`物料号【${itemCode}】不在列表中`)
} else { } else {
detail.scaned = true
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) showErrorMessage(`批次[${batch}]不在任务列表中`)
} else if (itemDetail.scaned) { } else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) showErrorMessage(`批次[${batch}]已经扫描`)
} else { } else {
itemDetail.scaned = true itemDetail.scaned = true
itemDetail.handleQty = Number(result.label.qty) itemDetail.handleQty = Number(result.label.qty)
@ -235,7 +262,7 @@ const continueScan = () => {
} }
const updateData = () => { const updateData = () => {
calcHandleQty(detailSource.value) // calcHandleQty(detailSource.value)
} }
const openScanPopup = () => { const openScanPopup = () => {
@ -281,10 +308,15 @@ const commit = () => {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
// let valiDate = getSwitchInfoByCode("semiProductReceipCommitValidate")
//
if(valiDate){
if (!checkLocation()) { if (!checkLocation()) {
return return
} }
}else{
toLocationCode.value = jobToLocationCode.value
}
// //
if (scanCount.value == subList.value.length) { if (scanCount.value == subList.value.length) {
@ -300,7 +332,7 @@ const commit = () => {
} }
} else { } else {
// //
showMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`) showMessage('请完成扫描后,再进行提交\n' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`)
} }
} }
} }
@ -344,7 +376,7 @@ const submitJob = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成预生产收货记录<br>${res.data}`) showCommitSuccessMessage(`提交成功\n生成预生产收货记录\n${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }
@ -369,6 +401,8 @@ const setParams = () => {
if (detail.scaned) { if (detail.scaned) {
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch)
detail.toPackingNumber = info.packingNumber detail.toPackingNumber = info.packingNumber
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch detail.toBatch = info.batch
detail.toContainerNumber = '' detail.toContainerNumber = ''
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus

113
src/pages/productReceipt/job/productReceiptJob.vue

@ -27,7 +27,7 @@ import { getProductReceiptJobList, cancleTakeProductReceiptJob } from '@/api/req
import { goHome, updateTitle } from '@/common/basic.js' import { goHome, updateTitle } from '@/common/basic.js'
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js' import { getDetailOption, getDetailGiveupOption } from '@/common/array.js'
import {planRefreshTime} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
@ -72,15 +72,26 @@ const jobInfoPopupRef = ref()
const jobListPopupRef = ref() const jobListPopupRef = ref()
const scanPopup = ref() const scanPopup = ref()
const jobListRef = ref() const jobListRef = ref()
const timer = ref(null)
onMounted(() => { onMounted(() => {
detailOptions.value = getDetailOption() detailOptions.value = getDetailOption()
detailGiveupOptions.value = getDetailGiveupOption() detailGiveupOptions.value = getDetailGiveupOption()
timerRefresh()
// getList('refresh') // getList('refresh')
}) })
const refresh = () => { const timerRefresh = () => {
getList('refresh') getList('refresh')
stopRefresh();
timer.value = setInterval(function() {
getList('refresh');
}, planRefreshTime)
}
const stopRefresh = ()=> {
if (timer.value) {
clearInterval(timer.value);
timer.value = null;
}
} }
const getList = (type) => { const getList = (type) => {
proxy.$modal.loading('加载中­....') proxy.$modal.loading('加载中­....')
loadingType.value = 'loading' loadingType.value = 'loading'
@ -102,11 +113,6 @@ const getList = (type) => {
action: 'in', action: 'in',
value: status.value value: status.value
}) })
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
filters.push({ filters.push({
column: 'type', column: 'type',
action: '==', action: '==',
@ -151,20 +157,7 @@ const getList = (type) => {
} }
const openJobDetail = (item, scanMessage = '') => { const openJobDetail = (item, scanMessage = '') => {
if (props.type == 'predict') { getJobInfoByNumber(item.number,scanMessage)
uni.navigateTo({
url: `./productReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}`
})
} else if (props.type == 'assemble') {
uni.navigateTo({
url: `./fgProductReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}}`
})
} else {
uni.navigateTo({
url: `./scrapReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}}`
})
}
scanMessage.value = ''
} }
const showItemList = (itemList) => { const showItemList = (itemList) => {
@ -239,11 +232,6 @@ const getDataListByType = (code) => {
action: '==', action: '==',
value: code value: code
}) })
filters.push({
column: 'accept_user_id',
action: '==',
value: store.id
})
const params = { const params = {
filters, filters,
pageNo: 1, pageNo: 1,
@ -264,8 +252,14 @@ const getDataListByType = (code) => {
}) })
} }
const showMessage = (message) => { const showMessage = (message) => {
if(scanPopup.value){
scanPopup.value.packLoseFocus()
}
comMessageRef.value.showErrorMessage(message, (res) => { comMessageRef.value.showErrorMessage(message, (res) => {
if (res) { if (res) {
if(scanPopup.value){
scanPopup.value.packGetFocus()
}
} }
}) })
} }
@ -322,11 +316,6 @@ const getScanResult = (result) => {
action: 'in', action: 'in',
value: '1,2' value: '1,2'
}, },
{
column: 'accept_user_id',
action: '==',
value: store.id
}
// { // {
// column: 'fromLocationCode', // column: 'fromLocationCode',
// action: '==', // action: '==',
@ -358,15 +347,71 @@ const getScanResult = (result) => {
selectItem(list[0]) selectItem(list[0])
} }
} else { } else {
showMessage('未查找到任务<br>' + `扫描[${result.scanMessage}]`) showMessage('未查找到任务\n' + `扫描[${result.scanMessage}]`)
} }
}) })
.catch((error) => { .catch((error) => {
showMessage(error) showMessage(error)
}) })
} catch (e) { } catch (e) {
showMessage(`${error}<br>扫描[${result.scanMessage}]`) showMessage(`${error}\n扫描[${result.scanMessage}]`)
}
}
const getJobInfoByNumber = (number,scanMessage)=>{
uni.showLoading({
title: "加载中....",
mask: true
});
let filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
const params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
let result = res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
comMessageRef.value.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
getList('refresh')
} }
});
return;
}
if (props.type == 'predict') {
uni.navigateTo({
url: `./productReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}`
})
} else if (props.type == 'assemble') {
uni.navigateTo({
url: `./fgProductReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}}`
})
} else {
uni.navigateTo({
url: `./scrapReceiptDetail?id=${item.masterId}&status=${item.status}&scanMessage=${scanMessage}&title=${props.title}}`
})
}
scanMessage.value = ''
}
}).catch(error => {
uni.hideLoading();
showMessage(error);
})
} }
defineExpose({ defineExpose({
refresh, refresh,

72
src/pages/productReceipt/job/scrapReceiptDetail.vue

@ -13,7 +13,12 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" @remove="updateData" @updateData="updateData" :locationTypeList="toLocationTypeList"> </comProductDetailCard> <comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList' v-else>
</comProductDetailCard>
</view> </view>
<u-line /> <u-line />
</view> </view>
@ -55,6 +60,7 @@ import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comDetailCard from '@/mycomponents/detail/comDetailCard.vue' import comDetailCard from '@/mycomponents/detail/comDetailCard.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue'
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
import { useCountStore } from '@/store' import { useCountStore } from '@/store'
// store // store
const store = useCountStore() const store = useCountStore()
@ -66,6 +72,7 @@ const toLocationCode = ref('')
const subList = ref([]) // subList const subList = ref([]) // subList
const detailSource = ref([]) // const detailSource = ref([]) //
const managementList = ref([]) const managementList = ref([])
const managementType = ref('')
const jobStatus = ref('') const jobStatus = ref('')
const toLocationTypeList = ref([]) const toLocationTypeList = ref([])
const receiptJob = ref({}) const receiptJob = ref({})
@ -75,6 +82,7 @@ const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
const detailInfoPopupRef = ref() const detailInfoPopupRef = ref()
const comMessageRef = ref() const comMessageRef = ref()
const managementPrecision = ref()
onLoad((option) => { onLoad((option) => {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: `${option.title}详情` title: `${option.title}详情`
@ -135,7 +143,7 @@ const receive = (callback) => {
const getDetail = () => { const getDetail = () => {
proxy.$modal.loading('加载中....') proxy.$modal.loading('加载中....')
getProductReceiptJobDetail(id.value) getProductReceiptJobDetail(id.value)
.then((res) => { .then(async (res) => {
uni.hideLoading() uni.hideLoading()
if (res.data == null) { if (res.data == null) {
showMessage('未获取到详情') showMessage('未获取到详情')
@ -145,7 +153,20 @@ const getDetail = () => {
subList.value = res.data.subList subList.value = res.data.subList
jobToLocationCode.value = subList.value[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode
toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes) toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes)
detailSource.value = getDataSource(subList.value) detailSource.value = await getDataSource(subList.value)
//
let itemCodes = []
detailSource.value.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, jobToLocationCode.value, res => {
if (res.success) {
managementList.value = res.list;
managementType.value = managementList.value.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
uni.hideLoading() uni.hideLoading()
} else { } else {
showMessage('列表数据为0') showMessage('列表数据为0')
@ -167,12 +188,18 @@ const getScanResult = (result) => {
if (detail == undefined) { if (detail == undefined) {
showErrorMessage(`物料号【${itemCode}】不在列表中`) showErrorMessage(`物料号【${itemCode}】不在列表中`)
} else { } else {
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) let itemDetail
if(managementPrecision.value == 'BY_QUANTITY'){
itemDetail = detail.subList.find(r => r.itemCode == result.label.itemCode);
}else{
itemDetail = detail.subList.find(r => r.batch == batch);
}
if (itemDetail == undefined) { if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) showErrorMessage(`批次[${batch}]不在任务列表中`)
} else if (itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`)
} else { } else {
if(itemDetail.scaned){
showErrorMessage(`批次[${batch}]已经扫描`)
}else {
itemDetail.scaned = true itemDetail.scaned = true
itemDetail.handleQty = Number(result.label.qty) itemDetail.handleQty = Number(result.label.qty)
itemDetail.toLocationCode = toLocationCode.value itemDetail.toLocationCode = toLocationCode.value
@ -181,6 +208,7 @@ const getScanResult = (result) => {
continueScan() continueScan()
} }
} }
}
} }
const continueScan = () => { const continueScan = () => {
scanCount.value = getScanCount(subList.value) scanCount.value = getScanCount(subList.value)
@ -235,17 +263,38 @@ const commit = () => {
if (!checkLocation()) { if (!checkLocation()) {
return return
} }
// //
if (scanCount.value == subList.value.length) {
checkCount();
} else if (scanCount.value < subList.value.length) {
//
if (jobContent.value.allowPartialComplete == "TRUE") {
//
checkCount();
} else {
//
showMessage("任务明细未全部完成,是否提交");
}
}
}
const checkCount = ()=>{
// //
let str = '' let str = ''
detailSource.value.forEach((item) => { detailSource.value.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` let tempHandleQty = 0
if(cur.handleQty){
tempHandleQty = cur.handleQty
}else {
tempHandleQty = 0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
comMessageRef.value.showQuestionMessage1(str, 'red', res => { comMessageRef.value.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
submitJob() submitJob()
@ -269,12 +318,13 @@ const submitJob = () => {
getManagementPrecisions(itemCodes, toLocationCode.value, (res) => { getManagementPrecisions(itemCodes, toLocationCode.value, (res) => {
if (res.success) { if (res.success) {
managementList.value = res.list managementList.value = res.list
managementPrecision.value = managementList.value[0].ManagementPrecision
const params = setParams() const params = setParams()
productReceiptJobsubmit(params) productReceiptJobsubmit(params)
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成制品上架记录:${res.data}`) showCommitSuccessMessage(`提交成功\n生成制品上架记录:${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }
@ -298,6 +348,8 @@ const setParams = () => {
if (detail.scaned) { if (detail.scaned) {
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch)
detail.toPackingNumber = info.packingNumber detail.toPackingNumber = info.packingNumber
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch detail.toBatch = info.batch
detail.toContainerNumber = '' detail.toContainerNumber = ''
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus

27
src/pages/productReceipt/job/scrapReceiptJob.vue

@ -6,23 +6,42 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue' 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,
onHide, onUnload
} from '@dcloudio/uni-app'
import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue' import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue'
const productreceiptjobRef = ref() const productreceiptjobRef = ref()
const title = ref('') const title = ref('')
onShow(() => { onShow(() => {
nextTick(() => { nextTick(() => {
if (productreceiptjobRef.value != undefined) { if (productreceiptjobRef.value) {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
} }
}) })
}) })
onHide(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onUnload(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onLoad((option) => { onLoad((option) => {
title.value = option.title title.value = option.title
}) })
onPullDownRefresh(() => { onPullDownRefresh(() => {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
}) })
onReachBottom(() => { onReachBottom(() => {
productreceiptjobRef.value.onReach() productreceiptjobRef.value.onReach()

487
src/pages/productReceipt/job/semiProductReceiptDetail.vue

@ -5,7 +5,7 @@
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</view> </view>
<view class="header_item"> <view class="header_item">
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{ jobContent.requestNumber }}
</view> </view>
<view class='split_line'></view> <view class='split_line'></view>
</view> </view>
@ -43,373 +43,344 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import { import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
getProductReceiptJobDetail, getProductReceiptJobDetail,
takeProductReceiptJob, takeProductReceiptJob,
cancleTakeProductReceiptJob, cancleTakeProductReceiptJob,
productReceiptJobsubmit productReceiptJobsubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
navigateBack, navigateBack,
getPackingNumberAndBatch, getPackingNumberAndBatch,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getDirectoryItemArray, getDirectoryItemArray,
getInventoryStatusName getInventoryStatusName
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
getDataSource, getDataSource,
createRecordInfo, createRecordInfo,
calcHandleQty, calcHandleQty,
getScanCount getScanCount
} from '@/common/detail.js'; } from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPack from "@/mycomponents/scan/winScanPack.vue" import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default { import {ref, onMounted, onBeforeUnmount} from 'vue';
name: 'receipt_detail', import {onLoad, onPullDownRefresh, onBackPress, onNavigationBarButtonTap} from '@dcloudio/uni-app';
components: { import {useCountStore} from '@/store'
winScanButton,
comDetailCard, const store = useCountStore()
locationCompare, const id = ref('');
winScanPack, const receiptJob = ref({});
jobTop, const toLocationCode = ref('');
comProductDetailCard const isShowPackingCode = ref(true);
}, const scanCount = ref(0);
data() { const jobContent = ref({}); //
return { const subList = ref([]); // subList
id: '', const detailSource = ref([]); //
receiptJob: {}, const toLocationTypeList = ref([]);
toLocationCode: '', const managementList = ref([]);
isShowPackingCode: true, const jobStatus = ref("");
scanCount: 0, const jobToLocationCode = ref("");
jobContent: {}, //
subList: [], //subList const scanPopupRef = ref(null);
detailSource: [], // const comMessageRef = ref(null);
toLocationTypeList: [], const comScanLocationRef = ref(null);
managementList: [],
jobStatus:"", onLoad((option) => {
jobToLocationCode:"" id.value = option.id;
if (id.value !== undefined) {
}; //
}, if (option.status === "1") {
onLoad(option) { receive(() => {
this.id = option.id; getDetail();
if (this.id != undefined) { });
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else { } else {
this.getDetail(); getDetail();
} }
} }
}, });
//
onNavigationBarButtonTap(e) { onNavigationBarButtonTap((e) => {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} }
}, });
//
onBackPress(e) { onBackPress((e) => {
// //
if (e.from == 'backbutton') { if (e.from === 'backbutton') {
if (this.jobStatus=="2") { if (jobStatus.value === "2") {
// //
cancleTakeProductReceiptJob(this.id).then(res => { cancleTakeProductReceiptJob(id.value).then(() => {
uni.navigateBack(); uni.navigateBack();
}).catch(error => { }).catch(() => {
uni.navigateBack(); uni.navigateBack();
}) });
} else { } else {
uni.navigateBack(); uni.navigateBack();
} }
return true; return true;
} }
});
}, onPullDownRefresh(() => {
getDetail();
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, });
mounted() {
}, //
methods: { const receive = (callback) => {
// if (id.value !== null) {
receive(callback) { takeProductReceiptJob(id.value).then(() => {
if (this.id != null) {
takeProductReceiptJob(this.id).then(res => {
callback(); callback();
}).catch(error => { }).catch((error) => {
this.showErrorMessage(error) showErrorMessage(error);
}) });
} }
}, };
getDetail() { const getDetail = () => {
var that = this;
uni.showLoading({ uni.showLoading({
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getProductReceiptJobDetail(that.id).then(res => { getProductReceiptJobDetail(id.value).then((res) => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data === null) {
that.showMessage('未获取到详情'); showMessage('未获取到详情');
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; jobContent.value = res.data;
that.subList = res.data.subList; subList.value = res.data.subList;
that.jobStatus = res.data.status jobStatus.value = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode jobToLocationCode.value = subList.value[0].toLocationCode;
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) toLocationTypeList.value = getDirectoryItemArray(jobContent.value.toLocationTypes);
that.detailSource = getDataSource(that.subList) detailSource.value = getDataSource(subList.value);
} else { } else {
that.showMessage('列表数据为0'); showMessage('列表数据为0');
} }
} }
}).catch(error => { }).catch((error) => {
uni.hideLoading() uni.hideLoading();
this.showErrorMessage(error) showErrorMessage(error);
}) });
}, };
getScanResult(result) { const getScanResult = (result) => {
let label = result.label; const label = result.label;
var packingNumber = label.packingNumber; const packingNumber = label.packingNumber;
var batch = label.batch; const batch = label.batch;
var qty = label.qty; const qty = label.qty;
var itemCode = label.itemCode; const itemCode = label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); const detail = detailSource.value.find((r) => r.itemCode === itemCode);
if (detail == undefined) { if (detail === undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") showErrorMessage(`物料号【${itemCode}】不在列表中`);
} else { } else {
var itemDetail = detail.subList.find(r => const itemDetail = detail.subList.find((r) =>
r.packingNumber == packingNumber && r.packingNumber === packingNumber && r.batch === batch
r.batch == batch); );
if (itemDetail == undefined) { if (itemDetail === undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中") showErrorMessage(`箱码[${packingNumber}]批次[${batch}]不在任务列表中`);
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") showErrorMessage(`箱码[${packingNumber}]批次[${batch}]已经扫描`);
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = toLocationCode.value;
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource); calcHandleQty(detailSource.value);
this.continueScan() continueScan();
this.$forceUpdate()
} }
} }
} }
}, };
// const continueScan = () => {
continueScan() { scanCount.value = getScanCount(subList.value);
this.scanCount = getScanCount(this.subList); if (scanCount.value === subList.value.length) {
if (this.scanCount == this.subList.length) { closeScanPopup();
this.closeScanPopup();
} else { } else {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}, };
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() { const updateData = () => {
this.$refs.scanPopup.closeScanPopup(); calcHandleQty(detailSource.value);
}, };
const openScanPopup = () => {
scanPopupRef.value.openScanPopup();
};
scanLocationCode(location, code) { const closeScanPopup = () => {
this.toLocationCode = code scanPopupRef.value.closeScanPopup();
this.detailSource.forEach(item => { };
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
checkLocation() { const scanLocationCode = (location, code) => {
var isPass = true; toLocationCode.value = code;
if (this.toLocationCode == "" || this.toLocationCode == null) { detailSource.value.forEach((item) => {
this.showMessageHint('请扫描收货库位', callback => { item.subList.forEach((detail) => {
this.$refs.comScanLocation.showLocation(); detail.toLocationCode = code;
}) });
});
};
return isPass = false; const checkLocation = () => {
let isPass = true;
if (toLocationCode.value === "" || toLocationCode.value === null) {
showMessageHint('请扫描收货库位', () => {
comScanLocationRef.value.showLocation();
});
isPass = false;
} }
return isPass; return isPass;
}, };
showMessageHint(hint, callback) { const showMessageHint = (hint, callback) => {
this.$refs.comMessage.showErrorMessage(hint, res => { comMessageRef.value.showErrorMessage(hint, (res) => {
if (res) { if (res) {
callback() callback();
} }
}); });
}, };
commit() { const commit = () => {
this.scanCount = getScanCount(this.subList); scanCount.value = getScanCount(subList.value);
if (this.scanCount == 0) { if (scanCount.value === 0) {
this.showErrorMessage("扫描数为0,请先扫描") showErrorMessage("扫描数为0,请先扫描");
return; return;
} }
// if (!checkLocation()) {
if (!this.checkLocation()) { return;
return
} }
if (scanCount.value === subList.value.length) {
// submitJob();
if (this.scanCount == this.subList.length) { } else if (scanCount.value < subList.value.length) {
this.submitJob(); if (jobContent.value.allowPartialComplete === "TRUE") {
} else if (this.scanCount < this.subList.length) { comMessageRef.value.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', (res) => {
// if (res) {
if (this.jobContent.allowPartialComplete == "TRUE") { submitJob();
// }
this.submitJob(); });
} else { } else {
// showMessage("任务明细未全部完成,不允许部分提交!");
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
} }
} }
};
}, const submitJob = () => {
submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var itemCodes = [] const itemCodes = [];
this.detailSource.forEach(item => { detailSource.value.forEach((item) => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode);
}) });
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, toLocationCode.value, (res) => {
if (res.success) { if (res.success) {
this.managementList = res.list; managementList.value = res.list;
var params = this.setParams(); const params = setParams();
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then((res) => {
uni.hideLoading() uni.hideLoading();
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, ) showCommitSuccessMessage(`提交成功\n生成制品收货记录\n${res.data}`);
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") showErrorMessage(`提交失败[${res.msg}]`);
} }
}).catch(error => { }).catch((error) => {
uni.hideLoading() uni.hideLoading();
this.showErrorMessage(error) showErrorMessage(error);
}) });
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); showErrorMessage(res.message);
} }
}); });
}, };
setParams() { const setParams = () => {
var subList = [] const subList = [];
var creator = this.$store.state.user.id const creator = store.id;
this.detailSource.forEach(item => { detailSource.value.forEach((item) => {
item.subList.forEach(detail => { item.subList.forEach((detail) => {
if (detail.scaned) { if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch);
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus;
detail.toLocationCode = this.toLocationCode detail.toLocationCode = toLocationCode.value;
subList.push(detail) subList.push(detail);
} }
}) });
}) });
this.jobContent.subList = subList jobContent.value.subList = subList;
this.jobContent.creator = creator; jobContent.value.creator = creator;
return this.jobContent; return jobContent.value;
}, };
const scanPopupGetFocus = () => {
scanPopupGetFocus() { if (scanPopupRef.value) {
if (this.$refs.scanPopup != undefined) { scanPopupRef.value.getfocus();
this.$refs.scanPopup.getfocus();
} }
}, };
scanPopupLoseFocus() { const scanPopupLoseFocus = () => {
if (this.$refs.scanPopup != undefined) { if (scanPopupRef.value) {
this.$refs.scanPopup.losefocus(); scanPopupRef.value.losefocus();
} }
}, };
showMessage(message) { const showMessage = (message) => {
setTimeout(r => { setTimeout(() => {
this.scanPopupLoseFocus(); scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { comMessageRef.value.showMessage(message, (res) => {
if (res) { if (res) {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}); });
}) });
}, };
showErrorMessage(message) { const showErrorMessage = (message) => {
setTimeout(r => { setTimeout(() => {
this.scanPopupLoseFocus(); scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { comMessageRef.value.showErrorMessage(message, (res) => {
if (res) { if (res) {
this.scanPopupGetFocus(); scanPopupGetFocus();
} }
}); });
}) });
}, };
showCommitSuccessMessage(hint) { const showCommitSuccessMessage = (hint) => {
this.$refs.comMessage.showSuccessMessage(hint, res => { comMessageRef.value.showSuccessMessage(hint, () => {
navigateBack(1) navigateBack(1);
}) });
}, };
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

27
src/pages/productReceipt/job/semiProductReceiptJob.vue

@ -6,23 +6,42 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue' 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,
onHide, onUnload
} from '@dcloudio/uni-app'
import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue' import productReceiptJob from '@/pages/productReceipt/job/productReceiptJob.vue'
const productreceiptjobRef = ref() const productreceiptjobRef = ref()
const title = ref('') const title = ref('')
onShow(() => { onShow(() => {
nextTick(() => { nextTick(() => {
if (productreceiptjobRef.value != undefined) { if (productreceiptjobRef.value) {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
} }
}) })
}) })
onHide(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onUnload(()=>{
if (productreceiptjobRef.value) {
productreceiptjobRef.value.stopRefresh()
}
})
onLoad((option) => { onLoad((option) => {
title.value = option.title title.value = option.title
}) })
onPullDownRefresh(() => { onPullDownRefresh(() => {
productreceiptjobRef.value.refresh() productreceiptjobRef.value.timerRefresh()
}) })
onReachBottom(() => { onReachBottom(() => {
productreceiptjobRef.value.onReach() productreceiptjobRef.value.onReach()

Loading…
Cancel
Save