|
|
|
@ -1,6 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="pda-container" v-loading.fullscreen.lock="fullscreenLoading"> |
|
|
|
<div class="pda-container" v-loading.fullscreen.lock="fullscreenLoading" |
|
|
|
element-loading-background="rgba(255, 255, 255, 0.3)" |
|
|
|
element-loading-spinner="el-icon-loading" |
|
|
|
:element-loading-text="loadingText"> |
|
|
|
<div class="status-bar"> |
|
|
|
<div class="goBack" @click="handleBack"><i class="el-icon-arrow-left"></i>上一页</div> |
|
|
|
<div class="goBack">登记到达</div> |
|
|
|
@ -156,7 +159,8 @@ export default { |
|
|
|
hanlingItem: { code: '', qty: '', perQty: '', packageQty: '' }, |
|
|
|
site:localStorage.getItem('site'), |
|
|
|
warehouseId:localStorage.getItem('selectedWarehouse'), |
|
|
|
fullscreenLoading: false // 控制全屏loading |
|
|
|
fullscreenLoading: false, // 控制全屏loading |
|
|
|
loadingText: '加载中...' // 动态loading文本 |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -194,6 +198,11 @@ export default { |
|
|
|
}, |
|
|
|
searchPoList() { |
|
|
|
if (!this.scanCode) return this.poList = []; |
|
|
|
|
|
|
|
// 开始搜索时显示loading |
|
|
|
this.loadingText = '搜索中...'; |
|
|
|
this.fullscreenLoading = true; |
|
|
|
|
|
|
|
getPoList({ poNumber: this.scanCode,site: this.site }).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.poList = data.rows |
|
|
|
@ -206,9 +215,18 @@ export default { |
|
|
|
this.$refs.scanCodeRef.blur(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}).catch(error => { |
|
|
|
console.error('搜索失败:', error); |
|
|
|
this.$message.error('搜索失败,请重试'); |
|
|
|
}).finally(() => { |
|
|
|
// 搜索完成后关闭loading |
|
|
|
this.fullscreenLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
async recvLine(row) { |
|
|
|
if (row.authorizationRequired=='TRUE') { |
|
|
|
return this.$message.warning("该采购订单需要审核,无法接收"); |
|
|
|
} |
|
|
|
if (row.receiveCaseDB!='INVDIR' && row.receiveCaseDB!='QAINV' && row.receiveCaseDB!='ARRINV') { |
|
|
|
return this.$message.warning("该采购订单行的收货方式为"+row.receiveCase+",无法接收"); |
|
|
|
} |
|
|
|
@ -323,6 +341,7 @@ export default { |
|
|
|
}, |
|
|
|
async receivePo() { |
|
|
|
if (this.fullscreenLoading) return; // 防止重复点 |
|
|
|
this.loadingText = '提交中...'; |
|
|
|
this.fullscreenLoading = true; |
|
|
|
const item = this.recvItem; |
|
|
|
if (!item.transQty || !item.locationNo || !item.batchNo) { |
|
|
|
@ -363,6 +382,8 @@ export default { |
|
|
|
deliveryDate: item.deliveryDate, |
|
|
|
arrivalDate: item.arrivalDate, |
|
|
|
supplierBatchNo: item.supplierBatchNo, |
|
|
|
samplePercent: item.samplePercent || 0, |
|
|
|
sampleQty: item.sampleQty || 0, |
|
|
|
// PO相关字段 |
|
|
|
poNo: item.poNumber || item.poNo, |
|
|
|
orderNo: item.orderNo, |
|
|
|
@ -491,4 +512,25 @@ export default { |
|
|
|
background: #17b3a3; |
|
|
|
color: white; |
|
|
|
} |
|
|
|
|
|
|
|
/* 自定义loading样式 */ |
|
|
|
.pda-container >>> .el-loading-mask { |
|
|
|
background-color: rgba(255, 255, 255, 0.3) !important; |
|
|
|
} |
|
|
|
|
|
|
|
.pda-container >>> .el-loading-spinner { |
|
|
|
margin-top: -25px; |
|
|
|
} |
|
|
|
|
|
|
|
.pda-container >>> .el-loading-spinner .circular { |
|
|
|
width: 35px; |
|
|
|
height: 35px; |
|
|
|
} |
|
|
|
|
|
|
|
.pda-container >>> .el-loading-text { |
|
|
|
color: #17b3a3 !important; |
|
|
|
font-size: 14px; |
|
|
|
font-weight: 500; |
|
|
|
margin-top: 10px; |
|
|
|
} |
|
|
|
</style> |