From cc13825bb6b3f4185e3db8aa29e58990ee4e01c0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 27 二月 2026 17:49:36 +0800
Subject: [PATCH] 巡检模块流程更改
---
src/views/productionManagement/productionOrder/index.vue | 134 +++++++++++++++++++++-----------------------
1 files changed, 63 insertions(+), 71 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 3af5008..c9abe3c 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -11,14 +11,6 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
- <el-input v-model="searchForm.salesContractNo"
- placeholder="璇疯緭鍏�"
- clearable
- prefix-icon="Search"
- style="width: 160px;"
- @change="handleQuery" />
- </el-form-item>
<el-form-item label="浜у搧鍚嶇О:">
<el-input v-model="searchForm.productCategory"
placeholder="璇疯緭鍏�"
@@ -42,6 +34,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>
@@ -51,7 +44,8 @@
:tableData="tableData"
:page="page"
:tableLoading="tableLoading"
- :row-class-name="tableRowClassName"
+ :isSelection="true"
+ @selection-change="handleSelectionChange"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress
@@ -103,9 +97,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();
@@ -114,21 +110,21 @@
const isShowNewModal = ref(false);
const tableColumn = ref([
- {
- label: "鐢熶骇璁㈠崟鍙�",
- prop: "npsNo",
- width: '120px',
- },
- {
- label: "閿�鍞悎鍚屽彿",
- prop: "salesContractNo",
- width: '150px',
- },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: '200px',
- },
+ // {
+ // label: "鐢熶骇璁㈠崟鍙�",
+ // prop: "npsNo",
+ // width: '120px',
+ // },
+ // {
+ // label: "閿�鍞悎鍚屽彿",
+ // prop: "salesContractNo",
+ // width: '150px',
+ // },
+ // {
+ // label: "瀹㈡埛鍚嶇О",
+ // prop: "customerName",
+ // width: '200px',
+ // },
{
label: "浜у搧鍚嶇О",
prop: "productCategory",
@@ -160,23 +156,23 @@
width: 180,
},
{
- label: "寮�濮嬫棩鏈�",
- prop: "startTime",
+ label: "鐢熶骇鏃ユ湡",
+ prop: "productionDate",
formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
width: 120,
},
- {
- label: "缁撴潫鏃ユ湡",
- prop: "endTime",
- formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
- width: 120,
- },
- {
- label: "浜や粯鏃ユ湡",
- prop: "deliveryDate",
- formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
- width: 120,
- },
+ // {
+ // label: "缁撴潫鏃ユ湡",
+ // prop: "endTime",
+ // formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
+ // width: 120,
+ // },
+ // {
+ // label: "浜や粯鏃ユ湡",
+ // prop: "deliveryDate",
+ // formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
+ // width: 120,
+ // },
{
dataType: "action",
label: "鎿嶄綔",
@@ -216,6 +212,7 @@
size: 100,
total: 0,
});
+ const selectedRows = ref([]);
const data = reactive({
searchForm: {
@@ -243,22 +240,6 @@
if (p < 50) return "#e6a23c";
if (p < 80) return "#409eff";
return "#67c23a";
- };
-
- // 娣诲姞琛ㄨ绫诲悕鏂规硶
- const tableRowClassName = ({ row }) => {
- if (row.isFh) return '';
-
- const diff = row.deliveryDaysDiff;
- if (diff === 15) {
- return 'yellow';
- } else if (diff === 10) {
- return 'pink';
- } else if (diff === 2) {
- return 'purple';
- } else if (diff < 2) {
- return 'red';
- }
};
// 缁戝畾宸ヨ壓璺嚎寮规
@@ -394,6 +375,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("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -419,21 +427,5 @@
<style scoped lang="scss">
.search_form{
align-items: start;
-}
-
-::v-deep .yellow {
- background-color: #FAF0DE;
-}
-
-::v-deep .pink {
- background-color: #FAE1DE;
-}
-
-::v-deep .red {
- background-color: #f80202;
-}
-
-::v-deep .purple{
- background-color: #F4DEFA;
}
</style>
--
Gitblit v1.9.3