From 14f694d913698b5e04b09f6e6df789cbd1102937 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 14:17:42 +0800
Subject: [PATCH] 生产管控-添加导出功能
---
src/views/productionManagement/productionOrder/index.vue | 68 +++++++++++++++++----------------
1 files changed, 35 insertions(+), 33 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 87ca041..bce7a87 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -13,7 +13,7 @@
/>
<span class="search_title ml10">椤圭洰鍚嶇О锛�</span>
<el-input
- v-model="searchForm.customerName"
+ v-model="searchForm.projectName"
style="width: 240px"
placeholder="璇疯緭鍏�"
@change="handleQuery"
@@ -46,65 +46,64 @@
<script setup>
import {onMounted, ref} from "vue";
-import {
- listCustomer,
-} from "@/api/basicData/customerFile.js";
import { ElMessageBox } from "element-plus";
import dayjs from "dayjs";
+import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
const { proxy } = getCurrentInstance();
const tableColumn = ref([
{
label: "褰曞叆鏃ユ湡",
- prop: "customerName",
+ prop: "entryDate",
width: 120,
},
{
label: "鍚堝悓鍙�",
- prop: "taxpayerIdentificationNumber",
+ prop: "salesContractNo",
width: 220,
},
{
label: "瀹㈡埛鍚堝悓鍙�",
- prop: "addressPhone",
+ prop: "customerContractNo",
width: 250,
},
{
label: "瀹㈡埛鍚嶇О",
- prop: "contactPerson",
+ prop: "customerName",
+ width: 250,
},
{
label: "椤圭洰鍚嶇О",
- prop: "contactPhone",
- width:150
+ prop: "projectName",
+ width:300
},
{
label: "浜у搧澶х被",
- prop: "basicBankAccount",
- width: 220,
+ prop: "productCategory",
+ width: 160,
},
{
label: "瑙勬牸鍨嬪彿",
- prop: "bankAccount",
+ prop: "specificationModel",
width: 220,
},
{
label: "鍗曚綅",
- prop: "bankCode",
- width:220
+ prop: "unit",
+ width:90
},
{
label: "鏁伴噺",
- prop: "maintainer",
+ prop: "quantity",
},
{
label: "鎺掍骇鏁伴噺",
- prop: "maintenanceTime",
+ prop: "schedulingNum",
width: 100,
},
{
label: "瀹屽伐鏁伴噺",
- prop: "maintenanceTime",
+ prop: "successNum",
width: 100,
},
]);
@@ -119,12 +118,10 @@
const data = reactive({
searchForm: {
customerName: "",
- entryDate: [
- dayjs().format("YYYY-MM-DD"),
- dayjs().add(1, "day").format("YYYY-MM-DD"),
- ], // 褰曞叆鏃ユ湡
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+ projectName: "",
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -142,21 +139,26 @@
};
const changeDaterange = (value) => {
if (value) {
- searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
- searchForm.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
+ searchForm.value.entryDateStart = value[0];
+ searchForm.value.entryDateEnd = value[1];
} else {
- searchForm.entryDateStart = undefined;
- searchForm.entryDateEnd = undefined;
+ searchForm.value.entryDateStart = undefined;
+ searchForm.value.entryDateEnd = undefined;
}
handleQuery();
};
const getList = () => {
tableLoading.value = true;
- listCustomer({ ...searchForm.value, ...page }).then((res) => {
+ // 鏋勯�犱竴涓柊鐨勫璞★紝涓嶅寘鍚玡ntryDate瀛楁
+ const params = { ...searchForm.value, ...page };
+ params.entryDate = undefined
+ schedulingListPage(params).then((res) => {
tableLoading.value = false;
- tableData.value = res.records;
- page.total = res.total;
- });
+ tableData.value = res.data.records;
+ page.total = res.data.total;
+ }).catch(() => {
+ tableLoading.value = false;
+ })
};
// 瀵煎嚭
@@ -167,7 +169,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/basic/customer/export", {}, "瀹㈡埛妗f.xlsx");
+ proxy.download("/salesLedger/scheduling/export", {}, "鐢熶骇璁㈠崟.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3