| | |
| | | */ |
| | | TSite.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', checkbox: true}, |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键ID', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '所在城市', field: 'provinceAndCity', visible: true, align: 'center', valign: 'middle',width:'20%',}, |
| | | {title: '管理员姓名', field: 'userName', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '运营商ID', field: 'operatorId', visible: false, align: 'center', valign: 'middle',}, |
| | | {title: '管理员手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '认证平台', field: 'platform', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '认证类型', field: 'type', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '认证类型', field: 'type', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | if (data==1){ |
| | | return "个人" |
| | | }else if (data==2){ |
| | | return "企业" |
| | | }else{ |
| | | return "未认证" |
| | | } |
| | | |
| | | } |
| | | }, |
| | | {title: '分账比例', field: 'proportion', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '审核状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '审核状态', field: 'audit', visible: true, align: 'center', valign: 'middle', |
| | | formatter:function (data) { |
| | | return {1:"待审核",2:"审核中",3:"已通过",4:"已拒绝"}[data] |
| | | } |
| | | }, |
| | | {title: '操作', field: 'audit', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (data,row) { |
| | | var btn = ""; |
| | | if(data==1) { |
| | | var str = '<button class="btn btn-outline btn-primary" onclick="TSite.auth('+row.operatorId+')" >去认证</button>' |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | }else if (data==2){ |
| | | var str = '<button class="btn btn-outline btn-primary" onclick="TSite.auth('+row.operatorId+')" >详情</button>' |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="" onfocus="TUser.tooltip()">' + str + '</p>'] |
| | | }else if(data==4){ |
| | | var str = '<h3>已绑定</h3>' |
| | | btn = [str] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | TSite.auth = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "商户认证", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operator/proportionAuth/' + TSite.seItem.operatorId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TSite.proportion = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length >1 ){ |
| | | Feng.info("只能选择一个运营商商户设置分账比例!"); |
| | | }else { |
| | | if (this.check()) { |
| | | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: "认证", |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/operator/proportion/' + TSite.seItem.operatorId |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | TSite.addSubmit = function(){ |
| | | |
| | |
| | | Feng.error("请输入注册地址"); |
| | | return; |
| | | } |
| | | if ("" == $("#license").val() || null == $("#license").val()){ |
| | | Feng.error("请上传营业执照"); |
| | | return; |
| | | }if ("" == $("#legalPerson").val() || null == $("#legalPerson").val()){ |
| | | if ("" == $("#legalPerson").val() || null == $("#legalPerson").val()){ |
| | | Feng.error("请输入法人姓名"); |
| | | return; |
| | | }if ("" == $("#legalPhone").val() || null == $("#legalPhone").val()){ |
| | |
| | | Feng.error("请输入法人身份证开始时间"); |
| | | return; |
| | | } |
| | | |
| | | if ("" == $("#IDCardImg").val() || null == $("#IDCardImg").val()){ |
| | | Feng.error("请上传法人身份证正面照"); |
| | | return; |
| | | }if ("" == $("#lIDNumber").val() || null == $("#lIDNumber").val()){ |
| | | if ("" == $("#lIDNumber").val() || null == $("#lIDNumber").val()){ |
| | | Feng.error("请输入法人身份证号"); |
| | | return; |
| | | }if ("" == $("#lEmail").val() || null == $("#lEmail").val()){ |
| | |
| | | return; |
| | | }if ("" == $("#lIDAddress").val() || null == $("#lIDAddress").val()){ |
| | | Feng.error("请输入法人身份证地址"); |
| | | return; |
| | | }if ("" == $("#IDCardImg1").val() || null == $("#IDCardImg1").val()){ |
| | | Feng.error("请上传法人身份证背面照"); |
| | | return; |
| | | } |
| | | if(type=="ENTERPRISE"){ |
| | |
| | | Feng.error("请输入受益人身份证开始时间"); |
| | | return; |
| | | } |
| | | if ("" == $("#bImg1").val() || null == $("#bImg1").val()){ |
| | | Feng.error("请上传受益人身份证正面照"); |
| | | return; |
| | | } |
| | | |
| | | if ("" == $("#bIDNumber").val() || null == $("#bIDNumber").val()){ |
| | | Feng.error("请输入受益人身份证号"); |
| | | return; |
| | | } |
| | | if ("" == $("#bImg2").val() || null == $("#bImg2").val()){ |
| | | Feng.error("请输入受益人身份证背面照"); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/operator/auth", function(data){ |
| | | Feng.success("操作成功!"); |
| | | // window.parent.TSite.table.refresh(); |
| | | // TSite.close(); |
| | | window.parent.TSite.table.refresh(); |
| | | TSite.close(); |
| | | },function(data){ |
| | | Feng.error("操作失败!"); |
| | | }); |
| | |
| | | $("#benefit").hide() |
| | | var defaultColunms = TSite.initColumn(); |
| | | var table = new BSTable(TSite.id, "/operatorUser/listAll", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | table.setPaginationType("client"); |
| | | TSite.table = table.init(); |
| | | var c1 = new $WebUpload("license"); |
| | | var c2 = new $WebUpload("IDCardImg"); |