From 42d23dbccdc11345dedb3a7ed194cc26808fd013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Thu, 8 Jun 2023 17:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E9=99=A9=E8=BF=94=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/editInsImg/index.js | 15 +++++ pages/order/editInsImg/index.wxml | 39 +++++++++++++ pages/storeData/orderData/index.js | 87 ++-------------------------- pages/storeData/orderData/index.wxml | 4 +- 4 files changed, 63 insertions(+), 82 deletions(-) diff --git a/pages/order/editInsImg/index.js b/pages/order/editInsImg/index.js index 725770c..3039727 100644 --- a/pages/order/editInsImg/index.js +++ b/pages/order/editInsImg/index.js @@ -20,12 +20,18 @@ Page({ insurance_product:'', insurance_date:'', insurance_price:'', + insurance_rebate:0, + insurance_rebate_am:0, business_product:'', business_date:'', business_price:'', + business_rebate:0, + business_rebate_am:0, accident_product:'', accident_date:'', accident_price:'', + accident_rebate:0, + accident_rebate_am:0, }, onLoad: function (options) { for (let key in options) { @@ -61,6 +67,8 @@ Page({ insurance_product:res.data.imgs.insurance_img.product, insurance_date:res.data.imgs.insurance_img.date, insurance_price:res.data.imgs.insurance_img.price, + insurance_rebate:res.data.imgs.insurance_img.rebate, + insurance_rebate_am:res.data.imgs.insurance_img.rebate>0?Math.floor(res.data.imgs.insurance_img.price*res.data.imgs.insurance_img.rebate)/100:0, }) } if(res.data.imgs.business_img.length!=0&&res.data.imgs.business_img.value){ @@ -68,6 +76,8 @@ Page({ business_product:res.data.imgs.business_img.product, business_date:res.data.imgs.business_img.date, business_price:res.data.imgs.business_img.price, + business_rebate:res.data.imgs.business_img.rebate, + business_rebate_am:res.data.imgs.business_img.rebate>0?Math.floor(res.data.imgs.business_img.price*res.data.imgs.business_img.rebate)/100:0, }) } if(res.data.imgs.accident_img.length!=0&&res.data.imgs.accident_img.value){ @@ -75,6 +85,8 @@ Page({ accident_product:res.data.imgs.accident_img.product, accident_date:res.data.imgs.accident_img.date, accident_price:res.data.imgs.accident_img.price, + accident_rebate:res.data.imgs.accident_img.rebate, + accident_rebate_am:res.data.imgs.accident_img.rebate>0?Math.floor(res.data.imgs.accident_img.price*res.data.imgs.accident_img.rebate)/100:0, }) } } @@ -416,18 +428,21 @@ Page({ params['product'] = this.data.insurance_product; params['price'] = this.data.insurance_price; params['date'] = this.data.insurance_date; + params['rebate'] = this.data.insurance_rebate; } else if(e.currentTarget.dataset.type=='business'){ params['type'] = 0; params['product'] = this.data.business_product; params['price'] = this.data.business_price; params['date'] = this.data.business_date; + params['rebate'] = this.data.business_rebate; } else if(e.currentTarget.dataset.type=='accident'){ params['type'] = 2; params['product'] = this.data.accident_product; params['price'] = this.data.accident_price; params['date'] = this.data.accident_date; + params['rebate'] = this.data.accident_rebate; } _.apiQuery.putAppCusorderdataInfo(params).then(res => { diff --git a/pages/order/editInsImg/index.wxml b/pages/order/editInsImg/index.wxml index 8c8548e..69fa97e 100644 --- a/pages/order/editInsImg/index.wxml +++ b/pages/order/editInsImg/index.wxml @@ -34,6 +34,12 @@ 保险金额:{{insurance_img.price}}元 + + 保险返点:{{insurance_rebate}}% + + + 返点金额:{{insurance_rebate_am}}元 + @@ -59,6 +65,13 @@ + + 保险返点 + + + + % + @@ -97,6 +110,12 @@ 保险金额:{{business_img.price}}元 + + 保险返点:{{business_rebate}}% + + + 返点金额:{{business_rebate_am}}元 + @@ -122,6 +141,13 @@ + + 保险返点 + + + + % + @@ -160,6 +186,12 @@ 保险金额:{{accident_img.price}}元 + + 保险返点:{{accident_rebate}}% + + + 返点金额:{{accident_rebate_am}}元 + @@ -185,6 +217,13 @@ + + 保险返点 + + + + % + diff --git a/pages/storeData/orderData/index.js b/pages/storeData/orderData/index.js index 56c2565..2859762 100644 --- a/pages/storeData/orderData/index.js +++ b/pages/storeData/orderData/index.js @@ -44,7 +44,8 @@ function Pie2Chart(canvas, width, height, dpr) { let option = Pie2ChartData chart.setOption(option); chart.on('click',function(e){ - //_.eventBus.emit("pinpai",e.name) + _.eventBus.emit("pinpai",e.name) + console.log(e) }); return chart; } @@ -77,86 +78,10 @@ Page({ this.getAppBizStats_order() - // //消息通讯 是否显示授权用户信息按钮 - // _.eventBus.on("pinpai", this, function(res){ - // this.setData({ - // showPie2Chart:false, - // }) - - // Pie2ChartData = { - // tooltip: { - // fontSize:10, - // trigger: 'item', - // formatter: '{b}: {c} ({d}%)' - // }, - // series: [ - // { - // name: 'Access From', - // type: 'pie', - // selectedMode: 'single', - // radius: [0, '30%'], - // label: { - // position: 'inner', - // fontSize: 10 - // }, - // labelLine: { - // show: false - // }, - // data: [] - // }, - // { - // name: 'Access From', - // type: 'pie', - // radius: ['45%', '65%'], - // labelLine: { - // fontSize:5, - // length:10 - // }, - // label: { - // formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }', - // backgroundColor: '#F6F8FC', - // borderColor: '#8C8D8E', - // borderWidth: 1, - // borderRadius: 4, - // rich: { - // hr: { - // borderColor: '#8C8D8E', - // width: '100%', - // borderWidth: 1, - // height: 0 - // }, - // b: { - // color: '#4C5058', - // fontSize:10, - // lineHeight:20, - // align: 'center', - // }, - // c: { - // color: '#4C5058', - // fontSize:8, - // lineHeight:20, - // align: 'center', - // }, - // } - // }, - // data: [] - // }, - // ] - // }; - - // Pie2ChartData.series[0].data = this.data.pie2.series_data - // if(res == '成交'){ - // Pie2ChartData.series[1].data = this.data.pie2.series_data_1 - // } - // else if(res == '退定'){ - // Pie2ChartData.series[1].data = this.data.pie2.series_data_2 - // } - - // this.setData({ - // showPie2Chart:true, - // ['ecPie2.onInit']:Pie2Chart, - // }) - // }) + //消息通讯 是否显示授权用户信息按钮 + _.eventBus.on("pinpai", this, function(res){ + console.log(res) + }) }, diff --git a/pages/storeData/orderData/index.wxml b/pages/storeData/orderData/index.wxml index ac08e59..490a088 100644 --- a/pages/storeData/orderData/index.wxml +++ b/pages/storeData/orderData/index.wxml @@ -29,6 +29,7 @@ {{pie1Bottom}} + @@ -38,12 +39,13 @@ {{Pie2title}} - + {{pie2Bottom}} +