From 3b0d62ccee6666c8e87470b333a19311e49547d1 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期二, 07 四月 2026 14:40:03 +0800
Subject: [PATCH] 三项优化内容
---
src/views/productionManagement/productionOrder/index.vue | 140 ++++++++++++++++++++++++----------------------
1 files changed, 74 insertions(+), 66 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index fc64063..1fa48be 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -11,14 +11,14 @@
style="width: 160px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
+ <!-- <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> -->
<el-form-item label="浜у搧鍚嶇О:">
<el-input v-model="searchForm.productCategory"
placeholder="璇疯緭鍏�"
@@ -41,8 +41,10 @@
</el-form-item>
</el-form>
<div>
- <el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
- <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
+ <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>
@@ -57,11 +59,9 @@
@selection-change="handleSelectionChange"
@pagination="pagination">
<template #completionStatus="{ row }">
- <el-progress
- :percentage="toProgressPercentage(row?.completionStatus)"
- :color="progressColor(toProgressPercentage(row?.completionStatus))"
- :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''"
- />
+ <el-progress :percentage="toProgressPercentage(row?.completionStatus)"
+ :color="progressColor(toProgressPercentage(row?.completionStatus))"
+ :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
</template>
</PIMTable>
</div>
@@ -90,10 +90,9 @@
</span>
</template>
</el-dialog>
-
<new-product-order v-if="isShowNewModal"
- v-model:visible="isShowNewModal"
- @completed="handleQuery" />
+ v-model:visible="isShowNewModal"
+ @completed="handleQuery" />
</div>
</template>
@@ -106,12 +105,15 @@
productOrderListPage,
listProcessRoute,
bindingRoute,
- listProcessBom, delProductOrder,
+ listProcessBom,
+ delProductOrder,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
- import {fileDel} from "@/api/financialManagement/revenueManagement.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 NewProductOrder = defineAsyncComponent(() =>
+ import("@/views/productionManagement/productionOrder/New.vue")
+ );
const { proxy } = getCurrentInstance();
@@ -122,32 +124,32 @@
{
label: "鐢熶骇璁㈠崟鍙�",
prop: "npsNo",
- width: '120px',
+ width: "120px",
},
- {
- label: "閿�鍞悎鍚屽彿",
- prop: "salesContractNo",
- width: '150px',
- },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: '200px',
- },
+ // {
+ // label: "閿�鍞悎鍚屽彿",
+ // prop: "salesContractNo",
+ // width: "150px",
+ // },
+ // {
+ // label: "瀹㈡埛鍚嶇О",
+ // prop: "customerName",
+ // width: "200px",
+ // },
{
label: "浜у搧鍚嶇О",
prop: "productCategory",
- width: '120px',
+ width: "120px",
},
{
label: "瑙勬牸",
prop: "specificationModel",
- width: '120px',
+ width: "120px",
},
{
label: "宸ヨ壓璺嚎缂栧彿",
prop: "processRouteCode",
- width: '200px',
+ width: "200px",
},
{
label: "闇�姹傛暟閲�",
@@ -176,12 +178,12 @@
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: "deliveryDate",
+ // formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""),
+ // width: 120,
+ // },
{
dataType: "action",
label: "鎿嶄綔",
@@ -253,18 +255,18 @@
// 娣诲姞琛ㄨ绫诲悕鏂规硶
const tableRowClassName = ({ row }) => {
- if (!row.deliveryDate) return '';
- if (row.isFh) return '';
+ if (!row.deliveryDate) return "";
+ if (row.isFh) return "";
const diff = row.deliveryDaysDiff;
if (diff === 15) {
- return 'yellow';
+ return "yellow";
} else if (diff === 10) {
- return 'pink';
+ return "pink";
} else if (diff === 2) {
- return 'purple';
+ return "purple";
} else if (diff < 2) {
- return 'red';
+ return "red";
}
};
@@ -402,14 +404,14 @@
};
// 琛ㄦ牸閫夋嫨鏁版嵁
- const handleSelectionChange = (selection) => {
+ const handleSelectionChange = selection => {
selectedRows.value = selection;
};
const handleDelete = () => {
let ids = [];
if (selectedRows.value.length > 0) {
- ids = selectedRows.value.map((item) => item.id);
+ ids = selectedRows.value.map(item => item.id);
} else {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
return;
@@ -418,14 +420,16 @@
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
type: "warning",
- }).then(() => {
- delProductOrder(ids).then((res) => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
+ })
+ .then(() => {
+ delProductOrder(ids).then(res => {
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ getList();
+ });
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
});
- }).catch(() => {
- proxy.$modal.msg("宸插彇娑�");
- });
};
// 瀵煎嚭
@@ -436,7 +440,11 @@
type: "warning",
})
.then(() => {
- proxy.download("/productOrder/export", {...searchForm.value}, "鐢熶骇璁㈠崟.xlsx");
+ proxy.download(
+ "/productOrder/export",
+ { ...searchForm.value },
+ "鐢熶骇璁㈠崟.xlsx"
+ );
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -451,23 +459,23 @@
</script>
<style scoped lang="scss">
-.search_form{
- align-items: start;
-}
+ .search_form {
+ align-items: start;
+ }
-::v-deep .yellow {
- background-color: #FAF0DE;
-}
+ ::v-deep .yellow {
+ background-color: #faf0de;
+ }
-::v-deep .pink {
- background-color: #FAE1DE;
-}
+ ::v-deep .pink {
+ background-color: #fae1de;
+ }
-::v-deep .red {
- background-color: #f80202;
-}
+ ::v-deep .red {
+ background-color: #f80202;
+ }
-::v-deep .purple{
- background-color: #F4DEFA;
-}
+ ::v-deep .purple {
+ background-color: #f4defa;
+ }
</style>
--
Gitblit v1.9.3