From d9b5c1f1310a4449ba3ffbefc9b15ec246789d53 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期一, 20 四月 2026 13:35:23 +0800
Subject: [PATCH] feat: 添加报价单导入功能
---
src/views/productionManagement/productionOrder/index.vue | 89 +++++++++++++++++++++++++++++++-------------
1 files changed, 63 insertions(+), 26 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 3af5008..b722592 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -42,6 +42,7 @@
</el-form>
<div>
<el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
+ <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -52,6 +53,8 @@
:page="page"
:tableLoading="tableLoading"
:row-class-name="tableRowClassName"
+ :isSelection="true"
+ @selection-change="handleSelectionChange"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress
@@ -80,10 +83,10 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="bindRouteDialogVisible = false">鍙� 娑�</el-button>
<el-button type="primary"
:loading="bindRouteSaving"
@click="handleBindRouteConfirm">纭� 璁�</el-button>
+ <el-button @click="bindRouteDialogVisible = false">鍙� 娑�</el-button>
</span>
</template>
</el-dialog>
@@ -103,9 +106,11 @@
productOrderListPage,
listProcessRoute,
bindingRoute,
- listProcessBom,
+ listProcessBom, delProductOrder,
} 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 { proxy } = getCurrentInstance();
@@ -139,11 +144,11 @@
prop: "specificationModel",
width: '120px',
},
- {
- label: "宸ヨ壓璺嚎缂栧彿",
- prop: "processRouteCode",
- width: '200px',
- },
+ // {
+ // label: "宸ヨ壓璺嚎缂栧彿",
+ // prop: "processRouteCode",
+ // width: '200px',
+ // },
{
label: "闇�姹傛暟閲�",
prop: "quantity",
@@ -191,21 +196,21 @@
showRouteItemModal(row);
},
},
- {
- name: "缁戝畾宸ヨ壓璺嚎",
- type: "text",
- showHide: row => !row.processRouteCode,
- clickFun: row => {
- openBindRouteDialog(row);
- },
- },
- {
- name: "浜у搧缁撴瀯",
- type: "text",
- clickFun: row => {
- showProductStructure(row);
- },
- },
+ // {
+ // name: "缁戝畾宸ヨ壓璺嚎",
+ // type: "text",
+ // showHide: row => !row.processRouteCode,
+ // clickFun: row => {
+ // openBindRouteDialog(row);
+ // },
+ // },
+ // {
+ // name: "浜у搧缁撴瀯",
+ // type: "text",
+ // clickFun: row => {
+ // showProductStructure(row);
+ // },
+ // },
],
},
]);
@@ -216,6 +221,7 @@
size: 100,
total: 0,
});
+ const selectedRows = ref([]);
const data = reactive({
searchForm: {
@@ -247,6 +253,7 @@
// 娣诲姞琛ㄨ绫诲悕鏂规硶
const tableRowClassName = ({ row }) => {
+ if (!row.deliveryDate) return '';
if (row.isFh) return '';
const diff = row.deliveryDaysDiff;
@@ -394,6 +401,33 @@
});
};
+ // 琛ㄦ牸閫夋嫨鏁版嵁
+ const handleSelectionChange = (selection) => {
+ selectedRows.value = selection;
+ };
+
+ const handleDelete = () => {
+ let ids = [];
+ if (selectedRows.value.length > 0) {
+ ids = selectedRows.value.map((item) => item.id);
+ } else {
+ proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ delProductOrder(ids).then((res) => {
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ getList();
+ });
+ }).catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+ };
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -421,19 +455,22 @@
align-items: start;
}
-::v-deep .yellow {
+:deep(.yellow) {
background-color: #FAF0DE;
}
-::v-deep .pink {
+:deep(.pink) {
background-color: #FAE1DE;
}
-::v-deep .red {
+:deep(.red) {
background-color: #f80202;
}
-::v-deep .purple{
+:deep(.purple){
background-color: #F4DEFA;
}
+.table_list {
+ margin-top: unset;
+}
</style>
--
Gitblit v1.9.3