|
|
|
@ -26,9 +26,12 @@ |
|
|
|
<!-- 订单信息卡片 --> |
|
|
|
<div class="work-order-list" v-if="orderNo"> |
|
|
|
<div class="work-order-card"> |
|
|
|
<div class="card-title"> |
|
|
|
<span class="title-label">申请单号:{{ orderInfo.orderNo }} </span> |
|
|
|
<span class="title-label">本次: {{ totalScannedQty }}</span> |
|
|
|
<div class="card-title order-card-header"> |
|
|
|
<div class="order-card-left"> |
|
|
|
<span class="title-label">申请单号:{{ orderInfo.orderNo }}</span> |
|
|
|
<span class="title-label">本次: {{ totalScannedQty }}</span> |
|
|
|
</div> |
|
|
|
<span class="material-list-link" @click="showShipmentLineDialog">物料清单</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -193,6 +196,58 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- shipmentline 物料清单弹窗 --> |
|
|
|
<div v-if="showShipmentLineDialogVisible" class="summary-overlay"> |
|
|
|
<div class="summary-modal shipment-line-modal"> |
|
|
|
<div class="modal-header"> |
|
|
|
<span class="modal-title">物料清单</span> |
|
|
|
<i class="el-icon-close close-btn" @click="closeShipmentLineDialog"></i> |
|
|
|
</div> |
|
|
|
<div class="modal-body summary-body"> |
|
|
|
<div v-if="shipmentLineLoading" class="summary-loading"> |
|
|
|
正在获取物料清单,请稍候... |
|
|
|
</div> |
|
|
|
<template v-else> |
|
|
|
<div v-if="shipmentLineList.length === 0" class="summary-empty" style="padding: 40px 20px; text-align: center;"> |
|
|
|
暂无物料数据 |
|
|
|
</div> |
|
|
|
<div v-else class="summary-section"> |
|
|
|
<div class="section-title-row"> |
|
|
|
<div> |
|
|
|
<span class="section-title-text">Shipment Line</span> |
|
|
|
<span class="section-sub">申请单号 {{ orderNo }}</span> |
|
|
|
</div> |
|
|
|
<span class="section-count">共 {{ shipmentLineList.length }} 条</span> |
|
|
|
</div> |
|
|
|
<div class="summary-table shipment-line-table"> |
|
|
|
<div class="summary-table-row summary-table-head"> |
|
|
|
<div>行号</div> |
|
|
|
<div>物料号</div> |
|
|
|
<div>需求</div> |
|
|
|
<div>已分配</div> |
|
|
|
<div>待发</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-for="(item, index) in shipmentLineList" |
|
|
|
:key="'line-' + index + '-' + item.partNo" |
|
|
|
class="summary-table-row" |
|
|
|
> |
|
|
|
<div>{{ item.lineNo || '-' }}</div> |
|
|
|
<div class="part">{{ item.partNo || '-' }}</div> |
|
|
|
<div>{{ formatQty(item.inventoryQty) }}</div> |
|
|
|
<div>{{ formatQty(item.qtyAssigned) }}</div> |
|
|
|
<div class="highlight-qty">{{ formatQty(item.remainQty) }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<el-button class="btn-cancel" @click="closeShipmentLineDialog">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 编辑标签弹框 --> |
|
|
|
<div v-if="showEditDialog" class="edit-overlay"> |
|
|
|
<div class="edit-modal"> |
|
|
|
@ -364,6 +419,7 @@ export default { |
|
|
|
labelList: [], |
|
|
|
orderNo: '', |
|
|
|
orderType: '', |
|
|
|
site: '', |
|
|
|
isRemoveMode: false, // 默认为添加模式 |
|
|
|
partNo: '', // 物料编码 |
|
|
|
transactionId: '', // 关联单号 |
|
|
|
@ -410,6 +466,10 @@ export default { |
|
|
|
}, |
|
|
|
pendingIssueParams: null, |
|
|
|
shipmentLine: [], |
|
|
|
// shipmentline 物料清单弹窗 |
|
|
|
showShipmentLineDialogVisible: false, |
|
|
|
shipmentLineLoading: false, |
|
|
|
shipmentLineList: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -494,7 +554,7 @@ export default { |
|
|
|
const params = { |
|
|
|
scannedLabel: labelCode, |
|
|
|
workOrderNo: this.orderNo, |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
batchNo: this.batchNo, |
|
|
|
} |
|
|
|
// 检查是否已经扫描过 |
|
|
|
@ -522,7 +582,7 @@ export default { |
|
|
|
engChgLevel: labelInfo.engChgLevel || '1', |
|
|
|
detailId: labelInfo.detailId || '', |
|
|
|
unitId: labelInfo.unitId || '', |
|
|
|
site: labelInfo.site || localStorage.getItem('site'), |
|
|
|
site: labelInfo.site || this.site, |
|
|
|
height: labelInfo.height || null, |
|
|
|
}) |
|
|
|
|
|
|
|
@ -544,7 +604,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
let params = { |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
unitId: labelCode, |
|
|
|
detailId: exists.detailId, |
|
|
|
} |
|
|
|
@ -622,7 +682,7 @@ export default { |
|
|
|
const updateParams = { |
|
|
|
detailId: this.editForm.detailId, |
|
|
|
site: |
|
|
|
this.labelList[this.editIndex].site || localStorage.getItem('site'), |
|
|
|
this.labelList[this.editIndex].site || this.site, |
|
|
|
unitId: this.labelList[this.editIndex].unitId, |
|
|
|
locationId: this.editForm.locationId, |
|
|
|
qtyToIssue: Number(this.editForm.quantity), |
|
|
|
@ -687,7 +747,7 @@ export default { |
|
|
|
}, |
|
|
|
buildIssueParams() { |
|
|
|
return { |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
workOrderNo: this.orderNo, |
|
|
|
batchNo: this.batchNo, |
|
|
|
componentPartNo: this.partNo, |
|
|
|
@ -712,7 +772,7 @@ export default { |
|
|
|
async prepareComparisonData() { |
|
|
|
this.shipmentLine = [] |
|
|
|
const params = { |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
workOrderNo: this.orderNo, |
|
|
|
} |
|
|
|
await getCustomerIssueNotifyHeaderOrderMaterialList(params).then( |
|
|
|
@ -796,6 +856,53 @@ export default { |
|
|
|
this.showSummaryDialog = false |
|
|
|
this.pendingIssueParams = null |
|
|
|
}, |
|
|
|
// 查看 shipment 下 shipmentline 物料数量 |
|
|
|
showShipmentLineDialog() { |
|
|
|
this.showShipmentLineDialogVisible = true |
|
|
|
this.loadShipmentLineList() |
|
|
|
}, |
|
|
|
closeShipmentLineDialog() { |
|
|
|
this.showShipmentLineDialogVisible = false |
|
|
|
}, |
|
|
|
async loadShipmentLineList() { |
|
|
|
if (!this.site || !this.orderNo) { |
|
|
|
this.$message.error('缺少必要参数,无法获取物料清单') |
|
|
|
this.shipmentLineList = [] |
|
|
|
return |
|
|
|
} |
|
|
|
this.shipmentLineLoading = true |
|
|
|
try { |
|
|
|
const { data } = await getCustomerIssueNotifyHeaderOrderMaterialList({ |
|
|
|
site: this.site, |
|
|
|
workOrderNo: this.orderNo, |
|
|
|
}) |
|
|
|
if (!data || data.code !== 0) { |
|
|
|
this.$message.error((data && data.msg) || '获取物料清单失败') |
|
|
|
this.shipmentLineList = [] |
|
|
|
return |
|
|
|
} |
|
|
|
const materials = data.data || [] |
|
|
|
this.shipmentLineList = materials.map((item) => { |
|
|
|
const inventoryQty = |
|
|
|
Number(this.pickFieldValue(item, ['INVENTORY_QTY'], 0)) || 0 |
|
|
|
const qtyAssigned = |
|
|
|
Number(this.pickFieldValue(item, ['QTY_ASSIGNED'], 0)) || 0 |
|
|
|
return { |
|
|
|
lineNo: this.pickFieldValue(item, ['SHIPMENT_LINE_NO'], ''), |
|
|
|
partNo: this.pickFieldValue(item, ['INVENTORY_PART_NO'], ''), |
|
|
|
inventoryQty, |
|
|
|
qtyAssigned, |
|
|
|
remainQty: this.safeAdd(inventoryQty, -qtyAssigned), |
|
|
|
uom: this.pickFieldValue(item, ['INVENTORY_UOM'], ''), |
|
|
|
} |
|
|
|
}) |
|
|
|
} catch (error) { |
|
|
|
this.$message.error('获取物料清单失败') |
|
|
|
this.shipmentLineList = [] |
|
|
|
} finally { |
|
|
|
this.shipmentLineLoading = false |
|
|
|
} |
|
|
|
}, |
|
|
|
proceedIssueConfirm() { |
|
|
|
if (!this.pendingIssueParams) { |
|
|
|
this.pendingIssueParams = this.buildIssueParams() |
|
|
|
@ -864,7 +971,7 @@ export default { |
|
|
|
const printRequest = { |
|
|
|
userId: localStorage.getItem('userName'), |
|
|
|
username: localStorage.getItem('userName'), |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
unitIds: unitIds, |
|
|
|
labelType: printLabelType, |
|
|
|
} |
|
|
|
@ -916,7 +1023,7 @@ export default { |
|
|
|
let params = { |
|
|
|
shipmentId: this.orderNo, |
|
|
|
partNo: this.partNo, |
|
|
|
site: localStorage.getItem('site'), |
|
|
|
site: this.site, |
|
|
|
} |
|
|
|
this.labelList = [] |
|
|
|
getShipmentHuDetail(params) |
|
|
|
@ -1081,6 +1188,7 @@ export default { |
|
|
|
this.orderNo = this.$route.query.shipmentId |
|
|
|
this.state = this.$route.query.state |
|
|
|
this.orderType = this.$route.query.orderType |
|
|
|
this.site = this.$route.query.site || '' |
|
|
|
|
|
|
|
if (!this.orderNo) { |
|
|
|
this.$message.error('参数错误') |
|
|
|
@ -1246,6 +1354,36 @@ export default { |
|
|
|
margin-bottom: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.order-card-header { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: flex-start; |
|
|
|
margin-bottom: 0; |
|
|
|
gap: 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.order-card-left { |
|
|
|
flex: 1; |
|
|
|
min-width: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.order-card-left .title-label { |
|
|
|
margin-bottom: 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.order-card-left .title-label:last-child { |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.shipment-line-table .summary-table-row { |
|
|
|
grid-template-columns: 0.6fr 1.4fr 0.8fr 0.8fr 0.8fr; |
|
|
|
} |
|
|
|
|
|
|
|
.shipment-line-table .highlight-qty { |
|
|
|
color: #17b3a3; |
|
|
|
font-weight: 600; |
|
|
|
} |
|
|
|
|
|
|
|
.title-label { |
|
|
|
font-size: 11px; |
|
|
|
color: #999; |
|
|
|
|