You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
18 KiB
1 lines
18 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-income-commission-list"],{"138f":function(t,e,i){"use strict";i.r(e);var n=i("6120"),a=i.n(n);for(var c in n)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(c);e["default"]=a.a},6120:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("bf0f"),i("18f7"),i("de6c"),i("c223");var a=n(i("9b1b")),c=n(i("2634")),s=n(i("2fdc")),o=i("8f59"),r=n(i("cd23")),l=n(i("13f3")),u={components:{wPicker:l.default},data:function(){return{isLoad:!1,countList:[{key:"total_service_cash",title:"项目收益",text:"累计所有项目收益,不包含车费"},{key:"total_car_cash",title:"车费收益",text:"累计所有车费"}],countInd:0,showDialog:!1,curDay:"",curMonth:"",startYear:"",showKey:"",showDate:!1,prev_time:{activeIndex:0,month:"",start_time:"",end_time:""},check_time:{activeIndex:0,month:"",start_time:"",end_time:""},count:{},activeIndex:0,tabList:[{id:1,title:"月份选择"},{id:2,title:"自定义时间"}],param:{page:1},list:{data:[]},loading:!0}},computed:(0,o.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor}}),onLoad:function(){var t=this;return(0,s.default)((0,c.default)().mark((function e(){return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.initIndex();case 2:case"end":return e.stop()}}),e)})))()},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:(0,a.default)((0,a.default)({},(0,o.mapMutations)([])),{},{initIndex:function(){var t=arguments,e=this;return(0,s.default)((0,c.default)().mark((function i(){var n,a;return(0,c.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.length>0&&void 0!==t[0]&&t[0],n||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:return e.$util.setNavigationBarColor({bg:e.primaryColor}),a=new Date(Math.ceil((new Date).getTime())),e.curDay=e.$util.formatTime(a,"YY-M-D"),e.curMonth=e.$util.formatTime(a,"YY-M"),e.startYear=e.$util.formatTime(a,"YY"),i.next=12,Promise.all([e.getCount(),e.getList()]);case 12:e.isLoad=!0;case 13:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getCount:function(){var t=this;return(0,s.default)((0,c.default)().mark((function e(){var i,n,a,s,o;return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.activeIndex,n=t.$util.deepCopy(t.check_time),a=n.start_time,s=n.end_time,o={},1==i&&a&&s&&(o.start_time=t.$util.DateToUnix(a),o.end_time=t.$util.DateToUnix(s)+86400-1),e.next=6,t.$api.technician.coachCommissionData(o);case 6:t.count=e.sent;case 7:case"end":return e.stop()}}),e)})))()},getList:function(t){var e=this;return(0,s.default)((0,c.default)().mark((function i(){var n,a,s,o,r,l,u,d;return(0,c.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return t&&(e.param.page=1,e.list.data=[],uni.pageScrollTo({scrollTop:0})),n=e.list,a=e.activeIndex,s=e.$util.deepCopy(e.param),o=e.$util.deepCopy(e.check_time),r=o.month,l=o.start_time,u=o.end_time,0==a&&(s.month=r?e.$util.DateToUnix("".concat(r,"-01")):""),1==a&&(s.start_time=l&&u?e.$util.DateToUnix(l):"",s.end_time=l&&u?e.$util.DateToUnix(u)+86400-1:""),i.next=8,e.$api.technician.coachCommissionList(s);case 8:d=i.sent,1==e.param.page||(d.data=n.data.concat(d.data)),e.list=d,e.loading=!1,e.$util.hideAll();case 12:case"end":return i.stop()}}),i)})))()},toShowDialog:function(t){this.countInd=t,this.$refs.show_rule_item.open()},handerTabChange:function(t){this.activeIndex=t,this.check_time.activeIndex=t},toShowTimePopup:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.check_time=this.$util.deepCopy(this.prev_time),e&&0!=e&&(this.activeIndex=0,this.curMonth=e,this.check_time.month=e),this.activeIndex=this.check_time.activeIndex,this.$refs.show_choose_time.open()},toReset:function(){var t=this.activeIndex;0!=t?(this.check_time.start_time="",this.check_time.end_time="",this.getList(1)):this.check_time.month=""},toClose:function(){var t=this;return(0,s.default)((0,c.default)().mark((function e(){var i,n,a,s,o;return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.activeIndex,n=t.check_time,a=n.month,s=n.start_time,o=n.end_time,(0!=i||a)&&(1!=i||s&&o)||(1!=i||s&&o||(t.activeIndex=0,t.check_time.activeIndex=0,t.check_time.month=""),t.prev_time=t.$util.deepCopy(t.check_time)),(0==i&&a||1==i&&s&&o)&&(t.check_time=t.$util.deepCopy(t.prev_time)),t.$refs.show_choose_time.close(),1!=t.activeIndex){e.next=8;break}return e.next=8,t.getCount();case 8:t.getList(1);case 9:case"end":return e.stop()}}),e)})))()},toShowTime:function(t){var e=this.activeIndex;if(1!=e||"end_time"!=t||this.check_time.start_time){var i=this.check_time[t];i&&("month"==t?this.curMonth=i:this.curDay=i),this.showKey=t,this.showDate=!0}else this.$util.showToast({title:"请选择开始时间"})},onConfirm:function(t){var e=this;return(0,s.default)((0,c.default)().mark((function i(){var n,a,s,o,r,l,u,d,h,v,f,m;return(0,c.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=e.check_time,a=n.start_time,s=n.end_time,o=e.showKey,r=e.activeIndex,l=void 0===r?0:r,u=e.$util.DateToUnix("month"==o?"".concat(t.result,"-01"):t.result),d=a?e.$util.DateToUnix(a):0,h=s?e.$util.DateToUnix(s):0,v=e.$util.formatTime(new Date(Math.ceil((new Date).getTime())),"YY-M-D"),f=e.$util.DateToUnix(v)+1,m={month:"开始月份",start_time:"开始时间",end_time:"结束时间"},!(u>f)){i.next=11;break}return e.$util.showToast({title:"".concat(m[o],"不能选择未来时间哦")}),i.abrupt("return");case 11:if(1!=l||!("start_time"==o&&h&&h<e.$util.DateToUnix(t.result)||"end_time"==o&&d&&d>e.$util.DateToUnix(t.result))){i.next=14;break}return e.$util.showToast({title:"结束时间不能小于开始时间"}),i.abrupt("return");case 14:e.check_time[o]=t.result;case 15:case"end":return i.stop()}}),i)})))()},toConfirm:function(){var t=this;return(0,s.default)((0,c.default)().mark((function e(){var i,n,a,s,o,r,l,u,d,h,v;return(0,c.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.check_time,n=i.month,a=void 0===n?"":n,s=i.start_time,o=void 0===s?"":s,r=i.end_time,l=void 0===r?"":r,u=t.activeIndex,d=void 0===u?0:u,h=1e3*t.$util.DateToUnix(o),v=1e3*t.$util.DateToUnix(l),0!=d||a){e.next=7;break}return t.$util.showToast({title:"请选择开始月份"}),e.abrupt("return");case 7:if(1!=d||o&&l&&!(v-h>31536e6)){e.next=10;break}return t.$util.showToast({title:o?l?"查询时间跨度最长为一年哦":"请选择结束时间":"请选择开始时间"}),e.abrupt("return");case 10:if(t.check_time.activeIndex=d,t.prev_time=t.$util.deepCopy(t.check_time),t.$refs.show_choose_time.close(),1!=d){e.next=16;break}return e.next=16,t.getCount();case 16:t.getList(1);case 17:case"end":return e.stop()}}),e)})))()},goDetail:function(t){var e=this.list.data[t].id;this.$util.goUrl({url:"/technician/pages/income/commission-detail?id=".concat(e)})}}),filters:{handleTimeText:function(t,e){var i="请选择",n=t.activeIndex,a=t.month,c=t.start_time,s=t.end_time;0==n&&a&&(i=r.default.formatTime(1e3*r.default.DateToUnix("".concat(a,"-01")),"YY年M月"));var o=1==e?"YY.M.D":"YY年M月D日";return 1==n&&c&&s&&(i=r.default.formatTime(1e3*r.default.DateToUnix(c),o)+" - "+r.default.formatTime(1e3*r.default.DateToUnix(s),o)),i}}};e.default=u},"7b5c":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.technician-cash-integral .record-search-info[data-v-2c923e76]{width:%?750?%;height:%?270?%}.technician-cash-integral .record-search-info .record-info[data-v-2c923e76]{width:%?710?%}.technician-cash-integral .record-search-info .record-info .search-item[data-v-2c923e76]{height:%?100?%}.technician-cash-integral .record-search-info .record-info .search-item .iconfont[data-v-2c923e76]{font-size:%?26?%}.technician-cash-integral .record-search-info .record-info .record-list .list-item[data-v-2c923e76]{width:50%}.technician-cash-integral .record-search-info .record-info .record-list .list-item .iconfont[data-v-2c923e76]{font-size:%?28?%}.technician-cash-integral .count-item[data-v-2c923e76]{height:%?120?%}.technician-cash-integral .count-item .title[data-v-2c923e76]{padding-top:%?18?%}.technician-cash-integral .count-item .title .iconfont[data-v-2c923e76]{font-size:%?16?%}.technician-cash-integral .list-item .avatar[data-v-2c923e76]{width:%?155?%;height:%?155?%}.technician-cash-integral .list-item .item-bell[data-v-2c923e76]{width:%?66?%;height:%?30?%;border-radius:%?4?%}.technician-cash-integral .popup-choose-time[data-v-2c923e76]{width:%?750?%;border-radius:%?30?% %?30?% 0 0}.technician-cash-integral .popup-choose-time .icon-close[data-v-2c923e76]{color:#a8aeb8;font-size:%?40?%}.technician-cash-integral .popup-choose-time .item-child[data-v-2c923e76]{width:50%}.technician-cash-integral .popup-choose-time .confirm-btn[data-v-2c923e76]{width:%?670?%;height:%?100?%}',""]),t.exports=e},8211:function(t,e,i){var n=i("7b5c");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("1108ca95",n,!0,{sourceMap:!1,shadowMode:!1})},"88fc":function(t,e,i){"use strict";var n=i("8211"),a=i.n(n);a.a},"8c95":function(t,e,i){"use strict";i.r(e);var n=i("fe75"),a=i("138f");for(var c in a)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(c);i("88fc");var s=i("828b"),o=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"2c923e76",null,!1,n["a"],void 0);e["default"]=o.exports},fe75:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return c})),i.d(e,"a",(function(){return n}));var n={wPicker:i("13f3").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"technician-cash-integral"},[i("fixed",{attrs:{zIndex:"997"}},[i("v-uni-view",{staticClass:"record-search-info fill-body pt-md pl-md c-base"},[i("v-uni-view",{staticClass:"record-info radius-32",style:{background:t.primaryColor}},[i("v-uni-view",{staticClass:"search-item flex-between ml-lg mr-lg f-desc b-1px-b"},[i("v-uni-view",[t._v("查询时间")]),i("v-uni-view",{staticClass:"flex-y-center",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTimePopup(e)}}},[t._v(t._s(t._f("handleTimeText")(t.prev_time,1))),i("i",{staticClass:"iconfont icon-right"})])],1),i("v-uni-view",{staticClass:"record-list flex-x-center pt-lg pb-lg f-paragraph"},t._l(t.countList,(function(e,n){return i("v-uni-view",{key:n,staticClass:"list-item flex-center flex-column"},[i("v-uni-view",{staticClass:"f-sm-title text-bold"},[t._v("¥"+t._s(t.count[e.key]||0))]),i("v-uni-view",{staticClass:"flex-y-center f-caption",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowDialog(n)}}},[t._v(t._s(e.title)),i("i",{staticClass:"iconfont iconshuyi_shuoming ml-sm"})])],1)})),1)],1)],1)],1),t.isLoad&&t.list.data.length>0?i("v-uni-view",{staticClass:"fill-base"},[t._l(t.list.data,(function(e,n){return[0==t.prev_time.activeIndex&&(0==n||n>0&&e.month!=t.list.data[n-1].month)?i("v-uni-view",{key:n+"_0",staticClass:"count-item fill-body pl-md pr-md",on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.toShowTimePopup(i,e.month)}}},[i("veiw",{staticClass:"title flex-y-center"},[i("v-uni-view",{staticClass:"f-title c-title text-bold"},[t._v(t._s(e.month_text))]),i("i",{staticClass:"iconfont iconxia"})],1),i("v-uni-view",{staticClass:"flex-y-center f-caption c-caption"},[t._v("实际收益¥"+t._s(e.total_cash)),i("v-uni-view",{staticClass:"ml-md"},[t._v("共"+t._s(e.total_count)+"笔订单")])],1)],1):t._e(),1==t.prev_time.activeIndex&&0==n?i("v-uni-view",{key:n+"_1",staticClass:"count-item fill-body pl-md pr-md",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTimePopup(e)}}},[i("veiw",{staticClass:"title flex-y-center"},[i("v-uni-view",{staticClass:"f-title c-title text-bold"},[t._v(t._s(t._f("handleTimeText")(t.prev_time,2)))]),i("i",{staticClass:"iconfont iconxia"})],1),i("v-uni-view",{staticClass:"flex-y-center f-caption c-caption"},[t._v("实际收益¥"+t._s(t.count.service_cash)),i("v-uni-view",{staticClass:"ml-md"},[t._v("共"+t._s(t.count.count)+"笔订单")])],1)],1):t._e(),i("v-uni-view",{key:n+"_2",staticClass:"list-item pt-lg pb-lg ml-lg mr-lg",class:[{"b-1px-t":0!=n}],on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(n)}}},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"f-mini-title c-title text-bold max-500 ellipsis"},[t._v("订单号 "+t._s(e.order_code))]),i("v-uni-view",{staticClass:"f-paragraph",style:{color:t.primaryColor}},[t._v("查看详情")])],1),i("v-uni-view",{staticClass:"f-caption c-caption mt-sm"},[t._v(t._s(e.create_time))]),i("v-uni-view",{staticClass:"flex-between mt-sm"},[i("v-uni-view",{staticClass:"f-desc c-paragraph"},[t._v("订单收益")]),i("v-uni-view",{staticClass:"flex-y-center f-caption c-warning"},[t._v("¥"),i("v-uni-view",{staticClass:"f-mini-title"},[t._v(t._s(e.coach_cash))])],1)],1)],1)]}))],2):t._e(),t.loading?i("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?i("abnor"):t._e(),i("v-uni-view",{staticClass:"space-footer"}),i("uni-popup",{ref:"show_choose_time",attrs:{type:"bottom"}},[i("v-uni-view",{staticClass:"popup-choose-time fill-base"},[i("v-uni-view",{staticClass:"pl-lg pr-lg"},[i("v-uni-view",{staticClass:"flex-between b-1px-b"},[i("tab",{attrs:{list:t.tabList,activeIndex:1*t.activeIndex,activeColor:t.primaryColor,height:"100rpx"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.handerTabChange.apply(void 0,arguments)}}}),i("i",{staticClass:"iconfont icon-close",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toClose.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"flex-center mt-md pt-lg pb-lg"},[i("v-uni-view",{staticClass:"flex-1 flex-y-baseline"},[i("v-uni-view",{staticClass:"f-paragraph c-title text-bold"},[t._v(t._s(0==t.activeIndex?"选择月份":"自定义时间"))]),1==t.activeIndex?i("v-uni-view",{staticClass:"f-caption c-warning ml-sm"},[t._v("最长可查找时间跨度一年的交易")]):t._e()],1),0==t.activeIndex&&t.check_time.month||1==t.activeIndex&&(t.check_time.start_time||t.check_time.end_time)?i("v-uni-view",{staticClass:"f-paragraph",staticStyle:{color:"#5A677E"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toReset.apply(void 0,arguments)}}},[t._v("清除")]):t._e()],1),0==t.activeIndex?i("v-uni-view",{staticClass:"flex-center pb-lg"},[i("v-uni-view",{staticClass:"item-child flex-center flex-column",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTime("month")}}},[i("v-uni-view",[t._v("开始月份")]),i("v-uni-view",{staticClass:"mt-sm",style:{color:t.check_time.month?t.primaryColor:"#999"}},[t._v(t._s(t.check_time.month||"选择月份"))])],1)],1):t._e(),1==t.activeIndex?i("v-uni-view",{staticClass:"flex-center pb-lg"},[i("v-uni-view",{staticClass:"item-child flex-center flex-column",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTime("start_time")}}},[i("v-uni-view",[t._v("开始时间")]),i("v-uni-view",{staticClass:"mt-sm",style:{color:t.check_time.start_time?t.primaryColor:"#999"}},[t._v(t._s(t.check_time.start_time||"选择时间"))])],1),i("v-uni-view",{staticClass:"item-child flex-center flex-column b-1px-l",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTime("end_time")}}},[i("v-uni-view",[t._v("结束时间")]),i("v-uni-view",{staticClass:"mt-sm",style:{color:t.check_time.end_time?t.primaryColor:"#999"}},[t._v(t._s(t.check_time.end_time||"选择时间"))])],1)],1):t._e()],1),i("v-uni-view",{staticClass:"flex-center flex-column fill-body"},[i("v-uni-view",{staticClass:"space-lg"}),i("v-uni-view",{staticClass:"confirm-btn flex-center f-title c-base radius-16",style:{background:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toConfirm.apply(void 0,arguments)}}},[t._v("确定")]),i("v-uni-view",{staticClass:"space-lg"}),i("v-uni-view",{staticClass:"space-safe"})],1)],1)],1),i("w-picker",{ref:"day",attrs:{mode:"date",startYear:1*t.startYear-10,endYear:t.startYear,value:0==t.activeIndex?t.curMonth:t.curDay,current:!1,fields:0==t.activeIndex?"month":"day","disabled-after":!1,themeColor:t.primaryColor,visible:t.showDate},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm(e)},"update:visible":function(e){arguments[0]=e=t.$handleEvent(e),t.showDate=e}}}),i("uni-popup",{ref:"show_rule_item",attrs:{type:"center",maskClick:!1}},[i("v-uni-view",{staticClass:"common-popup-content fill-base pd-lg radius-34"},[i("v-uni-view",{staticClass:"title"},[t._v(t._s(t.countList[t.countInd].title))]),i("v-uni-view",{staticClass:"f-desc c-title mt-lg"},[t._v(t._s(t.countList[t.countInd].text))]),i("v-uni-view",{staticClass:"button"},[i("v-uni-view",{staticClass:"item-child c-base",style:{background:t.primaryColor,color:"#fff"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.$refs.show_rule_item.close()}}},[t._v("知道了")])],1)],1)],1)],1)},c=[]}}]); |