Browse Source

部分发料

master
shenzhouyu 2 months ago
parent
commit
40c9f84b1f
  1. 3
      src/api/production/production-return.js
  2. 420
      src/views/modules/production-issue/directIssueDetail.vue
  3. 786
      src/views/modules/production-issue/productionPickingDetail.vue
  4. 2
      src/views/modules/production-return/production.vue
  5. 10
      src/views/modules/production-return/productionReturnIssueList.vue
  6. 266
      src/views/modules/production-return/productionReturnPickingDetail.vue

3
src/api/production/production-return.js

@ -28,4 +28,5 @@ export const productionReturnUnissueConfirm = data => createAPI(`/pda/production
export const printLabelInfo = data => createAPI('/label/setting/printLabel','post',data)
// 打印标签
export const printLabelCommon = data => createAPI('/label/setting/printLabelCommon','post',data)
export const printLabelCommon = data => createAPI('/label/setting/printLabelCommon','post',data)
export const createNewReturnHandlingUnits = data => createAPI(`/pda/production/return/createNewReturnHandlingUnits`,'post',data)

420
src/views/modules/production-issue/directIssueDetail.vue

@ -23,64 +23,78 @@
</div>
</div>
<!-- 工单物料信息 -->
<div class="work-order-list" v-if="workOrderNo && componentPartNo">
<div class="work-order-card">
<div class="card-title">
<span class="title-label">工单号{{ workOrderNo }}&nbsp;&nbsp;行号{{itemNo}}</span>
</div>
<!-- 是否部分勾选框 -->
<div class="partial-checkbox-container">
<el-checkbox v-model="isPartial" :disabled="scannedLabels.length > 0">是否部分领料</el-checkbox>
</div>
<!-- 物料描述单独一行 -->
<div class="part-desc-row">
<span class="desc-text">物料编码{{ componentPartNo }}</span>
</div>
<div class="part-desc-row">
<span class="desc-text">物料名称{{ componentPartDesc }}</span>
</div>
<!-- 统一滚动容器 -->
<div class="scrollable-content">
<!-- 工单物料信息 -->
<div class="work-order-list" v-if="workOrderNo && componentPartNo">
<div class="work-order-card">
<div class="card-title">
<span class="title-label">工单号{{ workOrderNo }}&nbsp;&nbsp;行号{{itemNo}}</span>
</div>
<div class="card-details">
<div class="detail-item">
<div class="detail-label">需求数量</div>
<div class="detail-value">{{ requiredQty }}</div>
<!-- 物料描述单独一行 -->
<div class="part-desc-row">
<span class="desc-text">物料编码{{ componentPartNo }}</span>
</div>
<div class="detail-item">
<div class="detail-label">已发数量</div>
<div class="detail-value">{{ issuedQty }}</div>
<div class="part-desc-row">
<span class="desc-text">物料名称{{ componentPartDesc }}</span>
</div>
<div class="detail-item">
<div class="detail-label">本次</div>
<div class="detail-value">{{ totalScannedQty }}</div>
<div class="card-details">
<div class="detail-item">
<div class="detail-label">需求数量</div>
<div class="detail-value">{{ requiredQty }}</div>
</div>
<div class="detail-item">
<div class="detail-label">已发数量</div>
<div class="detail-value">{{ issuedQty }}</div>
</div>
<div class="detail-item">
<div class="detail-label">本次</div>
<div class="detail-value">{{ totalScannedQty }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="section-title">
<div class="title-left">
<i class="el-icon-circle-check"></i>
<span>出库信息确认</span>
</div>
</div>
<!-- 标签列表 -->
<div class="label-list">
<div class="list-header">
<div class="col-no">NO.</div>
<div class="col-label">标签条码</div>
<div class="col-batch">库位</div>
<div class="col-batch">批次号</div>
<div class="col-qty">数量</div>
<div class="section-title">
<div class="title-left">
<i class="el-icon-circle-check"></i>
<span>出库信息确认</span>
</div>
</div>
<div class="list-body">
<div v-for="(label, index) in scannedLabels" :key="label.id" class="list-item">
<div class="col-no">{{ index+1 }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-batch">{{label.locationId}}</div>
<div class="col-batch">{{ label.batchNo }}</div>
<div class="col-qty">{{ label.quantity }}</div>
<!-- 标签列表 -->
<div class="label-list">
<div class="list-header">
<div class="col-no">NO.</div>
<div class="col-label">标签条码</div>
<div class="col-batch">库位</div>
<div class="col-batch">批次号</div>
<div v-if="isPartial" class="col-qty">剩余高</div>
<div class="col-qty">数量</div>
</div>
<div v-if="scannedLabels.length === 0" class="empty-labels">
<p>暂无扫描标签</p>
<div class="list-body">
<div v-for="(label, index) in scannedLabels" :key="label.id" class="list-item"
:class="{ 'clickable': isPartial }" @click="isPartial ? handleLabelClick(label, index) : null">
<div class="col-no">{{ index+1 }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-batch">{{label.locationId}}</div>
<div class="col-batch">{{ label.batchNo }}</div>
<div v-if="isPartial" class="col-qty">{{ label.height.toFixed(3) }}</div>
<div class="col-qty">
<span class="quantity-display">{{ label.quantity }}</span>
<i v-if="isPartial" class="el-icon-edit edit-icon"></i>
</div>
</div>
<div v-if="scannedLabels.length === 0" class="empty-labels">
<p>暂无扫描标签</p>
</div>
</div>
</div>
</div>
@ -97,6 +111,47 @@
取消
</button>
</div>
<!-- 修改数量弹框 -->
<div v-if="quantityDialogVisible" class="edit-overlay" @click.self="quantityDialogVisible = false">
<div class="edit-modal">
<div class="modal-header">
<span class="modal-title">修改数量</span>
<i class="el-icon-close close-btn" @click="quantityDialogVisible = false"></i>
</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">标签条码</label>
<el-input v-model="currentEditLabel.labelCode" disabled class="form-input" />
</div>
<div class="form-group">
<label class="form-label">当前数量</label>
<el-input v-model="currentEditLabel.quantity" disabled class="form-input" />
</div>
<div class="form-group">
<label class="form-label">剩余高度(mm) <span class="required">*</span></label>
<el-input-number v-model="editHeight" :min="0.001" :precision="3" :step="0.001" class="form-input"
style="width: 100%;" :controls="false">
</el-input-number>
</div>
<div class="form-group">
<label class="form-label">修改数量 <span class="required">*</span></label>
<el-input-number v-model="editQuantity" :min="0.0001" :precision="4" :step="0.0001" class="form-input"
style="width: 100%;" :controls="false">
</el-input-number>
</div>
</div>
<div class="modal-footer">
<button class="btn-cancel" @click="quantityDialogVisible = false">取消</button>
<button class="btn-confirm" @click="confirmQuantityChange">确定</button>
</div>
</div>
</div>
</div>
</template>
@ -113,6 +168,7 @@ export default {
return {
scanCode: '',
isRemoveMode: false,
isPartial: false,
scannedLabels: [],
workOrderNo: '',
componentPartNo: '',
@ -121,12 +177,19 @@ export default {
issuedQty: 0,
itemNo: '',
loading: false,
issueInfo:{}
issueInfo: {},
quantityDialogVisible: false,
currentEditLabel: {},
currentEditIndex: -1,
editQuantity: 0,
editHeight: 0,
}
},
computed: {
totalScannedQty() {
return this.scannedLabels.reduce((sum, l) => sum + (l.quantity || 0), 0)
const total = this.scannedLabels.reduce((sum, l) => sum + (l.quantity || 0), 0)
// 4
return Math.round(total * 10000) / 10000
},
},
methods: {
@ -163,7 +226,7 @@ export default {
this.$message.error('标签物料编码与选择的材料不匹配')
return
} */
this.scannedLabels.push({
const newLabel = {
id: Date.now(),
labelCode,
componentPartNo: data.labelInfo.partNo,
@ -171,12 +234,22 @@ export default {
batchNo: data.labelInfo.batchNo,
warehouseId: data.labelInfo.warehouseId,
locationId: data.labelInfo.locationId,
height: data.labelInfo.height || 0,
wdrNo: data.labelInfo.wdrNo,
engChgLevel: data.labelInfo.engChgLevel,
})
console.log(this.scannedLabels);
}
this.scannedLabels.push(newLabel)
console.log(this.scannedLabels)
this.$message.success('扫描成功')
// ""
if (this.isPartial) {
const newIndex = this.scannedLabels.length - 1
this.$nextTick(() => {
this.handleLabelClick(newLabel, newIndex)
})
}
} else {
this.$message.error(data.msg || '标签验证失败')
}
@ -223,7 +296,6 @@ export default {
this.$message.warning('请先扫描材料标签')
return
}
const params = {
site: localStorage.getItem('site'),
@ -231,8 +303,9 @@ export default {
componentPartNo: this.componentPartNo,
operatorName: localStorage.getItem('userName'),
itemNo: this.itemNo,
releaseNo:this.issueInfo.releaseNo,
sequenceNo:this.issueInfo.sequenceNo,
releaseNo: this.issueInfo.releaseNo,
sequenceNo: this.issueInfo.sequenceNo,
isPartial: this.isPartial,
selectedMaterials: this.scannedLabels.map((l, i) => ({
labelCode: l.labelCode,
issueQty: l.quantity,
@ -241,6 +314,7 @@ export default {
locationId: l.locationId,
materialCode: l.materialCode,
wdrNo: l.wdrNo,
height: l.height,
engChgLevel: l.engChgLevel,
})),
}
@ -259,7 +333,8 @@ export default {
})
.catch(() => {
this.$message.error('发料失败')
}).finally(()=>{
})
.finally(() => {
this.loading = false
})
},
@ -275,7 +350,7 @@ export default {
sequenceNo: this.$route.query.sequenceNo,
requiredQty: Number(this.$route.query.requiredQty || 0),
issuedQty: Number(this.$route.query.issuedQty || 0),
partDesc: this.$route.query.partDesc || ''
partDesc: this.$route.query.partDesc || '',
}
/* if (!this.workOrderNo || !this.materialCode) {
@ -289,6 +364,35 @@ export default {
sessionStorage.setItem('directIssue_shouldRestore', 'true')
this.$router.back()
},
//
handleLabelClick(label, index) {
if (!this.isPartial) return
this.currentEditLabel = { ...label }
this.currentEditIndex = index
this.editHeight = label.height
this.editQuantity = label.quantity
this.quantityDialogVisible = true
},
//
confirmQuantityChange() {
if (this.editHeight < 0) {
this.$message.warning('高度不能小于0')
return
}
if (this.editQuantity <= 0) {
this.$message.warning('数量必须大于0')
return
}
if (
this.currentEditIndex >= 0 &&
this.currentEditIndex < this.scannedLabels.length
) {
this.scannedLabels[this.currentEditIndex].quantity = this.editQuantity
this.scannedLabels[this.currentEditIndex].height = this.editHeight
this.$message.success('数量修改成功')
this.quantityDialogVisible = false
}
},
},
mounted() {
this.initFromRoute()
@ -364,6 +468,17 @@ export default {
.custom-switch {
transform: scale(1.3);
}
.partial-checkbox-container {
padding: 8px 16px;
background: white;
border-top: 1px solid #f0f0f0;
display: flex;
align-items: center;
}
.partial-checkbox-container ::v-deep .el-checkbox__label {
font-size: 14px;
color: #333;
}
.switch-text {
position: absolute;
left: 25%;
@ -410,9 +525,15 @@ export default {
width: 60px;
height: 28px;
}
/* 统一滚动容器 */
.scrollable-content {
flex: 1;
overflow-y: auto;
min-height: 0;
}
/* 工单列表 */
.work-order-list {
overflow-y: auto;
padding: 12px 16px;
}
@ -420,7 +541,6 @@ export default {
.work-order-card {
background: white;
border-radius: 8px;
margin-bottom: 12px;
padding: 16px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
cursor: pointer;
@ -467,7 +587,7 @@ export default {
justify-content: space-between;
padding: 6px 8px;
background: white;
margin: 0 16px;
margin: 0 8px;
margin-top: 4px;
border-radius: 8px 8px 0 0;
border-bottom: 2px solid #17b3a3;
@ -522,7 +642,6 @@ export default {
overflow: hidden;
display: flex;
flex-direction: column;
max-height: calc(100vh - 320px);
}
.list-header {
display: flex;
@ -535,7 +654,6 @@ export default {
flex-shrink: 0;
}
.list-body {
overflow-y: auto;
flex: 1;
min-height: 0;
}
@ -547,12 +665,22 @@ export default {
color: #333;
align-items: flex-start;
min-height: 40px;
transition: background-color 0.2s;
}
.list-item:last-child {
border-bottom: none;
}
.list-item.clickable {
cursor: pointer;
}
.list-item.clickable:hover {
background-color: #f5f5f5;
}
.list-item.clickable:active {
background-color: #e8e8e8;
}
.col-no {
width: 20px;
width: 10px;
text-align: center;
}
.col-label {
@ -567,6 +695,7 @@ export default {
text-align: center;
}
.col-qty {
flex: 0.6;
width: 60px;
text-align: center;
}
@ -600,6 +729,165 @@ export default {
.action-btn:active {
transform: scale(0.98);
}
/* 编辑弹框样式 */
.edit-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.edit-modal {
background: white;
border-radius: 12px;
width: 100%;
max-width: 400px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
overflow: hidden;
display: flex;
flex-direction: column;
}
.edit-modal .modal-header {
background: #17b3a3;
color: white;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.edit-modal .modal-title {
font-size: 16px;
font-weight: 500;
margin: 0;
}
.edit-modal .close-btn {
font-size: 16px;
cursor: pointer;
color: white;
transition: color 0.2s ease;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
}
.edit-modal .close-btn:hover {
color: #e0e0e0;
}
.edit-modal .modal-body {
padding: 20px;
}
.edit-modal .form-group {
margin-bottom: 16px;
}
.edit-modal .form-group:last-child {
margin-bottom: 0;
}
.edit-modal .form-label {
display: block;
font-size: 14px;
color: #333;
margin-bottom: 6px;
font-weight: 500;
}
.edit-modal .required {
color: #ff4949;
}
.edit-modal .form-input {
width: 100%;
}
.edit-modal .form-input ::v-deep .el-input__inner {
height: 40px;
border: 2px solid #dcdfe6;
border-radius: 6px;
font-size: 14px;
padding: 0 12px;
}
.edit-modal .form-input ::v-deep .el-input__inner:focus {
border-color: #17b3a3;
outline: none;
}
.edit-modal .form-input ::v-deep .el-input__inner:disabled {
background: #f5f7fa;
color: #c0c4cc;
border-color: #e4e7ed;
}
.edit-modal .form-input ::v-deep .el-input-number {
width: 100%;
}
.edit-modal .form-input ::v-deep .el-input-number .el-input__inner {
height: 40px;
border: 2px solid #dcdfe6;
border-radius: 6px;
font-size: 14px;
padding: 0 12px;
}
.edit-modal .form-input ::v-deep .el-input-number .el-input__inner:focus {
border-color: #17b3a3;
outline: none;
}
.edit-modal .modal-footer {
padding: 16px 20px;
display: flex;
gap: 12px;
justify-content: flex-end;
border-top: 1px solid #f0f0f0;
}
.edit-modal .btn-cancel {
padding: 10px 20px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
border: 1px solid #dcdfe6;
background: white;
color: #606266;
}
.edit-modal .btn-cancel:hover {
background: #f5f7fa;
border-color: #c0c4cc;
}
.edit-modal .btn-confirm {
padding: 10px 20px;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
border: 1px solid #17b3a3;
background: #17b3a3;
color: white;
}
.edit-modal .btn-confirm:hover {
background: #13998c;
border-color: #13998c;
}
@media (max-width: 360px) {
.header-bar {
padding: 8px 12px;
@ -623,7 +911,7 @@ export default {
min-width: 50px;
}
.label-list {
margin: 0 12px 8px;
margin: 0 8px 8px;
}
}
</style>

786
src/views/modules/production-issue/productionPickingDetail.vue
File diff suppressed because it is too large
View File

2
src/views/modules/production-return/production.vue

@ -33,8 +33,6 @@ export default {
buttons: [
{ icon: 'scan', label: '直接退料', iconClass: 'direct', to: 'productionReturnPicking', disabled: false },
{ icon: 'records', label: '申请单退料', iconClass: 'request', to: 'productionReturnPDA', disabled: false },
{ icon: 'logistics', label: '移库退料', iconClass: 'move', to: 'productionReturnPicking', disabled: true },
{ icon: 'revoke', label: '退料撤销', iconClass: 'cancel', to: 'productionReturnPicking', disabled: true },
]
}
},

10
src/views/modules/production-return/productionReturnIssueList.vue

@ -45,12 +45,12 @@
<div class="detail-value">{{ item.QUANTITY }}</div>
</div>
<div class="detail-item">
<div class="detail-label">撤销数量</div>
<div class="detail-label">已退数量</div>
<div class="detail-value">{{ item.QTY_REVERSED || 0 }}</div>
</div>
<div class="detail-item">
<div class="detail-label">单位</div>
<div class="detail-value">{{ item.uom || '个' }}</div>
<div class="detail-label">WDR号</div>
<div class="detail-value">{{ item.WAIV_DEV_REJ_NO }}</div>
</div>
</div>
</div>
@ -135,6 +135,7 @@ export default {
componentPartDesc: this.componentPartDesc,
releaseNo: this.releaseNo,
sequenceNo: this.sequenceNo,
wdrNo: item.WAIV_DEV_REJ_NO ,
},
});
},
@ -154,6 +155,9 @@ export default {
</script>
<style scoped>
.search-container {
margin-bottom: 10px;
}
.pda-container { width: 100vw; height: 100vh; display: flex; flex-direction: column; background: #f5f5f5; }
.header-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: #17B3A3; color: white; height: 40px; min-height: 40px; }
.header-left { display: flex; align-items: center; cursor: pointer; font-size: 16px; font-weight: 500; }

266
src/views/modules/production-return/productionReturnPickingDetail.vue

@ -21,73 +21,75 @@
</div>
</div>
<!-- 订单信息卡片对齐直接领料明细样式 -->
<div class="work-order-list" v-if="orderNo">
<div class="work-order-card">
<div class="card-title">
<span class="title-label">工单号{{ orderNo }}</span>
</div>
<!-- 关联信息单独一行 -->
<div class="part-desc-row">
<span class="desc-text">领料号 {{orderInfo.transactionId}}</span>
</div>
<div class="part-desc-row">
<span class="desc-text">{{ componentPartNo }}</span>
</div>
<div class="part-desc-row">
<span class="desc-text">{{ orderInfo.componentPartDesc }}</span>
</div>
<div class="scrollable-content">
<!-- 订单信息卡片对齐直接领料明细样式 -->
<div class="work-order-list" v-if="orderNo">
<div class="work-order-card">
<div class="card-title">
<span class="title-label">工单号{{ orderNo }}</span>
</div>
<div class="card-details">
<div class="detail-item">
<div class="detail-label">领料数量</div>
<div class="detail-value">{{ orderInfo.quantity }}</div>
<!-- 关联信息单独一行 -->
<div class="part-desc-row">
<span class="desc-text">领料号 {{orderInfo.transactionId}}</span>
</div>
<div class="detail-item">
<div class="detail-label">已退数量</div>
<div class="detail-value">{{ orderInfo.qtyReversed }}</div>
<div class="part-desc-row">
<span class="desc-text">{{ componentPartNo }}</span>
</div>
<div class="detail-item">
<div class="detail-label">本次</div>
<div class="detail-value">{{ totalScannedQty }}</div>
<div class="part-desc-row">
<span class="desc-text">{{ orderInfo.componentPartDesc }}</span>
</div>
<div class="card-details">
<div class="detail-item">
<div class="detail-label">领料数量</div>
<div class="detail-value">{{ orderInfo.quantity }}</div>
</div>
<div class="detail-item">
<div class="detail-label">已退数量</div>
<div class="detail-value">{{ orderInfo.qtyReversed }}</div>
</div>
<div class="detail-item">
<div class="detail-label">本次</div>
<div class="detail-value">{{ totalScannedQty }}</div>
</div>
</div>
</div>
</div>
</div>
<!-- 退料信息确认标题 -->
<div class="section-title">
<div class="title-left">
<i class="el-icon-circle-check"></i>
<span>退料信息确认</span>
<!-- 退料信息确认标题 -->
<div class="section-title">
<div class="title-left">
<i class="el-icon-circle-check"></i>
<span>退料信息确认</span>
</div>
</div>
</div>
<!-- 退料标签列表 -->
<div class="label-list">
<div class="list-header">
<div class="col-no">NO.</div>
<div class="col-label">标签条码</div>
<div class="col-part">物料编码</div>
<div class="col-qty">高度</div>
<div class="col-qty">标签数量</div>
</div>
<!-- 退料标签列表 -->
<div class="label-list">
<div class="list-header">
<div class="col-no">NO.</div>
<div class="col-label">标签条码</div>
<div class="col-part">物料编码</div>
<div class="col-qty">高度</div>
<div class="col-qty">标签数量</div>
</div>
<div v-for="(label, index) in labelList" :key="index" class="list-item">
<div class="col-no">{{ index+1 }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-part">{{ label.partNo }}</div>
<div class="col-batch">{{ label.height }}</div>
<div class="col-qty" @click="openEditDialog(label, index)">
<span class="quantity-display">{{ label.quantity }}</span>
<i class="el-icon-edit edit-icon"></i>
<div v-for="(label, index) in labelList" :key="index" class="list-item">
<div class="col-no">{{ index+1 }}</div>
<div class="col-label">{{ label.labelCode }}</div>
<div class="col-part">{{ label.partNo }}</div>
<div class="col-batch">{{ label.height }}</div>
<div class="col-qty" @click="openEditDialog(label, index)">
<span class="quantity-display">{{ label.quantity }}</span>
<i class="el-icon-edit edit-icon"></i>
</div>
</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>
@ -123,15 +125,15 @@
<div class="form-group">
<label class="form-label">库位 <span class="required">*</span></label>
<el-input v-model="editForm.locationId" placeholder="请输入库位" class="form-input" />
<el-input v-model="editForm.locationId" placeholder="请输入库位" class="form-input" clearable/>
</div>
<div class="form-group">
<label class="form-label">高度(单位毫米)</label>
<el-input v-model="editForm.height" type="number" :min="0" placeholder="请输入高度(单位毫米)" class="form-input" />
<el-input v-model="editForm.height" type="number" :min="0" placeholder="请输入高度(单位毫米)" class="form-input" clearable/>
</div>
<div class="form-group">
<label class="form-label">标签数量 <span class="required">*</span></label>
<el-input v-model="editForm.quantity" type="number" :min="0" placeholder="请输入标签数量" class="form-input" />
<el-input v-model="editForm.quantity" type="number" :min="0" placeholder="请输入标签数量" class="form-input" clearable/>
</div>
</div>
@ -245,6 +247,7 @@ export default {
loading: false,
releaseNo: '',
sequenceNo: '',
wdrNo: '',
}
},
computed: {
@ -273,6 +276,114 @@ export default {
this.scanCode = ''
},
goManualPrint() {
this.saveStateForManualPrint()
this.$router.push({
name: 'productionReturnManualPrint',
query: {
orderNo: this.orderNo,
orderType: this.orderType,
componentPartNo: this.componentPartNo,
transactionId: this.transactionId,
accountingId: this.accountingId,
quantity: this.quantity,
qtyReversed: this.qtyReversed,
batchNo: this.batchNo,
lineItemNo: this.lineItemNo,
componentPartDesc: this.componentPartDesc,
releaseNo: this.releaseNo,
sequenceNo: this.sequenceNo,
wdrNo: this.wdrNo,
},
})
},
saveStateForManualPrint() {
const state = {
scanCode: this.scanCode,
orderInfo: this.orderInfo,
labelList: this.labelList,
orderNo: this.orderNo,
orderType: this.orderType,
showMaterialDialog: this.showMaterialDialog,
materialList: this.materialList,
materialListLoading: this.materialListLoading,
isRemoveMode: this.isRemoveMode,
returnReason: this.returnReason,
showEditDialog: this.showEditDialog,
editForm: this.editForm,
editIndex: this.editIndex,
loading: this.loading,
transactionId: this.transactionId,
componentPartNo: this.componentPartNo,
accountingId: this.accountingId,
quantity: this.quantity,
qtyReversed: this.qtyReversed,
batchNo: this.batchNo,
lineItemNo: this.lineItemNo,
componentPartDesc: this.componentPartDesc,
releaseNo: this.releaseNo,
sequenceNo: this.sequenceNo,
}
sessionStorage.setItem(
'productionReturnPickingDetail_state_manual',
JSON.stringify(state)
)
sessionStorage.setItem(
'productionReturnPickingDetail_shouldRestore',
'true'
)
},
restoreStateFromManual() {
try {
const shouldRestore = sessionStorage.getItem(
'productionReturnPickingDetail_shouldRestore'
)
const savedState = sessionStorage.getItem(
'productionReturnPickingDetail_state_manual'
)
if (shouldRestore === 'true' && savedState) {
const state = JSON.parse(savedState)
this.scanCode = state.scanCode || ''
this.orderInfo = state.orderInfo || {}
this.labelList = state.labelList || []
this.orderNo = state.orderNo || this.orderNo
this.orderType = state.orderType || this.orderType
this.showMaterialDialog = state.showMaterialDialog || false
this.materialList = state.materialList || []
this.materialListLoading = state.materialListLoading || false
this.isRemoveMode = state.isRemoveMode || false
this.returnReason = state.returnReason || ''
this.showEditDialog = false
this.editForm = state.editForm || this.editForm
this.editIndex =
typeof state.editIndex === 'number' ? state.editIndex : -1
this.loading = state.loading || false
this.transactionId = state.transactionId || this.transactionId
this.componentPartNo = state.componentPartNo || this.componentPartNo
this.accountingId = state.accountingId || this.accountingId
this.quantity = state.quantity || this.quantity
this.qtyReversed = state.qtyReversed || this.qtyReversed
this.batchNo = state.batchNo || this.batchNo
this.lineItemNo = state.lineItemNo || this.lineItemNo
this.componentPartDesc =
state.componentPartDesc || this.componentPartDesc
this.releaseNo = state.releaseNo || this.releaseNo
this.sequenceNo = state.sequenceNo || this.sequenceNo
}
} catch (error) {
console.warn('恢复生产退料手动页面状态失败', error)
} finally {
sessionStorage.removeItem(
'productionReturnPickingDetail_shouldRestore'
)
sessionStorage.removeItem(
'productionReturnPickingDetail_state_manual'
)
}
},
// 退
validateAndAddLabel(labelCode) {
const params = {
@ -435,11 +546,11 @@ export default {
this.$router.back()
this.loading = false
} else {
this.$message.error(data.message || '操作失败')
this.$message.error(data.msg || '操作失败')
}
})
.catch(() => {
this.$message.error('操作失败')
this.$message.error(data.msg ||'操作失败')
})
.finally(() => {
this.loading = false
@ -586,6 +697,7 @@ export default {
this.componentPartDesc = this.$route.query.componentPartDesc
this.releaseNo = this.$route.query.releaseNo
this.sequenceNo = this.$route.query.sequenceNo
this.wdrNo = this.$route.query.wdrNo
console.log(
'订单号:',
this.orderNo,
@ -610,6 +722,7 @@ export default {
//
this.loadOrderDetails()
this.restoreStateFromManual()
},
}
</script>
@ -669,6 +782,33 @@ export default {
margin-right: 12px;
}
.manual-btn {
border: 1px solid #1abc4a;
background: #1abc4a;
color: white;
border-radius: 6px;
width:60px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
}
.manual-btn:hover {
background: #17b3a3;
color: white;
}
.manual-btn:active {
transform: scale(0.98);
}
.scrollable-content {
flex: 1;
overflow-y: auto;
min-height: 0;
}
/* 紧凑型输入框样式 */
.compact-input ::v-deep .el-input__inner {
height: 36px;
@ -836,7 +976,6 @@ export default {
/* 对齐直接领料明细的工单卡片样式 */
/* 工单列表容器背景与间距 */
.work-order-list {
overflow-y: auto;
padding: 12px 10px;
}
@ -844,7 +983,6 @@ export default {
.work-order-card {
background: white;
border-radius: 8px;
margin-bottom: 12px;
padding: 16px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
@ -914,8 +1052,8 @@ export default {
margin: 0 10px 12px;
border-radius: 0 0 8px 8px;
overflow: hidden;
max-height: 300px;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.list-header {

Loading…
Cancel
Save