Browse Source

文件迁移Vue2升级Vue3 8/2-10/25

hella_vue3
王志国 3 weeks ago
parent
commit
f1738c952f
  1. 398
      src/pages/customerReturn/record/recordList.vue
  2. 475
      src/pages/customerReturn/record/recordListDetail.vue
  3. 67
      src/pages/productPutaway/record/fgDirectPutaway.vue
  4. 65
      src/pages/productPutaway/record/semiDirectPutaway.vue
  5. 63
      src/pages/productReceipt/record/semiDirectReceipt.vue

398
src/pages/customerReturn/record/recordList.vue

@ -5,13 +5,9 @@
</job-filter>
<com-empty-view v-if="recordList.length==0"></com-empty-view>
<view v-if="recordList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in recordList" :key="index">
<uni-swipe-action-item>
<u-swipe-action ref="swipeAction" v-for="(item, index) in recordList" :key="index">
<comReturnRecordCard :dataContent="item" @click='openJobDetail(item)'></comReturnRecordCard>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
</u-swipe-action>
<job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></job-list-popup>
<job-info-popup ref='jobInfoPopup'></job-info-popup>
@ -25,7 +21,7 @@
</view>
</template>
<script>
<script setup lang="ts">
import {getCustomerReturnRecordList, cancleTakeProductionReceiptJob,} from '@/api/request2.js';
import {goHome, updateTitle} from '@/common/basic.js';
@ -47,294 +43,262 @@
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import jobList from '@/mycomponents/jobList/jobList.vue'
export default {
name: 'productionReceipt',
components: {
comEmptyView,
jobFilter,
comReturnRecordCard,
jobListPopup,
jobInfoPopup,
winScanPackJob,
winScanButton,
jobList
},
data() {
return {
recordList: [],
pageNo: 1,
pageSize: 10,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
detailOptions: [],
detailGiveupOptions: [],
title: '',
scanMessage: "",
filterItemCode: "",
queryParams:{
creationTime:"",
receiveStatus:"",
itemCode:""
}
};
},
onLoad(option) {
this.title = option.title
},
onShow() {
this.getList('refresh')
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList('more')
},
onPullDownRefresh() {
this.getList('refresh')
},
//退
onBackPress(options) {
import { ref,} from 'vue';
import { onLoad, onShow, onReady, onReachBottom, onPullDownRefresh, onBackPress, onNavigationBarButtonTap } from '@dcloudio/uni-app';
const recordList = ref([]);
const pageNo = ref(1);
const pageSize = ref(10);
const totalCount = ref(0);
const loadingType = ref("nomore");
const checkedToday = ref(false);
const checkedWaitTask = ref(false);
const todayTime = ref("");
const detailOptions = ref([]);
const detailGiveupOptions = ref([]);
const title = ref('');
const scanMessage = ref("");
const filterItemCode = ref("");
const queryParams = ref({
creationTime: "",
receiveStatus: "",
itemCode: ""
});
const filter = ref(null);
const jobListPopup = ref(null);
const jobInfoPopup = ref(null);
const comMessage = ref(null);
const scanPopup = ref(null);
const recordListRef = ref(null);
onLoad((option) => {
title.value = option.title;
});
onShow(() => {
getList('refresh');
});
onReady(() => {
detailOptions.value = getDetailOption();
detailGiveupOptions.value = getDetailGiveupOption();
});
onReachBottom(() => {
//
if (loadingType.value === 'loading' || loadingType.value === 'nomore') return;
getList('more');
});
onPullDownRefresh(() => {
getList('refresh');
});
onBackPress((options) => {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
uni.navigateBack({ delta: 1 });
return false;
}
},
});
//
onNavigationBarButtonTap(e) {
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
} else if (e.index === 1) {
filter.value.openFilter();
}
},
methods: {
});
setQueryParam() {
var filterParams = []
const setQueryParam = () => {
const filterParams = [];
//
if (this.queryParams.creationTime) {
//
if (queryParams.value.creationTime) {
filterParams.push({
column: "create_time",
action: "betweeen",
value: this.queryParams.creationTime
})
action: "between",
value: queryParams.value.creationTime
});
}
//
if (this.queryParams.receiveStatus) {
//
if (queryParams.value.receiveStatus) {
filterParams.push({
column: "receiveStatus",
action: "in",
value: this.queryParams.receiveStatus
})
value: queryParams.value.receiveStatus
});
} else {
filterParams.push({
column: "receiveStatus",
action: "in",
value: "0"
})
});
}
//
if (this.queryParams.itemCode) {
//
if (queryParams.value.itemCode) {
filterParams.push({
column: "itemCode",
action: "like",
value: this.queryParams.itemCode
})
this.filterItemCode = this.queryParams.itemCode
}else {
if(this.filterItemCode){
value: queryParams.value.itemCode
});
filterItemCode.value = queryParams.value.itemCode;
} else if (filterItemCode.value) {
filterParams.push({
column: "itemCode",
action: "like",
value: this.filterItemCode
})
}
value: filterItemCode.value
});
}
return filterParams;
};
},
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
const getList = (type) => {
uni.showLoading({ title: "加载中­....", mask: true });
this.loadingType = "loading";
loadingType.value = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.recordList = [];
pageNo.value = 1;
recordList.value = [];
}
var queryFiltersParams = this.setQueryParam()
var params = {
const queryFiltersParams = setQueryParam();
const params = {
filters: queryFiltersParams,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
pageNo: pageNo.value,
pageSize: pageSize.value,
};
console.log("查询条件",JSON.stringify(params))
console.log("查询条件", JSON.stringify(params));
getCustomerReturnRecordList(params).then(res => {
getCustomerReturnRecordList(params).then((res) => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
updateTitle(this.title + "(" + this.totalCount + ")");
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
const list = res.data.list;
totalCount.value = res.data.total;
updateTitle(`${title.value} (${totalCount.value})`);
loadingType.value = "loadmore";
if (!list || list.length === 0) {
loadingType.value = "nomore";
return;
}
list.forEach(item=>{
item.packingNumber =item.toPackingNumber
})
this.recordList = type === "refresh" ? list : this.recordList.concat(list);
this.pageNo++;
}).catch(error => {
list.forEach((item) => {
item.packingNumber = item.toPackingNumber;
});
recordList.value = type === "refresh" ? list : [...recordList.value, ...list];
pageNo.value++;
}).catch((error) => {
if (type === "refresh") {
uni.stopPullDownRefresh();
}
this.loadingType = "";
updateTitle(this.title);
loadingType.value = "";
updateTitle(title.value);
uni.hideLoading();
that.showMessage(error)
})
},
showMessage(error);
});
};
openJobDetail(item, scanMessage = '') {
const openJobDetail = (item, scanMessage = '') => {
uni.navigateTo({
url: './recordListDetail?id=' + item.masterId + '&receiveStatus=' + item.receiveStatus +
'&scanMessage=' + scanMessage + '&title=' + this.title
url: `./recordListDetail?id=${item.masterId}&receiveStatus=${item.receiveStatus}&scanMessage=${scanMessage}&title=${title.value}`
});
this.scanMessage = ""
},
scanMessage.value = "";
};
showItemList(itemList) {
this.$refs.jobListPopup.openPopup(itemList);
},
const showItemList = (itemList) => {
jobListPopup.value.openPopup(itemList);
};
selectedItem(item) {
this.openJobDetail(item);
},
const selectedItem = (item) => {
openJobDetail(item);
};
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
const openjobInfoPopup = (item) => {
jobInfoPopup.value.openPopup(item);
};
showMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus()
const showMessage = (message) => {
if (scanPopup.value) {
scanPopup.value.packLoseFocus();
}
comMessage.value.showErrorMessage(message, (res) => {
if (res && scanPopup.value) {
scanPopup.value.packGetFocus();
}
});
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, this.scanMessage);
},
getScanResult(result) {
};
const openScanPopup = () => {
scanPopup.value.openScanPopup();
};
const selectItem = (item) => {
scanPopup.value.closeScanPopup();
openJobDetail(item, scanMessage.value);
};
const getScanResult = (result) => {
try {
this.scanMessage = ""
var filters = [{
column: "toPackingNumber",
action: "in",
value: result.package.number + "," + result.package.parentNumber
},
{
column: "receiveStatus",
action: "in",
value: '0'
},
{
column: "toBatch",
action: "==",
value: result.label.batch
},
{
column: "itemCode",
action: "==",
value: result.label.itemCode
},
]
scanMessage.value = "";
const filters = [
{ column: "toPackingNumber", action: "in", value: `${result.package.number},${result.package.parentNumber}` },
{ column: "receiveStatus", action: "in", value: '0' },
{ column: "toBatch", action: "==", value: result.label.batch },
{ column: "itemCode", action: "==", value: result.label.itemCode },
];
getCustomerReturnRecordList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
this.scanMessage = result.scanMessage
let resultList = res.data.list;
}).then((res) => {
scanMessage.value = result.scanMessage;
const resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
resultList.forEach((item) => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item => {
if (!list.find(subItem => subItem.title == item.title)) {
list.push(item)
item.selected = false;
});
const list = [];
resultList.forEach((item) => {
if (!list.find((subItem) => subItem.title === item.title)) {
list.push(item);
}
})
});
if (list.length > 1) {
this.$refs.recordList.openList(list)
recordListRef.value.openList(list);
} else {
this.selectItem(list[0])
selectItem(list[0]);
}
} else {
this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
showMessage(`未查找到任务\n扫描[${result.scanMessage}]`);
}
}).catch(error => {
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
}).catch((error) => {
showMessage(`${error}\n扫描[${result.scanMessage}]`);
});
} catch (e) {
this.showMessage(e.message)
showMessage(e.message);
}
},
};
getListByFilter(params) {
this.queryParams.creationTime=params.creationTime
this.queryParams.receiveStatus=params.receiveStatus
this.queryParams.itemCode=params.itemCode
this.getList('refresh')
},
const getListByFilter = (params) => {
queryParams.value.creationTime = params.creationTime;
queryParams.value.receiveStatus = params.receiveStatus;
queryParams.value.itemCode = params.itemCode;
getList('refresh');
};
}
}
</script>
<style scoped lang="scss">

475
src/pages/customerReturn/record/recordListDetail.vue

@ -37,11 +37,13 @@
style="background-color:ghostwhite; width: 100%; ">
<view class=" uni-flex uni-row">
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after"
@click="reject">拒绝</button>
@click="reject">拒绝
</button>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" style="width: 280rpx;" hover-class="btn_commit_after"
@click="receive" :disabled="receiveDisable">接收</button>
@click="receive" :disabled="receiveDisable">接收
</button>
</view>
</view>
</view>
@ -55,370 +57,345 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
import {
getCustomerReturnRecordDetail,
customerReturnRecordRefuse,
customerReturnRecordReceive,
} from '@/api/request2.js';
import {
} from '@/api/request2.js';
import {
goHome,
navigateBack,
getCurrDateTime,
getInventoryStatusName,
getSwitchInfoByCode
} from '@/common/basic.js';
import {
} from '@/common/basic.js';
import {
getDataSource,
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import receiveTop from '@/mycomponents/receive/receiveTop.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
components: {
winScanButton,
winScanPack,
comDetailCard,
detailInfoPopup,
receiveTop
},
data() {
return {
id: '',
scanCount: 0,
recordContent: {}, //
subList: [], //subList
detailSource: [], //
fromLocationCode: "",
toLocationCode: "",
isAllReceived: false,
receiveDisable: true //
};
},
onLoad(option) {
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import receiveTop from '@/mycomponents/receive/receiveTop.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import {ref} from 'vue';
import {
onLoad,
onBackPress,
onNavigationBarButtonTap
} from '@dcloudio/uni-app';
const id = ref(null);
const isAllReceived = ref(false);
const receiveDisable = ref(true);
const recordContent = ref(null);
const subList = ref([]);
const detailSource = ref([]);
const scanCount = ref(0);
const detailInfoPopup = ref(null);
const scanPopup = ref(null);
const comMessage = ref(null);
onLoad((option) => {
uni.setNavigationBarTitle({
title: option.title + '详情'
})
this.id = option.id;
if (this.id != undefined) {
//
if (option.receiveStatus == "0") {
this.getDetail();
});
id.value = option.id;
if (id.value !== undefined) {
//
if (option.receiveStatus === "0") {
getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {
});
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
});
onBackPress((e) => {
//
if (e.from === 'backbutton') {
uni.navigateBack();
return true;
}
},
});
mounted() {
},
methods: {
//
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getCustomerReturnRecordDetail(that.id).then(res => {
//
const getDetail = () => {
uni.showLoading({title: "加载中....", mask: true});
getCustomerReturnRecordDetail(id.value).then((res) => {
uni.hideLoading();
this.isAllReceived= false
this.receiveDisable = true
isAllReceived.value = false;
receiveDisable.value = true;
if (res.data == null) {
that.showMessage('未获取到详情');
showMessage('未获取到详情');
} else {
if (res.data.list.length > 0) {
that.recordContent = res.data.list[0];
that.subList = res.data.list;
that.subList.forEach(item => {
recordContent.value = res.data.list[0];
subList.value = res.data.list;
subList.value.forEach((item) => {
item.batch = item.toBatch;
item.packingNumber = item.toPackingNumber;
})
that.detailSource = getDataSource(that.subList)
});
detailSource.value = getDataSource(subList.value);
} else {
that.showMessage('列表数据为0');
showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
calcHandleQty() {
calcHandleQty(this.detailSource);
this.updateBtn()
this.continueScan()
this.$forceUpdate();
},
updateBtn() {
this.scanCount = getScanCount(this.subList);
//
if (this.scanCount == this.subList.length) {
this.receiveDisable = false;
}else {
this.receiveDisable = true;
}).catch((error) => {
uni.hideLoading();
showErrorMessage(error);
});
};
const calcHandleQty = () => {
calcHandleQty(detailSource.value);
updateBtn();
continueScan();
};
const updateBtn = () => {
scanCount.value = getScanCount(subList.value);
//
if (scanCount.value === subList.value.length) {
receiveDisable.value = false;
} else {
receiveDisable.value = true;
}
},
};
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
const continueScan = () => {
scanCount.value = getScanCount(subList.value);
if (scanCount.value === subList.value.length) {
closeScanPopup();
} else {
this.scanPopupGetFocus();
scanPopupGetFocus();
}
},
};
updateData() {
this.calcHandleQty();
this.updateBtn()
},
const updateData = () => {
calcHandleQty();
updateBtn();
};
openDetail(item) {
this.$refs.detailInfoPopup.openPopup(item)
},
const openDetail = (item) => {
detailInfoPopup.value.openPopup(item);
};
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
const openScanPopup = () => {
scanPopup.value.openScanPopup();
};
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
const closeScanPopup = () => {
scanPopup.value.closeScanPopup();
};
getScanResult(result) {
const getScanResult = (result) => {
try {
var itemCode = result.label.itemCode;
var packingNumber = result.package.number;
var batch = result.label.batch;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
const itemCode = result.label.itemCode;
const packingNumber = result.package.number;
const batch = result.label.batch;
const detail = detailSource.value.find((r) => r.itemCode === itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
if (detail === undefined) {
showErrorMessage(`物料号【${itemCode}】不在列表中`);
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
})
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中")
const itemDetail = detail.subList.find((r) => r.packingNumber === packingNumber && r.batch === batch);
if (itemDetail === undefined) {
showErrorMessage(`箱码[${packingNumber}]批次[${batch}]不在列表中`);
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
showErrorMessage(`箱码[${packingNumber}]批次[${batch}]已经扫描`);
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(itemDetail.qty)
this.calcHandleQty();
itemDetail.handleQty = Number(itemDetail.qty);
calcHandleQty();
}
}
}
} catch (e) {
this.showMessage(e.message)
showMessage(e.message);
}
},
reject() {
this.showQuestionMessage("是否拒绝接收?", res => {
};
const reject = () => {
showQuestionMessage("是否拒绝接收?", (res) => {
if (res) {
uni.showLoading({
title: "提交中....",
mask: true
});
customerReturnRecordRefuse(this.id).then(res=>{
uni.hideLoading()
if(res.data){
this.showCommitSuccessMessage("拒绝成功")
}else {
this.showErrorMessage("拒绝失败[" + res.msg + "]")
uni.showLoading({title: "提交中....", mask: true});
customerReturnRecordRefuse(id.value).then((res) => {
uni.hideLoading();
if (res.data) {
showCommitSuccessMessage("拒绝成功");
} else {
showErrorMessage(`拒绝失败[${res.msg}]`);
}
}).catch(error=>{
uni.hideLoading()
this.showErrorMessage(error)
})
}).catch((error) => {
uni.hideLoading();
showErrorMessage(error);
});
}
})
},
});
};
receive() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
const receive = () => {
scanCount.value = getScanCount(subList.value);
if (scanCount.value === 0) {
showErrorMessage("扫描数为0,请先扫描");
return;
}
if (this.scanCount < this.subList.length) {
this.showErrorMessage("还有未扫描的数据,请先扫描")
if (scanCount.value < subList.value.length) {
showErrorMessage("还有未扫描的数据,请先扫描");
return;
}
//
if (this.scanCount == this.subList.length) {
this.receiveSubmit();
//
if (scanCount.value === subList.value.length) {
receiveSubmit();
}
},
};
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
const showMessageHint = (hint, callback) => {
comMessage.value.showErrorMessage(hint, (res) => {
if (res) {
callback()
callback();
}
});
},
};
receiveSubmit() {
uni.showLoading({
title: "提交中....",
mask: true
});
customerReturnRecordReceive(this.id).then(res => {
uni.hideLoading()
const receiveSubmit = () => {
uni.showLoading({title: "提交中....", mask: true});
customerReturnRecordReceive(id.value).then((res) => {
uni.hideLoading();
if (res.data) {
this.showCommitSuccessMessage("接收成功")
showCommitSuccessMessage("接收成功");
} else {
this.showErrorMessage("接收失败[" + res.msg + "]")
showErrorMessage(`接收失败[${res.msg}]`);
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
}).catch((error) => {
uni.hideLoading();
showErrorMessage(error);
});
};
const showMessage = (message) => {
setTimeout(() => {
scanPopupLoseFocus();
comMessage.value.showMessage(message, (res) => {
if (res) {
this.afterCloseMessage()
afterCloseMessage();
}
});
})
},
});
};
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
const showErrorMessage = (message) => {
setTimeout(() => {
scanPopupLoseFocus();
comMessage.value.showErrorMessage(message, (res) => {
if (res) {
this.afterCloseMessage()
afterCloseMessage();
}
});
})
},
});
};
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage(message, res => {
const showQuestionMessage = (message, callback) => {
setTimeout(() => {
scanPopupLoseFocus();
comMessage.value.showQuestionMessage(message, (res) => {
if (res) {
callback(res);
}
});
})
},
});
};
scanPopupGetFocus() {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus();
const scanPopupGetFocus = () => {
if (scanPopup.value) {
scanPopup.value.getfocus();
}
},
};
scanPopupLoseFocus() {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
const scanPopupLoseFocus = () => {
if (scanPopup.value) {
scanPopup.value.losefocus();
}
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
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 => {
};
const afterCloseMessage = () => {
scanPopupGetFocus();
};
const showCommitSuccessMessage = (hint) => {
comMessage.value.showSuccessMessage(hint, (res) => {
navigateBack(1);
});
};
const switchChange = (isOn) => {
isAllReceived.value = isOn;
if (isAllReceived.value) {
detailSource.value.forEach((item) => {
item.subList.forEach((info) => {
info.scaned = true;
info.handleQty = Number(info.qty);
});
});
calcHandleQty();
} else {
comMessage.value.showQuestionMessage("是否要关闭整单收货?", (res) => {
if (res) {
this.getDetail()
getDetail();
} else {
this.isAllReceived=true
isAllReceived.value = true;
}
});
}
}
}
}
};
</script>
<style scoped lang="scss">
page {
page {
width: 100%;
height: 100%;
background-color: #fff;
}
}
.page-wraper {
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
}
.page-main {
.page-main {
flex: 1;
position: relative;
}
}
.page-main-scroll {
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}
.page-main-list {
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
}
</style>

67
src/pages/productPutaway/record/fgDirectPutaway.vue

@ -1,48 +1,41 @@
<template>
<template>
<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>
</template>
</template>
<script>
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'
<script setup>
import { ref } from 'vue';
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app';
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue';
export default {
components: {
productPutawayRecord
},
data() {
return {
title:''
};
},
onLoad(option){
this.title = option.title
},
const title = ref('');
const productPutawayRecordRef = ref(null);
onShow() {
if(this.$refs.productPutawayRecord!=undefined){
// this.$refs.productPutawayRecord.refresh();
}
},
onLoad((option) => {
title.value = option.title;
});
onPullDownRefresh() {
// this.$refs.productPutawayRecord.refresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productPutawayRecord.toHome();
} else if (e.index == 1) {
this.$refs.productPutawayRecord.openFilter();
onShow(() => {
if (productPutawayRecordRef.value) {
// productPutawayRecordRef.value.refresh();
}
},
methods: {
});
onPullDownRefresh(() => {
if (productPutawayRecordRef.value) {
// productPutawayRecordRef.value.refresh();
}
}
</script>
});
<style scoped lang="scss">
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
productPutawayRecordRef.value.toHome();
} else if (e.index === 1) {
productPutawayRecordRef.value.openFilter();
}
});
</script>
</style>
<style scoped lang="scss">
</style>

65
src/pages/productPutaway/record/semiDirectPutaway.vue

@ -1,48 +1,41 @@
<template>
<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>
</template>
</template>
<script>
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue'
<script setup lang="ts">
import { ref } from 'vue';
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app';
import productPutawayRecord from '@/pages/productPutaway/record/productPutawayRecord.vue';
export default {
components: {
productPutawayRecord
},
data() {
return {
title:''
};
},
onLoad(option){
this.title = option.title
},
const title = ref('');
const productPutawayRecordRef = ref(null);
onShow() {
if(this.$refs.productPutawayRecord!=undefined){
this.$refs.productPutawayRecord.refresh();
}
},
onLoad((option) => {
title.value = option.title;
});
onPullDownRefresh() {
this.$refs.productPutawayRecord.refresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productPutawayRecord.toHome();
} else if (e.index == 1) {
this.$refs.productPutawayRecord.openFilter();
onShow(() => {
if (productPutawayRecordRef.value) {
productPutawayRecordRef.value.refresh();
}
},
methods: {
});
onPullDownRefresh(() => {
if (productPutawayRecordRef.value) {
productPutawayRecordRef.value.refresh();
}
}
</script>
});
<style scoped lang="scss">
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
productPutawayRecordRef.value.toHome();
} else if (e.index === 1) {
productPutawayRecordRef.value.openFilter();
}
});
</script>
</style>
<style scoped lang="scss">
</style>

63
src/pages/productReceipt/record/semiDirectReceipt.vue

@ -1,48 +1,47 @@
<template>
<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>
</template>
<script>
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue'
<script setup>
import { ref } from 'vue';
import { onLoad, onShow, onPullDownRefresh, onNavigationBarButtonTap } from '@dcloudio/uni-app';
import productReceiptRecord from '@/pages/productReceipt/record/productReceiptRecord.vue';
export default {
components: {
productReceiptRecord
},
data() {
return {
title:''
};
},
onLoad(option){
this.title = option.title
},
//
const title = ref('');
const productReceiptRecordRef = ref(null);
onShow() {
if(this.$refs.productReceiptRecord!=undefined){
this.$refs.productReceiptRecord.refresh();
}
},
//
onLoad((option) => {
title.value = option.title;
});
onPullDownRefresh() {
this.$refs.productReceiptRecord.refresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productReceiptRecord.toHome();
} else if (e.index == 1) {
this.$refs.productReceiptRecord.openFilter();
//
onShow(() => {
if (productReceiptRecordRef.value) {
productReceiptRecordRef.value.refresh();
}
},
methods: {
});
//
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>
<style scoped lang="scss">
/* 样式部分保持不变 */
</style>
Loading…
Cancel
Save