From 7e89486b56e01f4743ff8da8ed0395bd28595824 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 06 五月 2024 15:15:59 +0800
Subject: [PATCH] 工单阈值完善
---
src/views/system/work-order/distribute/index.vue | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/views/system/work-order/distribute/index.vue b/src/views/system/work-order/distribute/index.vue
index 1db483d..dce8735 100644
--- a/src/views/system/work-order/distribute/index.vue
+++ b/src/views/system/work-order/distribute/index.vue
@@ -112,6 +112,7 @@
reserve-keyword
placeholder="璇烽�夋嫨鏉ユ簮"
:remote-method="remoteGetPoints"
+ @change="setPointId"
:loading="selectLoading">
<el-option
v-for="item in pointList"
@@ -146,6 +147,10 @@
name: 'index',
data() {
return {
+ selectedIdsDistributeForm: {
+ ids: [],
+ unitId: null
+ },
unitList: [],
settingForm: {
// 绂荤嚎
@@ -197,7 +202,7 @@
queryParams: {
unitId: null,
pageNum: 1,
- pageSize: 20,
+ pageSize: 10,
},
// 鎬绘潯鏁�
total: 0,
@@ -243,6 +248,10 @@
},
},
methods: {
+ setPointId(selectedValue) {
+ const selectedItem = this.pointList.find(item => item.value === selectedValue);
+ this.form.pointId = selectedItem.id
+ },
submitSetting() {
this.$refs['settingForm'].validate((valid) => {
if (valid) {
@@ -257,7 +266,7 @@
this.loading = true;
this.selectUnit();
distributeWorkOrder(this.queryParams).then(res => {
- this.workOrderList = res.data;
+ this.workOrderList = res.data.records;
this.total = res.total;
this.loading = false;
})
@@ -278,7 +287,8 @@
},
// 鍏ㄩ儴涓嬪彂
allDistribute() {
- selectedIdsDistribute([], this.unitId).then(res => {
+ this.selectedIdsDistributeForm.unitId = this.unitId
+ selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => {
this.$message.success("宸ュ崟涓嬪彂鎴愬姛")
this.page();
})
@@ -304,8 +314,11 @@
this.$message.warning("璇峰厛閫夋嫨瑕佷笅鍙戠殑宸ュ崟")
return
}
- selectedIdsDistribute(this.multipleSelection, this.unitId).then(res => {
+ this.selectedIdsDistributeForm.unitId = this.unitId;
+ this.selectedIdsDistributeForm.ids = this.multipleSelection;
+ selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => {
this.$message.success("宸ュ崟涓嬪彂鎴愬姛")
+ this.selectedIdsDistributeForm.ids = [];
this.page();
})
},
--
Gitblit v1.8.0