1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[46,18,20],{439:function(e,t,r){"use strict";var o=r(18),n=r(2),l=r(3),c=r(137),d=r(27),f=r(19),m=r(273),v=r(54),y=r(136),_=r(272),h=r(5),x=r(97).f,S=r(45).f,w=r(25).f,C=r(440),$=r(441).trim,N="Number",I=n.Number,T=I.prototype,E=n.TypeError,k=l("".slice),j=l("".charCodeAt),A=function(e){var t=_(e,"number");return"bigint"==typeof t?t:L(t)},L=function(e){var t,r,o,n,l,c,d,code,f=_(e,"number");if(y(f))throw E("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=$(f),43===(t=j(f,0))||45===t){if(88===(r=j(f,2))||120===r)return NaN}else if(48===t){switch(j(f,1)){case 66:case 98:o=2,n=49;break;case 79:case 111:o=8,n=55;break;default:return+f}for(c=(l=k(f,2)).length,d=0;d<c;d++)if((code=j(l,d))<48||code>n)return NaN;return parseInt(l,o)}return+f};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(T,r)&&h((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++)f(I,F=R[z])&&!f(O,F)&&w(O,F,S(I,F));O.prototype=T,T.constructor=O,d(n,N,O)}},440:function(e,t,r){var o=r(3);e.exports=o(1..valueOf)},441:function(e,t,r){var o=r(3),n=r(33),l=r(17),c=r(442),d=o("".replace),f="["+c+"]",m=RegExp("^"+f+f+"*"),v=RegExp(f+f+"*$"),y=function(e){return function(t){var r=l(n(t));return 1&e&&(r=d(r,m,"")),2&e&&(r=d(r,v,"")),r}};e.exports={start:y(1),end:y(2),trim:y(3)}},442:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},443:function(e,t,r){var content=r(446);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(15).default)("3181fc86",content,!0,{sourceMap:!1})},444:function(e,t,r){"use strict";r.r(t);r(439),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:400},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=String(e).split("."),t.first=e[0],t.second=e[1],this.priceSlice=t)}}},n=(r(445),r(9)),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},445:function(e,t,r){"use strict";r(443)},446:function(e,t,r){var o=r(14)(!1);o.push([e.i,".price-format{display:flex;align-items:baseline}",""]),e.exports=o},455:function(e,t,r){var content=r(468);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(15).default)("368b5a27",content,!0,{sourceMap:!1})},467:function(e,t,r){"use strict";r(455)},468:function(e,t,r){var o=r(14)(!1);o.push([e.i,".v-upload .el-upload--picture-card[data-v-9cabb86c]{width:76px;height:76px;line-height:76px}.v-upload .el-upload-list--picture-card .el-upload-list__item[data-v-9cabb86c]{width:76px;height:76px}",""]),e.exports=o},469:function(e,t,r){"use strict";r.r(t);r(439),r(40);var o=r(188),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))},remove:function(e,t){this.$emit("remove",t)},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(467),r(9)),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+"/api/file/formimage",limit:e.limit,"on-success":e.success,"on-error":e.error,"on-remove":e.remove,"on-change":e.onChange,headers:{token:e.$store.state.token},"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,"9cabb86c",null);t.default=component.exports},552:function(e,t,r){var content=r(637);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(15).default)("ddd4eaec",content,!0,{sourceMap:!1})},636:function(e,t,r){"use strict";r(552)},637:function(e,t,r){var o=r(14)(!1);o.push([e.i,".apply-sale-list[data-v-a1ed73d8]{padding:10px}.apply-sale-list .goods-info .table-content[data-v-a1ed73d8],.apply-sale-list .goods-info .table-head[data-v-a1ed73d8]{padding:10px 20px;border-bottom:1px solid #e5e5e5}.apply-sale-list .goods-info .info[data-v-a1ed73d8]{width:500px}.apply-sale-list .goods-info .act-pay[data-v-a1ed73d8],.apply-sale-list .goods-info .num[data-v-a1ed73d8],.apply-sale-list .goods-info .price[data-v-a1ed73d8],.apply-sale-list .goods-info .sum[data-v-a1ed73d8]{width:100px}.apply-sale-list .apply-form[data-v-a1ed73d8]{margin-top:24px}",""]),e.exports=o},680:function(e,t,r){"use strict";r.r(t);var o=r(6),n=(r(65),r(53),{head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",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){this.fileList=e.map((function(e){return e.response.data.uri}))},$applyAgain:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var data,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return data={id:e.$route.query.afterSaleId,reason:e.form.reason,refund_type:e.form.applyType,remark:e.form.desc,img:fileList.length<=0?"":e.fileList[0]},t.next=3,$post("after_sale/again",data);case 3:1==(r=t.sent).code&&(e.$message({message:"提交成功",type:"success"}),e.$router.push("/user/after_sales/apply_result?afterSaleId="+r.data.after_sale_id));case 5:case"end":return t.stop()}}),t)})))()},$applyAfterSale:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var data,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log(e.fileList[0]),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:e.fileList[0]},t.next=4,e.$post("after_sale/add",data);case 4:1==(r=t.sent).code&&(e.$message({message:"提交成功",type:"success"}),e.$router.push("/user/after_sales/apply_result?afterSaleId="+r.data.after_sale_id));case 6:case"end":return t.stop()}}),t)})))()}}}),l=(r(636),r(9)),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 flex m-t-10"},[r("div",{staticClass:"info flex"},[r("div",{staticClass:"flex"},[r("el-image",{staticStyle:{width:"72px",height:"72px",flex:"none"},attrs:{src:e.goods.image}}),e._v(" "),r("div",{staticClass:"m-l-10",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 flex row-center",staticStyle:{"align-self":"flex-start"}},[r("price-formate",{attrs:{price:e.goods.goods_price}})],1),e._v(" "),r("div",{staticClass:"num flex row-center",staticStyle:{"align-self":"flex-start"}},[e._v("\n "+e._s(e.goods.goods_num)+"\n ")]),e._v(" "),r("div",{staticClass:"sum flex row-center",staticStyle:{"align-self":"flex-start"}},[r("price-formate",{attrs:{price:e.goods.total_price}})],1),e._v(" "),r("div",{staticClass:"act-pay flex 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:{remove:e.uploadSuccess,success:e.uploadSuccess}},[r("div",{staticStyle:{height:"100%"}},[r("i",{staticClass:"el-icon-camera xs",staticStyle:{"font-size":"24px"}})])]),e._v(" "),r("div",{staticClass:"xs muted"},[e._v("最多可上传3张图片,支持jpg、png格式,图片大小1M以内")])],1),e._v(" "),r("el-form-item",[r("div",{staticClass:"flex"},[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("提交申请")]),e._v(" "),r("div",{staticClass:"m-l-20"},[e._v("\n 退款金额:"),r("span",{staticClass:"primary"},[e._v("¥"+e._s(e.goods.total_price))])])],1)])],1)],1)])}),[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"table-head flex"},[r("div",{staticClass:"info"},[e._v("商品信息")]),e._v(" "),r("div",{staticClass:"price flex row-center"},[e._v("单价")]),e._v(" "),r("div",{staticClass:"num flex row-center"},[e._v("数量")]),e._v(" "),r("div",{staticClass:"sum flex row-center"},[e._v("合计")]),e._v(" "),r("div",{staticClass:"act-pay flex row-center"},[e._v("实付")])])}],!1,null,"a1ed73d8",null);t.default=component.exports;installComponents(component,{PriceFormate:r(444).default,Upload:r(469).default})}}]); |