保险返点
This commit is contained in:
@@ -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 => {
|
||||
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
<view class="mt20 relative font-28">
|
||||
保险金额:{{insurance_img.price}}元
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
保险返点:{{insurance_rebate}}%
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
返点金额:{{insurance_rebate_am}}元
|
||||
</view>
|
||||
</view>
|
||||
<view wx:elif="{{insurance_img.value}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
@@ -59,6 +65,13 @@
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 pr40 font-28">
|
||||
<view class="absolute left-0 box-middle">保险返点</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入保险返点" bindinput='inputTx' data-key="insurance_rebate" name='insurance_rebate' value='{{insurance_rebate}}' always-embed='{{true}}' />
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">%</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pt30 pb30 text-center font-28">
|
||||
<button class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" bindtap="putAppCusorderdataInfo" data-type="insurance">确定修改</button>
|
||||
</view>
|
||||
@@ -97,6 +110,12 @@
|
||||
<view class="mt20 relative font-28">
|
||||
保险金额:{{business_img.price}}元
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
保险返点:{{business_rebate}}%
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
返点金额:{{business_rebate_am}}元
|
||||
</view>
|
||||
</view>
|
||||
<view wx:elif="{{business_img.value}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
@@ -122,6 +141,13 @@
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 pr40 font-28">
|
||||
<view class="absolute left-0 box-middle">保险返点</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入保险返点" bindinput='inputTx' data-key="business_rebate" name='business_rebate' value='{{business_rebate}}' always-embed='{{true}}' />
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">%</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pt30 pb30 text-center font-28">
|
||||
<button class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" bindtap="putAppCusorderdataInfo" data-type="business">确定修改</button>
|
||||
</view>
|
||||
@@ -160,6 +186,12 @@
|
||||
<view class="mt20 relative font-28">
|
||||
保险金额:{{accident_img.price}}元
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
保险返点:{{accident_rebate}}%
|
||||
</view>
|
||||
<view class="mt20 relative font-28">
|
||||
返点金额:{{accident_rebate_am}}元
|
||||
</view>
|
||||
</view>
|
||||
<view wx:elif="{{accident_img.value}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
@@ -185,6 +217,13 @@
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 pr40 font-28">
|
||||
<view class="absolute left-0 box-middle">保险返点</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入保险返点" bindinput='inputTx' data-key="accident_rebate" name='accident_rebate' value='{{accident_rebate}}' always-embed='{{true}}' />
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">%</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pt30 pb30 text-center font-28">
|
||||
<button class="inline-block text-middle font-22 color-fff ulib-r10 btn-36afa2" hover-class="btn-36afa2-hover" bindtap="putAppCusorderdataInfo" data-type="accident">确定修改</button>
|
||||
</view>
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
</view>
|
||||
<view class="absolute left-0 bottom-0 right-0 text-center font-22 color-888">{{pie1Bottom}}</view>
|
||||
</view>
|
||||
<!-- <view class="text-center font-22 color-f9394d" wx:if='{{!pie1noData}}'>点击分类卡片查看具体数据</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -38,12 +39,13 @@
|
||||
<view class="font-36">{{Pie2title}}</view>
|
||||
</view>
|
||||
<lcb-listmore isNoData='{{pie2noData}}' noDataMsg='暂无数据'></lcb-listmore>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie2noData}}">
|
||||
<view class="mt50 mb20 relative height-400 z-index-0" wx:if="{{!pie2noData}}">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showPie2Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie2 }}"></ec-canvas>
|
||||
</view>
|
||||
<view class="absolute left-0 bottom-0 right-0 text-center font-22 color-888">{{pie2Bottom}}</view>
|
||||
</view>
|
||||
<!-- <view class="text-center font-22 color-f9394d" wx:if='{{!pie2noData}}'>点击分类卡片查看具体数据</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user