1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
![]() |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-refund-confirm"],{"038c":function(t,e,r){"use strict";r("7a82");var n=r("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r("c7eb")),a=n(r("1da1"));r("d3b7"),r("3ca3"),r("ddb0"),r("acd8"),r("a9e3"),r("3c65"),r("a434"),r("14d9");var o=r("736a"),d=n(r("952d")),u=r("26cb"),s={components:{alertBox:d.default},computed:(0,u.mapGetters)(["viewColor"]),data:function(){return{order_id:0,isShowBox:!1,uploadImg:[],qsArray:[],qsIndex:0,numArray:[],numIndex:0,ids:"",refund_type:"",type:"",productData:{},con:"",refund_price:"",postage_price:"",maxRefundPrice:"",rerundPrice:"",unitPrice:0,msg:"",refund_order_id:"",status:"",order_status:!1}},onLoad:function(t){this.ids=t.ids,this.refund_type=t.refund_type,this.type=t.type,this.order_id=t.order_id,Promise.all([this.refundProduct(),this.refundMessage()])},methods:{checkMaxPrice:function(){this.rerundPrice>this.maxRefundPrice&&(this.rerundPrice=this.maxRefundPrice.toFixed(2))},limitAamount:function(){parseFloat(this.rerundPrice)>parseFloat(this.maxRefundPrice)&&(uni.showToast({title:"退款金额不能大于支付金额",icon:"none"}),this.validate=!1)},refundMessage:function(){var t=this;(0,o.refundMessage)().then((function(e){t.qsArray=e.data}))},refundProduct:function(){var t=this;(0,o.refundProduct)(this.order_id,{ids:this.ids,type:this.type}).then((function(e){var r=e.data;if(t.productData=r,t.refund_price=r.total_refund_price,t.postage_price=r.postage_price,t.maxRefundPrice=Number(r.postage_price)+Number(r.total_refund_price),t.rerundPrice=t.maxRefundPrice.toFixed(2),t.status=r.status,t.order_status=r.activity_type,t.unitPostage=t.postage_price>0?t.$util.$h.Div(t.postage_price,r.product[0].refund_num).toFixed(2):0,1==t.type){t.unitPrice=t.$util.$h.Div(r.total_refund_price,r.product[0].refund_num);for(var n=1;n<=r.product[0].refund_num;n++)t.numArray.unshift(n);t.refund_price=t.$util.$h.Mul(t.unitPrice,t.numArray[0])}})).catch((function(t){uni.showToast({title:t,icon:"none"})}))},bindPickerChange:function(t){this.qsIndex=t.target.value},bindNumChange:function(t){this.numIndex=t.target.value,this.refund_price=this.numArray[t.target.value]===this.productData.product[0].refund_num?this.productData.total_refund_price:this.$util.$h.Mul(this.unitPrice,this.numArray[t.target.value]),this.maxRefundPrice=this.refund_price+(this.postage_price>0?this.numArray[t.target.value]===this.productData.product[0].refund_num?this.postage_price:this.$util.$h.Mul(this.numArray[t.target.value],this.unitPostage):0),this.rerundPrice=this.maxRefundPrice.toFixed(2)},deleteImg:function(t){this.uploadImg.splice(t,1)},uploadpic:function(){if(this.uploadImg.length<9){var t=this;t.$util.uploadImageOne("upload/image",(function(e){t.uploadImg.push(e.data.path),t.$set(t,"uploadImg",t.uploadImg)}))}else uni.showToast({title:"最多可上传9张",icon:"none"})},bindComfirm:function(){var t=this;return(0,a.default)((0,i.default)().mark((function e(){var r;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,o.refundApply)(t.order_id,{type:t.type,refund_type:t.refund_type,num:1==t.type?t.numArray[t.numIndex]:"",ids:t.ids,refund_message:t.qsArray[t.qsIndex],mark:t.con,refund_price:t.rerundPrice,pics:t.uploadImg});case 3:r=e.sent,t.msg=r.message,t.refund_order_id=r.data.refund_order_id,t.isShowBox=!0,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),uni.showToast({title:e.t0,icon:"none"});case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))()},bindClose:function(){this.isShowBox=!1,uni.redirectTo({url:"/pages/users/refund/detail?id="+this.refund_order_id})}}};e.default=s},"0447":function(t,e,r){var n=r("c018");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=r("4f06").default;i("0775d10f",n,!0,{sourceMap:!1,shadowMode:!1})},"21fc":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件<EFBFBD><EFBFBD>
|