You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
48 KiB
1 line
48 KiB
1 year ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-warehouse-weituo"],{"0794":function(e,t,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("a9e3");var o=n(i("3f6b")),r=i("afca"),a={data:function(){return{orderInfo:[],warehouse:[],orderDetails:{},value:30,min:0,max:0,coupon_id:null,sxfRadio:null,sxf:null,switchValue:1,total:0,enough:0,couponNumOrgin:0,available_commission_amount:0}},methods:{changeYongjin:function(e){if(console.log(e),e){var t=(Number(this.sxf)-Number(this.couponNumOrgin)-Number(this.available_commission_amount)).toFixed(2);this.total=t>0?t:0}else(Number(this.sxf)-Number(this.couponNumOrgin)).toFixed(2)>0?this.total=(Number(this.sxf)-Number(this.couponNumOrgin)).toFixed(2):this.total=0},submitHandle:function(){var e=this,t={order_id:this.id,coupon_id:this.coupon_id,use_commission:this.switchValue};(0,r.payUpGoods)(t).then((function(t){1==t.data.pay_data?(uni.showToast({title:"支付成功",icon:"none"}),uni.redirectTo({url:"/pages/qianggou/productList"})):(o.default.config({debug:!1,appId:t.data.pay_data.appId,timestamp:t.data.pay_data.timeStamp,nonceStr:t.data.pay_data.nonceStr,signature:t.data.pay_data.signType,jsApiList:["chooseWXPay"]}),o.default.ready((function(){o.default.checkJsApi({jsApiList:["chooseWXPay"],success:function(e){console.log("checkjsapi Success"),console.log(e)},fail:function(e){console.log("res"),console.log(e)}}),o.default.chooseWXPay({timestamp:t.data.pay_data.timeStamp,nonceStr:t.data.pay_data.nonceStr,package:t.data.pay_data.package,signType:t.data.pay_data.signType,paySign:t.data.pay_data.paySign,success:function(e){uni.showToast({title:"支付成功",icon:"none"}),uni.redirectTo({url:"/pages/qianggou/productList"})},cancel:function(e){console.log(e)},fail:function(e){uni.showToast({title:"支付失败",icon:"none"})}})})),o.default.error((function(e){console.log(e)})),e.getOrderDetails())}))},goyhq:function(){uni.navigateTo({url:"/pages/MyCoupon/MyCoupon?id="+this.id})},gopay:function(){uni.navigateTo({url:"/pages/warehouse/pay?num="+this.orderDetails.order_amount+"&id="+this.orderDetails.id})},getOrderDetails:function(){var e=this;(0,r.orderDetail)({id:this.id,custom:{auth:!0}}).then((function(t){(0,r.getUserCommissionStatistic)().then((function(i){e.available_commission_amount=i.data.available_commission_amount,e.min=Number(t.data.order_amount).toFixed(2),e.orderDetails=Object.assign({},e.orderDetails,t.data),e.orderInfo=t.data.order_goods,e.warehouse=t.data.warehouse,e.sxfRadio=t.data.entrustment_ratio,e.max=Number(Number(e.min)*(1+Number(t.data.entrusted_ratio)/100)).toFixed(2),e.value=e.max,console.log(e.max);var n=Number(t.data.order_amount)*(Number(e.sxfRadio)/100);e.sxf=n.toFixed(2),1==e.switchValue?(e.total=(Number(e.sxf)-Number(e.couponNumOrgin)-Number(e.available_commission_amount)).toFixed(2),console.log(Number(e.available_commission_amount))):e.total=(Number(e.sxf)-Number(e.couponNumOrgin)).toFixed(2),e.total<0&&(e.total=0)}))}))},sliderChange:function(e){this.orderDetails.order_amount=e.detail.value;var t=Number(e.detail.value)*(Number(this.sxfRadio)/100);this.sxf=t.toFixed(2),this.total=(Number(this.orderDetails.order_amount)+Number(this.sxf)-Number(this.couponNum)).toFixed(2)}},onLoad:function(e){e.coupon?(this.coupon_id=e.coupon_id,this.couponNumOrgin=Number(e.num),this.enough=Number(e.enough)):this.couponNumOrgin=0,this.id=e.id,this.getOrderDetails()}};t.default=a},"09d7":function(e,t,i){"use strict";var n=i("628b"),o=i.n(n);o.a},1465:function(e,t,i){"use strict";var n=i("2fbd"),o=i.n(n);o.a},"14a5":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\
|