Browse Source

2026-01-29

pda采购入库增加关联单号和关联单行号
master
fengyuan_yang 1 month ago
parent
commit
f79f2c0ffc
  1. 8
      src/api/inbound.js
  2. 66
      src/views/modules/purchase-inbound/inboundStorage.vue
  3. 79
      src/views/modules/purchase-inbound/qualifiedStorage.vue

8
src/api/inbound.js

@ -46,4 +46,10 @@ export const getScannedLabelList = data => createAPI(`inbound/getScannedLabelLis
* 获取物料可用库存 * 获取物料可用库存
* @param {Object} data - 查询参数 {site, notifyNo, notifyType, orderNo, orderLineNo, partNo, warehouseId} * @param {Object} data - 查询参数 {site, notifyNo, notifyType, orderNo, orderLineNo, partNo, warehouseId}
*/ */
export const getInventoryStock = data => createAPI(`inbound/getInventoryStock`, 'post', data)
export const getInventoryStock = data => createAPI(`inbound/getInventoryStock`, 'post', data)
/**
* 获取采购入库通知单明细列表小卡片
* @param {Object} data - 查询参数 {site, buNo, orderNo}
*/
export const getInboundNotificationDetails = data => createAPI(`inbound/getInboundNotificationDetails`, 'post', data)

66
src/views/modules/purchase-inbound/inboundStorage.vue

@ -38,8 +38,18 @@
<!-- 物料信息卡片 --> <!-- 物料信息卡片 -->
<div class="material-info-card" v-if="materialInfo.inboundNo"> <div class="material-info-card" v-if="materialInfo.inboundNo">
<div class="card-title"> <div class="card-title">
<span class="title-label">入库单号</span>
<span class="title-value">{{ materialInfo.inboundNo }}</span>
<div class="title-item">
<span class="title-label">入库单号</span>
<span class="title-value">{{ materialInfo.inboundNo }}</span>
</div>
<div class="title-item">
<span class="title-label">关联单号</span>
<span class="title-value">{{ materialInfo.relatedOrderNo || '-' }}</span>
</div>
<div class="title-item">
<span class="title-label">行号</span>
<span class="title-value">{{ materialInfo.relatedOrderLineNo || '-' }}</span>
</div>
</div> </div>
<div class="card-details"> <div class="card-details">
@ -57,7 +67,7 @@
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">批次号</div> <div class="detail-label">批次号</div>
<div class="detail-value">{{ materialInfo.batchNo }}</div>
<div class="detail-value">{{ materialInfo.batchNo || '-' }}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">检验日期</div> <div class="detail-label">检验日期</div>
@ -279,6 +289,8 @@ export default {
labelList: [], labelList: [],
inboundNo: '', inboundNo: '',
partNo: '', partNo: '',
relatedOrderNo: '',
relatedOrderLineNo: '',
showLocationDialog: false, showLocationDialog: false,
locationCode: '', locationCode: '',
showMaterialDialog: false, showMaterialDialog: false,
@ -325,7 +337,9 @@ export default {
site: this.materialInfo.site, site: this.materialInfo.site,
buNo: this.materialInfo.buNo, buNo: this.materialInfo.buNo,
operationType: 'I', // I operationType: 'I', // I
warehouseId: getCurrentWarehouse() //
warehouseId: getCurrentWarehouse(), //
relatedOrderNo: this.relatedOrderNo,
relatedOrderLineNo: this.relatedOrderLineNo
}; };
validateLabelWithInbound(params).then(({ data }) => { validateLabelWithInbound(params).then(({ data }) => {
@ -350,7 +364,9 @@ export default {
site: this.materialInfo.site, site: this.materialInfo.site,
buNo: this.materialInfo.buNo, buNo: this.materialInfo.buNo,
operationType: 'D', // D operationType: 'D', // D
warehouseId: getCurrentWarehouse() //
warehouseId: getCurrentWarehouse(), //
relatedOrderNo: this.relatedOrderNo,
relatedOrderLineNo: this.relatedOrderLineNo
}; };
validateLabelWithInbound(params).then(({ data }) => { validateLabelWithInbound(params).then(({ data }) => {
@ -403,7 +419,9 @@ export default {
site: this.materialInfo.site, site: this.materialInfo.site,
buNo: this.materialInfo.buNo, buNo: this.materialInfo.buNo,
inboundNo: this.inboundNo, inboundNo: this.inboundNo,
locationCode: this.locationCode.trim()
locationCode: this.locationCode.trim(),
relatedOrderNo: this.relatedOrderNo,
relatedOrderLineNo: this.relatedOrderLineNo
}; };
confirmInboundStorage(params).then(({ data }) => { confirmInboundStorage(params).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -568,7 +586,9 @@ export default {
partNo: this.partNo, partNo: this.partNo,
buNo: this.buNo, buNo: this.buNo,
warehouseId: getCurrentWarehouse(), warehouseId: getCurrentWarehouse(),
site:localStorage.getItem('site'),
site: localStorage.getItem('site'),
relatedOrderNo: this.relatedOrderNo,
relatedOrderLineNo: this.relatedOrderLineNo
}; };
getInboundDetails(params).then(({ data }) => { getInboundDetails(params).then(({ data }) => {
@ -620,6 +640,10 @@ export default {
// //
this.inboundNo = this.$route.params.inboundNo; this.inboundNo = this.$route.params.inboundNo;
this.buNo = this.$route.params.buNo; this.buNo = this.$route.params.buNo;
this.relatedOrderNo = this.$route.params.relatedOrderNo || '';
this.relatedOrderLineNo = this.$route.params.relatedOrderLineNo || '';
this.partNo = this.$route.params.partNo || '';
if (!this.inboundNo || !this.buNo) { if (!this.inboundNo || !this.buNo) {
this.$message.error('参数错误'); this.$message.error('参数错误');
this.$router.back(); this.$router.back();
@ -806,23 +830,39 @@ export default {
/* 卡片标题 */ /* 卡片标题 */
.card-title { .card-title {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 16px; margin-bottom: 16px;
gap: 8px;
}
.title-item {
display: flex;
flex-direction: column;
flex: 1;
}
.title-item:first-child {
flex: 1.5;
} }
.title-label { .title-label {
font-size: 11px; font-size: 11px;
color: #999; color: #999;
display: block;
margin-bottom: 6px;
font-weight: normal;
margin-bottom: 4px;
white-space: nowrap;
} }
.title-value { .title-value {
font-size: 18px;
font-size: 13px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
line-height: 1.2;
margin-left: 20px;
word-break: break-all;
}
.title-item:first-child .title-value {
font-size: 15px;
} }
/* 卡片详情 */ /* 卡片详情 */

79
src/views/modules/purchase-inbound/qualifiedStorage.vue

@ -22,7 +22,7 @@
/> />
</div> </div>
<!-- 物料列表 -->
<!-- 入库单列表 -->
<div class="content-area"> <div class="content-area">
<div <div
v-for="(item, index) in qualifiedList" v-for="(item, index) in qualifiedList"
@ -31,8 +31,18 @@
@click="goToInboundPage(item)" @click="goToInboundPage(item)"
> >
<div class="card-title"> <div class="card-title">
<span class="title-label">入库单号</span>
<span class="title-value">{{ item.inboundNo }}</span>
<div class="title-item">
<span class="title-label">入库单号</span>
<span class="title-value">{{ item.inboundNo }}</span>
</div>
<div class="title-item">
<span class="title-label">关联单号</span>
<span class="title-value">{{ item.relatedOrderNo || '-' }}</span>
</div>
<div class="title-item">
<span class="title-label">行号</span>
<span class="title-value">{{ item.relatedOrderLineNo || '-' }}</span>
</div>
</div> </div>
<div class="card-details"> <div class="card-details">
@ -50,7 +60,7 @@
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">批次号</div> <div class="detail-label">批次号</div>
<div class="detail-value">{{ item.batchNo }}</div>
<div class="detail-value">{{ item.batchNo || '-' }}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">检验日期</div> <div class="detail-label">检验日期</div>
@ -168,7 +178,9 @@ export default {
name: 'inboundStorage', name: 'inboundStorage',
params: { params: {
buNo: item.buNo, buNo: item.buNo,
inboundNo: item.inboundNo
inboundNo: item.inboundNo,
relatedOrderNo: item.relatedOrderNo,
relatedOrderLineNo: item.relatedOrderLineNo
} }
}); });
} }
@ -234,35 +246,6 @@ export default {
background: white; background: white;
} }
.search-box {
position: relative;
display: flex;
align-items: center;
background: #f8f9fa;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 0 12px;
}
.search-icon {
color: #999;
font-size: 16px;
margin-right: 8px;
}
.search-box input {
flex: 1;
border: none;
background: transparent;
padding: 12px 0;
font-size: 14px;
outline: none;
}
.search-box input::placeholder {
color: #999;
}
/* 内容区域 */ /* 内容区域 */
.content-area { .content-area {
flex: 1; flex: 1;
@ -292,21 +275,39 @@ export default {
/* 卡片标题 */ /* 卡片标题 */
.card-title { .card-title {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 12px; margin-bottom: 12px;
gap: 8px;
}
.title-item {
display: flex;
flex-direction: column;
flex: 1;
}
.title-item:first-child {
flex: 1.5;
} }
.title-label { .title-label {
font-size: 12px;
color: #666;
display: block;
font-size: 11px;
color: #999;
margin-bottom: 4px; margin-bottom: 4px;
white-space: nowrap;
} }
.title-value { .title-value {
font-size: 16px;
font-size: 13px;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-left: 20px;
word-break: break-all;
}
.title-item:first-child .title-value {
font-size: 15px;
} }
/* 卡片详情 */ /* 卡片详情 */

Loading…
Cancel
Save