From 131f45388633a6670800926fefe17918e30b70ed Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 27 三月 2026 15:26:03 +0800
Subject: [PATCH] 军泰伟业 1.生产订单添加领料功能 2.将报工台账单的查看投入迁移到生产订单
---
src/views/salesManagement/returnOrder/components/detailDia.vue | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/src/views/salesManagement/returnOrder/components/detailDia.vue b/src/views/salesManagement/returnOrder/components/detailDia.vue
index bffc48d..9c9a73d 100644
--- a/src/views/salesManagement/returnOrder/components/detailDia.vue
+++ b/src/views/salesManagement/returnOrder/components/detailDia.vue
@@ -20,7 +20,11 @@
<div style="padding-top: 20px">
<span class="descriptions">浜у搧鍒楄〃</span>
- <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData" />
+ <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData">
+ <template #unQuantity="{ row }">
+ {{ calcAlreadyReturned(row) }}
+ </template>
+ </PIMTable>
</div>
</div>
<template #footer>
@@ -41,13 +45,19 @@
const tableData = ref([]);
const availableProducts = ref([]);
+const calcAlreadyReturned = (row) => {
+ const total = Number(row?.shippingNum ?? row?.totalQuantity ?? 0);
+ const returned = Number(row?.returnQuantity ?? row?.num ?? 0);
+ if (!Number.isFinite(total) || !Number.isFinite(returned)) return 0;
+ return total - returned;
+};
+
const tableColumn = [
{align: "center", label: "浜у搧澶х被", prop: "productCategory"},
- {align: "center", label: "瑙勬牸鍨嬪彿", prop: "specificationModel"},
+ {align: "center", label: "鍥剧焊缂栧彿", prop: "specificationModel"},
{align: "center", label: "鍗曚綅", prop: "unit", width: 80},
{align: "center", label: "鎬绘暟閲�", prop: "shippingNum", width: 120},
- {align: "center", label: "宸查��璐ф暟閲�", prop: "totalReturnNum", width: 120},
- {align: "center", label: "鏈��璐ф暟閲�", prop: "unQuantity", width: 120},
+ {align: "center", label: "鏈��璐ф暟閲�", prop: "unQuantity", width: 120, dataType: "slot", slot: "unQuantity"},
{align: "center", label: "閫�璐ф暟閲�", prop: "returnQuantity", width: 120},
{align: "center", label: "閫�璐т骇鍝佸崟浠�", prop: "price", width: 120},
{align: "center", label: "閫�璐т骇鍝侀噾棰�", prop: "amount", width: 120},
@@ -56,19 +66,21 @@
];
const getStatusType = (status) => {
- const statusMap = {
- 0: "warning",
- 1: "success"
- };
- return statusMap[status] || "info";
+ const statusMap = {
+ 0: "warning",
+ 1: "success",
+ 2: "warning"
+ };
+ return statusMap[status] || "info";
};
const getStatusText = (status) => {
- const statusMap = {
- 0: "寰呭鐞�",
- 1: "宸插鐞�"
- };
- return statusMap[status] || "鏈煡";
+ const statusMap = {
+ 0: "寰呭鐞�",
+ 1: "宸插鐞�",
+ 2: "宸叉挙閿�"
+ };
+ return statusMap[status] || "鏈煡";
};
const openDialog = async (row) => {
@@ -104,7 +116,7 @@
isQuality: raw?.isQuality ?? 2,
remark: raw?.remark ?? "",
};
- return product ? { ...product, ...normalized } : normalized;
+ return product ? { ...product, ...normalized, returnQuantity: normalized.returnQuantity } : normalized;
}) : [];
} catch (e) {
console.error("Failed to load detail", e);
--
Gitblit v1.9.3