From a0bee2b2dc61a4c4ca860fcbb34f7848b30fef99 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 十一月 2025 17:18:20 +0800
Subject: [PATCH] 1.湟水峡-生产派单逻辑修改联调
---
src/views/productionManagement/productionDispatching/index.vue | 75 ++++++++++++++-----------------------
1 files changed, 29 insertions(+), 46 deletions(-)
diff --git a/src/views/productionManagement/productionDispatching/index.vue b/src/views/productionManagement/productionDispatching/index.vue
index c28b062..a97c407 100644
--- a/src/views/productionManagement/productionDispatching/index.vue
+++ b/src/views/productionManagement/productionDispatching/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"
@@ -27,6 +27,7 @@
</div>
<div>
<el-button type="primary" @click="openForm('add')">鐢熶骇娲惧伐</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
<div class="table_list">
@@ -49,61 +50,36 @@
<script setup>
import {onMounted, ref} from "vue";
import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue";
-import dayjs from "dayjs";
import {schedulingListPage} from "@/api/productionManagement/productionOrder.js";
+import { ElMessageBox } from "element-plus";
const data = reactive({
searchForm: {
- staffName: "",
- 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"),
+ customerName: "",
+ projectName: "",
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
const tableColumn = ref([
{
- label: "褰曞叆鏃ユ湡",
- prop: "entryDate",
- width: 120,
- },
- {
- label: "鍚堝悓鍙�",
- prop: "salesContractNo",
- width: 220,
- },
- {
- label: "瀹㈡埛鍚堝悓鍙�",
- prop: "customerContractNo",
- width: 250,
- },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: 250,
- },
- {
- label: "椤圭洰鍚嶇О",
- prop: "projectName",
- width:300
- },
- {
label: "浜у搧澶х被",
prop: "productCategory",
- width: 160,
},
{
label: "瑙勬牸鍨嬪彿",
prop: "specificationModel",
- width: 220,
},
{
label: "鍗曚綅",
prop: "unit",
width:90
+ },
+ {
+ label: "褰曞叆鏃ユ湡",
+ prop: "registerDate",
},
{
label: "鏁伴噺",
@@ -112,12 +88,10 @@
{
label: "鎺掍骇鏁伴噺",
prop: "schedulingNum",
- width: 100,
},
{
label: "寰呮帓鏁伴噺",
prop: "pendingQuantity",
- width: 100,
},
]);
const tableData = ref([]);
@@ -160,11 +134,11 @@
schedulingListPage(params).then((res) => {
tableLoading.value = false;
// 澶勭悊姣忔潯鏁版嵁锛屽鍔爌endingQuantity瀛楁
- tableData.value = res.data.records.map(item => ({
+ tableData.value = res.data.data.records.map(item => ({
...item,
pendingQuantity: (Number(item.quantity) || 0) - (Number(item.schedulingNum) || 0)
}));
- page.total = res.data.total;
+ page.total = res.data.data.total;
}).catch(() => {
tableLoading.value = false;
})
@@ -189,13 +163,22 @@
})
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/productionOrder/exportOne", {}, "鐢熶骇娲惧伐.xlsx");
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
+
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