diff --git a/README.md b/README.md index 0cad94c..b6933c6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 狸车宝项目 +# 理车宝项目 ## 账号密码 -//狸车宝 +//理车宝 wx71095d4049de3ed1 a80eb6ed68d7bae2d804fe507a4522f7 diff --git a/app.json b/app.json index da63ebf..05bbbce 100644 --- a/app.json +++ b/app.json @@ -53,6 +53,7 @@ "pages/order/editLicenseImg/index", "pages/order/editInsImg/index", "pages/order/editOtherImg/index", + "pages/order/editInvoiceImg/index", "pages/storeData/index", "pages/storeData/customerData/index", "pages/storeData/wechatData/index", @@ -62,7 +63,9 @@ "pages/order/editVoucherImg/index", "pages/dataAnalysis/detail/index", "pages/order/editBuyer/index", - "pages/storeData/subData/index" + "pages/storeData/subData/index", + "pages/signup/code", + "pages/signup/index" ], "echarts": [ { @@ -75,7 +78,7 @@ "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "狸车宝", + "navigationBarTitleText": "理车宝", "navigationBarTextStyle": "black" }, "sitemapLocation": "sitemap.json", diff --git a/commons/js/config.js b/commons/js/config.js index d1bfd92..1eeb891 100644 --- a/commons/js/config.js +++ b/commons/js/config.js @@ -2,8 +2,8 @@ const env = "p"; const version = 1, -//狸车宝 -app_id = '' + +//理车宝 +app_id = '1c156bb57cd6984a' + '', key = '71fd71173b776766a2ae1209d9a2c2ed'; diff --git a/commons/js/lib/wxTimer.js b/commons/js/lib/wxTimer.js index dbfa12d..582edb8 100644 --- a/commons/js/lib/wxTimer.js +++ b/commons/js/lib/wxTimer.js @@ -99,7 +99,11 @@ wxTimer.prototype = { //更新计时器数组 wxTimerList[that.name] = { - wxTimer: tmpTimeStr + wxTimer: tmpTimeStr, + hour: collageHour, + day:collageDay, + min:collageMin, + tim:collageTim }; self.setData({ diff --git a/components/auth/index.wxml b/components/auth/index.wxml index 6306fad..969733e 100644 --- a/components/auth/index.wxml +++ b/components/auth/index.wxml @@ -40,7 +40,7 @@ {{title || '立即登录'}} - 授权手机号即可登录狸车小程序,了解更多狸车资讯,一手活动特惠即刻拥有。 + 授权手机号即可登录理车小程序,了解更多理车资讯,一手活动特惠即刻拥有。 diff --git a/components/footer/footer.wxml b/components/footer/footer.wxml index bd5c82e..3cefbb7 100644 --- a/components/footer/footer.wxml +++ b/components/footer/footer.wxml @@ -2,6 +2,6 @@ Powered by - 狸车 + 理车 \ No newline at end of file diff --git a/pages/allot/index.wxml b/pages/allot/index.wxml index 29652ce..5dbaccc 100644 --- a/pages/allot/index.wxml +++ b/pages/allot/index.wxml @@ -1,7 +1,7 @@ - {{userInfo.uname}},欢迎回到狸车宝! + {{userInfo.uname}},欢迎回到理车宝! {{userInfo.biz_name}} diff --git a/pages/channel/index.js b/pages/channel/index.js index 21b2988..1bcc717 100644 --- a/pages/channel/index.js +++ b/pages/channel/index.js @@ -49,6 +49,7 @@ Page({ this.getUserInfo() this.getAppCity() + this.getAppArea() //20240526新增 //消息通讯 是否显示授权用户信息按钮 _.eventBus.on("isShowProfile", this, function(res){ @@ -131,14 +132,63 @@ Page({ cityArray:cityArray, cityList:res.data.list, }) - this.getAppUserBizs() - // this.getAppStatisticsCust() - // this.getAppStatisticsOrders() - }); }, + //20240526 获取系统配置城市省市 + getAppArea(){ + let area_list = [{ + "name": "福建省", + "id": 1, + "propvince_id": "35", + "children": [{ + "id":"19","city_id":"350900","name":"宁德市"}, + {"id":"18","city_id":"350700","name":"南平市"}] + },{ + "name": "湖南省", + "id": 1, + "propvince_id": "36", + "children": [{ + "city_id": "120900", + "id": "20", + "name": "长沙市", + },{ + "city_id": "120000", + "id": "21", + "name": "湘潭市", + }] + }] + + let area_id = [35,350900] + + + let areaArr = [] + // let cur_index = [] + area_list.forEach((item,index) => { + if(item.propvince_id==area_id[0]){ + item.children.forEach((it,idx)=>{ + if(it.city_id==area_id[1]){ + // cur_index = [item.propvince_id,it.city_id] + this.setData({ + areaIndex: [index,idx] + }) + areaArr = [area_list,area_list[index].children] + return; + } + }) + } + }); + this.setData({ + area_id: area_id, + area_list: area_list, + areaArr: areaArr + // cityList: res.data.list, + }) + }, + + + //获取管理门店 getAppUserBizs(){ let params = {}; @@ -161,6 +211,35 @@ Page({ // this.getAppStatisticsOrders() }, + //20240526选择地区 + changeArea(e){ + this.setData({ + areaIndex: e.detail.value, + }) + }, + + //20240526地区联动 + columnChangeArea(e){ + let multiData = this.data.area_list; + let multiIndex = this.data.areaIndex; + let columnIndex = e.detail.column; + let columnValue = e.detail.value; + + multiIndex[columnIndex] = columnValue; + + console.log(e) + console.log(multiIndex) + console.log(multiData) + + this.setData({ + areaArr: [ + multiData, + multiData[multiIndex[0]].children + ], + }) + + }, + //客户选择季度 changeCust(e) { this.setData({ diff --git a/pages/channel/index.wxml b/pages/channel/index.wxml index c225741..642b193 100644 --- a/pages/channel/index.wxml +++ b/pages/channel/index.wxml @@ -7,13 +7,13 @@ - Hi~ {{hoursTip}}欢迎回到狸车宝! + Hi~ {{hoursTip}}欢迎回到理车宝! {{userInfo.uname}} - 车辆调拨记录 + 车辆调拨记录 @@ -43,12 +43,22 @@ --> 管辖门店 - + {{cityArray[cityIndex]}} + + + + {{area_list[areaIndex[0]].name}}-{{area_list[areaIndex[0]].children[areaIndex[1]].name}} + + + + + + diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js index ad35b1b..3873a8b 100644 --- a/pages/customer/detail/index.js +++ b/pages/customer/detail/index.js @@ -7,8 +7,8 @@ Page({ imgUrl:_.config.imgUrl, tabid:1, tab:[ - {"id":1,"title":"跟进记录"}, - {"id":2,"title":"客户画像"}, + {"id":1,"title":"跟进记录",is_show_all:true}, + {"id":2,"title":"客户画像",is_show_all:false}, ], logslist: [],//日志列表 pageNo: 1, @@ -60,6 +60,7 @@ Page({ phoneNumber:'',//拨打的电话号码 userInfo:'', + optDefeat: false }, onLoad(options) { for (let key in options) { diff --git a/pages/customer/detail/index.wxml b/pages/customer/detail/index.wxml index ffb531e..cf5ae16 100644 --- a/pages/customer/detail/index.wxml +++ b/pages/customer/detail/index.wxml @@ -1,7 +1,7 @@ - + {{detailinfo.tip}} @@ -10,25 +10,13 @@ {{detailinfo.name}}编号 {{detailinfo.id}} - + {{detailinfo.mobile}} - - + - @@ -47,13 +35,13 @@ - + {{item.title}} - + {{item.val}} @@ -180,7 +168,11 @@ - + + + 返回列表 + + 修改信息 diff --git a/pages/customer/optDefeat/index.wxml b/pages/customer/optDefeat/index.wxml index 36550e6..5bc06a2 100644 --- a/pages/customer/optDefeat/index.wxml +++ b/pages/customer/optDefeat/index.wxml @@ -3,15 +3,15 @@ {{total}} - + {{item.name}} ({{item.mobile}}) - 查看详情 + 详细信息 - {{item.reason}} + {{item.reason}} diff --git a/pages/distribute/cashout/index.wxml b/pages/distribute/cashout/index.wxml index f7639e5..978786b 100644 --- a/pages/distribute/cashout/index.wxml +++ b/pages/distribute/cashout/index.wxml @@ -19,7 +19,7 @@ ¥ 2345.12 - 注:若提现出现问题,请联系小狸1812334344 + 注:若提现出现问题,请联系小理1812334344 diff --git a/pages/distribute/index.wxml b/pages/distribute/index.wxml index bb79d90..ed54123 100644 --- a/pages/distribute/index.wxml +++ b/pages/distribute/index.wxml @@ -25,7 +25,7 @@ - 联系小狸 + 联系小理 diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 7d85533..7d0325d 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -7,7 +7,7 @@ - Hi~ {{hoursTip}}欢迎回到狸车宝! + Hi~ {{hoursTip}}欢迎回到理车宝! {{userInfo.uname}} {{userInfo.biz_name}} @@ -15,7 +15,7 @@ - + {{pandianNum}} @@ -43,7 +43,7 @@ 数据看板 - + {{item.today.value}}/{{item.month.value}} {{item.today.title}}/{{item.month.title}} @@ -213,7 +213,7 @@ - 亲爱的用户,关注 “狸车宝”公众号。后续关于客户、订单以及其他相关资讯,将逐步通过服务号通知的形式进行消息通知,请提前关注~ + 亲爱的用户,关注 “理车宝”公众号。后续关于客户、订单以及其他相关资讯,将逐步通过服务号通知的形式进行消息通知,请提前关注~ 联系电话:18965133055 @@ -285,7 +285,7 @@ - 狸车宝 {{versionInfo.number}} 更新说明 + 理车宝 {{versionInfo.number}} 更新说明 {{index+1}}、{{item}} diff --git a/pages/login/index.json b/pages/login/index.json index b760625..5ea3084 100644 --- a/pages/login/index.json +++ b/pages/login/index.json @@ -1,5 +1,5 @@ { - "navigationBarTitleText": "狸车宝", + "navigationBarTitleText": "理车宝", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#1a1c26", "backgroundColor": "#ffffff", diff --git a/pages/login/index.wxml b/pages/login/index.wxml index 6ad6e0c..dfecf3b 100644 --- a/pages/login/index.wxml +++ b/pages/login/index.wxml @@ -1,8 +1,8 @@ diff --git a/pages/login/index.wxss b/pages/login/index.wxss index 745dffa..ea6e6c0 100644 --- a/pages/login/index.wxss +++ b/pages/login/index.wxss @@ -1,15 +1,16 @@ page{ background-repeat:no-repeat; background-position:center bottom; - background-size:100% auto; + background-size:cover; background-color:#1a1c26; - background-image:url('http://qs.haodian.cn/wechat_app/lichebao/login/login-bg.jpg?v=20210721'); + background-image:url('https://img.liche.cn/spacestation/bg.jpg?v=20240526'); } .con-100{width:100rpx;} .login-light{left:0;bottom:322rpx;height:138rpx;animation:light linear 2s infinite;} @keyframes light{0%{opacity:1}100%{opacity:0}} +.login-light{display:none;} .bottom-170{bottom:170rpx;} diff --git a/pages/mine/index.js b/pages/mine/index.js index a25972f..9743028 100644 --- a/pages/mine/index.js +++ b/pages/mine/index.js @@ -40,8 +40,8 @@ Page({ // }, { icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-sucai2.png', - title:'我的素材', - url:'/pages/distribute/index', + title:'签到码', + url:'/pages/signup/code', }, { icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-sezhi2.png', diff --git a/pages/order/detail/index2.js b/pages/order/detail/index2.js index 46bbb28..2f65e48 100644 --- a/pages/order/detail/index2.js +++ b/pages/order/detail/index2.js @@ -1,4 +1,6 @@ import _ from '../../../commons/js/commons' +const timer = require('../../../commons/js/lib/wxTimer'); +var wxTimer = null const app = getApp() Page({ data: { @@ -20,6 +22,10 @@ Page({ other_img:[],//交车合照 isShowCK:false, isShowBill:false, + isShowConfirm: false, //是否显示确认窗口 + confirm_count_down: 3, + wxTimerList: {}, + wxTimer: null, }, onLoad: function (options) { for (let key in options) { @@ -37,6 +43,20 @@ Page({ this.getAppCusorderdata() }, + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + if (wxTimer) { + wxTimer.stop(); + wxTimer = null + } + this.setData({ + wxTimerList: {}, + wxTimer: null, + }) + }, + //获取用户信息 getUserInfo(){ _.apiQuery.getUserInfo().then(res => { @@ -912,10 +932,63 @@ Page({ }) }, + //20240526 确认弹窗 + bindShowConfirm(){ + this.setData({ + isShowConfirm:true, + submitFlag: true + },()=>{ + this.getTimes(this.data.confirm_count_down) + }) + }, + + //关闭短信弹框 + hideConfirm(e){ + this.setData({ + isShowConfirm:false, + }) + }, + + //20240526 确定无误接口 + postConfirmOrder(){ + console.log('postConfirmOrder') + }, + + /** + * 生成倒计时 + */ + getTimes(seconds) { + let that = this + return new Promise(function (resolve, reject) { + wxTimer = new timer({ + name: 'wxTimer', + leftTime: seconds, + complete: function () { + // that.setData({ + // isShow: false + // }) + setTimeout(() => { + that.setData({ + 'submitFlag': false, + wxTimerList: {} + }) + }, 1000); + // that.getAppActivityExchange() + resolve() + }, + }) + wxTimer.start(that); + }) + }, + //页面相关事件处理函数--监听用户下拉动作 onPullDownRefresh(){ this.getAppCusorderdata() this.getAppCusorderV2() + this.setData({ + wxTimerList: {}, + wxTimer: null + }) }, }) \ No newline at end of file diff --git a/pages/order/detail/index2.wxml b/pages/order/detail/index2.wxml index 5a31898..fccedd5 100644 --- a/pages/order/detail/index2.wxml +++ b/pages/order/detail/index2.wxml @@ -28,7 +28,7 @@ - + 车主姓名 {{info.owner_name}} @@ -133,14 +133,18 @@ - - 发票 - - + + 发票 + + {{info.bill_img?'更新':'上传'}} + + + - @@ -233,16 +237,16 @@ --> - + - 车辆证件 + 行驶证 {{register_img.value||car_img.value?'更新':'上传'}} - - + 企微信息 {{imgInfo.imgs.wx_img.value||imgInfo.imgs.mut_wx_img.value?'更新':'上传'}} @@ -341,7 +345,7 @@ - + 实名认证资料 {{imgInfo.imgs.destory_img.value?'更新':'上传'}} @@ -385,7 +389,7 @@ - 车辆证件 + 行驶证 @@ -431,7 +435,7 @@ - + 添加企微 @@ -447,7 +451,7 @@ - + 实名认证资料 @@ -473,7 +477,7 @@ - + 随车资料 @@ -509,7 +513,7 @@ - + 随车资料 @@ -534,9 +538,12 @@ - + - + + @@ -567,4 +574,17 @@ + + + + + + 温馨提示 + 是否提交信息至汽车之家AHOH系统? + + + + + + \ No newline at end of file diff --git a/pages/order/editBuyer/index.wxml b/pages/order/editBuyer/index.wxml index 8277717..e065315 100644 --- a/pages/order/editBuyer/index.wxml +++ b/pages/order/editBuyer/index.wxml @@ -25,9 +25,9 @@ - 《狸车用户注册协议》 + 《理车用户注册协议》 - 《狸车用户隐私政策》 + 《理车用户隐私政策》 diff --git a/pages/order/editFinance/index.wxml b/pages/order/editFinance/index.wxml index 97f59e5..b91c263 100644 --- a/pages/order/editFinance/index.wxml +++ b/pages/order/editFinance/index.wxml @@ -9,7 +9,7 @@ - + 金融机构* @@ -35,13 +35,20 @@ - + + + 月供* + + + + + 是否贴息 - + 按揭返点 @@ -50,7 +57,7 @@ % - + 按揭通知函* @@ -73,7 +80,7 @@ - + 金融机构 {{financeArray[financeIndex]}} @@ -85,17 +92,21 @@ 分期期数 {{nums[numIndex]}} - + + 月供 + {{(price_loan/nums[numIndex])}} + + 是否贴息 {{is_tiexi==1?'是':'否'}} - + 按揭返点 {{loan_rebate}}% - + 按揭通知函 @@ -116,7 +127,7 @@ - + 放款通知函 diff --git a/pages/order/editInvoiceImg/index.js b/pages/order/editInvoiceImg/index.js new file mode 100644 index 0000000..038cd02 --- /dev/null +++ b/pages/order/editInvoiceImg/index.js @@ -0,0 +1,597 @@ +import _ from '../../../commons/js/commons' +const app = getApp() +Page({ + data: { + cardida:{},//身份证正面照片 + cardidb:{},//身份证反面照片 + business_licence:{},//营业执照照片 + car_img:{},//行驶证照片 + register_img:{},//登记证照片 + ins_img:[],//保险照片 + other_img:[],//交车合照 + }, + onLoad: function (options) { + for (let key in options) { + this.setData({ + [key]: options[key] + }) + } + + this.getAppCusorderdata() + + }, + onShow: function () { + + }, + + //获取订单图片 + getAppCusorderdata(){ + let params = {}; + params['id'] = this.data.id; + _.apiQuery.getAppCusorderdata(params).then(res=>{ + this.setData({ + imgInfo:res.data, + }) + if(res.data.img_status == 1){ + this.setData({ + cardida:res.data.imgs.cardida.length==0?{}:res.data.imgs.cardida, + cardidb:res.data.imgs.cardidb.length==0?{}:res.data.imgs.cardidb, + business_licence:res.data.imgs.business_licence.length==0?{}:res.data.imgs.business_licence, + car_img:res.data.imgs.car_img.length==0?{}:res.data.imgs.car_img, + register_img:res.data.imgs.register_img.length==0?{}:res.data.imgs.register_img, + ins_img:res.data.imgs.ins_img.length==0?[]:res.data.imgs.ins_img, + other_img:res.data.imgs.bill_ck_img.length==0?[]:res.data.imgs.bill_ck_img, //20240526 + }) + } + wx.stopPullDownRefresh() + }) + }, + + //选择图片 + chooseImg(e) { + let that = this + //上传身份证正面 + if(e.currentTarget.dataset.type=='cardida'){ + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res.tempFilePaths[0], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let params = {}; + params['id'] = that.data.id; + params['cardida'] = resp.data.data.url; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + 'cardida.value':resp.data.data.url, + 'cardida.img':resp.data.data.full_url, + }) + }).catch(res2=>{ + wx.hideLoading(); + if(res2.code==418){ + that.setData({ + 'cardida.value':resp.data.data.url, + 'cardida.img':resp.data.data.full_url, + 'cardida.err':!res2.data[0].caridA, + 'cardida.errmsg':res2.data[0].errmsg, + }) + } + }); + }else{ + wx.hideLoading(); + wx.showToast({ + title: '上传失败', + icon: 'none', + duration: 2000 + }) + } + }, + }) + }, + fail: res => { + console.log(res) + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传身份证背面 + if(e.currentTarget.dataset.type=='cardidb'){ + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res.tempFilePaths[0], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let params = {}; + params['id'] = that.data.id; + params['cardidb'] = resp.data.data.url; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + 'cardidb.value':resp.data.data.url, + 'cardidb.img':resp.data.data.full_url, + }) + }).catch(res2=>{ + wx.hideLoading(); + if(res2.code==418){ + that.setData({ + 'cardidb.value':resp.data.data.url, + 'cardidb.img':resp.data.data.full_url, + 'cardidb.err':!res2.data[1].caridB, + 'cardidb.errmsg':res2.data[1].errmsg, + }) + } + }); + }else{ + wx.hideLoading(); + wx.showToast({ + title: '上传失败', + icon: 'none', + duration: 2000 + }) + } + }, + }) + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传营业执照 + if(e.currentTarget.dataset.type=='business_licence'){ + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res.tempFilePaths[0], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let params = {}; + params['id'] = that.data.id; + params['business_licence'] = resp.data.data.url; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + 'business_licence.value':resp.data.data.url, + 'business_licence.img':resp.data.data.full_url, + }) + }).catch(res2=>{ + wx.hideLoading(); + if(res2.code==418){ + that.setData({ + 'business_licence.value':resp.data.data.url, + 'business_licence.img':resp.data.data.full_url, + 'business_licence.err':!res2.data[0].business_licence, + 'business_licence.errmsg':res2.data[0].errmsg, + }) + } + }); + }else{ + wx.hideLoading(); + wx.showToast({ + title: '上传失败', + icon: 'none', + duration: 2000 + }) + } + }, + }) + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传登记证 + if(e.currentTarget.dataset.type=='register_img'){ + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res.tempFilePaths[0], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let params = {}; + params['id'] = that.data.id; + params['register_img'] = resp.data.data.url; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + 'register_img.value':resp.data.data.url, + 'register_img.img':resp.data.data.full_url, + }) + }).catch(res2=>{ + wx.hideLoading(); + }); + }else{ + wx.hideLoading(); + wx.showToast({ + title: '上传失败', + icon: 'none', + duration: 2000 + }) + } + }, + }) + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传行驶证 + if(e.currentTarget.dataset.type=='car_img'){ + wx.chooseImage({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res) { + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res.tempFilePaths[0], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let params = {}; + params['id'] = that.data.id; + params['car_img'] = resp.data.data.url; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + 'car_img.value':resp.data.data.url, + 'car_img.img':resp.data.data.full_url, + }) + }).catch(res2=>{ + wx.hideLoading(); + }); + }else{ + wx.hideLoading(); + wx.showToast({ + title: '上传失败', + icon: 'none', + duration: 2000 + }) + } + }, + }) + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传保单 + if(e.currentTarget.dataset.type=='ins_img'){ + wx.chooseImage({ + count: 10 - that.data.ins_img.length, // + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res1) { + wx.showLoading({ + title: '上传中', + }) + let ins_img=that.data.ins_img + let k = 0 + for (let i = 0; i < res1.tempFilePaths.length; i++) { + //上传图片 + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res1.tempFilePaths[i], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + k = k + 1 + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let imgdata = resp.data + let list = [] + list.push({ + value:imgdata.data.url, + img:imgdata.data.full_url, + }) + ins_img=ins_img.concat(list) + if(k == res1.tempFilePaths.length){ + let params = {}; + params['id'] = that.data.id; + let img = [] + ins_img.forEach(item => { + img.push(item.value) + }) + params['ins_imgs'] = img; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + ins_img, + }) + }).catch(res2=>{ + wx.hideLoading(); + }); + } + }else{ + wx.hideLoading(); + } + }, + + }) + } + + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传交车合照 + if(e.currentTarget.dataset.type=='other_img'){ + wx.chooseImage({ + count: 1, // + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res1) { + wx.showLoading({ + title: '上传中', + }) + let other_img=that.data.other_img + let k = 0 + for (let i = 0; i < res1.tempFilePaths.length; i++) { + //上传图片 + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res1.tempFilePaths[i], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + k = k + 1 + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let imgdata = resp.data + let list = [] + list.push({ + value:imgdata.data.url, + img:imgdata.data.full_url, + }) + other_img=other_img.concat(list) + if(k == res1.tempFilePaths.length){ + let params = {}; + params['id'] = that.data.id; + let img = [] + other_img.forEach(item => { + img.push(item.value) + }) + params['other_imgs'] = img; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + other_img, + }) + }).catch(res2=>{ + wx.hideLoading(); + }); + } + }else{ + wx.hideLoading(); + } + }, + + }) + } + + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + + //上传发票 + if(e.currentTarget.dataset.type=='bill_img'){ + wx.chooseImage({ + count: 1, // + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success(res1) { + wx.showLoading({ + title: '上传中', + }) + let other_img=that.data.other_img + let k = 0 + for (let i = 0; i < res1.tempFilePaths.length; i++) { + //上传图片 + wx.uploadFile({ + url:_.config.api.upImg, + filePath:res1.tempFilePaths[i], + name: 'img', + formData: { + 'app': 'liche' + }, + success: (resp) => { + k = k + 1 + resp.data = JSON.parse(resp.data); + if (resp.data.code == 200) { + let imgdata = resp.data + let list = [] + list.push({ + value:imgdata.data.url, + img:imgdata.data.full_url, + }) + other_img=other_img.concat(list) + if(k == res1.tempFilePaths.length){ + let params = {}; + params['id'] = that.data.id; + let img = [] + other_img.forEach(item => { + img.push(item.value) + }) + params['bill_img'] = img; + _.apiQuery.putAppCusorderdata(params).then(res2 => { + wx.hideLoading(); + that.setData({ + other_img, + }) + }).catch(res2=>{ + wx.hideLoading(); + }); + } + }else{ + wx.hideLoading(); + } + }, + + }) + } + + }, + fail: res => { + wx.showToast({ + title: '文件选择失败', + icon: 'none', + duration: 2000 + }) + } + }) + } + }, + + // 编辑页面删除图片 + delImg(e){ + if(e.currentTarget.dataset.type=='ins_img'){ + let ins_img = this.data.ins_img + ins_img.splice(e.currentTarget.dataset.index, 1) + let params = {}; + params['id'] = this.data.id; + let img = [] + ins_img.forEach(item => { + img.push(item.value) + }) + params['ins_imgs'] = img; + _.apiQuery.putAppCusorderdata(params).then(res => { + this.setData({ + ins_img, + }) + }) + }else if(e.currentTarget.dataset.type=='other_img'){ + let other_img = this.data.other_img + other_img.splice(e.currentTarget.dataset.index, 1) + let params = {}; + params['id'] = this.data.id; + let img = [] + other_img.forEach(item => { + img.push(item.value) + }) + params['other_imgs'] = img; + _.apiQuery.putAppCusorderdata(params).then(res => { + this.setData({ + other_img, + }) + }) + } + }, + + //查看图片 + previewImage: function (e) { + if(e.currentTarget.dataset.type=='other_img'){ + let img = [] + this.data.imgInfo.imgs.other_img.forEach(item => { + img.push(item.img) + }) + wx.previewImage({ + current:e.currentTarget.dataset.current, + urls:img, + }) + } + }, + +}) \ No newline at end of file diff --git a/pages/order/editInvoiceImg/index.json b/pages/order/editInvoiceImg/index.json new file mode 100644 index 0000000..84227ea --- /dev/null +++ b/pages/order/editInvoiceImg/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "交车合照信息", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/order/editInvoiceImg/index.wxml b/pages/order/editInvoiceImg/index.wxml new file mode 100644 index 0000000..1889d9a --- /dev/null +++ b/pages/order/editInvoiceImg/index.wxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + 上传发票 + + + + + + + + \ No newline at end of file diff --git a/pages/order/editInvoiceImg/index.wxss b/pages/order/editInvoiceImg/index.wxss new file mode 100644 index 0000000..249582c --- /dev/null +++ b/pages/order/editInvoiceImg/index.wxss @@ -0,0 +1 @@ +/* pages/order/editOtherImg/index.wxss */ \ No newline at end of file diff --git a/pages/order/editOtherImg/index.js b/pages/order/editOtherImg/index.js index 3391b1d..be5db3a 100644 --- a/pages/order/editOtherImg/index.js +++ b/pages/order/editOtherImg/index.js @@ -102,6 +102,7 @@ Page({ }) }, fail: res => { + console.log(res) wx.showToast({ title: '文件选择失败', icon: 'none', diff --git a/pages/order/editOwner/index.wxml b/pages/order/editOwner/index.wxml index 1182e16..04188c3 100644 --- a/pages/order/editOwner/index.wxml +++ b/pages/order/editOwner/index.wxml @@ -57,9 +57,9 @@ - 《狸车用户注册协议》 + 《理车用户注册协议》 - 《狸车用户隐私政策》 + 《理车用户隐私政策》 diff --git a/pages/order/index.wxml b/pages/order/index.wxml index a088e51..29f5cd1 100644 --- a/pages/order/index.wxml +++ b/pages/order/index.wxml @@ -72,29 +72,69 @@ 企业名称 {{item.company}} - - - - {{key}} - - - {{pin.value}} - 移交 - - - - - - {{lable.value}} - - - - {{pin.value}} - {{pin.value}} + + + + + + + + {{key}} + + + {{pin.value}} + 移交 + + + + + + {{lable.value}} + + + + {{pin.value}} + {{pin.value}} + + + + - + + + + + + + {{key}} + + + {{pin.value}} + 移交 + + + + + + {{lable.value}} + + + + {{pin.value}} + {{pin.value}} + + + + + + + 注:{{item.remark}} diff --git a/pages/order/register/index.js b/pages/order/register/index.js index 557845f..77eecba 100644 --- a/pages/order/register/index.js +++ b/pages/order/register/index.js @@ -105,6 +105,8 @@ Page({ price_loan0:'',//首付按揭金额 firstPayArr:['现金','0首付','按揭',],//首付类型 firstPayIndex:0,//首付类型 + is_get_brand: false,//20240526是否店内上牌 + is_get_insure: false,//20240526是否店内投保 }, //生命周期函数--监听页面加载 onLoad: function (options) { @@ -160,24 +162,24 @@ Page({ icon: 'none' }) } - else if(this.data.main_type == 0&&this.data.owner_name == ''){ - wx.showToast({ - title: '请填写车主姓名', - icon: 'none' - }) - } - else if(this.data.main_type == 0&&this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ - wx.showToast({ - title: '请填写车主手机号', - icon: 'none' - }) - } - else if(this.data.main_type == 0&&(this.data.owner_cardid == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.owner_cardid))){ - wx.showToast({ - title: '请填写正确车主身份证', - icon: 'none' - }) - } + // else if(this.data.main_type == 0&&this.data.owner_name == ''){ + // wx.showToast({ + // title: '请填写车主姓名', + // icon: 'none' + // }) + // } + // else if(this.data.main_type == 0&&this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){ + // wx.showToast({ + // title: '请填写车主手机号', + // icon: 'none' + // }) + // } + // else if(this.data.main_type == 0&&(this.data.owner_cardid == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.owner_cardid))){ + // wx.showToast({ + // title: '请填写正确车主身份证', + // icon: 'none' + // }) + // } // else if(this.data.main_type == 0&&(this.data.address == '')){ // wx.showToast({ // title: '请填写车主地址', @@ -196,12 +198,12 @@ Page({ icon: 'none' }) } - else if(this.data.c_city_id == ''){ - wx.showToast({ - title: '请选择上牌城市', - icon: 'none' - }) - } + // else if(this.data.c_city_id == ''){ + // wx.showToast({ + // title: '请选择上牌城市', + // icon: 'none' + // }) + // } else{ this.setData({ step:2, @@ -219,16 +221,16 @@ Page({ title: '请选择车辆版本', icon: 'none' }) - }else if(this.data.color_id == '' ){ - wx.showToast({ - title: '请选择车身颜色', - icon: 'none' - }) - }else if(this.data.incolor_id == '' ){ - wx.showToast({ - title: '请选择内饰颜色', - icon: 'none' - }) + // }else if(this.data.color_id == '' ){ + // wx.showToast({ + // title: '请选择车身颜色', + // icon: 'none' + // }) + // }else if(this.data.incolor_id == '' ){ + // wx.showToast({ + // title: '请选择内饰颜色', + // icon: 'none' + // }) }else{ this.setData({ step:3, @@ -242,12 +244,12 @@ Page({ icon: 'none' }) } - else if(this.data.delry_time == ''){ - wx.showToast({ - title: '请输入期望交付时间', - icon: 'none' - }) - } + // else if(this.data.delry_time == ''){ + // wx.showToast({ + // title: '请输入期望交付时间', + // icon: 'none' + // }) + // } else if(this.data.if_zero_firstpay!=1&&(!this.data.priceinfo.sdeposit||this.data.priceinfo.sdeposit == '')){ wx.showToast({ title: '请设置定金', @@ -1513,4 +1515,19 @@ Page({ } }, + //20240526是否店内上牌 + changeIsGetBrand(e){ + console.log('是否店内上牌',e.detail.value) + this.setData({ + is_get_brand: e.detail.value + }) + }, + + //20240526是否店内投保 + changeIsGetInsure(e){ + console.log('是否店内投保',e.detail.value) + this.setData({ + is_get_insure: e.detail.value + }) + } }) \ No newline at end of file diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml index 6428e85..4aaa286 100644 --- a/pages/order/register/index.wxml +++ b/pages/order/register/index.wxml @@ -49,7 +49,7 @@ - + 车主信息 @@ -124,9 +124,9 @@ - 《狸车用户注册协议》 + 《理车用户注册协议》 - 《狸车用户隐私政策》 + 《理车用户隐私政策》 @@ -161,7 +161,7 @@ - 车身颜色* + 车身颜色 请选择 @@ -171,7 +171,7 @@ - 内饰颜色* + 内饰颜色 请选择 @@ -214,7 +214,7 @@ - 期望交付时间* + 期望交付时间 请选择 @@ -223,10 +223,10 @@ - + 颜色加价 {{priceinfo.price_color}} @@ -297,7 +297,7 @@ --> - + 委托代办 @@ -324,7 +324,7 @@ - + 精品选装 @@ -363,6 +363,26 @@ 特别约定