|
|
@ -2,7 +2,7 @@ |
|
|
<div class="pda-container"> |
|
|
<div class="pda-container"> |
|
|
<!-- 头部栏 --> |
|
|
<!-- 头部栏 --> |
|
|
<div class="header-bar"> |
|
|
<div class="header-bar"> |
|
|
<div class="header-left" @click="$router.back()"> |
|
|
|
|
|
|
|
|
<div class="header-left" @click="handleBack"> |
|
|
<i class="el-icon-arrow-left"></i> |
|
|
<i class="el-icon-arrow-left"></i> |
|
|
<span>生产领料</span> |
|
|
<span>生产领料</span> |
|
|
</div> |
|
|
</div> |
|
|
@ -86,20 +86,22 @@ |
|
|
<div class="col-qty">标签数量</div> |
|
|
<div class="col-qty">标签数量</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
v-for="(label, index) in labelList" |
|
|
|
|
|
:key="label.id" |
|
|
|
|
|
class="list-item" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="col-no">{{ labelList.length - index }}</div> |
|
|
|
|
|
<div class="col-label">{{ label.labelCode }}</div> |
|
|
|
|
|
<div class="col-part">{{ label.locationId }}</div> |
|
|
|
|
|
<div class="col-qty">{{ label.quantity }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="list-body"> |
|
|
|
|
|
<div |
|
|
|
|
|
v-for="(label, index) in labelList" |
|
|
|
|
|
:key="label.id" |
|
|
|
|
|
class="list-item" |
|
|
|
|
|
> |
|
|
|
|
|
<div class="col-no">{{ labelList.length - index }}</div> |
|
|
|
|
|
<div class="col-label">{{ label.labelCode }}</div> |
|
|
|
|
|
<div class="col-part">{{ label.locationId }}</div> |
|
|
|
|
|
<div class="col-qty">{{ label.quantity }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 空状态 --> |
|
|
|
|
|
<div v-if="labelList.length === 0" class="empty-labels"> |
|
|
|
|
|
<p>暂无扫描标签</p> |
|
|
|
|
|
|
|
|
<!-- 空状态 --> |
|
|
|
|
|
<div v-if="labelList.length === 0" class="empty-labels"> |
|
|
|
|
|
<p>暂无扫描标签</p> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -281,10 +283,9 @@ export default { |
|
|
qty += label.quantity; |
|
|
qty += label.quantity; |
|
|
} |
|
|
} |
|
|
if (qty > this.outboundInfo.qtyToIssue) { |
|
|
if (qty > this.outboundInfo.qtyToIssue) { |
|
|
this.$message.warning('扫描标签总数量超过需求数量'); |
|
|
|
|
|
this.$confirm('取消后将清空已扫描的标签,确定取消吗?', '提示', { |
|
|
|
|
|
|
|
|
this.$confirm('扫描标签总数量超过需求数量确定出库吗?', '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '继续操作', |
|
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.confirmProductionPicking(); |
|
|
this.confirmProductionPicking(); |
|
|
@ -297,10 +298,12 @@ export default { |
|
|
confirmProductionPicking(){ |
|
|
confirmProductionPicking(){ |
|
|
const params = { |
|
|
const params = { |
|
|
site: localStorage.getItem('site'), |
|
|
site: localStorage.getItem('site'), |
|
|
|
|
|
notifyNo:this.outboundInfo.outboundNo, |
|
|
workOrderNo: this.outboundInfo.orderNo, |
|
|
workOrderNo: this.outboundInfo.orderNo, |
|
|
componentPartNo: this.outboundInfo.componentPartNo, |
|
|
componentPartNo: this.outboundInfo.componentPartNo, |
|
|
operatorName: localStorage.getItem('userName'), |
|
|
operatorName: localStorage.getItem('userName'), |
|
|
itemNo: this.outboundInfo.lineItemNo, |
|
|
|
|
|
|
|
|
itemNo: this.outboundInfo.itemNo, |
|
|
|
|
|
lineItemNo:this.outboundInfo.lineItemNo, |
|
|
releaseNo:this.outboundInfo.releaseNo, |
|
|
releaseNo:this.outboundInfo.releaseNo, |
|
|
sequenceNo:this.outboundInfo.sequenceNo, |
|
|
sequenceNo:this.outboundInfo.sequenceNo, |
|
|
selectedMaterials: this.labelList.map((l, i) => ({ |
|
|
selectedMaterials: this.labelList.map((l, i) => ({ |
|
|
@ -317,6 +320,15 @@ export default { |
|
|
confirmProductionPicking(params).then(({ data }) => { |
|
|
confirmProductionPicking(params).then(({ data }) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.$message.success('操作成功'); |
|
|
this.$message.success('操作成功'); |
|
|
|
|
|
// 设置标记,表示需要恢复productionPicking页面的状态 |
|
|
|
|
|
sessionStorage.setItem('productionPicking_shouldRestore', 'true'); |
|
|
|
|
|
// 保存本次扫描的数量和物料信息,用于更新已发数量 |
|
|
|
|
|
const issueInfo = { |
|
|
|
|
|
componentPartNo: this.outboundInfo.componentPartNo, |
|
|
|
|
|
lineItemNo: this.outboundInfo.lineItemNo, |
|
|
|
|
|
issueQty: this.totalScannedQty |
|
|
|
|
|
}; |
|
|
|
|
|
sessionStorage.setItem('productionPicking_issueInfo', JSON.stringify(issueInfo)); |
|
|
this.$router.back(); |
|
|
this.$router.back(); |
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(data.msg || '操作失败'); |
|
|
this.$message.error(data.msg || '操作失败'); |
|
|
@ -344,18 +356,29 @@ export default { |
|
|
if (this.labelList.length > 0) { |
|
|
if (this.labelList.length > 0) { |
|
|
this.$confirm('取消后将清空已扫描的标签,确定取消吗?', '提示', { |
|
|
this.$confirm('取消后将清空已扫描的标签,确定取消吗?', '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '继续操作', |
|
|
|
|
|
|
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
|
|
|
// 设置标记,表示需要恢复productionPicking页面的状态 |
|
|
|
|
|
sessionStorage.setItem('productionPicking_shouldRestore', 'true'); |
|
|
this.$router.back(); |
|
|
this.$router.back(); |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
// 用户选择继续操作 |
|
|
// 用户选择继续操作 |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
// 设置标记,表示需要恢复productionPicking页面的状态 |
|
|
|
|
|
sessionStorage.setItem('productionPicking_shouldRestore', 'true'); |
|
|
this.$router.back(); |
|
|
this.$router.back(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 处理返回操作(头部返回按钮) |
|
|
|
|
|
handleBack() { |
|
|
|
|
|
// 设置标记,表示需要恢复productionPicking页面的状态 |
|
|
|
|
|
sessionStorage.setItem('productionPicking_shouldRestore', 'true'); |
|
|
|
|
|
this.$router.back(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 显示物料清单弹窗 |
|
|
// 显示物料清单弹窗 |
|
|
showMaterialListDialog() { |
|
|
showMaterialListDialog() { |
|
|
this.showMaterialDialog = true; |
|
|
this.showMaterialDialog = true; |
|
|
@ -425,6 +448,7 @@ export default { |
|
|
this.outboundInfo.orderNo = this.$route.query.notifyInfo.orderNo |
|
|
this.outboundInfo.orderNo = this.$route.query.notifyInfo.orderNo |
|
|
this.outboundInfo.componentPartNo = this.$route.query.notifyInfo.componentPartNo |
|
|
this.outboundInfo.componentPartNo = this.$route.query.notifyInfo.componentPartNo |
|
|
this.outboundInfo.qtyToIssue = this.$route.query.notifyInfo.qtyToIssue |
|
|
this.outboundInfo.qtyToIssue = this.$route.query.notifyInfo.qtyToIssue |
|
|
|
|
|
this.outboundInfo.itemNo = this.$route.query.notifyInfo.itemNo |
|
|
this.outboundInfo.lineItemNo = this.$route.query.notifyInfo.lineItemNo |
|
|
this.outboundInfo.lineItemNo = this.$route.query.notifyInfo.lineItemNo |
|
|
this.outboundInfo.releaseNo = this.$route.query.notifyInfo.releaseNo |
|
|
this.outboundInfo.releaseNo = this.$route.query.notifyInfo.releaseNo |
|
|
this.outboundInfo.sequenceNo = this.$route.query.notifyInfo.sequenceNo |
|
|
this.outboundInfo.sequenceNo = this.$route.query.notifyInfo.sequenceNo |
|
|
@ -709,6 +733,9 @@ export default { |
|
|
margin: 0 16px 12px; |
|
|
margin: 0 16px 12px; |
|
|
border-radius: 0 0 8px 8px; |
|
|
border-radius: 0 0 8px 8px; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
max-height: calc(100vh - 320px); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-header { |
|
|
.list-header { |
|
|
@ -719,6 +746,13 @@ export default { |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
color: #666; |
|
|
color: #666; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.list-body { |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
min-height: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.list-item { |
|
|
.list-item { |
|
|
|