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
14 KiB
1 lines
14 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-order-refund"],{"33a9":function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.detail.id?i("v-uni-view",{staticClass:"user-order-refund"},[i("v-uni-view",{staticClass:"item-child mt-md ml-lg mr-lg pd-lg fill-base radius-16"},[i("v-uni-view",{staticClass:"flex-between pb-lg b-1px-b"},[i("v-uni-view",{staticClass:"f-paragraph c-title max-380 ellipsis"},[e._v("订单号:"+e._s(e.detail.order_code))]),i("v-uni-view",{staticClass:"f-caption text-bold",style:{color:2==e.detail.pay_type?e.primaryColor:e.detail.pay_type<6?e.subColor:6==e.detail.pay_type?"#11C95E":"#333"}},[e._v(e._s(e.statusType[e.detail.pay_type]))])],1),e._l(e.detail.order_goods,(function(t,a){return[t.can_refund_num>0?i("v-uni-view",{key:a+"_0",staticClass:"item-child flex-center mt-lg",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handerRadioChange(a)}}},[i("i",{staticClass:"iconfont mr-md",class:[{"icon-xuanze":!t.checked},{"icon-xuanze-fill":t.checked}],style:{color:t.checked?e.primaryColor:""}}),i("v-uni-view",{staticClass:"flex-1"},[i("v-uni-view",{staticClass:"flex-warp"},[i("v-uni-view",{staticClass:"goods-img radius-16"},[i("v-uni-view",{staticClass:"h5-image goods-img radius-16",style:{backgroundImage:"url('"+t.goods_cover+"')"}})],1),i("v-uni-view",{staticClass:"flex-1 ml-md max-380"},[i("v-uni-view",{staticClass:"f-title c-title text-bold max-450 ellipsis"},[e._v(e._s(t.goods_name))]),i("v-uni-view",{staticClass:"f-caption c-caption"},[e._v("服务"+e._s(e.$t("action.attendantName"))+":"+e._s(e.detail.coach_info?e.detail.coach_info.coach_name:"-"))]),i("v-uni-view",{staticClass:"f-caption c-caption"},[e._v(e._s(e.detail.start_time))]),1*t.material_price>0?i("v-uni-view",{staticClass:"f-caption c-caption"},[e._v("物料费:¥"+e._s(t.material_price))]):e._e(),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-baseline f-caption c-warning"},[e._v("¥"),i("v-uni-view",{staticClass:"f-title text-bold"},[e._v(e._s(t.true_price))])],1),t.can_refund_num>1?i("v-uni-view",{staticClass:"flex-warp"},[i("v-uni-button",{staticClass:"reduce",style:{borderColor:e.primaryColor,color:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.changeNum(a,-1)}}},[i("i",{staticClass:"iconfont icon-jian-bold"})]),i("v-uni-button",{staticClass:"addreduce clear-btn"},[e._v(e._s(t.apply_num))]),i("v-uni-button",{staticClass:"add",style:{background:e.primaryColor,borderColor:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.changeNum(a,1)}}},[i("i",{staticClass:"iconfont icon-jia-bold"})])],1):i("v-uni-view",{staticClass:"c-paragraph"},[e._v("x"+e._s(t.apply_num))])],1)],1)],1)],1)],1):e._e()]})),e.detail.can_refund_material_price||e.detail.can_refund_car_price&&1*e.detail.car_price>0?i("v-uni-view",{staticClass:"mt-lg pt-lg pb-lg f-paragraph c-title b-1px-t"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",[e._v("服务金额")]),i("v-uni-view",[e._v("¥"+e._s(e.detail.can_refund_price))])],1),e.detail.can_refund_material_price?i("v-uni-view",{staticClass:"flex-between mt-sm"},[i("v-uni-view",[e._v("物料费")]),i("v-uni-view",[e._v("¥"+e._s(e.detail.can_refund_material_price))])],1):e._e(),e.detail.can_refund_car_price&&1*e.detail.car_price>0?i("v-uni-view",{staticClass:"flex-between mt-sm"},[i("v-uni-view",{staticClass:"flex-y-baseline"},[e._v("车费"),i("v-uni-view",{staticClass:"f-icontext c-warning ml-sm"},[e._v(e._s(e.$t("action.attendantName"))+"出发前全部服务退款将退还")])],1),i("v-uni-view",[e._v("¥"+e._s(e.detail.car_price))])],1):e._e()],1):e._e(),i("v-uni-view",{staticClass:"pt-lg f-paragraph c-title flex-between b-1px-t"},[i("v-uni-view",[e._v("合计")]),i("v-uni-view",{staticClass:"f-title c-warning text-bold"},[e._v(e._s(e.can_refund_price+"元"))])],1)],2),i("v-uni-view",{staticClass:"item-child mt-md ml-lg mr-lg pd-lg fill-base radius-16"},[i("v-uni-view",{staticClass:"flex-between pb-lg f-title c-title text-bold"},[e._v("退款原因")]),i("v-uni-view",{staticClass:"textarea-info f-caption c-caption radius-16"},[i("v-uni-textarea",{staticClass:"input-textarea f-paragraph pd-lg",attrs:{"placeholder-class":"f-paragraph",maxlength:"300",placeholder:"输入退款原因"},model:{value:e.form.text,callback:function(t){e.$set(e.form,"text",t)},expression:"form.text"}}),i("v-uni-view",{staticClass:"text-right pb-lg pr-lg"},[e._v(e._s(e.form.text.length>300?300:e.form.text.length)+"/300")])],1)],1),i("v-uni-view",{staticClass:"item-child mt-md ml-lg mr-lg pt-lg pl-lg pr-lg fill-base radius-16"},[i("v-uni-view",{staticClass:"flex-between pb-sm f-title c-title text-bold"},[e._v("上传图片")]),i("v-uni-view",{staticClass:"flex-between pt-sm"},[i("upload",{attrs:{imagelist:e.form.imgs,imgtype:"imgs",imgclass:"mini",text:"添加照片",imgsize:5},on:{del:function(t){arguments[0]=t=e.$handleEvent(t),e.imgDel.apply(void 0,arguments)},upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1),0==e.form.imgs.length?i("v-uni-view",{staticClass:"space-lg"}):i("v-uni-view",{staticClass:"space-sm"})],1),i("v-uni-view",{staticClass:"space-max-footer"}),i("v-uni-view",{staticClass:"refund-bottom-info fill-base fix pl-lg pr-lg"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-center",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAllItem.apply(void 0,arguments)}}},[i("i",{staticClass:"iconfont mr-sm",class:[{"icon-xuanze":!e.selectAll},{"icon-xuanze-fill":e.selectAll}],style:{color:e.selectAll?e.primaryColor:""}}),e._v("全选")]),i("v-uni-view",{staticClass:"text-right flex-center"},[i("v-uni-view",{staticClass:"flex-y-center"},[i("v-uni-view",{staticClass:"f-caption c-caption mr-sm"},[e._v("共"+e._s(e.total_refund_num)+"件")]),e._v("退款金额"),i("v-uni-view",{staticClass:"flex-y-baseline f-caption c-warning"},[e._v("¥"),i("v-uni-view",{staticClass:"f-title text-bold"},[e._v(e._s(e.total_refund_price))])],1)],1),i("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:e.primaryColor,borderColor:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.toSubmit.apply(void 0,arguments)}}},[e._v("提交申请")])],1)],1),i("v-uni-view",{staticClass:"space-safe"})],1)],1):e._e()},n=[]},3538:function(e,t,i){var a=i("3ee0");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var n=i("967d").default;n("9bc38fa2",a,!0,{sourceMap:!1,shadowMode:!1})},"3ee0":function(e,t,i){var a=i("c86c");t=a(!1),t.push([e.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/* 文章场景相关 */.user-order-refund .item-child .icon-xuanze[data-v-44518278],\n.user-order-refund .item-child .icon-xuanze-fill[data-v-44518278]{font-size:%?38?%}.user-order-refund .item-child .goods-img[data-v-44518278]{width:%?172?%;height:%?172?%}.user-order-refund .item-child .goods-spe[data-v-44518278]{height:%?44?%;line-height:%?44?%;background:#f7f7f7}.user-order-refund .item-child .goods-num[data-v-44518278]{width:%?200?%}.user-order-refund .item-child .textarea-info[data-v-44518278]{background:#f7f7f7}.user-order-refund .item-child .textarea-info .input-textarea[data-v-44518278]{width:%?570?%;height:%?300?%}.user-order-refund .refund-bottom-info[data-v-44518278]{bottom:0}.user-order-refund .refund-bottom-info .iconfont[data-v-44518278]{font-size:%?38?%}.user-order-refund .refund-bottom-info .text-right[data-v-44518278]{height:%?110?%}.user-order-refund .refund-bottom-info .text-right .order[data-v-44518278]{margin-top:0;border-radius:%?30?%}',""]),e.exports=t},"514a":function(e,t,i){"use strict";var a=i("3538"),n=i.n(a);n.a},"51cf":function(e,t,i){"use strict";i.r(t);var a=i("33a9"),n=i("8cfe");for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);i("514a");var s=i("828b"),c=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"44518278",null,!1,a["a"],void 0);t["default"]=c.exports},"8cfe":function(e,t,i){"use strict";i.r(t);var a=i("c72f"),n=i.n(a);for(var r in a)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(r);t["default"]=n.a},c72f:function(e,t,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("fd3c"),i("aa9c"),i("bf0f"),i("2797"),i("e838"),i("8f71");var n=a(i("2634")),r=a(i("2fdc")),s=a(i("9b1b")),c=i("8f59"),l={components:{},data:function(){return{options:{},detail:{},statusType:{"-1":"已取消",1:"待支付",2:"待服务",3:this.$t("action.attendantName")+"接单",4:this.$t("action.attendantName")+"出发",5:this.$t("action.attendantName")+"到达",6:"服务中",7:"已完成",8:"已评价"},total_refund_num:0,total_refund_price:0,can_refund_num:0,can_refund_price:0,selectAll:!1,selectAdd:!1,form:{text:"",imgs:[]},lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo}}),onLoad:function(e){this.options=e,this.initIndex()},methods:(0,s.default)((0,s.default)({},(0,c.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var e=arguments,t=this;return(0,r.default)((0,n.default)().mark((function i(){var a,r,s,c,l,o,u,d,f,p,v,_;return(0,n.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(a=e.length>0&&void 0!==e[0]&&e[0],a||!t.$jweixin.isWechat()){i.next=5;break}return i.next=4,t.$jweixin.initJssdk();case 4:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 5:return r=t.options.id,i.next=8,t.$api.order.orderInfo({id:r});case 8:s=i.sent,t.$util.setNavigationBarColor({bg:t.primaryColor}),c=s.car_price,l=s.can_refund_car_price,o=void 0===l?0:l,u=0,d=0,f=0,s.order_goods.map((function(e){u+=e.can_refund_num,e.apply_num=e.can_refund_num,e.checked=e.can_refund_num<1,e.apply_num>0&&(d+=e.true_price*e.apply_num,f+=e.material_price*e.apply_num)})),p=(1*d).toFixed(2),v=(1*f).toFixed(2),s.can_refund_price=p,s.can_refund_material_price=v,t.detail=s,t.can_refund_num=u,_=o?c:0,t.can_refund_price=(1*p+1*v+1*_).toFixed(2);case 23:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},imgDel:function(e){var t=e.imagelist,i=e.imgtype;this.form[i]=t},imgUpload:function(e){var t=e.imagelist,i=e.imgtype;this.form[i]=t},handerRadioChange:function(e){var t=this.detail.order_goods[e];if(!(t.can_refund_num<1)){var i=!t.checked;this.detail.order_goods[e].checked=i,this.checkIsSelectAll()}},handerAddRadioChange:function(){var e=this.detail.add_price;1*!e||(this.selectAdd=!this.selectAdd,this.checkIsSelectAll())},changeNum:function(e,t){var i=this;return(0,r.default)((0,n.default)().mark((function a(){var r,s;return(0,n.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(r=i.detail.order_goods[e],s=r.apply_num+t,!(s<1)){a.next=5;break}return i.$util.showToast({title:"此商品最少可退1件"}),a.abrupt("return");case 5:if(!(s>r.can_refund_num)){a.next=8;break}return i.$util.showToast({title:"此商品最多可退".concat(r.can_refund_num,"件")}),a.abrupt("return");case 8:i.detail.order_goods[e].apply_num=s,i.countPrice();case 10:case"end":return a.stop()}}),a)})))()},selectAllItem:function(){var e=this;this.detail.order_goods.map((function(t){t.can_refund_num<1||(t.checked=!e.selectAll)})),this.checkIsSelectAll()},checkIsSelectAll:function(){var e=[];this.detail.order_goods.map((function(t){t.can_refund_num<1||e.push(t)})),this.selectAll=e.every((function(e){return e.checked})),this.countPrice()},countPrice:function(){var e=this.can_refund_num,t=this.detail,i=t.car_price,a=t.can_refund_car_price,n=void 0===a?0:a,r=0,s=0,c=[];this.detail.order_goods.forEach((function(e){e.can_refund_num<1||c.push(e)})),c.forEach((function(e,t){e.checked&&(r+=parseFloat(1*e.true_price+1*e.material_price)*e.apply_num,s+=e.apply_num)}));var l=1*r.toFixed(2);this.total_refund_num=s,this.total_refund_price=n&&e==s?(l+1*i).toFixed(2):l},toSubmit:function(){var e=this;return(0,r.default)((0,n.default)().mark((function t(){var i,a,r,s,c;return(0,n.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.detail,a=i.id,r=i.order_goods,s=[],r.filter((function(e){if(e.checked){if(e.apply_num<1)return;s.push({id:e.id,num:e.apply_num})}})),!(s.length<1)){t.next=6;break}return e.$util.showToast({title:"请选择商品"}),t.abrupt("return");case 6:if(c=e.$util.deepCopy(e.form),c.text){t.next=10;break}return e.$util.showToast({title:"请输入退款原因"}),t.abrupt("return");case 10:if(c.imgs=c.imgs.length>0?c.imgs.map((function(e){return e.path})):[],c=Object.assign({},c,{order_id:a,list:s}),!e.lockTap){t.next=14;break}return t.abrupt("return");case 14:return e.lockTap=!0,e.$util.showLoading(),t.prev=16,t.next=19,e.$api.order.applyOrder(c);case 19:e.$util.hideAll(),e.$util.showToast({title:"提交成功"}),e.lockTap=!1,setTimeout((function(){e.$util.back(),e.$util.goUrl({url:1,openType:"navigateBack"})}),1e3),t.next=28;break;case 25:t.prev=25,t.t0=t["catch"](16),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 28:case"end":return t.stop()}}),t,null,[[16,25]])})))()}})};t.default=l}}]); |