|
|
@@ -87,20 +87,20 @@ layui.config({
|
|
|
|
|
|
|
|
|
//excel导入
|
|
|
- excel = layui.excel;
|
|
|
+ excel = layui.excel;
|
|
|
$('#ExcelFile').change(function (e) {
|
|
|
var files = e.target.files;
|
|
|
- excel.importExcel(files, { }, function (data) {
|
|
|
+ excel.importExcel(files, {}, function (data) {
|
|
|
ExcelData = data[0].sheet1;
|
|
|
});
|
|
|
});
|
|
|
|
|
|
//监听单元格编辑
|
|
|
- table.on('edit(LAY-list-manage)', function(obj){
|
|
|
+ table.on('edit(LAY-list-manage)', function (obj) {
|
|
|
var value = obj.value //得到修改后的值
|
|
|
- ,data = obj.data //得到所在行所有键值
|
|
|
- ,field = obj.field; //得到字段
|
|
|
- if(field == "Sort"){
|
|
|
+ , data = obj.data //得到所在行所有键值
|
|
|
+ , field = obj.field; //得到字段
|
|
|
+ if (field == "Sort") {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/PosMerchantInfo/Sort?r=" + Math.random(1),
|
|
|
@@ -111,7 +111,7 @@ layui.config({
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
|
|
|
//列表数据
|
|
|
table.render({
|
|
|
@@ -119,26 +119,26 @@ layui.config({
|
|
|
, url: '/Admin/PosMerchantInfoList/IndexData' //模拟接口
|
|
|
, cols: [[
|
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
|
- ,{field:'MerchantNo', width: 200, title:'商户编号', sort: true}
|
|
|
- ,{field:'MerIdcardNo', width: 200, title:'身份证号', sort: true}
|
|
|
- ,{field:'MerchantName', width: 200, title:'商户名称', sort: true}
|
|
|
- ,{field:'MerchantMobile', width: 200, title:'商户手机号', sort: true}
|
|
|
- ,{field:'KqMerNo', width: 200, title:'快钱商户编码', sort: true}
|
|
|
- ,{field:'KqSnNo', width: 200, title:'快钱SN号', sort: true}
|
|
|
- ,{field:'SnType', width: 200, title:'机具类型', sort: true}
|
|
|
- ,{field:'RebateQual', width: 200, title:'返利资格', sort: true}
|
|
|
- ,{field:'ActType', width: 200, title:'激活类型', sort: true}
|
|
|
- ,{field:'MerStatus', width: 200, title:'商户状态', sort: true}
|
|
|
- ,{field:'ActiveStatus', width: 200, title:'商户激活状态', sort: true}
|
|
|
- ,{field:'MerMakerCode', width: 200, title:'商户创客编码', sort: true}
|
|
|
- ,{field:'MerRealName', width: 200, title:'商户创客名称', sort: true}
|
|
|
- ,{field:'MerUserType', width: 200, title:'商户创客类型', sort: true}
|
|
|
- ,{field:'MakerCode', width: 200, title:'直属创客编号', sort: true}
|
|
|
- ,{field:'RealName', width: 200, title:'直属创客姓名', sort: true}
|
|
|
- ,{field:'StoreNo', width: 200, title:'SN仓库编号', sort: true}
|
|
|
- ,{field:'StoreName', width: 200, title:'SN仓库名称', sort: true}
|
|
|
- ,{field:'SnApplyMakerCode', width: 200, title:'申请创客编号', sort: true}
|
|
|
- ,{field:'SnApplyRealName', width: 200, title:'申请创客姓名', sort: true}
|
|
|
+ , { field: 'MerchantNo', width: 200, title: '商户编号', sort: true }
|
|
|
+ , { field: 'MerIdcardNo', width: 200, title: '身份证号', sort: true }
|
|
|
+ , { field: 'MerchantName', width: 200, title: '商户名称', sort: true }
|
|
|
+ , { field: 'MerchantMobile', width: 200, title: '商户手机号', sort: true }
|
|
|
+ , { field: 'KqMerNo', width: 200, title: '快钱商户编码', sort: true }
|
|
|
+ , { field: 'KqSnNo', width: 200, title: '快钱SN号', sort: true }
|
|
|
+ , { field: 'SnType', width: 200, title: '机具类型', sort: true }
|
|
|
+ , { field: 'RebateQual', width: 200, title: '返利资格', sort: true }
|
|
|
+ , { field: 'ActType', width: 200, title: '激活类型', sort: true }
|
|
|
+ , { field: 'MerStatus', width: 200, title: '商户状态', sort: true }
|
|
|
+ , { field: 'ActiveStatus', width: 200, title: '商户激活状态', sort: true }
|
|
|
+ , { field: 'MerMakerCode', width: 200, title: '商户创客编码', sort: true }
|
|
|
+ , { field: 'MerRealName', width: 200, title: '商户创客名称', sort: true }
|
|
|
+ , { field: 'MerUserType', width: 200, title: '商户创客类型', sort: true }
|
|
|
+ , { field: 'MakerCode', width: 200, title: '直属创客编号', sort: true }
|
|
|
+ , { field: 'RealName', width: 200, title: '直属创客姓名', sort: true }
|
|
|
+ , { field: 'StoreNo', width: 200, title: 'SN仓库编号', sort: true }
|
|
|
+ , { field: 'StoreName', width: 200, title: 'SN仓库名称', sort: true }
|
|
|
+ , { field: 'SnApplyMakerCode', width: 200, title: '申请创客编号', sort: true }
|
|
|
+ , { field: 'SnApplyRealName', width: 200, title: '申请创客姓名', sort: true }
|
|
|
, { field: 'KqRegTime', width: 200, title: '注册时间', sort: true }
|
|
|
, { title: '操作', width: 120, align: 'left', toolbar: '#table-list-tools', fixed: 'right' }
|
|
|
]]
|
|
|
@@ -164,7 +164,7 @@ layui.config({
|
|
|
data: "Id=" + data.Id,
|
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
|
- if (data == "success") {
|
|
|
+ if (data == "success") {
|
|
|
obj.del();
|
|
|
layer.close(index);
|
|
|
} else {
|
|
|
@@ -187,20 +187,20 @@ layui.config({
|
|
|
, submitID = 'LAY-list-front-submit'
|
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
+ setTimeout(function () {
|
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
|
if (errObj.length > 0) {
|
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
|
submit.click();
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}, 300);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//监听提交
|
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
|
@@ -211,7 +211,7 @@ layui.config({
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/PosMerchantInfo/Edit?r=" + Math.random(1),
|
|
|
@@ -292,8 +292,8 @@ layui.config({
|
|
|
form.on('submit(LAY-list-front-search)', function (data) {
|
|
|
var field = data.field;
|
|
|
field.ShowFlag = 1;
|
|
|
- if (field.MerIdcardNo == "" || field.MerchantName == "") {
|
|
|
- layer.alert('请填写身份证号或者商户姓名');
|
|
|
+ if (field.MerIdcardNo == "" && field.MerchantName == "" && field.MerchantMobile == "") {
|
|
|
+ layer.alert('请输入查询条件');
|
|
|
}
|
|
|
else {
|
|
|
//执行重载
|
|
|
@@ -358,20 +358,20 @@ layui.config({
|
|
|
, submitID = 'LAY-list-front-submit'
|
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
+ setTimeout(function () {
|
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
|
if (errObj.length > 0) {
|
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
|
submit.click();
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}, 300);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//监听提交
|
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
|
@@ -382,7 +382,7 @@ layui.config({
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/PosMerchantInfo/Add?r=" + Math.random(1),
|
|
|
@@ -437,9 +437,9 @@ layui.config({
|
|
|
, Open: function () {
|
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
|
, data = checkStatus.data; //得到选中的数据
|
|
|
- if(data.length < 1){
|
|
|
+ if (data.length < 1) {
|
|
|
parent.layer.msg("请选择要开启的项");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
var ids = "";
|
|
|
$.each(data, function (index, value) {
|
|
|
ids += data[index].Id + ",";
|
|
|
@@ -466,9 +466,9 @@ layui.config({
|
|
|
, Close: function () {
|
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
|
, data = checkStatus.data; //得到选中的数据
|
|
|
- if(data.length < 1){
|
|
|
+ if (data.length < 1) {
|
|
|
parent.layer.msg("请选择要关闭的项");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
var ids = "";
|
|
|
$.each(data, function (index, value) {
|
|
|
ids += data[index].Id + ",";
|