2023-10-23 16:11:09 +08:00

1 line
12 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[40,15,18],{434:function(e,t,r){"use strict";var o=r(15),n=r(2),l=r(3),c=r(137),f=r(27),d=r(17),m=r(273),v=r(53),h=r(136),y=r(272),_=r(4),x=r(93).f,S=r(45).f,w=r(23).f,C=r(435),$=r(436).trim,N="Number",I=n.Number,E=I.prototype,T=n.TypeError,j=l("".slice),k=l("".charCodeAt),A=function(e){var t=y(e,"number");return"bigint"==typeof t?t:L(t)},L=function(e){var t,r,o,n,l,c,f,code,d=y(e,"number");if(h(d))throw T("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2)if(d=$(d),43===(t=k(d,0))||45===t){if(88===(r=k(d,2))||120===r)return NaN}else if(48===t){switch(k(d,1)){case 66:case 98:o=2,n=49;break;case 79:case 111:o=8,n=55;break;default:return+d}for(c=(l=j(d,2)).length,f=0;f<c;f++)if((code=k(l,f))<48||code>n)return NaN;return parseInt(l,o)}return+d};if(c(N,!I(" 0o1")||!I("0b1")||I("+0x1"))){for(var F,O=function(e){var t=arguments.length<1?0:I(A(e)),r=this;return v(E,r)&&_((function(){C(r)}))?m(Object(t),r,O):t},R=o?x(I):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),z=0;R.length>z;z++)d(I,F=R[z])&&!d(O,F)&&w(O,F,S(I,F));O.prototype=E,E.constructor=O,f(n,N,O)}},435:function(e,t,r){var o=r(3);e.exports=o(1..valueOf)},436:function(e,t,r){var o=r(3),n=r(31),l=r(16),c=r(437),f=o("".replace),d="["+c+"]",m=RegExp("^"+d+d+"*"),v=RegExp(d+d+"*$"),h=function(e){return function(t){var r=l(n(t));return 1&e&&(r=f(r,m,"")),2&e&&(r=f(r,v,"")),r}};e.exports={start:h(1),end:h(2),trim:h(3)}},437:function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},438:function(e,t,r){var content=r(441);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(19).default)("03051d40",content,!0,{sourceMap:!1})},439:function(e,t,r){"use strict";r.r(t);r(434),r(39),r(274);var o={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:500},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(e){this.priceFormat()}},methods:{priceFormat:function(){var e=this.price,t={};null!==e&&(e=parseFloat(e),e=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},n=(r(440),r(11)),component=Object(n.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("span",{class:(e.lineThrough?"line-through":"")+"price-format",style:{color:e.color,"font-weight":e.weight}},[e.showSubscript?r("span",{style:{"font-size":e.subscriptSize+"px","margin-right":"1px"}},[e._v("¥")]):e._e(),e._v(" "),r("span",{style:{"font-size":e.firstSize+"px","margin-right":"1px"}},[e._v(e._s(e.priceSlice.first))]),e._v(" "),e.priceSlice.second?r("span",{style:{"font-size":e.secondSize+"px"}},[e._v("."+e._s(e.priceSlice.second))]):e._e()])}),[],!1,null,null,null);t.default=component.exports},440:function(e,t,r){"use strict";r(438)},441:function(e,t,r){var o=r(18)(!1);o.push([e.i,".price-format{display:flex;align-items:baseline}",""]),e.exports=o},447:function(e,t,r){var content=r(455);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(19).default)("61949a37",content,!0,{sourceMap:!1})},454:function(e,t,r){"use strict";r(447)},455:function(e,t,r){var o=r(18)(!1);o.push([e.i,".v-upload .el-upload--picture-card{width:76px;height:76px;line-height:76px}.v-upload .el-upload-list--picture-card .el-upload-list__item{width:76px;height:76px}",""]),e.exports=o},456:function(e,t,r){"use strict";r.r(t);r(434),r(40);var o=r(189),n={components:{},props:{limit:{type:Number,default:1},isSlot:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},onChange:{type:Function,default:function(){}}},watch:{},data:function(){return{url:o.a.baseUrl}},created:function(){},computed:{},methods:{success:function(e,t,r){this.autoUpload&&(this.$message({message:"上传成功",type:"success"}),this.$emit("success",r))},error:function(e){this.$message({message:"上传失败,请重新上传",type:"error"})},beforeAvatarUpload:function(e){var t=e.name.substring(e.name.lastIndexOf(".")+1);console.log("fdsadsf");var r="jpg"===t,o="png"===t;return r||o?r||o||"jpeg"===t:(this.$message({message:"上传文件只能是 jpg, jpeg, png格式!",type:"warning"}),!1)}}},l=(r(454),r(11)),component=Object(l.a)(n,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-upload"},[r("el-upload",{attrs:{"list-type":"picture-card",action:e.url+"file/formimage",limit:e.limit,"on-success":e.success,"on-error":e.error,"on-change":e.onChange,"auto-upload":e.autoUpload,accept:"image/jpg,image/jpeg,image/png","before-upload":e.beforeAvatarUpload}},[e.isSlot?e._t("default"):r("div",[r("div",{staticClass:"muted xs"},[e._v("上传图片")])])],2)],1)}),[],!1,null,null,null);t.default=component.exports},535:function(e,t,r){var content=r(607);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(19).default)("199d6a81",content,!0,{sourceMap:!1})},606:function(e,t,r){"use strict";r(535)},607:function(e,t,r){var o=r(18)(!1);o.push([e.i,".apply-sale-list[data-v-55e350fe]{padding:10px}.apply-sale-list .goods-info .table-content[data-v-55e350fe],.apply-sale-list .goods-info .table-head[data-v-55e350fe]{padding:10px 20px;border-bottom:1px solid #e5e5e5}.apply-sale-list .goods-info .info[data-v-55e350fe]{width:500px}.apply-sale-list .goods-info .act-pay[data-v-55e350fe],.apply-sale-list .goods-info .num[data-v-55e350fe],.apply-sale-list .goods-info .price[data-v-55e350fe],.apply-sale-list .goods-info .sum[data-v-55e350fe]{width:100px}.apply-sale-list .apply-form[data-v-55e350fe]{margin-top:24px}",""]),e.exports=o},654:function(e,t,r){"use strict";r.r(t);var o=r(6),n=(r(10),r(21),r(52),{components:{upload:r(456).default},head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user_lauout",name:"applySale",asyncData:function(e){return Object(o.a)(regeneratorRuntime.mark((function t(){var r,o,n,l,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.$get,e.$post,o=e.query,n={},l=[],t.next=5,r("after_sale/goodsInfo",{params:{order_id:o.order_id,item_id:o.item_id}});case 5:return 1==(c=t.sent).code&&(n=c.data.goods,l=c.data.reason),t.abrupt("return",{reason:l,goods:n});case 8:case"end":return t.stop()}}),t)})))()},data:function(){return{applyType:"仅退款",form:{applyType:0,reason:"",desc:""},rules:{applyType:[{required:!0,message:"请选择退款类型"}],reason:[{required:!0,message:"请选择退款原因",triggle:"blur"}]},fileList:[]}},methods:{applyRadioChange:function(e){this.form.applyType="仅退款"==e?0:1},onSubmit:function(e){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;t.$route.query.afterSaleId?t.applyAgainFun():t.$applyAfterSale()}))},onUploadChange:function(e){var t=Object.assign([],this.fileList);t.push(e),this.fileList=t,console.log("onChange",e," fileList:",this.fileList)},uploadSuccess:function(e){var t=Object.assign([],e);this.fileList=t,console.log("onSuccess",e," fileList:",this.fileList)},$applyAgain:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r,data,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],e.fileList.forEach((function(e){r.push(e.response.data)})),data={id:e.$route.query.afterSaleId,reason:e.form.reason,refund_type:e.form.applyType,remark:e.form.desc,img:r.length<=0?"":r[0].base_url},t.next=5,$post("after_sale/again",data);case 5:1==(o=t.sent).code&&(e.$message({message:"提交成功",type:"success"}),e.$router.push("/user/after_sales/apply_result?afterSaleId="+o.data.after_sale_id));case 7:case"end":return t.stop()}}),t)})))()},$applyAfterSale:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var r,data,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],e.fileList.forEach((function(e){r.push(e.response.data)})),data={item_id:e.$route.query.item_id,order_id:e.$route.query.order_id,reason:e.form.reason,refund_type:e.form.applyType,remark:e.form.desc,img:r.length<=0?"":r[0].base_url},t.next=5,e.$post("after_sale/add",data);case 5:1==(o=t.sent).code&&(e.$message({message:"提交成功",type:"success"}),e.$router.push("/user/after_sales/apply_result?afterSaleId="+o.data.after_sale_id));case 7:case"end":return t.stop()}}),t)})))()}}}),l=(r(606),r(11)),component=Object(l.a)(n,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"apply-sale-list"},[r("div",{staticClass:"goods-info"},[e._m(0),e._v(" "),r("div",{staticClass:"table-content row mt10"},[r("div",{staticClass:"info row"},[r("div",{staticClass:"row"},[r("el-image",{staticStyle:{width:"72px",height:"72px",flex:"none"},attrs:{src:e.goods.image}}),e._v(" "),r("div",{staticClass:"ml10",staticStyle:{flex:"1","align-self":"flex-start"}},[r("div",{staticClass:"line2"},[e._v(e._s(e.goods.goods_name))]),e._v(" "),r("div",{staticClass:"mt10 muted sm"},[e._v(e._s(e.goods.spec_value))])])],1)]),e._v(" "),r("div",{staticClass:"price row-center",staticStyle:{"align-self":"flex-start"}},[r("price-formate",{attrs:{price:e.goods.goods_price}})],1),e._v(" "),r("div",{staticClass:"num row-center",staticStyle:{"align-self":"flex-start"}},[e._v("\n "+e._s(e.goods.goods_num)+"\n ")]),e._v(" "),r("div",{staticClass:"sum row-center",staticStyle:{"align-self":"flex-start"}},[r("price-formate",{attrs:{price:e.goods.total_price}})],1),e._v(" "),r("div",{staticClass:"act-pay row-center",staticStyle:{"align-self":"flex-start"}},[r("price-formate",{attrs:{price:e.goods.total_pay_price}})],1)])]),e._v(" "),r("div",{staticClass:"apply-form"},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"退款类型:",prop:"applyType"}},[r("el-radio-group",{on:{change:e.applyRadioChange},model:{value:e.applyType,callback:function(t){e.applyType=t},expression:"applyType"}},[r("el-radio",{attrs:{label:"仅退款"}}),e._v(" "),r("el-radio",{attrs:{label:"退货退款"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"退款原因:",prop:"reason"}},[r("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.reason,callback:function(t){e.$set(e.form,"reason",t)},expression:"form.reason"}},e._l(e.reason,(function(e,t){return r("el-option",{key:t,attrs:{label:e,value:e}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"退款说明:",prop:"desc"}},[r("el-input",{staticStyle:{width:"600px"},attrs:{type:"textarea",placeholder:"退款说明200字以内",maxlength:"200","show-word-limit":"",resize:"none",rows:"5"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1),e._v(" "),r("el-form-item",[r("upload",{attrs:{isSlot:"","file-list":e.fileList,limit:3},on:{success:e.uploadSuccess}},[r("div",{staticClass:"column-center",staticStyle:{height:"100%"}},[r("i",{staticClass:"el-icon-camera xs",staticStyle:{"font-size":"24px"}}),e._v(" "),r("div",{staticClass:"muted xs mt10",staticStyle:{"line-height":"0"}},[e._v("上传凭证")])])]),e._v(" "),r("div",{staticClass:"xs muted"},[e._v("最多可上传3张图片支持jpg、png格式图片大小1M以内")])],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("提交申请")])],1)],1)],1)])}),[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"table-head row"},[r("div",{staticClass:"info"},[e._v("商品信息")]),e._v(" "),r("div",{staticClass:"price row-center"},[e._v("单价")]),e._v(" "),r("div",{staticClass:"num row-center"},[e._v("数量")]),e._v(" "),r("div",{staticClass:"sum row-center"},[e._v("合计")]),e._v(" "),r("div",{staticClass:"act-pay row-center"},[e._v("实付")])])}],!1,null,"55e350fe",null);t.default=component.exports;installComponents(component,{PriceFormate:r(439).default})}}]);