From e7b4dbf658552ce7a66caa742bd55a75ac4d82e5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 08 五月 2026 14:54:04 +0800
Subject: [PATCH] refactor(AIChatSidebar): 重构助理配置结构
---
src/views/productionPlan/productionPlan/index.vue | 64 +++++++++++++++++++++++++------
1 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index 289ecaf..dd768af 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -88,6 +88,13 @@
<template #qtyRequired="{ row }">
{{ row.qtyRequired || '-' }}<span style="color:rgba(12, 46, 40, 0.76)"> {{ row.unit || '鏂�' }}</span>
</template>
+ <template #salesContractNo="{ row }">
+ <el-button type="primary"
+ text
+ link
+ @click="showDetail(row)">{{ row.salesContractNo }}
+ </el-button>
+ </template>
</PIMTable>
</div>
<!-- 鍚堝苟涓嬪彂寮圭獥 -->
@@ -127,9 +134,9 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="isShowNewModal = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleMergeSubmit">纭畾涓嬪彂</el-button>
+ <el-button @click="isShowNewModal = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -221,9 +228,9 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleSubmit">纭畾</el-button>
+ <el-button @click="dialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -251,6 +258,7 @@
productionPlanUpdate,
productionPlanDelete,
productionPlanCombine,
+ exportProductionPlan,
} from "@/api/productionPlan/productionPlan.js";
import { productTreeList, modelListPage } from "@/api/basicData/product.js";
import PIMTable from "./components/PIMTable.vue";
@@ -262,11 +270,6 @@
const loadProdData = () => {
console.log("Mock loadProdData called");
return Promise.resolve({ code: 200, msg: "鍚屾鎴愬姛" });
- };
-
- const exportProductionPlan = () => {
- console.log("Mock exportProductionPlan called");
- return Promise.resolve();
};
// const productionPlanCombine = payload => {
@@ -286,9 +289,13 @@
width: "150px",
dataType: "tag",
formatType: params => {
- return params == "鍐呴儴" ? "info" : "primary";
+ return params == "閿�鍞�" ? "primary" : "info";
+ },
+ formatData: params => {
+ return params == "閿�鍞�" ? "閿�鍞�" : "鍐呴儴";
},
},
+
{
label: "浜у搧鍚嶇О",
prop: "productName",
@@ -363,6 +370,23 @@
formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : ""),
},
{
+ label: "閿�鍞悎鍚屽彿",
+ prop: "salesContractNo",
+ width: "200px",
+ dataType: "slot",
+ slot: "salesContractNo",
+ },
+ {
+ label: "瀹㈡埛鍚嶇О",
+ prop: "customerName",
+ width: "150px",
+ },
+ {
+ label: "椤圭洰鍚嶇О",
+ prop: "projectName",
+ width: "150px",
+ },
+ {
label: "澶囨敞",
width: "150px",
prop: "remark",
@@ -379,7 +403,7 @@
type: "primary",
link: true,
showHide: row => {
- return row.status == 0;
+ return row.status == 0 && row.source != "閿�鍞�";
},
clickFun: row => {
handleEdit(row);
@@ -389,16 +413,18 @@
name: "涓嬪彂",
type: "text",
showHide: row => {
- return row.status == 0;
+ return row.status != 2;
},
clickFun: row => {
mergeForm.productName = row.productName || "";
mergeForm.model = row.model || "";
- mergeForm.totalAssignedQuantity = Number(row.qtyRequired || 0);
+ mergeForm.totalAssignedQuantity =
+ Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
mergeForm.planCompleteTime = row.requiredDate || "";
mergeForm.productId = row.productId || "";
mergeForm.ids = [row.id];
- sumAssignedQuantity.value = Number(row.qtyRequired || 0);
+ sumAssignedQuantity.value =
+ Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
isShowNewModal.value = true;
},
},
@@ -667,6 +693,10 @@
// 鍒ゆ柇琛屾槸鍚﹀彲閫夋嫨
const isSelectable = row => {
+ // 濡傛灉鏄凡涓嬪彂鐘舵�侊紝绂佹鍕鹃��
+ if (row.status == 2) {
+ return false;
+ }
// 璁$畻鍓╀綑鏁伴噺
const remainingQty = (row.qtyRequired || 0) - (row.quantityIssued || 0);
// 濡傛灉鍓╀綑鏁伴噺灏忎簬绛変簬0锛岀姝㈤�夋嫨
@@ -696,7 +726,7 @@
// 璁$畻鎬诲埗閫犳暟閲� (榛樿qtyRequired鐨勫拰)
const totalAssignedQuantity = selectedRows.value.reduce((sum, row) => {
- return sum + Number(row.qtyRequired || 0);
+ return sum + Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0);
}, 0);
sumAssignedQuantity.value = totalAssignedQuantity;
console.log(totalAssignedQuantity);
@@ -711,6 +741,14 @@
// 鎵撳紑寮圭獥
isShowNewModal.value = true;
};
+ const showDetail = row => {
+ router.push({
+ path: "/salesManagement/salesLedger",
+ query: {
+ salesContractNo: row.salesContractNo,
+ },
+ });
+ };
// 澶勭悊鍚堝苟涓嬪彂鎻愪氦
const handleMergeSubmit = () => {
--
Gitblit v1.9.3