5 changed files with 772 additions and 846 deletions
@ -1,424 +1,401 @@ |
|||||
<template> |
<template> |
||||
<view class="page-wraper"> |
<view class="page-wraper"> |
||||
<view class="page-main"> |
<view class="page-main"> |
||||
<view class="page-header"> |
<view class="page-header"> |
||||
<view class="header-view"> |
<view class="header-view"> |
||||
<view class="header_job_top"> |
<view class="header_job_top"> |
||||
<receive-top :dataContent="recordContent"></receive-top> |
<receive-top :dataContent="recordContent"></receive-top> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view v-if="detailSource.length>0" class="uni-flex uni-row " |
<view v-if="detailSource.length>0" class="uni-flex uni-row " |
||||
style=";margin-top: 15rpx; margin-bottom: 15rpx; margin-left: 20rpx; text-align: right;"> |
style=";margin-top: 15rpx; margin-bottom: 15rpx; margin-left: 20rpx; text-align: right;"> |
||||
<view class="font_default" style="display: block; font-weight: bold;"> |
<view class="font_default" style="display: block; font-weight: bold;"> |
||||
整单接收 |
整单接收 |
||||
</view> |
</view> |
||||
<view class="uni-flex" style="margin-left: 20rpx; align-items: center; text-align: center;"> |
<view class="uni-flex" style="margin-left: 20rpx; align-items: center; text-align: center;"> |
||||
<u-switch v-model="isAllReceived" active-color="#5FCB94" inactive-color="#eee" size="35" |
<u-switch v-model="isAllReceived" active-color="#5FCB94" inactive-color="#eee" size="35" |
||||
@change="switchChange"></u-switch> |
@change="switchChange"></u-switch> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<scroll-view scroll-y="true"> |
<scroll-view scroll-y="true"> |
||||
<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=""> |
||||
<com-detail-card :dataContent="item" :index="index" :settingParam="recordContent" |
<com-detail-card :dataContent="item" :index="index" :settingParam="recordContent" |
||||
@remove="updateData" :isShowToLocation="true" @updateData="updateData" |
@remove="updateData" :isShowToLocation="true" @updateData="updateData" |
||||
@openDetail="openDetail"> |
@openDetail="openDetail"> |
||||
</com-detail-card> |
</com-detail-card> |
||||
<view class='split_line'></view> |
<view class='split_line'></view> |
||||
</view> |
</view> |
||||
|
|
||||
</view> |
</view> |
||||
</scroll-view> |
</scroll-view> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="page-footer"> |
<view class="page-footer"> |
||||
<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=" uni-flex uni-row"> |
<view class=" uni-flex uni-row"> |
||||
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after" |
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after" |
||||
@click="reject">拒绝</button> |
@click="reject">拒绝 |
||||
</view> |
</button> |
||||
<view class=" uni-flex uni-row"> |
</view> |
||||
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after" |
<view class=" uni-flex uni-row"> |
||||
@click="receive" :disabled="receiveDisable">接收</button> |
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after" |
||||
</view> |
@click="receive" :disabled="receiveDisable">接收 |
||||
</view> |
</button> |
||||
</view> |
</view> |
||||
|
</view> |
||||
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
</view> |
||||
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ,HMQ">></win-scan-pack> |
|
||||
|
<win-scan-button @goScan='openScanPopup'></win-scan-button> |
||||
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ,HMQ">></win-scan-pack> |
||||
|
|
||||
<comMessage ref="comMessage"></comMessage> |
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> |
||||
</view> |
|
||||
|
<comMessage ref="comMessage"></comMessage> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
|
|
||||
import { |
import { |
||||
getCustomerReturnRecordDetail, |
getCustomerReturnRecordDetail, |
||||
customerReturnRecordRefuse, |
customerReturnRecordRefuse, |
||||
customerReturnRecordReceive, |
customerReturnRecordReceive, |
||||
} from '@/api/request2.js'; |
} from '@/api/request2.js'; |
||||
import { |
import { |
||||
goHome, |
goHome, |
||||
navigateBack, |
navigateBack, |
||||
getCurrDateTime, |
getCurrDateTime, |
||||
getInventoryStatusName, |
getInventoryStatusName, |
||||
getSwitchInfoByCode |
getSwitchInfoByCode |
||||
} from '@/common/basic.js'; |
} from '@/common/basic.js'; |
||||
import { |
import { |
||||
getDataSource, |
getDataSource, |
||||
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 comDetailCard from "@/mycomponents/detail/comDetailCard.vue" |
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" |
||||
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' |
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' |
||||
import receiveTop from '@/mycomponents/receive/receiveTop.vue' |
import receiveTop from '@/mycomponents/receive/receiveTop.vue' |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
|
|
||||
export default { |
import {ref} from 'vue'; |
||||
components: { |
import { |
||||
winScanButton, |
onLoad, |
||||
winScanPack, |
onBackPress, |
||||
comDetailCard, |
onNavigationBarButtonTap |
||||
detailInfoPopup, |
} from '@dcloudio/uni-app'; |
||||
receiveTop |
|
||||
}, |
const id = ref(null); |
||||
data() { |
const isAllReceived = ref(false); |
||||
return { |
const receiveDisable = ref(true); |
||||
id: '', |
const recordContent = ref(null); |
||||
scanCount: 0, |
const subList = ref([]); |
||||
recordContent: {}, //任务内容 |
const detailSource = ref([]); |
||||
subList: [], //接口返回的任务subList |
const scanCount = ref(0); |
||||
detailSource: [], //绑定在页面上的数据源 |
|
||||
fromLocationCode: "", |
const detailInfoPopup = ref(null); |
||||
toLocationCode: "", |
const scanPopup = ref(null); |
||||
isAllReceived: false, |
const comMessage = ref(null); |
||||
receiveDisable: true //默认不可点击 |
|
||||
}; |
onLoad((option) => { |
||||
}, |
uni.setNavigationBarTitle({ |
||||
onLoad(option) { |
title: option.title + '详情' |
||||
uni.setNavigationBarTitle({ |
}); |
||||
title: option.title + '详情' |
id.value = option.id; |
||||
}) |
if (id.value !== undefined) { |
||||
this.id = option.id; |
// 新建的任务自动接收 |
||||
if (this.id != undefined) { |
if (option.receiveStatus === "0") { |
||||
//新建的任务自动接收 |
getDetail(); |
||||
if (option.receiveStatus == "0") { |
} |
||||
this.getDetail(); |
} |
||||
} |
}); |
||||
} |
|
||||
}, |
onNavigationBarButtonTap((e) => { |
||||
//返回首页 |
if (e.index === 0) { |
||||
onNavigationBarButtonTap(e) { |
goHome(); |
||||
if (e.index === 0) { |
} |
||||
goHome(); |
}); |
||||
} |
|
||||
}, |
onBackPress((e) => { |
||||
//拦截返回按钮事件 |
// 已经接收但是没提交任务 |
||||
onBackPress(e) { |
if (e.from === 'backbutton') { |
||||
//已经接收但是没提交任务 |
uni.navigateBack(); |
||||
if (e.from == 'backbutton') { |
return true; |
||||
uni.navigateBack(); |
} |
||||
return true; |
}); |
||||
} |
|
||||
}, |
// 方法 |
||||
|
const getDetail = () => { |
||||
|
uni.showLoading({title: "加载中....", mask: true}); |
||||
mounted() { |
getCustomerReturnRecordDetail(id.value).then((res) => { |
||||
|
uni.hideLoading(); |
||||
}, |
isAllReceived.value = false; |
||||
methods: { |
receiveDisable.value = true; |
||||
//接收 |
if (res.data == null) { |
||||
getDetail() { |
showMessage('未获取到详情'); |
||||
var that = this; |
} else { |
||||
uni.showLoading({ |
if (res.data.list.length > 0) { |
||||
title: "加载中....", |
recordContent.value = res.data.list[0]; |
||||
mask: true |
subList.value = res.data.list; |
||||
}); |
subList.value.forEach((item) => { |
||||
getCustomerReturnRecordDetail(that.id).then(res => { |
item.batch = item.toBatch; |
||||
uni.hideLoading(); |
item.packingNumber = item.toPackingNumber; |
||||
this.isAllReceived= false |
}); |
||||
this.receiveDisable = true |
detailSource.value = getDataSource(subList.value); |
||||
if (res.data == null) { |
} else { |
||||
that.showMessage('未获取到详情'); |
showMessage('列表数据为0'); |
||||
} else { |
} |
||||
if (res.data.list.length > 0) { |
} |
||||
that.recordContent = res.data.list[0]; |
}).catch((error) => { |
||||
that.subList = res.data.list; |
uni.hideLoading(); |
||||
that.subList.forEach(item => { |
showErrorMessage(error); |
||||
item.batch = item.toBatch; |
}); |
||||
item.packingNumber = item.toPackingNumber; |
}; |
||||
}) |
|
||||
that.detailSource = getDataSource(that.subList) |
const calcHandleQty = () => { |
||||
} else { |
calcHandleQty(detailSource.value); |
||||
that.showMessage('列表数据为0'); |
updateBtn(); |
||||
} |
continueScan(); |
||||
} |
}; |
||||
}).catch(error => { |
|
||||
uni.hideLoading() |
const updateBtn = () => { |
||||
this.showErrorMessage(error) |
scanCount.value = getScanCount(subList.value); |
||||
}) |
// 扫描数量和任务数量相等,直接提交 |
||||
}, |
if (scanCount.value === subList.value.length) { |
||||
|
receiveDisable.value = false; |
||||
calcHandleQty() { |
} else { |
||||
calcHandleQty(this.detailSource); |
receiveDisable.value = true; |
||||
this.updateBtn() |
} |
||||
this.continueScan() |
}; |
||||
this.$forceUpdate(); |
|
||||
}, |
const continueScan = () => { |
||||
|
scanCount.value = getScanCount(subList.value); |
||||
updateBtn() { |
if (scanCount.value === subList.value.length) { |
||||
this.scanCount = getScanCount(this.subList); |
closeScanPopup(); |
||||
//扫描数量和任务数量相等,直接提交 |
} else { |
||||
if (this.scanCount == this.subList.length) { |
scanPopupGetFocus(); |
||||
this.receiveDisable = false; |
} |
||||
}else { |
}; |
||||
this.receiveDisable = true; |
|
||||
} |
const updateData = () => { |
||||
}, |
calcHandleQty(); |
||||
|
updateBtn(); |
||||
//继续扫描 |
}; |
||||
continueScan() { |
|
||||
this.scanCount = getScanCount(this.subList); |
const openDetail = (item) => { |
||||
if (this.scanCount == this.subList.length) { |
detailInfoPopup.value.openPopup(item); |
||||
this.closeScanPopup(); |
}; |
||||
} else { |
|
||||
this.scanPopupGetFocus(); |
const openScanPopup = () => { |
||||
} |
scanPopup.value.openScanPopup(); |
||||
}, |
}; |
||||
|
|
||||
updateData() { |
const closeScanPopup = () => { |
||||
this.calcHandleQty(); |
scanPopup.value.closeScanPopup(); |
||||
this.updateBtn() |
}; |
||||
}, |
|
||||
|
const getScanResult = (result) => { |
||||
openDetail(item) { |
try { |
||||
this.$refs.detailInfoPopup.openPopup(item) |
const itemCode = result.label.itemCode; |
||||
}, |
const packingNumber = result.package.number; |
||||
|
const batch = result.label.batch; |
||||
openScanPopup() { |
const detail = detailSource.value.find((r) => r.itemCode === itemCode); |
||||
this.$refs.scanPopup.openScanPopup(); |
|
||||
}, |
if (detail === undefined) { |
||||
|
showErrorMessage(`物料号【${itemCode}】不在列表中`); |
||||
closeScanPopup() { |
} else { |
||||
this.$refs.scanPopup.closeScanPopup(); |
const itemDetail = detail.subList.find((r) => r.packingNumber === packingNumber && r.batch === batch); |
||||
}, |
if (itemDetail === undefined) { |
||||
|
showErrorMessage(`箱码[${packingNumber}]批次[${batch}]不在列表中`); |
||||
getScanResult(result) { |
} else { |
||||
try { |
if (itemDetail.scaned) { |
||||
var itemCode = result.label.itemCode; |
showErrorMessage(`箱码[${packingNumber}]批次[${batch}]已经扫描`); |
||||
var packingNumber = result.package.number; |
} else { |
||||
var batch = result.label.batch; |
itemDetail.scaned = true; |
||||
var detail = this.detailSource.find(r => r.itemCode == itemCode); |
itemDetail.handleQty = Number(itemDetail.qty); |
||||
|
calcHandleQty(); |
||||
if (detail == undefined) { |
} |
||||
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") |
} |
||||
} else { |
} |
||||
var itemDetail = detail.subList.find(r => { |
} catch (e) { |
||||
return r.packingNumber == packingNumber && |
showMessage(e.message); |
||||
r.batch == batch |
} |
||||
}) |
}; |
||||
if (itemDetail == undefined) { |
|
||||
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中") |
const reject = () => { |
||||
} else { |
showQuestionMessage("是否拒绝接收?", (res) => { |
||||
if (itemDetail.scaned) { |
if (res) { |
||||
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描") |
uni.showLoading({title: "提交中....", mask: true}); |
||||
} else { |
customerReturnRecordRefuse(id.value).then((res) => { |
||||
itemDetail.scaned = true; |
uni.hideLoading(); |
||||
itemDetail.handleQty = Number(itemDetail.qty) |
if (res.data) { |
||||
this.calcHandleQty(); |
showCommitSuccessMessage("拒绝成功"); |
||||
} |
} else { |
||||
} |
showErrorMessage(`拒绝失败[${res.msg}]`); |
||||
} |
} |
||||
} catch (e) { |
}).catch((error) => { |
||||
this.showMessage(e.message) |
uni.hideLoading(); |
||||
} |
showErrorMessage(error); |
||||
}, |
}); |
||||
reject() { |
} |
||||
this.showQuestionMessage("是否拒绝接收?", res => { |
}); |
||||
if (res) { |
}; |
||||
uni.showLoading({ |
|
||||
title: "提交中....", |
const receive = () => { |
||||
mask: true |
scanCount.value = getScanCount(subList.value); |
||||
}); |
if (scanCount.value === 0) { |
||||
customerReturnRecordRefuse(this.id).then(res=>{ |
showErrorMessage("扫描数为0,请先扫描"); |
||||
uni.hideLoading() |
return; |
||||
if(res.data){ |
} |
||||
this.showCommitSuccessMessage("拒绝成功") |
if (scanCount.value < subList.value.length) { |
||||
}else { |
showErrorMessage("还有未扫描的数据,请先扫描"); |
||||
this.showErrorMessage("拒绝失败[" + res.msg + "]") |
return; |
||||
} |
} |
||||
}).catch(error=>{ |
|
||||
uni.hideLoading() |
// 扫描数量和任务数量相等,直接提交 |
||||
this.showErrorMessage(error) |
if (scanCount.value === subList.value.length) { |
||||
}) |
receiveSubmit(); |
||||
} |
} |
||||
}) |
}; |
||||
}, |
|
||||
|
const showMessageHint = (hint, callback) => { |
||||
receive() { |
comMessage.value.showErrorMessage(hint, (res) => { |
||||
this.scanCount = getScanCount(this.subList); |
if (res) { |
||||
if (this.scanCount == 0) { |
callback(); |
||||
this.showErrorMessage("扫描数为0,请先扫描") |
} |
||||
return; |
}); |
||||
} |
}; |
||||
if (this.scanCount < this.subList.length) { |
|
||||
this.showErrorMessage("还有未扫描的数据,请先扫描") |
const receiveSubmit = () => { |
||||
return; |
uni.showLoading({title: "提交中....", mask: true}); |
||||
} |
customerReturnRecordReceive(id.value).then((res) => { |
||||
|
uni.hideLoading(); |
||||
//扫描数量和任务数量相等,直接提交 |
if (res.data) { |
||||
if (this.scanCount == this.subList.length) { |
showCommitSuccessMessage("接收成功"); |
||||
this.receiveSubmit(); |
} else { |
||||
} |
showErrorMessage(`接收失败[${res.msg}]`); |
||||
}, |
} |
||||
|
}).catch((error) => { |
||||
showMessageHint(hint, callback) { |
uni.hideLoading(); |
||||
this.$refs.comMessage.showErrorMessage(hint, res => { |
showErrorMessage(error); |
||||
if (res) { |
}); |
||||
callback() |
}; |
||||
} |
|
||||
}); |
const showMessage = (message) => { |
||||
}, |
setTimeout(() => { |
||||
|
scanPopupLoseFocus(); |
||||
receiveSubmit() { |
comMessage.value.showMessage(message, (res) => { |
||||
uni.showLoading({ |
if (res) { |
||||
title: "提交中....", |
afterCloseMessage(); |
||||
mask: true |
} |
||||
}); |
}); |
||||
customerReturnRecordReceive(this.id).then(res => { |
}); |
||||
uni.hideLoading() |
}; |
||||
if (res.data) { |
|
||||
this.showCommitSuccessMessage("接收成功") |
const showErrorMessage = (message) => { |
||||
} else { |
setTimeout(() => { |
||||
this.showErrorMessage("接收失败[" + res.msg + "]") |
scanPopupLoseFocus(); |
||||
} |
comMessage.value.showErrorMessage(message, (res) => { |
||||
}).catch(error => { |
if (res) { |
||||
uni.hideLoading() |
afterCloseMessage(); |
||||
this.showErrorMessage(error) |
} |
||||
}) |
}); |
||||
}, |
}); |
||||
|
}; |
||||
showMessage(message) { |
|
||||
setTimeout(r => { |
const showQuestionMessage = (message, callback) => { |
||||
this.scanPopupLoseFocus(); |
setTimeout(() => { |
||||
this.$refs.comMessage.showMessage(message, res => { |
scanPopupLoseFocus(); |
||||
if (res) { |
comMessage.value.showQuestionMessage(message, (res) => { |
||||
this.afterCloseMessage() |
if (res) { |
||||
} |
callback(res); |
||||
}); |
} |
||||
}) |
}); |
||||
}, |
}); |
||||
|
}; |
||||
showErrorMessage(message) { |
|
||||
setTimeout(r => { |
const scanPopupGetFocus = () => { |
||||
this.scanPopupLoseFocus(); |
if (scanPopup.value) { |
||||
this.$refs.comMessage.showErrorMessage(message, res => { |
scanPopup.value.getfocus(); |
||||
if (res) { |
} |
||||
this.afterCloseMessage() |
}; |
||||
} |
|
||||
}); |
const scanPopupLoseFocus = () => { |
||||
}) |
if (scanPopup.value) { |
||||
}, |
scanPopup.value.losefocus(); |
||||
|
} |
||||
showQuestionMessage(message, callback) { |
}; |
||||
setTimeout(r => { |
|
||||
this.scanPopupLoseFocus(); |
const afterCloseMessage = () => { |
||||
this.$refs.comMessage.showQuestionMessage(message, res => { |
scanPopupGetFocus(); |
||||
if (res) { |
}; |
||||
callback(res); |
|
||||
} |
const showCommitSuccessMessage = (hint) => { |
||||
}); |
comMessage.value.showSuccessMessage(hint, (res) => { |
||||
}) |
navigateBack(1); |
||||
}, |
}); |
||||
|
}; |
||||
scanPopupGetFocus() { |
|
||||
if (this.$refs.scanPopup) { |
const switchChange = (isOn) => { |
||||
this.$refs.scanPopup.getfocus(); |
isAllReceived.value = isOn; |
||||
} |
if (isAllReceived.value) { |
||||
}, |
detailSource.value.forEach((item) => { |
||||
|
item.subList.forEach((info) => { |
||||
scanPopupLoseFocus() { |
info.scaned = true; |
||||
if (this.$refs.scanPopup) { |
info.handleQty = Number(info.qty); |
||||
this.$refs.scanPopup.losefocus(); |
}); |
||||
} |
}); |
||||
}, |
calcHandleQty(); |
||||
|
} else { |
||||
afterCloseMessage() { |
comMessage.value.showQuestionMessage("是否要关闭整单收货?", (res) => { |
||||
this.scanPopupGetFocus(); |
if (res) { |
||||
}, |
getDetail(); |
||||
|
} else { |
||||
|
isAllReceived.value = true; |
||||
showCommitSuccessMessage(hint) { |
} |
||||
this.$refs.comMessage.showSuccessMessage(hint, res => { |
}); |
||||
navigateBack(1) |
} |
||||
}) |
}; |
||||
}, |
|
||||
|
|
||||
switchChange(isOn) { |
|
||||
this.isAllReceived = isOn |
|
||||
if(this.isAllReceived){ |
|
||||
this.detailSource.forEach(item=>{ |
|
||||
item.subList.forEach(info=>{ |
|
||||
info.scaned=true; |
|
||||
info.handleQty=Number(info.qty) |
|
||||
}) |
|
||||
}) |
|
||||
this.calcHandleQty(); |
|
||||
}else { |
|
||||
this.$refs.comMessage.showQuestionMessage("是否要关闭整单收货?", res => { |
|
||||
if (res) { |
|
||||
this.getDetail() |
|
||||
} else { |
|
||||
this.isAllReceived=true |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
page { |
page { |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
background-color: #fff; |
background-color: #fff; |
||||
} |
} |
||||
|
|
||||
.page-wraper { |
.page-wraper { |
||||
display: flex; |
display: flex; |
||||
flex-direction: column; |
flex-direction: column; |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
} |
} |
||||
|
|
||||
|
|
||||
.page-main { |
.page-main { |
||||
flex: 1; |
flex: 1; |
||||
position: relative; |
position: relative; |
||||
} |
} |
||||
|
|
||||
.page-main-scroll { |
.page-main-scroll { |
||||
position: absolute; |
position: absolute; |
||||
left: 0; |
left: 0; |
||||
right: 0; |
right: 0; |
||||
top: 0; |
top: 0; |
||||
bottom: 0; |
bottom: 0; |
||||
} |
} |
||||
|
|
||||
.page-main-list { |
.page-main-list { |
||||
/* height: 80rpx; |
/* height: 80rpx; |
||||
line-height: 80rpx; */ |
line-height: 80rpx; */ |
||||
text-align: center; |
text-align: center; |
||||
background: #e0e0e0; |
background: #e0e0e0; |
||||
|
|
||||
} |
} |
||||
</style> |
</style> |
@ -1,48 +1,41 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-putaway-record :title="title" ref="productPutawayRecord" putawayType='assemble'></product-putaway-record> |
<product-putaway-record :title="title" ref="productPutawayRecordRef" putawayType="assemble"></product-putaway-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup> |
||||
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
export default { |
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'; |
||||
components: { |
|
||||
productPutawayRecord |
const title = ref(''); |
||||
}, |
const productPutawayRecordRef = ref(null); |
||||
data() { |
|
||||
return { |
onLoad((option) => { |
||||
title:'' |
title.value = option.title; |
||||
}; |
}); |
||||
}, |
|
||||
onLoad(option){ |
onShow(() => { |
||||
this.title = option.title |
if (productPutawayRecordRef.value) { |
||||
}, |
// productPutawayRecordRef.value.refresh(); |
||||
|
} |
||||
onShow() { |
}); |
||||
if(this.$refs.productPutawayRecord!=undefined){ |
|
||||
// this.$refs.productPutawayRecord.refresh(); |
onPullDownRefresh(() => { |
||||
} |
if (productPutawayRecordRef.value) { |
||||
}, |
// productPutawayRecordRef.value.refresh(); |
||||
|
} |
||||
onPullDownRefresh() { |
}); |
||||
// this.$refs.productPutawayRecord.refresh(); |
|
||||
}, |
onNavigationBarButtonTap((e) => { |
||||
onNavigationBarButtonTap(e) { |
if (e.index === 0) { |
||||
if (e.index === 0) { |
productPutawayRecordRef.value.toHome(); |
||||
this.$refs.productPutawayRecord.toHome(); |
} else if (e.index === 1) { |
||||
} else if (e.index == 1) { |
productPutawayRecordRef.value.openFilter(); |
||||
this.$refs.productPutawayRecord.openFilter(); |
} |
||||
} |
}); |
||||
}, |
</script> |
||||
|
|
||||
methods: { |
<style scoped lang="scss"> |
||||
|
</style> |
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped lang="scss"> |
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,48 +1,41 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-putaway-record :title="title" ref="productPutawayRecord" putawayType='predict'></product-putaway-record> |
<product-putaway-record :title="title" ref="productPutawayRecordRef" putawayType="predict"></product-putaway-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup lang="ts"> |
||||
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
export default { |
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'; |
||||
components: { |
|
||||
productPutawayRecord |
const title = ref(''); |
||||
}, |
const productPutawayRecordRef = ref(null); |
||||
data() { |
|
||||
return { |
onLoad((option) => { |
||||
title:'' |
title.value = option.title; |
||||
}; |
}); |
||||
}, |
|
||||
onLoad(option){ |
onShow(() => { |
||||
this.title = option.title |
if (productPutawayRecordRef.value) { |
||||
}, |
productPutawayRecordRef.value.refresh(); |
||||
|
} |
||||
onShow() { |
}); |
||||
if(this.$refs.productPutawayRecord!=undefined){ |
|
||||
this.$refs.productPutawayRecord.refresh(); |
onPullDownRefresh(() => { |
||||
} |
if (productPutawayRecordRef.value) { |
||||
}, |
productPutawayRecordRef.value.refresh(); |
||||
|
} |
||||
onPullDownRefresh() { |
}); |
||||
this.$refs.productPutawayRecord.refresh(); |
|
||||
}, |
onNavigationBarButtonTap((e) => { |
||||
onNavigationBarButtonTap(e) { |
if (e.index === 0) { |
||||
if (e.index === 0) { |
productPutawayRecordRef.value.toHome(); |
||||
this.$refs.productPutawayRecord.toHome(); |
} else if (e.index === 1) { |
||||
} else if (e.index == 1) { |
productPutawayRecordRef.value.openFilter(); |
||||
this.$refs.productPutawayRecord.openFilter(); |
} |
||||
} |
}); |
||||
}, |
</script> |
||||
|
|
||||
methods: { |
<style scoped lang="scss"> |
||||
|
</style> |
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style scoped lang="scss"> |
|
||||
|
|
||||
</style> |
|
||||
|
@ -1,48 +1,47 @@ |
|||||
<template> |
<template> |
||||
<view class=""> |
<view class=""> |
||||
<product-receipt-record :title="title" ref="productPutawayRecord" type='predict'></product-receipt-record> |
<product-receipt-record :title="title" ref="productReceiptRecordRef" type="predict"></product-receipt-record> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script setup> |
||||
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue' |
import { ref } from 'vue'; |
||||
|
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app'; |
||||
|
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue'; |
||||
|
|
||||
export default { |
// 定义响应式数据 |
||||
components: { |
const title = ref(''); |
||||
productReceiptRecord |
const productReceiptRecordRef = ref(null); |
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
title:'' |
|
||||
}; |
|
||||
}, |
|
||||
onLoad(option){ |
|
||||
this.title = option.title |
|
||||
}, |
|
||||
|
|
||||
onShow() { |
|
||||
if(this.$refs.productReceiptRecord!=undefined){ |
|
||||
this.$refs.productReceiptRecord.refresh(); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
onPullDownRefresh() { |
// 页面加载时处理 |
||||
this.$refs.productReceiptRecord.refresh(); |
onLoad((option) => { |
||||
}, |
title.value = option.title; |
||||
onNavigationBarButtonTap(e) { |
}); |
||||
if (e.index === 0) { |
|
||||
this.$refs.productReceiptRecord.toHome(); |
|
||||
} else if (e.index == 1) { |
|
||||
this.$refs.productReceiptRecord.openFilter(); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
methods: { |
// 页面显示时处理 |
||||
|
onShow(() => { |
||||
|
if (productReceiptRecordRef.value) { |
||||
|
productReceiptRecordRef.value.refresh(); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
} |
// 下拉刷新时处理 |
||||
} |
onPullDownRefresh(() => { |
||||
|
if (productReceiptRecordRef.value) { |
||||
|
productReceiptRecordRef.value.refresh(); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
// 导航栏按钮点击事件 |
||||
|
onNavigationBarButtonTap((e) => { |
||||
|
if (e.index === 0) { |
||||
|
productReceiptRecordRef.value.toHome(); |
||||
|
} else if (e.index === 1) { |
||||
|
productReceiptRecordRef.value.openFilter(); |
||||
|
} |
||||
|
}); |
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
|
/* 样式部分保持不变 */ |
||||
</style> |
</style> |
||||
|
Loading…
Reference in new issue