From 2a436c650a19bd5de5a57e23d4604cc7412edba3 Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Sat, 24 Aug 2024 19:39:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=91=E6=8F=B4=E9=9B=86=E6=88=90?= =?UTF-8?q?=E8=BF=9B=E5=BA=A64/5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/rescue/info.js | 10 + src/views/company/staff/index.vue | 19 +- src/views/rescue/customerDriverIndex.vue | 12 +- src/views/rescue/driverIndex.vue | 5 +- src/views/rescue/index.vue | 9 +- src/views/rescue/refuelRecord.vue | 9 +- src/views/rescue/rescueCarSpend.vue | 8 +- src/views/rescue/rescueCw.vue | 306 ++++++++++++----------- 8 files changed, 215 insertions(+), 163 deletions(-) diff --git a/src/api/rescue/info.js b/src/api/rescue/info.js index a3b4c0e..fbc190c 100644 --- a/src/api/rescue/info.js +++ b/src/api/rescue/info.js @@ -100,3 +100,13 @@ export function downloadOrder(params) { responseType: 'blob' }) } + +export function exportManagement(params) { + return request({ + url: '/system/rescueInfo/exportManagement', + method: 'get', + params, + responseType: 'blob' + }) +} + diff --git a/src/views/company/staff/index.vue b/src/views/company/staff/index.vue index c88fda8..bd35f61 100644 --- a/src/views/company/staff/index.vue +++ b/src/views/company/staff/index.vue @@ -2,6 +2,11 @@
+ + + @@ -86,6 +91,9 @@ >新增 + + + { + // console.log(res) + // }) + // } } } diff --git a/src/views/rescue/customerDriverIndex.vue b/src/views/rescue/customerDriverIndex.vue index c20bec6..18286af 100644 --- a/src/views/rescue/customerDriverIndex.vue +++ b/src/views/rescue/customerDriverIndex.vue @@ -336,9 +336,9 @@ import { handleUpdate(row) { const data = { ...row, - firstDriverIds: row.firstDriverIds.split(",").map(id => parseInt(id)), - secondDriverIds: row.secondDriverIds.split(",").map(id => parseInt(id)), - thirdDriverIds: row.thirdDriverIds.split(",").map(id => parseInt(id)) + firstDriverIds: row.firstDriverIds ? row.firstDriverIds.split(",").map(id => parseInt(id)) : "", + secondDriverIds: row.secondDriverIds ? row.secondDriverIds.split(",").map(id => parseInt(id)) : "", + thirdDriverIds: row.thirdDriverIds ? row.thirdDriverIds.split(",").map(id => parseInt(id)) : "" } this.form = data // console.log(this.form) @@ -351,9 +351,9 @@ import { this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { - this.form.firstDriverIds = this.form.firstDriverIds.join(",") - this.form.secondDriverIds = this.form.secondDriverIds.join(",") - this.form.thirdDriverIds = this.form.thirdDriverIds.join(",") + this.form.firstDriverIds = this.form.firstDriverIds ? this.form.firstDriverIds.join(",") : null + this.form.secondDriverIds = this.form.secondDriverIds ? this.form.secondDriverIds.join(",") : null + this.form.thirdDriverIds = this.form.thirdDriverIds ? this.form.thirdDriverIds.join(",") : null edept_driver(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; diff --git a/src/views/rescue/driverIndex.vue b/src/views/rescue/driverIndex.vue index 6ca3563..84eacec 100644 --- a/src/views/rescue/driverIndex.vue +++ b/src/views/rescue/driverIndex.vue @@ -683,11 +683,10 @@ export default { }, /** 修改按钮操作 */ handleUpdate(row) { - console.log(row) this.reset() this.form = row this.form.realName = row.nickName - this.carfrom.carInfoList = !!row.carInfoList ? row.carInfoList : this.carfrom.carInfoList + this.carfrom.carInfoList = !row.carInfoList ? row.carInfoList : this.carfrom.carInfoList this.open = true this.title = '修改司机信息' @@ -706,7 +705,7 @@ export default { this.$refs['carfrom'].validate(carValid => { if (carValid) { if (this.form.id != null) { - this.form.carInfoList = this.carfrom.carInfoList + this.form.carInfoList = this.carfrom.carInfoList.carType updateDriver(this.form).then(response => { this.$modal.msgSuccess('修改成功') this.open = false diff --git a/src/views/rescue/index.vue b/src/views/rescue/index.vue index 5b950a8..56249cc 100644 --- a/src/views/rescue/index.vue +++ b/src/views/rescue/index.vue @@ -100,7 +100,11 @@ - + + + @@ -167,7 +171,7 @@ {{ scope.row.setMoney/100 }} - + @@ -500,7 +504,6 @@ export default { editInfoFront(type,index){ this.editType =type this.editIdx =index - }, cancelRepayment(){ this.repaymentForm = {} diff --git a/src/views/rescue/refuelRecord.vue b/src/views/rescue/refuelRecord.vue index 0063a2b..5f95b88 100644 --- a/src/views/rescue/refuelRecord.vue +++ b/src/views/rescue/refuelRecord.vue @@ -29,6 +29,11 @@ + + + @@ -154,8 +159,8 @@ export default { getList() { this.loading = true; listRefuelRecord(this.queryParams).then(response => { - this.refuelRecordList = response.rows; - this.total = response.total; + this.refuelRecordList = response.data.records; + this.total = response.data.total; this.loading = false; }); }, diff --git a/src/views/rescue/rescueCarSpend.vue b/src/views/rescue/rescueCarSpend.vue index fc21935..44617a7 100644 --- a/src/views/rescue/rescueCarSpend.vue +++ b/src/views/rescue/rescueCarSpend.vue @@ -91,7 +91,11 @@ - + + + - +