1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageC/applicationRefund/applicationRefund"],{3212:function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("7eb4")),r=o(n("7ca3")),a=o(n("ee10"));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={components:{reasonPopupVue:function(){n.e("pageC/applicationRefund/component/reasonPopup").then(function(){return resolve(n("8006"))}.bind(null,n)).catch(n.oe)}},data:function(){return{show:!1,value1:"",refundText:"请选择退款原因",orderId:"",goodsDetail:{},imgList:[],fileList6:[],btnShow:!0,refund_price:""}},onLoad:function(e){this.orderId=e.orderId},methods:{openReason:function(){this.show=!0},close:function(e){this.refundText=e,this.show=!1},deletePic:function(e){this["fileList".concat(e.name)].splice(e.index,1),this.imgList.splice(e.index,1)},afterRead:function(e){var t=this;return(0,a.default)(i.default.mark((function n(){var o,r,a,c,s;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:console.log(e),o=[].concat(e.file),r=t["fileList".concat(e.name)].length,o.map((function(n){t["fileList".concat(e.name)].push(u({},n))})),a=0;case 5:if(!(a<o.length)){n.next=15;break}return n.next=8,t.uploadFilePromise(o[a].url);case 8:c=n.sent,s=t["fileList".concat(e.name)][r],t["fileList".concat(e.name)].splice(r,1,Object.assign(s,{status:"success",message:"",url:c})),r++;case 12:a++,n.next=5;break;case 15:case"end":return n.stop()}}),n)})))()},uploadFilePromise:function(t){var n=this;return this.btnShow=!1,new Promise((function(o,i){e.uploadFile({url:"".concat(e.$u.http.config.baseURL,"/api/upload/images"),filePath:t,name:"file",formData:{user:"test"},success:function(e){n.imgList.push(JSON.parse(e.data).data.filePath),setTimeout((function(){o(e.data.data)}),1e3),n.btnShow=!0}})}))},getRefundMoney:function(t){var n=this;e.$u.http.post("/api/order/calculate_refund_weight",{order_id:t,order_goods_id:this.orderId}).then((function(e){n.refund_price=e.refund_price}))},getDetail:function(){var t=this;e.$u.http.post("/api/order/order_goods_details",{order_goods_id:this.orderId}).then((function(e){t.goodsDetail=e,t.getRefundMoney(e.id)}))},submitApplication:function(){this.btnShow?e.$u.http.post("/api/order/refund",{order_id:this.goodsDetail.id,order_goods_id:this.orderId,refund_reason:this.refundText,refund_illustrate:this.value1,images:this.imgList.join(",")}).then((function(t){e.showToast({title:"已申请,请等待审核",icon:"none"}),e.navigateBack({delta:1})})):e.showToast({title:"请等待图片上传完毕",icon:"none"})}},mounted:function(){this.getDetail(),e.setNavigationBarTitle({title:"申请退款"})}};t.default=s}).call(this,n("df3c")["default"])},"85bf":function(e,t,n){"use strict";n.r(t);var o=n("ecc2"),i=n("c868");for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);n("fb0c");var a=n("828b"),c=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,"8dfc9fc2",null,!1,o["a"],void 0);t["default"]=c.exports},c868:function(e,t,n){"use strict";n.r(t);var o=n("3212"),i=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(r);t["default"]=i.a},c9f2:function(e,t,n){},dfeb:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("abeb");o(n("3240"));var i=o(n("85bf"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},ecc2:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o}));var o={"u-Textarea":function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u--textarea/u--textarea")]).then(n.bind(null,"2a30"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"1e9f"))}},i=function(){var e=this,t=e.$createElement,n=(e._self._c,e.goodsDetail.goods?e.goodsDetail.goods.discount_price.split("."):null),o=e.goodsDetail.goods?e.goodsDetail.goods.discount_price.split("."):null,i=e.goodsDetail.goods?e.refund_price.split("."):null,r=e.goodsDetail.goods?e.refund_price.split("."):null;e.$mp.data=Object.assign({},{$root:{g0:n,g1:o,g2:i,g3:r}})},r=[]},fb0c:function(e,t,n){"use strict";var o=n("c9f2"),i=n.n(o);i.a}},[["dfeb","common/runtime","common/vendor"]]]);
|