|
|
@@ -1,4 +1,4 @@
|
|
|
-var ExcelData,ExcelKind;
|
|
|
+var ExcelData, ExcelKind;
|
|
|
function ConfirmImport() {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
@@ -31,49 +31,49 @@ layui.config({
|
|
|
//- 筛选条件-日期
|
|
|
var laydate = layui.laydate;
|
|
|
var layCreateTime = laydate.render({
|
|
|
-elem: '#CreateTime',
|
|
|
-trigger: 'click',
|
|
|
-type: 'datetime',
|
|
|
-range: true,
|
|
|
-change: function (value, date, endDate) {
|
|
|
-var op = true;
|
|
|
-if (date.year == endDate.year && endDate.month - date.month <= 1) {
|
|
|
-if (endDate.month - date.month == 1 && endDate.date > date.date) {
|
|
|
-op = false;
|
|
|
-layCreateTime.hint('日期范围请不要超过1个月');
|
|
|
-setTimeout(function () {
|
|
|
-$(".laydate-btns-confirm").addClass("laydate-disabled");
|
|
|
-}, 1);
|
|
|
-}
|
|
|
-} else {
|
|
|
-op = false;
|
|
|
-layCreateTime.hint('日期范围请不要超过1个月');
|
|
|
-setTimeout(function () {
|
|
|
-$(".laydate-btns-confirm").addClass("laydate-disabled");
|
|
|
-}, 1);
|
|
|
-}
|
|
|
-if (op) {
|
|
|
-$('#CreateTime').val(value);
|
|
|
-}
|
|
|
-}
|
|
|
-});
|
|
|
+ elem: '#CreateTime',
|
|
|
+ trigger: 'click',
|
|
|
+ type: 'datetime',
|
|
|
+ range: true,
|
|
|
+ change: function (value, date, endDate) {
|
|
|
+ var op = true;
|
|
|
+ if (date.year == endDate.year && endDate.month - date.month <= 1) {
|
|
|
+ if (endDate.month - date.month == 1 && endDate.date > date.date) {
|
|
|
+ op = false;
|
|
|
+ layCreateTime.hint('日期范围请不要超过1个月');
|
|
|
+ setTimeout(function () {
|
|
|
+ $(".laydate-btns-confirm").addClass("laydate-disabled");
|
|
|
+ }, 1);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ op = false;
|
|
|
+ layCreateTime.hint('日期范围请不要超过1个月');
|
|
|
+ setTimeout(function () {
|
|
|
+ $(".laydate-btns-confirm").addClass("laydate-disabled");
|
|
|
+ }, 1);
|
|
|
+ }
|
|
|
+ if (op) {
|
|
|
+ $('#CreateTime').val(value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
|
|
|
//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/BindRecord/Sort?r=" + Math.random(1),
|
|
|
@@ -84,32 +84,32 @@ $('#CreateTime').val(value);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//列表数据
|
|
|
table.render({
|
|
|
elem: '#LAY-list-manage'
|
|
|
, url: '/Admin/BindRecord/IndexData' //模拟接口
|
|
|
, cols: [[
|
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
|
- , {field:'Id', fixed: 'left', title:'ID', width:80, sort: true, unresize: true}
|
|
|
- ,{field:'AgentName', width: 200, title:'机构名称', sort: true}
|
|
|
-,{field:'MerNo', width: 200, title:'商户编号', sort: true}
|
|
|
-,{field:'MerName', width: 200, title:'商户名称', sort: true}
|
|
|
-,{field:'MerSnNo', width: 200, title:'终端机身号', sort: true}
|
|
|
-,{field:'MerOperateDate', width: 200, title:'操作时间', sort: true}
|
|
|
-,{field:'MerOperateType', width: 200, title:'操作类型', sort: true}
|
|
|
-,{field:'MerStatus', width: 200, title:'商户状态', sort: true}
|
|
|
-,{field:'ProductType', width: 200, title:'产品类型', sort: true}
|
|
|
-,{field:'MerNewSnNo', width: 200, title:'新终端机身号', sort: true}
|
|
|
-,{field:'CreateTime', width: 200, title:'创建时间', sort: true}
|
|
|
-,{field:'UpdateTime', width: 200, title:'更新时间', sort: true}
|
|
|
-,{field:'ChannelSerial', width: 200, title:'渠道流水号', sort: true}
|
|
|
-
|
|
|
- , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
|
|
|
+ , { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
|
|
|
+ // , { field: 'AgentName', width: 200, title: '机构名称', sort: true }
|
|
|
+ , { field: 'MerNo', width: 200, title: '商户编号', sort: true }
|
|
|
+ , { field: 'MerName', width: 200, title: '商户名称', sort: true }
|
|
|
+ // , { field: 'MerSnNo', width: 200, title: '终端机身号', sort: true }
|
|
|
+ , { field: 'MerOperateDate', width: 200, title: '操作时间', sort: true }
|
|
|
+ // , { field: 'MerOperateType', width: 200, title: '操作类型', sort: true }
|
|
|
+ // , { field: 'MerStatus', width: 200, title: '商户状态', sort: true }
|
|
|
+ , { field: 'ProductType', width: 200, title: '产品类型', sort: true }
|
|
|
+ // , { field: 'MerNewSnNo', width: 200, title: '新终端机身号', sort: true }
|
|
|
+ , { field: 'CreateTime', width: 200, title: '创建时间', sort: true }
|
|
|
+ , { field: 'UpdateTime', width: 200, title: '更新时间', sort: true }
|
|
|
+ , { field: 'ChannelSerial', width: 200, title: '渠道流水号', sort: true }
|
|
|
+
|
|
|
+ // , { field: 'Sort', fixed: 'right', title: '排序', width: 80, edit: 'text' }
|
|
|
, { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
]]
|
|
|
, where: {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
, page: true
|
|
|
, limit: 30
|
|
|
@@ -131,7 +131,7 @@ $('#CreateTime').val(value);
|
|
|
data: "Id=" + data.Id,
|
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
|
- if (data == "success") {
|
|
|
+ if (data == "success") {
|
|
|
obj.del();
|
|
|
layer.close(index);
|
|
|
} else {
|
|
|
@@ -154,20 +154,20 @@ $('#CreateTime').val(value);
|
|
|
, 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) {
|
|
|
@@ -178,7 +178,7 @@ $('#CreateTime').val(value);
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/BindRecord/Edit?r=" + Math.random(1),
|
|
|
@@ -271,20 +271,20 @@ $('#CreateTime').val(value);
|
|
|
, 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) {
|
|
|
@@ -295,7 +295,7 @@ $('#CreateTime').val(value);
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/BindRecord/Add?r=" + Math.random(1),
|
|
|
@@ -352,9 +352,9 @@ $('#CreateTime').val(value);
|
|
|
, 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 + ",";
|
|
|
@@ -381,9 +381,9 @@ $('#CreateTime').val(value);
|
|
|
, 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 + ",";
|