From 9d496497c8f4b9fea9609efd20b96b44016c305d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 17:43:00 +0800
Subject: [PATCH] 付款流水-添加采购合同号筛选
---
src/views/productionManagement/operationScheduling/index.vue | 143 +++++++++++++++++++++++++++++++----------------
1 files changed, 94 insertions(+), 49 deletions(-)
diff --git a/src/views/productionManagement/operationScheduling/index.vue b/src/views/productionManagement/operationScheduling/index.vue
index ca4bae6..082b782 100644
--- a/src/views/productionManagement/operationScheduling/index.vue
+++ b/src/views/productionManagement/operationScheduling/index.vue
@@ -4,10 +4,12 @@
<el-form :model="searchForm" :inline="true">
<el-form-item label="瀹㈡埛鍚嶇О:">
<el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+ style="width: 200px;"
@change="handleQuery" />
</el-form-item>
<el-form-item label="椤圭洰鍚嶇О:">
<el-input v-model="searchForm.projectName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+ style="width: 200px;"
@change="handleQuery" />
</el-form-item>
<el-form-item label="娲惧伐鏃ユ湡:">
@@ -15,9 +17,10 @@
placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
</el-form-item>
<el-form-item label="鐘舵��:">
- <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" style="width: 140px" clearable>
- <el-option label="宸叉帓浜�" :value="1"></el-option>
- <el-option label="寰呮帓浜�" :value="0"></el-option>
+ <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" @change="handleQuery" style="width: 140px" clearable>
+ <el-option label="寰呮帓浜�" :value="1"></el-option>
+ <el-option label="宸叉帓浜�" :value="3"></el-option>
+ <el-option label="鎺掍骇涓�" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
@@ -27,8 +30,9 @@
</div>
<div class="table_list">
<div style="text-align: right" class="mb10">
- <el-button type="primary" @click="openForm('add')">宸ュ簭鎺掍骇</el-button>
- <el-button type="danger" @click="openForm('delete')" plain>鍙栨秷鎺掍骇</el-button>
+ <el-button type="primary" @click="openForm">宸ュ簭鎺掍骇</el-button>
+ <el-button type="danger" @click="handleDelete" plain>鍙栨秷鎺掍骇</el-button>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</div>
<PIMTable
rowKey="id"
@@ -48,74 +52,100 @@
<script setup>
import {onMounted, ref} from "vue";
-import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue";
-import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
+import FormDia from "@/views/productionManagement/operationScheduling/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import dayjs from "dayjs";
+import {listPageProcess, productionDispatchDelete} from "@/api/productionManagement/operationScheduling.js";
const data = reactive({
searchForm: {
staffName: "",
- status: 0,
- 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"),
+ status: 1,
+ entryDate: null, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
const tableColumn = ref([
{
- label: "褰曞叆鏃ユ湡",
- prop: "staffNo",
+ label: "鐘舵��",
+ prop: "status",
+ dataType: "tag",
+ formatData: (params) => {
+ if (params == 3) {
+ return "宸叉帓浜�";
+ } else if (params == 1) {
+ return "寰呮帓浜�";
+ } else {
+ return '鎺掍骇涓�';
+ }
+ },
+ formatType: (params) => {
+ if (params == 3) {
+ return "success";
+ } else if (params == 1) {
+ return "primary";
+ } else {
+ return 'warning';
+ }
+ },
+ },
+ {
+ label: "娲惧伐鏃ユ湡",
+ prop: "schedulingDate",
+ width: 120,
+ },
+ {
+ label: "娲惧伐浜�",
+ prop: "schedulingUserName",
},
{
label: "鍚堝悓鍙�",
- prop: "staffName",
+ prop: "salesContractNo",
+ width: 200,
},
{
label: "瀹㈡埛鍚堝悓鍙�",
- prop: "addressPhone",
- width: 250,
+ prop: "customerContractNo",
+ width: 200,
},
{
label: "瀹㈡埛鍚嶇О",
- prop: "contactPerson",
+ prop: "customerName",
+ width: 200,
},
{
label: "椤圭洰鍚嶇О",
- prop: "contactPhone",
- width:150
+ prop: "projectName",
+ width:300
},
{
label: "浜у搧澶х被",
- prop: "basicBankAccount",
- width: 220,
+ prop: "productCategory",
+ width: 150,
},
{
label: "瑙勬牸鍨嬪彿",
- prop: "bankAccount",
- width: 220,
+ prop: "specificationModel",
+ width: 150,
},
{
label: "鍗曚綅",
- prop: "bankCode",
- width:220
+ prop: "unit",
},
{
- label: "鏁伴噺",
- prop: "maintainer",
+ label: "鎺掍骇鎬绘暟",
+ prop: "schedulingNum",
},
{
- label: "鎺掍骇鏁伴噺",
- prop: "maintenanceTime",
+ label: "宸叉帓浜ф暟閲�",
+ prop: "successNum",
width: 100,
},
{
- label: "寰呮帓鏁伴噺",
- prop: "maintenanceTime",
+ label: "寰呮帓浜ф暟閲�",
+ prop: "pendingNum",
width: 100,
},
]);
@@ -138,11 +168,11 @@
};
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 = dayjs(value[0]).format("YYYY-MM-DD");
+ searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
} else {
- searchForm.entryDateStart = undefined;
- searchForm.entryDateEnd = undefined;
+ searchForm.value.entryDateStart = undefined;
+ searchForm.value.entryDateEnd = undefined;
}
handleQuery();
};
@@ -153,9 +183,14 @@
};
const getList = () => {
tableLoading.value = true;
- staffJoinListPage({...page, ...searchForm.value}).then(res => {
+ const params = { ...searchForm.value, ...page };
+ params.entryDate = undefined
+ listPageProcess(params).then(res => {
tableLoading.value = false;
- tableData.value = res.data.records
+ tableData.value = res.data.records.map(item => ({
+ ...item,
+ pendingNum: (Number(item.schedulingNum) || 0) - (Number(item.successNum) || 0)
+ }));
page.total = res.data.total;
}).catch(err => {
tableLoading.value = false;
@@ -172,12 +207,12 @@
proxy.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�");
return;
}
- if (selectedRows.value[0].unPaymentAmountTotal == 0) {
- proxy.$message.warning("鏃犻渶鍐嶄粯娆�");
+ if (selectedRows.value[0].pendingNum == 0) {
+ proxy.$message.warning("鏃犻渶鍐嶆帓浜�");
return;
}
nextTick(() => {
- formDia.value?.openDialog(type, row)
+ formDia.value?.openDialog(type, selectedRows.value[0])
})
};
@@ -185,26 +220,35 @@
const handleDelete = () => {
let ids = [];
if (selectedRows.value.length > 0) {
+ // 鏂板锛氬垽鏂槸鍚︽湁宸叉帓浜х殑鏁版嵁
+ const hasScheduled = selectedRows.value.some(item => item.status == 3);
+ if (hasScheduled) {
+ proxy.$modal.msgWarning("宸叉帓浜ф暟鎹笉鑳藉彇娑堟帓浜�");
+ return;
+ }
ids = selectedRows.value.map((item) => item.id);
} else {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
return;
}
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+ ElMessageBox.confirm("鏄惁纭鍙栨秷鎺掍骇锛�", "鍒犻櫎鎻愮ず", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
type: "warning",
})
.then(() => {
- staffJoinDel(ids).then((res) => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
- });
+ tableLoading.value = true;
+ productionDispatchDelete(ids)
+ .then((res) => {
+ proxy.$modal.msgSuccess("鍙栨秷鎺掍骇鎴愬姛");
+ getList();
+ })
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
});
};
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -213,12 +257,13 @@
type: "warning",
})
.then(() => {
- proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 1}, "浜哄憳鍏ヨ亴.xlsx");
+ proxy.download("/salesLedger/scheduling/exportTwo", {}, "宸ュ簭鎺掍骇.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
});
};
+
onMounted(() => {
getList();
});
--
Gitblit v1.9.3