123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- /**
- *Created by ZHJY on 2020/7/14.
- */
- var payContainer = new Vue({
- mixins: [bankMixins,cmSysVitaMixins],
- el:"#payContainer",
- data: {
- loginLoading:true,
- payInfo:{
- payType:'',//支付类型 WEIXIN 微信支付 ALIPAY 支付宝支付
- payOrderId:'', //订单ID
- payAmount:0,
- payUnpaidAmount:0,//本次支付金额
- payMobileUrl:'',//URL
- },
- list: [],
- showPayUnder:false,
- isRequest:false,
- orderIdentificationId:'',
- orderId:0,
- shopOrderId:0,
- userId:0,
- isPayBigAlert:false, // 线下转账弹窗
- obligation:0,
- shopPay:{}
- },
- filters: {
- NumFormat:function(value) {
- //处理金额
- if (value) {
- return Number(value).toFixed(2)
- } else {
- return '0.00'
- }
- }
- },
- methods: {
- PayOrderShoporders(){//初始化订单数据
- const _self = this;
- PayApi.PayOrderShoporders({orderId:_self.orderId,shopOrderId:_self.shopOrderId},function(response){
- if(response.code === 0){
- // console.log(response);
- _self.list = response.data;
- _self.loginLoading = false;
- _self.isRequest = true;
- }else{
- CAIMEI.Alert(response.msg,'确定',false);
- }
- })
- },
- handlePayOrder:function (shopOrderId) {
- window.location.href = '/pay/caimei-hlbpay.html?shopOrderId='+shopOrderId;
- },
- copyOrderBtnSubmitFn(){//复制订单标识
- var _self = this;
- var oInput = document.createElement("textarea");
- oInput.value = _self.orderIdentificationId;
- document.body.appendChild(oInput);
- oInput.select(); // 选择对象
- document.execCommand("Copy"); // 执行浏览器复制命令
- document.body.removeChild(oInput);
- CAIMEI.dialog('复制成功');
- },
- handleAlert (list) {
- const _self = this;
- PayApi.getShopBank({ shopId:list.shopId },function(response){
- if(response.code === 0){
- _self.obligation = list.obligation
- _self.shopPay = response.data;
- _self.isPayBigAlert = true;
- }else{
- CAIMEI.Alert(response.msg,'确定',false);
- }
- })
- },
- closeBigAlert () {
- this.isPayBigAlert = false;
- },
- toFixedFn(text){//处理小数点后两位数
- return Number(text).toFixed(2);
- },
- },
- mounted: function () {
- var _self = this;
- _self.orderId = CAIMEI.getUrlParam('orderId');
- _self.shopOrderId = CAIMEI.getUrlParam('shopOrderId');
- // _self.orderIdentificationId = '#'+ _self.orderId+'#';
- _self.cmGetBankTypeLists();
- _self.PayOrderShoporders();
- }
- });
|