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. 17
      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: "/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: "/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: "/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', {path: '/production-return/pick/:orderNo',
name: 'ProductionIssuePick',component: resolve => require(["@/views/modules/production-return/pick.vue"], resolve), name: 'ProductionIssuePick',component: resolve => require(["@/views/modules/production-return/pick.vue"], resolve),
meta: { transition: 'instant' ,preload: true,keepAlive: true}}, meta: { transition: 'instant' ,preload: true,keepAlive: true}},

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

@ -266,6 +266,7 @@ export default {
partDesc: material.componentPartDesc, partDesc: material.componentPartDesc,
requiredQty: material.qtyRequired, requiredQty: material.qtyRequired,
issuedQty: material.qtyIssued || 0, 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-list" v-if="workOrderNo && componentPartNo">
<div class="work-order-card"> <div class="work-order-card">
<div class="card-title"> <div class="card-title">
<span class="title-label">工单号{{ workOrderNo }}</span>
<span class="title-label">工单号{{ workOrderNo }}&nbsp;&nbsp;行号{{itemNo}}</span>
</div> </div>
<!-- 物料描述单独一行 --> <!-- 物料描述单独一行 -->
@ -117,6 +117,7 @@ export default {
componentPartDesc: '', componentPartDesc: '',
requiredQty: 0, requiredQty: 0,
issuedQty: 0, issuedQty: 0,
itemNo: '',
} }
}, },
computed: { computed: {
@ -165,6 +166,7 @@ export default {
quantity: data.labelInfo.availableQty, quantity: data.labelInfo.availableQty,
batchNo: data.labelInfo.batchNo, batchNo: data.labelInfo.batchNo,
warehouseId: data.labelInfo.warehouseId, warehouseId: data.labelInfo.warehouseId,
locationId: data.labelInfo.locationId,
}) })
this.$message.success('扫描成功') this.$message.success('扫描成功')
} else { } else {
@ -215,12 +217,13 @@ export default {
workOrderNo: this.workOrderNo, workOrderNo: this.workOrderNo,
componentPartNo: this.componentPartNo, componentPartNo: this.componentPartNo,
operatorName: localStorage.getItem('userName'), operatorName: localStorage.getItem('userName'),
itemNo: this.itemNo,
selectedMaterials: this.scannedLabels.map((l, i) => ({ selectedMaterials: this.scannedLabels.map((l, i) => ({
itemNo: i + 1,
labelCode: l.labelCode, labelCode: l.labelCode,
issueQty: l.quantity, issueQty: l.quantity,
batchNo: l.batchNo, batchNo: l.batchNo,
warehouseId: l.warehouseId, warehouseId: l.warehouseId,
locationId: l.locationId,
materialCode: l.materialCode, materialCode: l.materialCode,
})), })),
} }
@ -243,6 +246,7 @@ export default {
this.componentPartDesc = this.$route.params.partDesc || '' this.componentPartDesc = this.$route.params.partDesc || ''
this.requiredQty = Number(this.$route.params.requiredQty || 0) this.requiredQty = Number(this.$route.params.requiredQty || 0)
this.issuedQty = Number(this.$route.params.issuedQty || 0) this.issuedQty = Number(this.$route.params.issuedQty || 0)
this.itemNo = this.$route.params.itemNo || ''
/* if (!this.workOrderNo || !this.materialCode) { /* if (!this.workOrderNo || !this.materialCode) {
this.$message.error('参数错误') 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}`" <div v-for="material in displayReturnRequestMaterials" :key="`${material.partNo}-${material.itemNo}`"
:class="['work-order-card', { selected: selectedRequestMaterial && isSameRequestMaterial(selectedRequestMaterial, material) }]" @click="selectRequestMaterial(material)"> :class="['work-order-card', { selected: selectedRequestMaterial && isSameRequestMaterial(selectedRequestMaterial, material) }]" @click="selectRequestMaterial(material)">
<div class="card-title"> <div class="card-title">
<span class="title-label">申请单号{{ material.notifyNo }} &nbsp;&nbsp; 行号{{
material.itemNo
}}</span>
<span class="title-label">申请单号{{ material.notifyNo }} </span>
</div> </div>
<!-- 工单号单独一行 --> <!-- 工单号单独一行 -->
@ -278,7 +276,9 @@ export default {
}, 3000) }, 3000)
}, },
}, },
created () {
this.resetRequest()
},
mounted() { mounted() {
// //
this.$nextTick(() => { this.$nextTick(() => {

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

@ -387,7 +387,9 @@ export default {
printData: {}, printData: {},
partNo:"", // partNo:"", //
transactionId:"", // transactionId:"", //
accountingId:"", //
quantity:"", // 退 quantity:"", // 退
qtyReversed:0, // 退
batchNo:"", // batchNo:"", //
printLabelList: [], printLabelList: [],
// //
@ -400,6 +402,7 @@ export default {
}, },
editIndex: -1, // editIndex: -1, //
unissureQty:0, // unissureQty:0, //
itemNo:'', // ID
}; };
}, },
computed: { computed: {
@ -435,6 +438,8 @@ export default {
orderNo: this.orderNo, orderNo: this.orderNo,
orderType: this.orderType, orderType: this.orderType,
site: this.$store.state.user.site, site: this.$store.state.user.site,
batchNo: this.batchNo,
componentPartNo: this.partNo,
}; };
// 退 // 退
@ -454,9 +459,11 @@ export default {
id: Date.now(), id: Date.now(),
labelCode: labelCode, labelCode: labelCode,
partNo: data.labelInfo.partNo, partNo: data.labelInfo.partNo,
quantity: data.labelInfo.quantity,
quantity: data.labelInfo.availableQty,
batchNo: data.labelInfo.batchNo, batchNo: data.labelInfo.batchNo,
returnReason: data.labelInfo.returnReason, returnReason: data.labelInfo.returnReason,
locationId: data.labelInfo.locationId ,
warehouseId: data.labelInfo.warehouseId ,
}); });
this.$message.success("操作成功"); this.$message.success("操作成功");
@ -556,20 +563,31 @@ export default {
return; return;
} }
if (!this.returnReason) {
/* if (!this.returnReason) {
this.$message.warning("请选择退料原因"); this.$message.warning("请选择退料原因");
return; return;
}
} */
const returnParams = { const returnParams = {
site: this.$store.state.user.site, site: this.$store.state.user.site,
orderNo: this.orderNo,
workOrderNo: this.orderNo,
orderType: this.orderType, 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, labelCode: label.labelCode,
quantity: label.quantity,
issueQty: label.quantity,
batchNo: label.batchNo, batchNo: label.batchNo,
partNo: label.partNo, partNo: label.partNo,
locationId: label.locationId,
wdrNo: label.wdrNo || '*',
})), })),
}; };
@ -792,14 +810,18 @@ export default {
mounted() { 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) { if (!this.orderNo) {
this.$message.error("参数错误"); this.$message.error("参数错误");

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

@ -67,6 +67,7 @@
<script> <script>
import { getUnissueMatericalForShopOrder } from '@/api/production/production-return'; import { getUnissueMatericalForShopOrder } from '@/api/production/production-return';
import { notify } from 'node-notifier';
export default { export default {
data() { data() {
@ -76,6 +77,7 @@ export default {
loading: false, loading: false,
issueList: [], issueList: [],
unissureQty: 0, unissureQty: 0,
itemNo: '',
}; };
}, },
methods: { methods: {
@ -108,12 +110,18 @@ export default {
this.$router.push({ this.$router.push({
name: 'productionReturnPDAIssueList', name: 'productionReturnPDAIssueList',
params: { params: {
orderNo: this.workOrderNo,
orderType: 'workOrder',
workOrderNo: this.workOrderNo,
material:{
itemNo: this.itemNo,
partNo: this.partNo, partNo: this.partNo,
transactionId: item.TRANSACTION_ID,
orderType: 'workOrder',
ifsTransactionID: item.TRANSACTION_ID,
quantity: item.QUANTITY, quantity: item.QUANTITY,
batchNo: item.LOT_BATCH_NO, 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.workOrderNo = this.$route.params.workOrderNo;
this.partNo = this.$route.params.partNo; this.partNo = this.$route.params.partNo;
this.unissureQty = this.$route.params.unissureQty; this.unissureQty = this.$route.params.unissureQty;
this.itemNo = this.$route.params.itemNo;
this.loadIssueList(); 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 { display: flex; align-items: center; cursor: pointer; font-size: 16px; font-weight: 500; }
.header-left i { margin-right: 8px; font-size: 18px; } .header-left i { margin-right: 8px; font-size: 18px; }
.header-right { cursor: pointer; font-size: 16px; font-weight: 500; } .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; } .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 { 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); } .material-card:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); transform: translateY(-1px); }

Loading…
Cancel
Save