(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["other-page-refund-index"],{"02a3":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("39d8"));n("bf0f"),n("2797"),n("e966"),n("fd3c"),n("8f71"),n("aa77"),n("dd2b"),n("aa9c"),n("4626"),n("5ac7");var r=n("edc8"),o=i(n("07ba")),s=n("390e"),u=n("eda6"),d={data:function(){return{reasons:["不想要了","质量问题","不喜欢/不合适","物流问题","商品损坏","收到错误商品","商品与描述不符","过期商品","购买错误","其他"],selectIndex:0,selectedReason:"",textareaValue:"",cateid:"",content:"",action:"".concat(r.BASE_URL,"api/upload/image"),imgData:[],order_id:"",orderDetail:[],goods_string:"",description:"",items:[],price:0,from:"",goodsData:""}},onLoad:function(t){this.order_id=t.order_id,this.from=t.from,this.goodsData=t.goodsData?JSON.parse(decodeURIComponent(t.goodsData)):[],console.log("goodsData",this.goodsData),this.order_id?(this.getOrderDetail(),this.selectedReason=this.reasons[this.selectIndex]):uni.showToast({title:"订单id不能为空",icon:"none"})},computed:{getRefundPrice:function(){var t=0;return this.orderDetail.goods.forEach((function(e){t+=e.refund_num*(e.goods_price/e.goods_num)})),t.toFixed(2)}},methods:(0,a.default)({checkNum:function(t,e,n){var i=e.target.value;i>t.goods_num?t.refund_num=t.goods_num:t.refund_num=parseInt(i,10)},beforeBack:function(){uni.navigateBack({delta:1})},getOrderDetail:function(){var t=this;(0,s.takeoutDetailNoNeedLoginApi)({id:this.order_id}).then((function(e){e.data.order.goods.map((function(t){t.refund_num=0})),"list"==t.from&&(e.data.order.goods=e.data.order.goods.map((function(e){var n=t.goodsData.find((function(t){return t.goods_id===e.goods_id}));return n?(e.refund_num=n.refund_num,e):null})).filter((function(t){return null!==t}))),t.orderDetail=e.data.order,t.orderDetail.paytime_cn=(0,o.default)(1e3*t.orderDetail.paytime).format("YYYY-MM-DD HH:mm:ss")}))},circleSelectChangeEvent:function(t){this.selectIndex=t.detail.value,this.selectedReason=this.reasons[this.selectIndex]},imgListChange:function(t){t.length0&&t.push({goods_id:e.goods_id,goods_title:e.goods_title,goods_price:e.goods_price/e.goods_num,goods_num:e.goods_num,refund_num:e.refund_num,image:e.thumb,option_id:e.option_id,goods_number:e.goods_number})})),0!=t.length?(0,u.applyRefundApi)({id:this.order_id,goods:t,reason:this.selectedReason}).then((function(t){console.log("res",t),!0===t.data?(uni.showToast({title:"申请成功",icon:"success"}),uni.navigateBack()):uni.showToast({title:t.msg,icon:"none"})})).catch((function(t){console.log("res",t),uni.showToast({title:t.msg,icon:"none"})})):uni.showToast({title:"请选择退款商品",icon:"none"})}},"checkNum",(function(t){t.refund_num>t.goods_num&&(uni.showToast({title:"退款数量不能大于购买数量",icon:"none"}),t.refund_num=t.goods_num)}))};e.default=d},"07ba":function(t,e,n){var i,a,r=n("bdbb").default;n("4085"),n("5c47"),n("a1c1"),n("0506"),n("2c10"),n("c9b5"),n("bf0f"),n("ab80"),n("f7a5"),n("64aa"),n("9370"),n("6730"),function(o,s){"object"==r(e)&&"undefined"!=typeof t?t.exports=s():(i=s,a="function"===typeof i?i.call(e,n,e,t):i,void 0===a||(t.exports=a))}(0,(function(){"use strict";var t=6e4,e=36e5,n="millisecond",i="second",a="minute",o="hour",s="day",u="week",d="month",c="quarter",l="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},_={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),a=n%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(a,2,"0")},m:function t(e,n){if(e.date()1)return t(o[0])}else{var s=e.name;b[s]=e,a=s}return!i&&a&&(y=a),a||!i&&y},S=function(t,e){if(x(t))return t.clone();var n="object"==r(e)?e:{};return n.date=t,n.args=arguments,new C(n)},$=_;$.l=w,$.i=x,$.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var C=function(){function r(t){this.$L=w(t.locale,null,!0),this.parse(t)}var v=r.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if($.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(h);if(i){var a=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return $},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return S(t)0?n("v-uni-view",{staticClass:"copy-btn",staticStyle:{padding:"4rpx 16rpx","border-radius":"12rpx"},style:[t.themeBtnStyle],on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.payPriceDiffShow(e)}}},[t._v("支付差价")]):t._e()],1)],1)],1)],1)})),1)],1),n("v-uni-view",{staticClass:"item",staticStyle:{"margin-top":"20rpx"}},[n("v-uni-text",{staticClass:"label"},[t._v("退款金额:")]),n("v-uni-text",{staticClass:"content",staticStyle:{"font-size":"20px",color:"#ff0000"}},[t._v("RM "+t._s(t.getRefundPrice))])],1)],1),n("v-uni-view",{staticClass:"section upload-images"}),"list"!=t.from?n("v-uni-button",{staticClass:"submit-button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submitRefund.apply(void 0,arguments)}}},[t._v("提交申请")]):t._e()],1)],1)},r=[]},8687:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa"),n("0c26");var a=i(n("a7d1")),r={mixins:[a.default],name:"tn-input",props:{value:{type:[String,Number],default:""},type:{type:String,default:"text"},inputAlign:{type:String,default:"left"},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:"color: #AAAAAA"},disabled:{type:Boolean,default:!1},maxLength:{type:Number,default:255},height:{type:Number,default:0},autoHeight:{type:Boolean,default:!0},confirmType:{type:String,default:"done"},customStyle:{type:Object,default:function(){return{}}},fixed:{type:Boolean,default:!1},focus:{type:Boolean,default:!1},passwordIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!1},borderColor:{type:String,default:"#dcdfe6"},selectOpen:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},cursorSpacing:{type:Number,default:0},selectionStart:{type:Number,default:-1},selectionEnd:{type:Number,default:-1},trim:{type:Boolean,default:!0},showConfirmBar:{type:Boolean,default:!0},showRightIcon:{type:Boolean,default:!1},rightIcon:{type:String,default:""}},computed:{inputStyle:function(){var t={};return t.minHeight=this.height?this.height+"rpx":"textarea"===this.type?this.textareaHeight+"rpx":this.inputHeight+"rpx",t=Object.assign(t,this.customStyle),t},elSelectionStart:function(){return String(this.selectionStart)},elSelectionEnd:function(){return String(this.selectionEnd)}},data:function(){return{defaultValue:this.value,inputHeight:70,textareaHeight:100,validateState:!1,focused:!1,showPassword:!1,lastValue:""}},watch:{value:function(t,e){this.defaultValue=t,t!==e&&"select"===this.type&&this.handleInput({detail:{value:t}})}},created:function(){this.$on("on-form-item-error",this.onFormItemError)},methods:{handleInput:function(t){var e=this,n=t.detail.value;this.trim&&(n=this.$t.string.trim(n)),this.$emit("input",n),this.defaultValue=n,setTimeout((function(){e.dispatch("tn-form-item","on-form-change",n)}),40)},handleBlur:function(t){var e=this,n=t.detail.value;setTimeout((function(){e.focused=!1}),100),this.$emit("blur",n),setTimeout((function(){e.dispatch("tn-form-item","on-form-blur",n)}),40)},onFormItemError:function(t){this.validateState=t},onFocus:function(t){this.focused=!0,this.$emit("focus")},onConfirm:function(t){this.$emit("confirm",t.detail.value)},onClear:function(t){this.$emit("input","")},inputClick:function(){this.$emit("click")}}};e.default=r},9370:function(t,e,n){"use strict";var i=n("8bdb"),a=n("af9e"),r=n("1099"),o=n("c215"),s=a((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));i({target:"Date",proto:!0,arity:1,forced:s},{toJSON:function(t){var e=r(this),n=o(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},a6a5:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"tn-input-class tn-input",class:{"tn-input--border":t.border,"tn-input--error":t.validateState},style:{padding:"0 "+(t.border?20:0)+"rpx",borderColor:t.borderColor,textAlign:t.inputAlign},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.inputClick.apply(void 0,arguments)}}},["textarea"===t.type?n("v-uni-textarea",{staticClass:"tn-input__input tn-input__textarea",style:[t.inputStyle],attrs:{value:t.defaultValue,placeholder:t.placeholder,placeholderStyle:t.placeholderStyle,disabled:t.disabled||"select"===t.type,maxlength:t.maxLength,fixed:t.fixed,focus:t.focus,autoHeight:t.autoHeight,selectionStart:t.elSelectionStart,selectionEnd:t.elSelectionEnd,cursorSpacing:t.cursorSpacing,showConfirmBar:t.showConfirmBar},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.handleInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.handleBlur.apply(void 0,arguments)},focus:function(e){arguments[0]=e=t.$handleEvent(e),t.onFocus.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}}):n("v-uni-input",{staticClass:"tn-input__input",style:[t.inputStyle],attrs:{type:"password"===t.type?"text":t.type,value:t.defaultValue,password:"password"===t.type&&!t.showPassword,placeholder:t.placeholder,placeholderStyle:t.placeholderStyle,disabled:t.disabled||"select"===t.type,maxlength:t.maxLength,focus:t.focus,confirmType:t.confirmType,selectionStart:t.elSelectionStart,selectionEnd:t.elSelectionEnd,cursorSpacing:t.cursorSpacing,showConfirmBar:t.showConfirmBar},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.handleInput.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.handleBlur.apply(void 0,arguments)},focus:function(e){arguments[0]=e=t.$handleEvent(e),t.onFocus.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"tn-input__right-icon tn-flex tn-flex-col-center"},[t.clearable&&""!==t.value&&t.focused?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClear.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"icon tn-icon-close"})],1):"text"===t.type&&!t.focused&&t.showRightIcon&&""!==t.rightIcon?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear"},[n("v-uni-view",{staticClass:"icon",class:["tn-icon-"+t.rightIcon]})],1):t._e(),t.passwordIcon&&"password"===t.type?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__clear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.showPassword=!t.showPassword}}},[t.showPassword?n("v-uni-view",{staticClass:"icon tn-icon-eye"}):n("v-uni-view",{staticClass:"tn-icon-eye-hide"})],1):t._e(),"select"===t.type?n("v-uni-view",{staticClass:"tn-input__right-icon__item tn-input__right-icon__select",class:{"tn-input__right-icon__select--reverse":t.selectOpen}},[n("v-uni-view",{staticClass:"icon tn-icon-up-triangle"})],1):t._e()],1)],1)},a=[]},a7d1:function(t,e,n){"use strict";function i(t,e,n){this.$children.map((function(a){t===a.$options.name?a.$emit.apply(a,[e].concat(n)):i.apply(a,[t,e].concat(n))}))}n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("fd3c"),n("c223");var a={methods:{dispatch:function(t,e,n){var i=this.$parent||this.$root,a=i.$options.name;while(i&&(!a||a!==t))i=i.$parent,i&&(a=i.$options.name);i&&i.$emit.apply(i,[e].concat(n))},broadcast:function(t,e,n){i.call(this,t,e,n)}}};e.default=a},a805:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */uni-page-body[data-v-4f7697e7]{background-color:#f7f7f7}body.?%PAGE?%[data-v-4f7697e7]{background-color:#f7f7f7}.container[data-v-4f7697e7]{padding:%?20?%}.section[data-v-4f7697e7]{margin-bottom:20px}.title[data-v-4f7697e7]{font-size:%?34?%;color:#333;margin-bottom:10px;font-weight:700}.item[data-v-4f7697e7]{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.label[data-v-4f7697e7]{color:#666;width:%?200?%}.content[data-v-4f7697e7]{color:#333;width:100%}.picker[data-v-4f7697e7]{background-color:#f0f0f0;padding:10px;border-radius:5px}.textarea[data-v-4f7697e7]{background-color:#f0f0f0;padding:10px;border:none;border-radius:5px;height:100px}.submit-button[data-v-4f7697e7]{background-color:red;color:#fff;padding:10px 20px;border:none;border-radius:5px;height:%?100?%;display:flex;align-items:center;text-align:center;justify-content:center}.circle-content[data-v-4f7697e7]{background-color:#fff;padding:%?20?%;width:100%;height:%?300?%;border-radius:%?10?%}.circle-title[data-v-4f7697e7]{display:flex;flex-direction:row;margin-bottom:%?20?%}.circle-title-left[data-v-4f7697e7]{flex:1}.circle-title-left .left-icon[data-v-4f7697e7]{font-size:%?30?%;padding:%?10?%;margin-right:%?10?%;background-color:#000;color:#fff;border-radius:%?70?%}.circle-title-right[data-v-4f7697e7]{margin-left:auto;color:#78909c}.goods-item[data-v-4f7697e7]{width:100%;display:flex;justify-content:space-between;align-items:center;margin-bottom:%?10?%;border-bottom:1px solid #ccc}.goods-item .goods-info[data-v-4f7697e7]{display:flex;flex-direction:column}.goods-item .goods-input[data-v-4f7697e7]{width:%?150?%;border-radius:%?5?%;border:1px solid #ccc}.store-name[data-v-4f7697e7]{font-size:%?30?%}.store-name .store-logo[data-v-4f7697e7]{height:%?60?%;width:%?60?%;border-radius:%?6?%}.product-list .product-item[data-v-4f7697e7]{margin-top:%?20?%;border-radius:%?12?%;padding:%?20?%;display:flex;background-color:#fff}.product-list .product-item .item-image[data-v-4f7697e7]{width:%?120?%;height:%?120?%;border-radius:%?8?%}.product-list .product-item .item-info[data-v-4f7697e7]{flex:1;padding-left:%?20?%}.product-list .product-item .item-info .title[data-v-4f7697e7]{width:100%;font-size:%?32?%}.product-list .product-item .item-info .spec[data-v-4f7697e7]{font-size:%?22?%;color:#aaa;margin-top:%?4?%}.product-list .product-item .item-info .price-num[data-v-4f7697e7]{margin-top:%?8?%}.product-list .product-item .item-info .price-num .price[data-v-4f7697e7]{font-size:%?32?%;font-weight:500}',""]),t.exports=e},e0fd:function(t,e,n){"use strict";var i=n("e894"),a=n.n(i);a.a},e370:function(t,e,n){"use strict";var i=n("750c"),a=n.n(i);a.a},e894:function(t,e,n){var i=n("a805");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("6bea1958",i,!0,{sourceMap:!1,shadowMode:!1})},eda6:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.postStoreCouponApi=e.getStoreInfoApi=e.getStoreGoodsListApi=e.getOrderDinnerStoreIdApi=e.getCodeInfoByCodeApi=e.getBrandApi=e.getAlipayTemplateIdDataApi=e.exchangeApi=e.default=e.checkExchangeApi=e.applyRefundApi=void 0,e.refundListBySupplierApi=m,e.updateGoodCartApi=e.searchRecordApi=void 0,n("5c47"),n("af8f");var a=i(n("b4f6")),r=function(t){return a.default.get("api/user.store.store/getOrderDinnerStoreId",t)};e.getOrderDinnerStoreIdApi=r;var o=function(t){return a.default.get("api/user.store.store/getBrand?sid="+t)};e.getBrandApi=o;var s=function(t){return a.default.get("api/user.store.store/getCodeInfo?code="+t,{})};e.getCodeInfoByCodeApi=s;var u=function(t){return a.default.get("api/user.mealRedpacket.meal_redpacket/checkExchange?sid="+t)};e.checkExchangeApi=u;var d=function(t){return a.default.post("api/user.mealRedpacket.meal_redpacket/exchange",t)};e.exchangeApi=d;var c=function(){return a.default.get("api/system.template.AliTemplate/templateList")};e.getAlipayTemplateIdDataApi=c;var l=function(t){return a.default.post("api/user.tuangouquan.write_off/searchRecords",t)};e.searchRecordApi=l;var f=function(t){var e=t.sid,n=t.search,i=t.orderId,r=t.cid,o=t.child_id,s=t.page,u=t.is_api_shop,d=t.storeCode,c=t.api_brand,l=t.order_type,f=t.encrypted_data,p=t.write_off_type,h=t.is_promotion,g=t.goodsC,v=t.chrid;return a.default.get("api/user.store.goods/goods",{sid:e,child_id:o||"",search:n||"",order_id:i||"",cid:r||"",page:s||1,is_api_shop:u||"",storeCode:d||"",api_brand:c||"",order_type:l||"",encrypted_data:f||"",write_off_type:p||"",is_promotion:h||-1,goodsC:g,chrid:v||""})};e.getStoreGoodsListApi=f;var p=function(t){var e=t.sid,n=t.table_id,i=t.storeCode,r=t.brand;return a.default.get("api/user.store.store/index",{sid:e,table_id:n,storeCode:i,brand:r})};e.getStoreInfoApi=p;var h=function(t){var e=t.sid;return a.default.post("api/user.channel.coupon/receive",{sid:e})};e.postStoreCouponApi=h;var g=function(t){var e=t.goodsId,n=t.sid,i=t.num,r=t.options_id;return a.default.post("api/user.store.goods/updateCart",{sid:n,goods_id:e,num:i,options_id:r})};e.updateGoodCartApi=g;var v=function(t){return a.default.post("api/user.order.order/applyRefund",t)};function m(t){return a.default.get("api/user.order.order/refundListBySupplier",t)}e.applyRefundApi=v;var _={getOrderDinnerStoreIdApi:r,getBrandApi:o,getCodeInfoByCodeApi:s,checkExchangeApi:u,exchangeApi:d,getAlipayTemplateIdDataApi:c,searchRecordApi:l,getStoreGoodsListApi:f,getStoreInfoApi:p,postStoreCouponApi:h,updateGoodCartApi:g,applyRefundApi:v,refundListBySupplierApi:m};e.default=_}}]);