| | |
| | | return true; |
| | | } |
| | | }; |
| | | /** |
| | | * 分账比例 |
| | | */ |
| | | TSite.openAddTSite = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个运营商商户设置分账比例!"); |
| | | }else { |
| | | if (this.check()) { |
| | | var index = layer.load(1,{ |
| | | type: 1 |
| | | , title: '添加分账比例' |
| | | , area: ['50%', '50%'] |
| | | , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset |
| | | , id: 'layerDemo' //防止重复弹出cge |
| | | , content: '<div class="form-horizontal">' + |
| | | ' <div class="col-sm-11" >' + |
| | | ' <div class="col-sm-11">' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">支付宝分账比例:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" placeholder="请输入分账比例" type="text" id="alipay"> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' <div class="form-group">\n' + |
| | | ' <label class="col-sm-3 control-label">微信分账比例:</label>\n' + |
| | | ' <div class="col-sm-9">\n' + |
| | | ' <input class="form-control" placeholder="请输入分账比例" type="text" id="wechat"> '+ |
| | | ' </div>\n' + |
| | | ' </div>\n' + |
| | | ' </div>' + |
| | | ' </div>' + |
| | | '</div>' |
| | | , btn: ['关闭', '保存'] |
| | | , btnAlign: 'c' //按钮居中 |
| | | , shade: 0.5 //不显示遮罩 |
| | | ,load:1 |
| | | , yes: function () { |
| | | layer.closeAll(); |
| | | }, |
| | | btn2:function () { |
| | | let wechat = $("#wechat").val() |
| | | let alipay = $("#alipay").val() |
| | | if(alipay==''){ |
| | | Feng.info("请输入支付宝分账比例") |
| | | return false; |
| | | } |
| | | if(wechat==''){ |
| | | Feng.info("请输入微信分账比例") |
| | | return false; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/operatorUser/addProportion", function (data) { |
| | | Feng.success("设置成功!"); |
| | | window.location.reload(); |
| | | window.parent.layer.closeAll(); |
| | | }, function (data) { |
| | | Feng.error("操作失败!") |
| | | }); |
| | | ajax.set("id", TSite.seItem.id); |
| | | ajax.set("alipay", alipay); |
| | | ajax.set("wechat", wechat); |
| | | ajax.start(); |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | function UploadFileFn(){ |
| | | $('#upFile').click(); |
| | | } |