From ed94f308b3fb345eb7238b8836a61d0b8bbaa98c Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期五, 27 三月 2026 17:52:23 +0800
Subject: [PATCH] feat(salesLedger): 添加批号字段和销售出库单打印功能
---
src/views/productionManagement/productionOrder/index.vue | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 829f7ab..8c254da 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -95,6 +95,13 @@
<new-product-order v-if="isShowNewModal"
v-model:visible="isShowNewModal"
@completed="handleQuery"/>
+
+ <!-- 娓呭満璁板綍寮规 -->
+ <clearance-record-dialog
+ v-model="clearanceDialogVisible"
+ :order-data="currentOrderData"
+ @save="handleSaveClearanceRecord"
+ />
</div>
</template>
@@ -108,12 +115,14 @@
listProcessRoute,
bindingRoute,
delProductOrder, finishOrder,
+ saveCleanRecord,
} from "@/api/productionManagement/productionOrder.js";
import {listMain as getOrderProcessRouteMain} from "@/api/productionManagement/productProcessRoute.js";
import {fileDel} from "@/api/financialManagement/revenueManagement.js";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
+const ClearanceRecordDialog = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/ClearanceRecordDialog.vue"));
const {proxy} = getCurrentInstance();
@@ -227,6 +236,14 @@
handleFinishOrder(row);
},
},
+ {
+ name: "娓呭満璁板綍",
+ type: "text",
+ showHide: row => !row.isEnd,
+ clickFun: row => {
+ handleClearanceRecord(row);
+ },
+ },
],
},
]);
@@ -289,6 +306,10 @@
const bindRouteLoading = ref(false);
const bindRouteSaving = ref(false);
const routeOptions = ref([]);
+
+// 娓呭満璁板綍寮规
+const clearanceDialogVisible = ref(false);
+const currentOrderData = ref({});
const bindForm = reactive({
orderId: null,
routeId: null,
@@ -478,6 +499,32 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+
+// 鎵撳紑娓呭満璁板綍寮规
+const handleClearanceRecord = (row) => {
+ currentOrderData.value = row;
+ clearanceDialogVisible.value = true;
+};
+
+// 淇濆瓨娓呭満璁板綍
+const handleSaveClearanceRecord = async (saveData, callback) => {
+ const orderId = currentOrderData.value?.id;
+ if (!orderId) {
+ proxy.$modal.msgError("璁㈠崟ID涓嶅瓨鍦�");
+ return;
+ }
+
+ try {
+ await saveCleanRecord(orderId, saveData);
+ proxy.$modal.msgSuccess("娓呭満璁板綍淇濆瓨鎴愬姛");
+ currentOrderData.value.cleanRecord = saveData;
+ if (callback) callback();
+ getList();
+ } catch (error) {
+ console.error('淇濆瓨娓呭満璁板綍澶辫触:', error);
+ proxy.$modal.msgError("娓呭満璁板綍淇濆瓨澶辫触");
+ }
+};
onMounted(() => {
getList();
});
--
Gitblit v1.9.3