From 36522646e804a876fa7cf2f4be50845de0ad7766 Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Wed, 23 Apr 2025 17:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/Neworder.vue | 6 +- pages/index/meetCarOrder.vue | 89 ++++++++++++++++++++- pages/index/newindex.vue | 45 +++++++++-- pages/staff/staff.vue | 147 +++++++++++++++++++++++++++++++++-- utils/utils.js | 96 ++++++++++++----------- 5 files changed, 317 insertions(+), 66 deletions(-) diff --git a/pages/index/Neworder.vue b/pages/index/Neworder.vue index 4d6d0ba..cce154e 100644 --- a/pages/index/Neworder.vue +++ b/pages/index/Neworder.vue @@ -652,11 +652,9 @@ }) }, async getgoodes() { - if (this.carNum == '' || this.customerSource == "" || this.skuId == '' || this.leadManId == - undefined || this.carRegisterDate == '' || this.meetManId == undefined || this.meetManId == - undefined) { + if (this.carNum == '' || this.customerSource == "" || this.skuId == '' || this.carRegisterDate == '') { uni.showToast({ - title: '车牌号 客户来源 商品 引车员 车辆注册日期 接车人 必填!', + title: '车牌号 客户来源 商品 车辆注册日期 必填!', icon: 'none' }) return diff --git a/pages/index/meetCarOrder.vue b/pages/index/meetCarOrder.vue index cdd419f..45a4019 100644 --- a/pages/index/meetCarOrder.vue +++ b/pages/index/meetCarOrder.vue @@ -29,6 +29,17 @@ + + 接车类型 + + + + + + + 客户姓名 @@ -86,6 +97,18 @@ + + 备注 + + + + + + 接车图片 + + + 接车 @@ -107,7 +130,7 @@ + @confirm="confirmMeetMan" @cancel="showMeetMan = false" keyName=" "> @@ -141,10 +164,12 @@ fileList: [], title: '新增接车', customerSource: '', + fileList1: [], buyName: '', nickname: '', buyPhone: '', userAddress: '', + content: '', carNum: '', baseImageUrl: this.$baseImageUrl, carStatus: '', @@ -181,6 +206,16 @@ baseUrl: this.$baseImageUrl, goodsId: '', msg: '3', + radiolist1: [{ + name: '接待', + label: 1 + }, + { + name: '上门取车', + label: 2 + } + ], + radiovalue1: 1, tapnum: 0, fenlist: [], goodstext: '', @@ -227,6 +262,39 @@ }) } }, + async afterRead(event) { + // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 + let lists = [].concat(event.file) + let fileListLen = this[`fileList${event.name}`].length + lists.map((item) => { + this[`fileList${event.name}`].push({ + ...item, + + }) + }) + for (let i = 0; i < lists.length; i++) { + const result = await this.uploadFilePromise(lists[i].url) + console.log(result) + let item = this[`fileList${event.name}`][fileListLen] + this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { + status: 'success', + message: '', + url: result + })) + fileListLen++ + } + }, + async uploadFilePromise(url) { + let res = await upload({ + url: '/common/upload', + filePath: url, + }) + return res.data.url + + }, + deletePic(event) { + this[`fileList${event.name}`].splice(event.index, 1) + }, handleRadioChange(newValue) { if (newValue === '0') { this.recordTime = '' @@ -244,6 +312,9 @@ } return value }, + groupChange() { + console.log(this.radiovalue1); + }, changeHandler(e) { const { columnIndex, @@ -410,9 +481,16 @@ }) }, async getgoodes() { - if (this.carNum == '' || this.carRegisterDate == '') { + if (this.carNum == '' || this.carRegisterDate == '' || !this.buyPhone) { uni.showToast({ - title: '车牌号 车辆注册日期 必填!', + title: '车牌号 车辆注册日期 联系方式 必填!', + icon: 'none' + }) + return + } + if (this.fileList1.length == 0) { + uni.showToast({ + title: '车辆照片必须上传', icon: 'none' }) return @@ -437,6 +515,8 @@ carRegisterDate: this.carRegisterDate, meetManId: this.meetManId, appointmentId: this.appointmentId, + content: this.content, + images: this.fileList1.map(item => item.url).join(',') } let res = await request({ @@ -446,7 +526,8 @@ }) if (res.code == 200) { uni.showToast({ - title: "可以接车了" + title: "接车成功", + icon: "none" }) } setTimeout(() => { diff --git a/pages/index/newindex.vue b/pages/index/newindex.vue index 123643c..4f10603 100644 --- a/pages/index/newindex.vue +++ b/pages/index/newindex.vue @@ -32,6 +32,7 @@ + {{ dateStr || '' }} {{ week || '' }} {{ time || '' }} 当日订单 @@ -49,7 +50,6 @@ - {{ dateStr || '' }} {{ week || '' }} {{ time || '' }} @@ -134,9 +134,7 @@ - - 转订单 - + @@ -165,12 +163,20 @@ 客户来源 自来客户 - + + 取消预约 + + + 转订单 + + + + @@ -386,6 +392,33 @@ loop: true // 是否可循环预览 }); }, + cancelAppoin(id) { + uni.showModal({ + title: '提示', + content: '确定将此预约取消吗?', + success: async (res) => { + if (res.confirm) { + try { + request({ + url: `/appInspection/goods/delAppointment`, + method: 'POST', + params: { + appointmentId: id + } + }).then(res => { + this.onRefresherrefresh() + }) + } catch (error) { + console.error('取消预约:', error); + uni.showToast({ + title: '取消', + icon: 'none' + }); + } + } + } + }); + }, goAddOrder(data) { this.clearMyInterval() uni.navigateTo({ diff --git a/pages/staff/staff.vue b/pages/staff/staff.vue index fcb42ab..2f31e7d 100644 --- a/pages/staff/staff.vue +++ b/pages/staff/staff.vue @@ -45,7 +45,8 @@ - 重审中 + 重检中 + 复检中 @@ -61,10 +62,21 @@ - 待接车 + 待接车 + 上门取车 - - + + + + + + @@ -79,6 +91,12 @@ 电话: {{ item.buyPhone }} + + + 接车地址: + {{ item.meetAddress }} + +