/**
|
* 跨城站点管理管理初始化
|
*/
|
var TSite = {
|
id: "TSiteTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1,
|
picture:"",
|
fileUrl:"",
|
img:"",
|
plan:"",
|
goodsPicArray:[],
|
validateFields: {
|
}
|
};
|
/**
|
* 初始化表格的列
|
*/
|
TSite.initColumn = function () {
|
return [
|
{field: 'selectItem', checkbox: 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: '管理员手机号', 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: 'proportion', visible: true, align: 'center', valign: 'middle'},
|
{title: '审核状态', field: 'state', visible: true, align: 'center', valign: 'middle',
|
formatter:function (data) {
|
return {1:"待审核",2:"审核中",3:"已通过",4:"已拒绝"}[data]
|
}
|
},
|
];
|
};
|
|
/**
|
* 检查是否选中
|
*/
|
TSite.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if(selected.length == 0){
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
}else{
|
TSite.seItem = selected[0];
|
return true;
|
}
|
};
|
|
function UploadFileFn(){
|
$('#upFile').click();
|
}
|
TSite.oneChange = function (e) {
|
console.log("进入!")
|
var oneId=$(e).val();
|
console.log(oneId)
|
var ajax = new $ax(Feng.ctxPath + "/tCompetition/onChange", function(data){
|
var content='<option value="">选择市</option>';
|
$.each(data, function(k,v) {
|
content += "<option value='"+v.code+"'>"+v.name+"</option>";
|
});
|
$("#cCode").empty().append(content);
|
});
|
if (oneId==""){
|
var temp = '<option value="">请先选择省</option>';
|
$("#cCode").empty().append(temp);
|
}
|
ajax.set("oneId",oneId);
|
ajax.start();
|
}
|
/**
|
* 打开场地管理查看详情
|
*/
|
TSite.openInfo = function () {
|
var index = layer.open({
|
type: 2,
|
title: "认证",
|
area: ['100%', '100%'], //宽高
|
fix: false, //不固定
|
maxmin: true,
|
content: Feng.ctxPath + '/operatorUser/proportion/' + 5
|
});
|
this.layerIndex = index;
|
|
};
|
/**
|
* 关闭此对话框
|
*/
|
TSite.close = function() {
|
parent.layer.close(window.parent.TSite.layerIndex);
|
};
|
|
TSite.search = function () {
|
var queryData = {};
|
queryData['province'] = $("#pCode").val();
|
queryData['city'] =$("#cCode").val();
|
queryData['userName'] =$("#name").val();
|
queryData['phone'] =$("#phone").val();
|
queryData['platform'] =$("#platform").val();
|
queryData['type'] =$("#type").val();
|
queryData['state'] =$("#state").val();
|
TSite.table.refresh({query: queryData});
|
};
|
|
TSite.resetSearch = function () {
|
$("#pCode").val("");
|
$("#cCode").val("");
|
$("#name").val("");
|
$("#phone").val("");
|
$("#platform").val("");
|
$("#type").val("");
|
$("#state").val("");
|
TSite.search();
|
};
|
TSite.tradeYse = function () {
|
var tradeT = document.getElementById('tradeT');
|
var IDCardT = document.getElementById('IDCardT');
|
var tradeTime = document.getElementById('tradeTime');
|
var IDCardTime = document.getElementById('IDCardTime');
|
// 判断是否被选中
|
if (tradeT.checked) {
|
tradeTime.disabled = true;
|
} else {
|
tradeTime.disabled = false;
|
}
|
if (IDCardT.checked) {
|
IDCardTime.disabled = true;
|
} else {
|
IDCardTime.disabled = false;
|
}
|
};
|
$(function () {
|
$("#benefit").hide()
|
var defaultColunms = TSite.initColumn();
|
var table = new BSTable(TSite.id, "/operatorUser/listAll", defaultColunms);
|
table.setPaginationType("server");
|
TSite.table = table.init();
|
var c1 = new $WebUpload("license");
|
var c2 = new $WebUpload("IDCardImg");
|
var c3 = new $WebUpload("IDCardImg1");
|
var c4 = new $WebUpload("bImg1");
|
var c5 = new $WebUpload("bImg2");
|
var c6 = new $WebUpload("Img");
|
c1.setUploadBarId("progressBar");
|
c1.init();
|
c2.setUploadBarId("progressBar");
|
c2.init();
|
c3.setUploadBarId("progressBar");
|
c3.init();
|
c4.setUploadBarId("progressBar");
|
c4.init();
|
c5.setUploadBarId("progressBar");
|
c5.init();
|
c6.setUploadBarId("progressBar");
|
c6.init();
|
|
});
|