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
12 KiB
1 lines
12 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-order-refund"],{7602:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.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"},[t._v("订单号:"+t._s(t.detail.order_code))]),i("v-uni-view",{staticClass:"f-caption text-bold",style:{color:2==t.detail.pay_type?t.primaryColor:t.detail.pay_type<6?t.subColor:6==t.detail.pay_type?"#11C95E":"#333"}},[t._v(t._s(t.statusType[t.detail.pay_type]))])],1),t._l(t.detail.order_goods,(function(e,n){return[e.can_refund_num>0?i("v-uni-view",{key:n+"_0",staticClass:"item-child flex-center mt-lg",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.handerRadioChange(n)}}},[i("i",{staticClass:"iconfont mr-md",class:[{"icon-xuanze":!e.checked},{"icon-xuanze-fill":e.checked}],style:{color:e.checked?t.primaryColor:""}}),i("v-uni-view",{staticClass:"flex-1"},[i("v-uni-view",{staticClass:"flex-center"},[i("v-uni-image",{staticClass:"goods-img radius-16",attrs:{mode:"aspectFill",src:e.goods_cover}}),i("v-uni-view",{staticClass:"flex-1 ml-md max-380"},[i("v-uni-view",{staticClass:"goods-title f-title c-title text-bold ellipsis"},[t._v(t._s(e.goods_name))]),i("v-uni-view",{staticClass:"f-caption c-caption"},[t._v("服务技师:"+t._s(t.detail.coach_info.coach_name))]),i("v-uni-view",{staticClass:"f-caption c-caption"},[t._v(t._s(t.detail.start_time))]),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-baseline f-caption c-warning"},[t._v("¥"),i("v-uni-view",{staticClass:"f-title text-bold"},[t._v(t._s(e.true_price))])],1),e.can_refund_num>1?i("v-uni-view",{staticClass:"flex-warp"},[i("v-uni-button",{staticClass:"reduce",style:{borderColor:t.primaryColor,color:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.changeNum(n,-1)}}},[i("i",{staticClass:"iconfont icon-jian-bold"})]),i("v-uni-button",{staticClass:"addreduce clear-btn"},[t._v(t._s(e.apply_num))]),i("v-uni-button",{staticClass:"add",style:{background:t.primaryColor,borderColor:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.changeNum(n,1)}}},[i("i",{staticClass:"iconfont icon-jia-bold"})])],1):i("v-uni-view",{staticClass:"c-paragraph"},[t._v("x"+t._s(e.apply_num))])],1)],1)],1)],1)],1):t._e()]}))],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"},[t._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:t.form.text,callback:function(e){t.$set(t.form,"text",e)},expression:"form.text"}}),i("v-uni-view",{staticClass:"text-right pb-lg pr-lg"},[t._v(t._s(t.form.text.length>300?300:t.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"},[t._v("上传图片")]),i("v-uni-view",{staticClass:"flex-between pt-sm"},[i("upload",{attrs:{imagelist:t.form.imgs,imgtype:"imgs",imgclass:"mini",text:"添加照片",imgsize:5},on:{del:function(e){arguments[0]=e=t.$handleEvent(e),t.imgDel.apply(void 0,arguments)},upload:function(e){arguments[0]=e=t.$handleEvent(e),t.imgUpload.apply(void 0,arguments)}}})],1),0==t.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 fix pl-lg pr-lg"},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"flex-y-center",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.selectAllItem.apply(void 0,arguments)}}},[i("i",{staticClass:"iconfont mr-sm",class:[{"icon-xuanze":!t.selectAll},{"icon-xuanze-fill":t.selectAll}],style:{color:t.selectAll?t.primaryColor:""}}),t._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"},[t._v("共"+t._s(t.total_refund_num)+"件")]),t._v("退款金额"),i("v-uni-view",{staticClass:"flex-y-baseline f-caption c-warning"},[t._v("¥"),i("v-uni-view",{staticClass:"f-title text-bold"},[t._v(t._s(t.total_refund_price))])],1)],1),i("v-uni-button",{staticClass:"clear-btn order",style:{color:"#fff",background:t.primaryColor},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toSubmit.apply(void 0,arguments)}}},[t._v("提交申请")])],1)],1)],1)],1):t._e()},a=[]},"7d31":function(t,e,i){"use strict";i.r(e);var n=i("7602"),a=i("8f30");for(var r in a)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(r);i("bc8a");var s=i("f0c5"),o=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"003587d6",null,!1,n["a"],void 0);e["default"]=o.exports},"8f30":function(t,e,i){"use strict";i.r(e);var n=i("f16e"),a=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=a.a},"9a01":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.user-order-refund .item-child .icon-xuanze[data-v-003587d6],\r\n.user-order-refund .item-child .icon-xuanze-fill[data-v-003587d6]{font-size:%?38?%}.user-order-refund .item-child .goods-img[data-v-003587d6]{width:%?172?%;height:%?172?%}.user-order-refund .item-child .goods-spe[data-v-003587d6]{height:%?44?%;line-height:%?44?%;background:#f7f7f7}.user-order-refund .item-child .goods-num[data-v-003587d6]{width:%?200?%}.user-order-refund .item-child .textarea-info[data-v-003587d6]{background:#f7f7f7}.user-order-refund .item-child .textarea-info .input-textarea[data-v-003587d6]{width:%?570?%;height:%?300?%}.user-order-refund .refund-bottom-info[data-v-003587d6]{bottom:0;height:%?110?%;background:#f9f9f9}.user-order-refund .refund-bottom-info .iconfont[data-v-003587d6]{font-size:%?38?%}.user-order-refund .refund-bottom-info .text-right[data-v-003587d6]{height:%?110?%}.user-order-refund .refund-bottom-info .text-right .order[data-v-003587d6]{margin-top:0;border-radius:%?30?%}',""]),t.exports=e},a379:function(t,e,i){var n=i("9a01");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("dd6d260a",n,!0,{sourceMap:!1,shadowMode:!1})},bc8a:function(t,e,i){"use strict";var n=i("a379"),a=i.n(n);a.a},f16e:function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d81d"),i("14d9"),i("d3b7"),i("159b"),i("acd8"),i("4de4");var a=n(i("c7eb")),r=n(i("1da1")),s=n(i("5530")),o=i("26cb"),l={components:{},data:function(){return{options:{},detail:{},statusType:{"-1":"已取消",1:"待支付",2:"待服务",3:"技师接单",4:"技师出发",5:"技师到达",6:"服务中",7:"已完成",8:"已评价"},total_refund_num:0,total_refund_price:0,selectAll:!1,selectAdd:!1,form:{text:"",imgs:[]},lockTap:!1}},computed:(0,o.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo}}),onLoad:function(t){this.options=t,this.initIndex()},methods:(0,s.default)((0,s.default)({},(0,o.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)((0,a.default)().mark((function i(){var n,r,s;return(0,a.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 r=e.options.id,i.next=8,e.$api.order.orderInfo({id:r});case 8:s=i.sent,e.$util.setNavigationBarColor({bg:e.primaryColor}),s.order_goods.map((function(t){t.apply_num=t.can_refund_num,t.checked=t.can_refund_num<1})),e.detail=s;case 12:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},imgDel:function(t){var e=t.imagelist,i=t.imgtype;this.form[i]=e},imgUpload:function(t){var e=t.imagelist,i=t.imgtype;this.form[i]=e},handerRadioChange:function(t){var e=this.detail.order_goods[t];if(!(e.can_refund_num<1)){var i=!e.checked;this.detail.order_goods[t].checked=i,this.checkIsSelectAll()}},handerAddRadioChange:function(){var t=this.detail.add_price;1*!t||(this.selectAdd=!this.selectAdd,this.checkIsSelectAll())},changeNum:function(t,e){var i=this;return(0,r.default)((0,a.default)().mark((function n(){var r,s;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=i.detail.order_goods[t],s=r.apply_num+e,!(s<1)){n.next=5;break}return i.$util.showToast({title:"此商品最少可退1件"}),n.abrupt("return");case 5:if(!(s>r.can_refund_num)){n.next=8;break}return i.$util.showToast({title:"此商品最多可退".concat(r.can_refund_num,"件")}),n.abrupt("return");case 8:i.detail.order_goods[t].apply_num=s,i.countPrice();case 10:case"end":return n.stop()}}),n)})))()},selectAllItem:function(){var t=this;this.detail.order_goods.map((function(e){e.can_refund_num<1||(e.checked=!t.selectAll)})),this.checkIsSelectAll()},checkIsSelectAll:function(){var t=[];this.detail.order_goods.map((function(e){e.can_refund_num<1||t.push(e)})),this.selectAll=t.every((function(t){return t.checked})),this.countPrice()},countPrice:function(){var t=0,e=0,i=[];this.detail.order_goods.forEach((function(t){t.can_refund_num<1||i.push(t)})),i.forEach((function(i,n){i.checked&&(t+=parseFloat(i.true_price)*i.apply_num,e+=i.apply_num)})),this.total_refund_num=e,this.total_refund_price=this.$util.formatDecimal(t,2)},toSubmit:function(){var t=this;return(0,r.default)((0,a.default)().mark((function e(){var i,n,r,s,o;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.detail,n=i.id,r=i.order_goods,s=[],r.filter((function(t){if(t.checked){if(t.apply_num<1)return;s.push({id:t.id,num:t.apply_num})}})),!(s.length<1)){e.next=6;break}return t.$util.showToast({title:"请选择商品"}),e.abrupt("return");case 6:if(o=t.$util.deepCopy(t.form),o.text){e.next=10;break}return t.$util.showToast({title:"请输入退款原因"}),e.abrupt("return");case 10:if(o.imgs=o.imgs.length>0?o.imgs.map((function(t){return t.path})):[],o=Object.assign({},o,{order_id:n,list:s}),!t.lockTap){e.next=14;break}return e.abrupt("return");case 14:return t.lockTap=!0,t.$util.showLoading(),e.prev=16,e.next=19,t.$api.order.applyOrder(o);case 19:t.$util.hideAll(),t.$util.showToast({title:"提交成功"}),t.lockTap=!1,setTimeout((function(){t.$util.back(),t.$util.goUrl({url:1,openType:"navigateBack"})}),1e3),e.next=28;break;case 25:e.prev=25,e.t0=e["catch"](16),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3);case 28:case"end":return e.stop()}}),e,null,[[16,25]])})))()}})};e.default=l}}]); |