diff --git a/components/orderCard.vue b/components/orderCard.vue index 876a358..6d2aac3 100644 --- a/components/orderCard.vue +++ b/components/orderCard.vue @@ -11,6 +11,7 @@ {{ order.carNum }} + {{order.repairTypeText}} {{ order.carModel }} @@ -40,6 +41,15 @@ 服务顾问:{{ order.counselorName }} + + 业务来源:{{ order.busiFrom }} + + + 支付方式:{{ order.payTypeText }} + + + 支付方式:未结算 + diff --git a/config.js b/config.js index 3c3de85..26e65b7 100644 --- a/config.js +++ b/config.js @@ -1,21 +1,24 @@ // 应用全局配置 module.exports = { + //生产 baseUrl: 'https://www.nuoyunr.com', - // baseUrl: 'http://192.168.110.93:48080', - // baseUrl: 'http://192.168.1.4:48080', - // baseUrl: "http://localhost:48080", + //开发 + // baseUrl: "http://192.168.1.17:48080", // baseUrl: "http://rzqhb7.natappfree.cc", imagesUrl: 'http://shequ.0315e.com/static/images/pages/', baseImageUrl: 'https://www.nuoyunr.com/minio/', shareUrl: 'https://www.lighting-it.cn/share?inviteId=', + //生产 wsUrl: 'ws://122.51.230.86:48080', + //本地 + // wsUrl: 'ws://192.168.1.17:48080', //com.carService.qx // 应用信息 appInfo: { // 应用名称 name: "智修小助手", // 应用版本 - version: "2.2", + version: "2.3", // 应用logo logo: "/static/logo.png'", // 官方网站 diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index c2d0475..493008d 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -278,7 +278,7 @@ export default { menuList: [ { title: '新建工单', - desc: '直接添加客户订单', + desc: '直接添加订单', icon: require('@/static/icons/homeMenuIcon/menu1.png'), path: '/pages-order/addOrder/addOrder' }, diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue index 50fb59d..f778591 100644 --- a/pages-order/addOrder/addOrder.vue +++ b/pages-order/addOrder/addOrder.vue @@ -236,6 +236,20 @@ + + + 客户来源 + + {{ cusFromList[cusFromIndex].label}} + + + + 业务来源 + + {{ busiFromList[busiFromIndex].label}} + + + 保险名称 @@ -289,7 +303,6 @@ {{ repairTypes[repairTypeIndex].label}} - @@ -381,6 +394,10 @@ export default { ticketType: '01', repairTypes:[], repairTypeIndex:0, + cusFromList:[], + cusFromIndex:0, + busiFromList:[], + busiFromIndex:0, partDisposals:[], partDisposalIndex:0, formData:{ @@ -401,6 +418,8 @@ export default { insuranceExpiryDate:null, jiaoqiang:null, shangye:null, + cusFrom:null, + busiFrom:null, }, options: [ {label: 'A单', value: '01'}, @@ -440,6 +459,15 @@ export default { if(!this.formData.handleMobile){ this.formData.handleMobile = newVal.phoneNumber } + if(!this.formData.cusFrom){ + for (let i = 0; i < this.cusFromList.length; i++) { + if(newVal.dataFrom==this.cusFromList[i].value){ + this.cusFromIndex = i + this.formData.cusFrom = newVal.dataFrom + return + } + } + } console.log('obj changed:', newVal, oldVal) }, deep: true @@ -457,8 +485,10 @@ export default { this.phone = data.phone this.listUserInfo() } + this.initDict("repair_busi_from") this.initDict("insurance_type") this.initDict("repair_type") + this.initDict("cus_data_from") this.initDict("repair_part_disposal") }, onShow() { @@ -492,10 +522,20 @@ export default { this.repairTypeIndex = newIndex; this.formData.repairType = this.repairTypes[newIndex].value; }, + cusFromChange(event){ + const newIndex = event.detail.value; + this.cusFromIndex = newIndex; + this.formData.cusFrom = this.cusFromList[newIndex].value; + }, + busiFromChange(event){ + const newIndex = event.detail.value; + this.busiFromIndex = newIndex; + this.formData.busiFrom = this.busiFromList[newIndex].value; + }, partDisposalChange(event){ const newIndex = event.detail.value; this.partDisposalIndex = newIndex; - this.formData.partDisposal = this.repairTypes[newIndex].value; + this.formData.partDisposal = this.partDisposals[newIndex].value; }, @@ -515,10 +555,14 @@ export default { if("repair_type"==dictCode){ this.repairTypes = res.data this.buildRepairType() - }else if("repair_part_disposal"){ + }else if("repair_part_disposal"==dictCode){ this.partDisposals = res.data - }else if("insurance_type"){ + }else if("insurance_type"==dictCode){ this.buildInsuranceTypeList() + }else if("cus_data_from"==dictCode){ + this.cusFromList = res.data + }else if("repair_busi_from"==dictCode){ + this.busiFromList = res.data } }) } @@ -528,10 +572,14 @@ export default { if("repair_type"==dictCode){ this.repairTypes = dictArray this.buildRepairType() - }else if("repair_part_disposal"){ + }else if("repair_part_disposal"==dictCode){ this.partDisposals = dictArray - }else if("insurance_type"){ + }else if("insurance_type"==dictCode){ this.buildInsuranceTypeList() + }else if("cus_data_from"==dictCode){ + this.cusFromList = dictArray + }else if("repair_busi_from"==dictCode){ + this.busiFromList = dictArray } }) } @@ -613,6 +661,12 @@ export default { //新增工单 submit() { let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",") + if(!this.formData.busiFrom){ + this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value + } + if(!this.formData.cusFrom){ + this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value + } const data = { userId: this.userInfo.id, ticketNo: this.ticketNo, @@ -634,6 +688,7 @@ export default { if(this.insuranceTypeArray.length>0){ data.insuranceType= this.insuranceTypeArray.join(",") } + if(this.pageData && this.pageData.hasOwnProperty("bookingId")){ data.bookingId = this.pageData.bookingId } diff --git a/pages-order/addOrder/editOrder.vue b/pages-order/addOrder/editOrder.vue index 30df259..9231d5a 100644 --- a/pages-order/addOrder/editOrder.vue +++ b/pages-order/addOrder/editOrder.vue @@ -110,6 +110,20 @@ + + + 客户来源 + + {{ cusFromList[cusFromIndex].label}} + + + + 业务来源 + + {{ busiFromList[busiFromIndex].label}} + + + 保险名称 @@ -163,7 +177,6 @@ {{ repairTypes[repairTypeIndex].label}} - @@ -174,12 +187,23 @@ 保存工单 + + + + + + + + + diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue index cad20bd..f75f44e 100644 --- a/pages-order/orderDetail/orderDetail.vue +++ b/pages-order/orderDetail/orderDetail.vue @@ -66,6 +66,10 @@ 联系方式 {{ ticketInfo.userMobile }} + + 客户来源 + {{ ticketInfo.customerInfo.dataFromText }} + 性别 {{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }} @@ -78,6 +82,10 @@ 经办人电话 {{ ticketInfo.handleMobile }} + + 业务来源 + {{ ticketInfo.busiFrom }} + 车架号 diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue index 930314d..3308639 100644 --- a/pages-order/orderList/orderList.vue +++ b/pages-order/orderList/orderList.vue @@ -11,7 +11,7 @@ - + 清空 diff --git a/pages/myCar/addCarUser.vue b/pages/myCar/addCarUser.vue index 784bcb0..4fac3c1 100644 --- a/pages/myCar/addCarUser.vue +++ b/pages/myCar/addCarUser.vue @@ -131,6 +131,7 @@ v-model="datePickerValue" :formatter="formatter" :show="datePickerShow" + :minDate="minDate" mode="date" @cancel="datePickerCancel" @confirm="datePickerConfirm" @@ -200,9 +201,11 @@ export default { //可选车辆性质范围 natureList: [], natureIndex: 0, + minDate:null, }; }, onLoad(data) { + this.minDate = Number(new Date('1980-01-01')); // 没有数据 需要赋值一下初始化 if(data && data.hasOwnProperty("userInfo")){ let thisUserInfoObj = JSON.parse(data.userInfo) @@ -422,9 +425,9 @@ export default { message: '上传中' }) }) - uni.showLoading({ - title: '正在识别中...' - }); + // uni.showLoading({ + // title: '正在识别中...' + // }); try { for (let i = 0; i < lists.length; i++) { const result = await this.uploadFilePromise(lists[i].url) @@ -438,6 +441,10 @@ export default { } }catch (e){ uni.hideLoading() + uni.showToast({ + title: '无法识别该行驶证', + icon: 'success' + }) } }, uploadFilePromise(url) { diff --git a/pages/myCar/carDetail.vue b/pages/myCar/carDetail.vue index 2405dab..1a7819e 100644 --- a/pages/myCar/carDetail.vue +++ b/pages/myCar/carDetail.vue @@ -114,6 +114,7 @@ :formatter="formatter" :show="datePickerShow" mode="date" + :minDate="minDate" @cancel="datePickerCancel" @confirm="datePickerConfirm" > @@ -132,7 +133,7 @@ import request from "@/utils/request"; import config from '@/config' import {bus} from "@/utils/eventBus"; import upload from "@/utils/upload"; -import {getDictByCode} from "@/utils/utils"; +import {getDictByCode,formatDate} from "@/utils/utils"; export default { components: { @@ -179,13 +180,17 @@ export default { natureList: [], natureIndex: 0, index:null, + minDate:null, }; }, onLoad(options) { + this.minDate = Number(new Date('1980-01-01')); // 如果是修改 if (options.car) { // 有数据为编辑 或 删除 this.car = JSON.parse(decodeURIComponent(options.car)); + //处理几个时间 + this.dealDateTime() this.brandId = this.car.carBrand console.log('初始化页面数据', this.car) this.bo1 = true; @@ -210,6 +215,17 @@ export default { console.log(this.car) }, methods: { + dealDateTime(){ + if(this.car.carRegisterDate){ + this.car.carRegisterDate = formatDate(this.car.carRegisterDate) + } + if(this.car.nextInspectionDate){ + this.car.nextInspectionDate = formatDate(this.car.nextInspectionDate) + } + if(this.car.insuranceExpiryDate){ + this.car.insuranceExpiryDate = formatDate(this.car.insuranceExpiryDate) + } + }, onchange(e) { this.brandId = e.detail.value[0].id this.brandName = e.detail.value[0].brandName @@ -395,18 +411,27 @@ export default { message: '上传中' }) }) - uni.showLoading({ - title: '正在识别中...' - }); - for (let i = 0; i < lists.length; i++) { - const result = await this.uploadFilePromise(lists[i].url) - let item = this[`fileList${event.name}`][fileListLen] - this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { - status: 'success', - message: '', - url: result - })) - fileListLen++ + // uni.showLoading({ + // title: '正在识别中...' + // }); + try { + for (let i = 0; i < lists.length; i++) { + let result = await this.uploadFilePromise(lists[i].url) + let item = this[`fileList${event.name}`][fileListLen] + this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { + status: 'success', + message: '', + url: result + })) + fileListLen++ + } + } catch (e) { + //识别报错 + uni.hideLoading() + uni.showToast({ + title: '无法识别该行驶证', + icon: 'success' + }) } }, uploadFilePromise(url) { diff --git a/utils/utils.js b/utils/utils.js index e666ebc..4bf3a9a 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -298,6 +298,7 @@ export function builderOrder(order) { userPhone: order.userMobile, counselorName: order.adviserName, canOperate:order.canOperate, + ...order, } }