From 0a251e40e30e7c8a96d71b3b9b6c459d4dfa4b22 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 08 七月 2026 23:04:45 +0800
Subject: [PATCH] 暂存
---
src/views/productionPlan/productionPlan/index.vue | 63 +++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index 0c8399c..fd56e89 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -13,6 +13,14 @@
style="width: 160px;"
@keyup.enter="handleQuery" />
</el-form-item>
+ <el-form-item label="閿�鍞悎鍚屽彿:"
+ prop="salesContractNo">
+ <el-input v-model="searchForm.salesContractNo"
+ placeholder="璇疯緭鍏�"
+ clearable
+ style="width: 160px;"
+ @keyup.enter="handleQuery" />
+ </el-form-item>
<el-form-item label="闇�姹傛棩鏈熻寖鍥�:"
prop="dateRange">
<el-date-picker v-model="searchForm.dateRange"
@@ -88,6 +96,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 +142,10 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="isShowNewModal = false">鍙栨秷</el-button>
<el-button type="primary"
+ :loading="mergeSubmitLoading"
@click="handleMergeSubmit">纭畾涓嬪彂</el-button>
+ <el-button @click="isShowNewModal = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -221,9 +237,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 +267,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 +279,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 => {
@@ -293,6 +305,14 @@
},
},
{
+ label: "閿�鍞悎鍚屽彿",
+ prop: "salesContractNo",
+ width: "200px",
+ dataType: "slot",
+ slot: "salesContractNo",
+ },
+
+ {
label: "浜у搧鍚嶇О",
prop: "productName",
width: "200px",
@@ -316,7 +336,6 @@
label: "鎵�闇�鏁伴噺",
prop: "qtyRequired",
width: "150px",
- align: "right",
dataType: "slot",
slot: "qtyRequired",
className: "volume-cell",
@@ -365,6 +384,17 @@
className: "date-cell",
formatData: cell => (cell ? dayjs(cell).format("YYYY-MM-DD") : ""),
},
+
+ {
+ label: "瀹㈡埛鍚嶇О",
+ prop: "customerName",
+ width: "150px",
+ },
+ {
+ label: "椤圭洰鍚嶇О",
+ prop: "projectName",
+ width: "150px",
+ },
{
label: "澶囨敞",
width: "150px",
@@ -382,7 +412,7 @@
type: "primary",
link: true,
showHide: row => {
- return row.status == 0;
+ return row.status == 0 && row.source != "閿�鍞�";
},
clickFun: row => {
handleEdit(row);
@@ -437,6 +467,7 @@
// 鍚堝苟涓嬪彂寮圭獥鎺у埗
const isShowNewModal = ref(false);
+ const mergeSubmitLoading = ref(false);
// 鍚堝苟涓嬪彂琛ㄥ崟鏁版嵁
const mergeForm = reactive({
productName: "",
@@ -568,6 +599,7 @@
const data = reactive({
searchForm: {
mpsNo: "",
+ salesContractNo: "",
productName: "",
model: "",
status: "",
@@ -596,6 +628,7 @@
}
Object.assign(searchForm.value, {
mpsNo: "",
+ salesContractNo: "",
productName: "",
model: "",
status: "",
@@ -720,6 +753,14 @@
// 鎵撳紑寮圭獥
isShowNewModal.value = true;
};
+ const showDetail = row => {
+ router.push({
+ path: "/salesManagement/salesLedger",
+ query: {
+ salesContractNo: row.salesContractNo,
+ },
+ });
+ };
// 澶勭悊鍚堝苟涓嬪彂鎻愪氦
const handleMergeSubmit = () => {
@@ -739,6 +780,7 @@
const payload = {
...mergeForm,
};
+ mergeSubmitLoading.value = true;
productionPlanCombine(payload)
.then(res => {
if (res.code === 200) {
@@ -754,6 +796,9 @@
.catch(err => {
console.error("鍚堝苟涓嬪彂寮傚父锛�", err);
ElMessage.error("绯荤粺寮傚父锛屽悎骞朵笅鍙戝け璐�");
+ })
+ .finally(() => {
+ mergeSubmitLoading.value = false;
});
// 鍙互閫夋嫨鍒锋柊鍒楄〃鎴栧叾浠栨搷浣�
};
--
Gitblit v1.9.3