Browse Source

生产领料退料修改

master
shenzhouyu 5 months ago
parent
commit
65e027e235
  1. 4
      src/router/index.js
  2. 1
      src/views/modules/production-issue/directIssue.vue
  3. 8
      src/views/modules/production-issue/directIssueDetail.vue
  4. 8
      src/views/modules/production-return/productionReturnPDA.vue
  5. 50
      src/views/modules/production-return/productionReturnPDAIssueList.vue
  6. 23
      src/views/modules/production-return/productionReturnPDAList.vue

4
src/router/index.js

@ -54,8 +54,8 @@ const globalRoutes = [
{path: "/productionReturnIssueList", name: "productionReturnIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPickingDetail/:orderNo/:orderType/:partNo/:transactionId/:quantity/:batchNo", name: "productionReturnPickingDetail", component: resolve => require(["@/views/modules/production-return/productionReturnPickingDetail.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPDA", name: "productionReturnPDA", component: resolve => require(["@/views/modules/production-return/productionReturnPDA.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPDAList/:workOrderNo/:partNo/:unissureQty", name: "productionReturnPDAList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPDAIssueList/:notifyNo/:itemNo/:workOrderNo/:unissureQty", name: "productionReturnPDAIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPDAList/:workOrderNo/:partNo/:unissureQty/:itemNo", name: "productionReturnPDAList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: "/productionReturnPDAIssueList/:workOrderNo/:material", name: "productionReturnPDAIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } },
{path: '/production-return/pick/:orderNo',
name: 'ProductionIssuePick',component: resolve => require(["@/views/modules/production-return/pick.vue"], resolve),
meta: { transition: 'instant' ,preload: true,keepAlive: true}},

1
src/views/modules/production-issue/directIssue.vue

@ -266,6 +266,7 @@ export default {
partDesc: material.componentPartDesc,
requiredQty: material.qtyRequired,
issuedQty: material.qtyIssued || 0,
itemNo: material.lineItemNo,
},
});
},

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

@ -27,7 +27,7 @@
<div class="work-order-list" v-if="workOrderNo && componentPartNo">
<div class="work-order-card">
<div class="card-title">
<span class="title-label">工单号{{ workOrderNo }}</span>
<span class="title-label">工单号{{ workOrderNo }}&nbsp;&nbsp;行号{{itemNo}}</span>
</div>
<!-- 物料描述单独一行 -->
@ -117,6 +117,7 @@ export default {
componentPartDesc: '',
requiredQty: 0,
issuedQty: 0,
itemNo: '',
}
},
computed: {
@ -165,6 +166,7 @@ export default {
quantity: data.labelInfo.availableQty,
batchNo: data.labelInfo.batchNo,
warehouseId: data.labelInfo.warehouseId,
locationId: data.labelInfo.locationId,
})
this.$message.success('扫描成功')
} else {
@ -215,12 +217,13 @@ export default {
workOrderNo: this.workOrderNo,
componentPartNo: this.componentPartNo,
operatorName: localStorage.getItem('userName'),
itemNo: this.itemNo,
selectedMaterials: this.scannedLabels.map((l, i) => ({
itemNo: i + 1,
labelCode: l.labelCode,
issueQty: l.quantity,
batchNo: l.batchNo,
warehouseId: l.warehouseId,
locationId: l.locationId,
materialCode: l.materialCode,
})),
}
@ -243,6 +246,7 @@ export default {
this.componentPartDesc = this.$route.params.partDesc || ''
this.requiredQty = Number(this.$route.params.requiredQty || 0)
this.issuedQty = Number(this.$route.params.issuedQty || 0)
this.itemNo = this.$route.params.itemNo || ''
/* if (!this.workOrderNo || !this.materialCode) {
this.$message.error('参数错误')

8
src/views/modules/production-return/productionReturnPDA.vue

@ -20,9 +20,7 @@
<div v-for="material in displayReturnRequestMaterials" :key="`${material.partNo}-${material.itemNo}`"
:class="['work-order-card', { selected: selectedRequestMaterial && isSameRequestMaterial(selectedRequestMaterial, material) }]" @click="selectRequestMaterial(material)">
<div class="card-title">
<span class="title-label">申请单号{{ material.notifyNo }} &nbsp;&nbsp; 行号{{
material.itemNo
}}</span>
<span class="title-label">申请单号{{ material.notifyNo }} </span>
</div>
<!-- 工单号单独一行 -->
@ -278,7 +276,9 @@ export default {
}, 3000)
},
},
created () {
this.resetRequest()
},
mounted() {
//
this.$nextTick(() => {

50
src/views/modules/production-return/productionReturnPDAIssueList.vue

@ -387,7 +387,9 @@ export default {
printData: {},
partNo:"", //
transactionId:"", //
accountingId:"", //
quantity:"", // 退
qtyReversed:0, // 退
batchNo:"", //
printLabelList: [],
//
@ -400,6 +402,7 @@ export default {
},
editIndex: -1, //
unissureQty:0, //
itemNo:'', // ID
};
},
computed: {
@ -435,6 +438,8 @@ export default {
orderNo: this.orderNo,
orderType: this.orderType,
site: this.$store.state.user.site,
batchNo: this.batchNo,
componentPartNo: this.partNo,
};
// 退
@ -454,9 +459,11 @@ export default {
id: Date.now(),
labelCode: labelCode,
partNo: data.labelInfo.partNo,
quantity: data.labelInfo.quantity,
quantity: data.labelInfo.availableQty,
batchNo: data.labelInfo.batchNo,
returnReason: data.labelInfo.returnReason,
locationId: data.labelInfo.locationId ,
warehouseId: data.labelInfo.warehouseId ,
});
this.$message.success("操作成功");
@ -556,20 +563,31 @@ export default {
return;
}
if (!this.returnReason) {
/* if (!this.returnReason) {
this.$message.warning("请选择退料原因");
return;
}
} */
const returnParams = {
site: this.$store.state.user.site,
orderNo: this.orderNo,
workOrderNo: this.orderNo,
orderType: this.orderType,
labels: this.labelList.map((label) => ({
batchNo: this.batchNo,
componentPartNo: this.partNo,
warehouseId: '1',
transactionId: this.transactionId,
accountingId:this.accountingId,
itemNo:this.itemNo,
ifsReversedQty:this.qtyReversed,
issueQty: this.quantity,
// 退
selectedMaterials: this.labelList.map((label) => ({
labelCode: label.labelCode,
quantity: label.quantity,
issueQty: label.quantity,
batchNo: label.batchNo,
partNo: label.partNo,
locationId: label.locationId,
wdrNo: label.wdrNo || '*',
})),
};
@ -792,14 +810,18 @@ export default {
mounted() {
//
this.orderNo = this.$route.params.orderNo;
this.orderType = this.$route.params.orderType || "workOrder";
this.partNo = this.$route.params.partNo
this.transactionId = this.$route.params.transactionId
this.quantity = this.$route.params.quantity
this.batchNo = this.$route.params.batchNo
this.unissureQty = this.$route.params.unissureQty
console.log("订单号:", this.orderNo, "订单类型:", this.orderType,"物料编码:",this.partNo);
console.log("路由参数:", this.$route.params.material);
this.orderNo = this.$route.params.workOrderNo;
this.orderType = this.$route.params.material.orderType || "workOrder";
this.partNo = this.$route.params.material.partNo
this.transactionId = this.$route.params.material.ifsTransactionID
this.accountingId = this.$route.params.material.ifsAccountingID
this.quantity = this.$route.params.material.quantity
this.batchNo = this.$route.params.material.batchNo
this.unissureQty = this.$route.params.material.unissureQty
this.itemNo = this.$route.params.material.itemNo
this.qtyReversed= this.$route.params.material.qtyReversedBy || 0
if (!this.orderNo) {
this.$message.error("参数错误");

23
src/views/modules/production-return/productionReturnPDAList.vue

@ -67,6 +67,7 @@
<script>
import { getUnissueMatericalForShopOrder } from '@/api/production/production-return';
import { notify } from 'node-notifier';
export default {
data() {
@ -76,6 +77,7 @@ export default {
loading: false,
issueList: [],
unissureQty: 0,
itemNo: '',
};
},
methods: {
@ -108,12 +110,18 @@ export default {
this.$router.push({
name: 'productionReturnPDAIssueList',
params: {
orderNo: this.workOrderNo,
orderType: 'workOrder',
partNo: this.partNo,
transactionId: item.TRANSACTION_ID,
quantity: item.QUANTITY,
batchNo: item.LOT_BATCH_NO,
workOrderNo: this.workOrderNo,
material:{
itemNo: this.itemNo,
partNo: this.partNo,
orderType: 'workOrder',
ifsTransactionID: item.TRANSACTION_ID,
quantity: item.QUANTITY,
batchNo: item.LOT_BATCH_NO,
unissureQty: this.unissureQty,
ifsAccountingID:item.ACCOUNTING_ID,
qtyReversed:item.QTY_REVERSED || 0,
}
},
});
},
@ -122,6 +130,7 @@ export default {
this.workOrderNo = this.$route.params.workOrderNo;
this.partNo = this.$route.params.partNo;
this.unissureQty = this.$route.params.unissureQty;
this.itemNo = this.$route.params.itemNo;
this.loadIssueList();
},
};
@ -133,7 +142,7 @@ export default {
.header-left { display: flex; align-items: center; cursor: pointer; font-size: 16px; font-weight: 500; }
.header-left i { margin-right: 8px; font-size: 18px; }
.header-right { cursor: pointer; font-size: 16px; font-weight: 500; }
.content-area { flex: 1; overflow-y: auto; padding: 12px 16px; }
.content-area { flex: 1; overflow-y: auto; }
.work-order-list { overflow-y: auto; padding: 12px 16px; }
.material-card { background: white; border-radius: 8px; margin-bottom: 12px; padding: 16px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent; }
.material-card:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); transform: translateY(-1px); }

Loading…
Cancel
Save