From 4d3882045d317ddb3c7416f606ac738ca6ec2c01 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期三, 23 七月 2025 10:21:05 +0800 Subject: [PATCH] 1.生产管理联调 --- src/views/productionManagement/productionOrder/index.vue | 74 ++++++++++++++++++++---------------- 1 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue index 87ca041..e65fd3b 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: [], // 褰曞叆鏃ユ湡 + entryDateStart: '', + entryDateEnd: '', }, }); 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("宸插彇娑�"); @@ -175,6 +177,12 @@ }; onMounted(() => { + searchForm.value.entryDate = [ + dayjs().format("YYYY-MM-DD"), + dayjs().add(1, "day").format("YYYY-MM-DD"), + ] + searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD") + searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD") getList(); }); </script> -- Gitblit v1.9.3