|
@@ -1,9 +1,9 @@
|
|
|
-var ExcelData, ExcelKind;
|
|
|
|
|
|
|
+var ExcelData;
|
|
|
function ConfirmImport() {
|
|
function ConfirmImport() {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwoChange/Import?r=" + Math.random(1),
|
|
|
|
|
- data: "Kind=" + ExcelKind + "&ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/ImportEnd?r=" + Math.random(1),
|
|
|
|
|
+ data: "ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
|
if (data == "success") {
|
|
if (data == "success") {
|
|
@@ -92,26 +92,26 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//excel导入
|
|
//excel导入
|
|
|
- excel = layui.excel;
|
|
|
|
|
|
|
+ excel = layui.excel;
|
|
|
$('#ExcelFile').change(function (e) {
|
|
$('#ExcelFile').change(function (e) {
|
|
|
var files = e.target.files;
|
|
var files = e.target.files;
|
|
|
- excel.importExcel(files, { }, function (data) {
|
|
|
|
|
- ExcelData = data[0].sheet1;
|
|
|
|
|
|
|
+ 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 //得到修改后的值
|
|
var value = obj.value //得到修改后的值
|
|
|
- ,data = obj.data //得到所在行所有键值
|
|
|
|
|
- ,field = obj.field; //得到字段
|
|
|
|
|
- if(field == "Sort"){
|
|
|
|
|
|
|
+ , data = obj.data //得到所在行所有键值
|
|
|
|
|
+ , field = obj.field; //得到字段
|
|
|
|
|
+ if (field == "Sort") {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Sort?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Sort?r=" + Math.random(1),
|
|
|
data: "Id=" + data.Id + "&Sort=" + value,
|
|
data: "Id=" + data.Id + "&Sort=" + value,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -119,37 +119,43 @@ layui.config({
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//列表数据
|
|
//列表数据
|
|
|
table.render({
|
|
table.render({
|
|
|
elem: '#LAY-list-manage'
|
|
elem: '#LAY-list-manage'
|
|
|
, url: '/Admin/PosMachinesTwoChange/IndexData' //模拟接口
|
|
, url: '/Admin/PosMachinesTwoChange/IndexData' //模拟接口
|
|
|
, cols: [[
|
|
, cols: [[
|
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
|
- ,{field:'PosSn', width: 200, title:'SN编号', sort: true}
|
|
|
|
|
- ,{field:'BrandId', width: 200, title:'产品类型', sort: true}
|
|
|
|
|
- ,{field:'StoreIdCode', width: 200, title:'所在仓库编号', sort: true}
|
|
|
|
|
- ,{field:'StoreIdName', width: 200, title:'所在仓库名称', sort: true}
|
|
|
|
|
- ,{field:'UserIdMakerCode', width: 200, title:'创客编号', sort: true}
|
|
|
|
|
- ,{field:'UserIdRealName', width: 200, title:'创客姓名', sort: true}
|
|
|
|
|
- ,{field:'BindMerchantIdMerchantNo', width: 200, title:'绑定商户编号', sort: true}
|
|
|
|
|
- ,{field:'BindMerchantIdMerchantName', width: 200, title:'绑定商户姓名', sort: true}
|
|
|
|
|
- ,{field:'PosSnType', width: 200, title:'机具类型', sort: true}
|
|
|
|
|
- ,{field:'DeviceType', width: 200, title:'设备类型', sort: true}
|
|
|
|
|
- ,{field:'BindingState', width: 200, title:'绑定状态', sort: true}
|
|
|
|
|
- ,{ field: 'ActivationState', width: 200, title: '激活状态', sort: true }
|
|
|
|
|
- ,{ field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
|
|
|
|
|
- ,{ field: 'BindingTime', width: 200, title: '绑定时间', sort: true }
|
|
|
|
|
- ,{ field: 'TransferTime', width: 200, title: '划拨时间', sort: true }
|
|
|
|
|
- ,{ field: 'RecycStartDate', width: 200, title: '循环开始时间', sort: true }
|
|
|
|
|
- ,{ field: 'RecycEndDate', width: 200, title: '循环截止时间', sort: true }
|
|
|
|
|
- ,{ field: 'UserInfo', width: 200, title: '大盟主券标记', sort: true }
|
|
|
|
|
- ,{ field: 'IsFirst', width: 200, title: '是否第一台机具', sort: true }
|
|
|
|
|
- ,{ field: 'SeoKeyword', width: 200, title: '押金金额', sort: true }
|
|
|
|
|
- ,{ title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
|
|
|
|
+ , { field: 'PosSn', width: 200, title: 'SN编号', sort: true }
|
|
|
|
|
+ , { field: 'BrandId', width: 200, title: '产品类型', sort: true }
|
|
|
|
|
+ , { field: 'StoreIdCode', width: 200, title: '所在仓库编号', sort: true }
|
|
|
|
|
+ , { field: 'StoreIdName', width: 200, title: '所在仓库名称', sort: true }
|
|
|
|
|
+ , { field: 'UserIdMakerCode', width: 200, title: '创客编号', sort: true }
|
|
|
|
|
+ , { field: 'UserIdRealName', width: 200, title: '创客姓名', sort: true }
|
|
|
|
|
+ , { field: 'BindMerchantIdMerchantNo', width: 200, title: '绑定商户编号', sort: true }
|
|
|
|
|
+ , { field: 'BindMerchantIdMerchantName', width: 200, title: '绑定商户姓名', sort: true }
|
|
|
|
|
+ , { field: 'PosSnType', width: 200, title: '机具类型', sort: true }
|
|
|
|
|
+ , { field: 'DeviceType', width: 200, title: '设备类型', sort: true }
|
|
|
|
|
+ , { field: 'BindingState', width: 200, title: '绑定状态', sort: true }
|
|
|
|
|
+ , { field: 'ActivationState', width: 200, title: '激活状态', sort: true }
|
|
|
|
|
+ , { field: 'ActivationTime', width: 200, title: '激活时间', sort: true }
|
|
|
|
|
+ , { field: 'BindingTime', width: 200, title: '绑定时间', sort: true }
|
|
|
|
|
+ , { field: 'TransferTime', width: 200, title: '划拨时间', sort: true }
|
|
|
|
|
+ , { field: 'RecycStartDate', width: 200, title: '循环开始时间', sort: true }
|
|
|
|
|
+ , { field: 'RecycEndDate', width: 200, title: '循环截止时间', sort: true }
|
|
|
|
|
+ , { field: 'UserInfo', width: 200, title: '大盟主券标记', sort: true }
|
|
|
|
|
+ , { field: 'IsFirst', width: 200, title: '是否第一台机具', sort: true }
|
|
|
|
|
+ , { field: 'SeoKeyword', width: 200, title: '押金金额', sort: true }
|
|
|
|
|
+ , { field: 'UpFeeFlag', width: 200, title: '调升标记', sort: true }
|
|
|
|
|
+ , { field: 'UpFeeDate', width: 200, title: '调升时间', sort: true }
|
|
|
|
|
+ , { field: 'UpFeeMan', width: 200, title: '调升人', sort: true }
|
|
|
|
|
+ , { field: 'DownFeeFlag', width: 200, title: '调降标记', sort: true }
|
|
|
|
|
+ , { field: 'DownFeeDate', width: 200, title: '调降时间', sort: true }
|
|
|
|
|
+ , { field: 'DownFeeMan', width: 200, title: '调降人', sort: true }
|
|
|
|
|
+ , { title: '操作', width: 100, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
]]
|
|
]]
|
|
|
, where: {
|
|
, where: {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
, page: true
|
|
, page: true
|
|
|
, limit: 30
|
|
, limit: 30
|
|
@@ -172,11 +178,11 @@ layui.config({
|
|
|
var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
|
|
var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Delete?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Delete?r=" + Math.random(1),
|
|
|
data: "Id=" + data.Id,
|
|
data: "Id=" + data.Id,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
|
- if (data == "success") {
|
|
|
|
|
|
|
+ if (data == "success") {
|
|
|
obj.del();
|
|
obj.del();
|
|
|
layer.close(index);
|
|
layer.close(index);
|
|
|
} else {
|
|
} else {
|
|
@@ -199,20 +205,20 @@ layui.config({
|
|
|
, submitID = 'LAY-list-front-submit'
|
|
, submitID = 'LAY-list-front-submit'
|
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
|
|
+ setTimeout(function () {
|
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
|
if (errObj.length > 0) {
|
|
if (errObj.length > 0) {
|
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
|
submit.click();
|
|
submit.click();
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
}, 300);
|
|
}, 300);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//监听提交
|
|
//监听提交
|
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
@@ -223,10 +229,10 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
//$.ajax({});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Edit?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Edit?r=" + Math.random(1),
|
|
|
data: userdata,
|
|
data: userdata,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -288,7 +294,7 @@ layui.config({
|
|
|
var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
|
|
var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Delete?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Delete?r=" + Math.random(1),
|
|
|
data: "Id=" + ids,
|
|
data: "Id=" + ids,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -316,20 +322,20 @@ layui.config({
|
|
|
, submitID = 'LAY-list-front-submit'
|
|
, submitID = 'LAY-list-front-submit'
|
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
, submit = layero.find('iframe').contents().find('#' + submitID);
|
|
|
|
|
|
|
|
- setTimeout(function () {
|
|
|
|
|
|
|
+ setTimeout(function () {
|
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
|
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
var errObj = $(this).find('.layui-form-danger');
|
|
|
if (errObj.length > 0) {
|
|
if (errObj.length > 0) {
|
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
iframeWindow.element.tabChange('mytabbar', String(i + 1));
|
|
|
submit.click();
|
|
submit.click();
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
}, 300);
|
|
}, 300);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
//监听提交
|
|
//监听提交
|
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
@@ -340,10 +346,10 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
//$.ajax({});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Add?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Add?r=" + Math.random(1),
|
|
|
data: userdata,
|
|
data: userdata,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -362,21 +368,7 @@ layui.config({
|
|
|
});
|
|
});
|
|
|
layer.full(perContent);
|
|
layer.full(perContent);
|
|
|
}
|
|
}
|
|
|
- , RejectStore: function () {
|
|
|
|
|
- ExcelKind = 1;
|
|
|
|
|
- layer.open({
|
|
|
|
|
- type: 1,
|
|
|
|
|
- title: '机具驳回仓库导入',
|
|
|
|
|
- maxmin: false,
|
|
|
|
|
- area: ['460px', '280px'],
|
|
|
|
|
- content: $('#excelForm'),
|
|
|
|
|
- cancel: function () {
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- $("#excelTemp").html('<a href="/users/机具驳回仓库模版.xlsx">点击下载机具驳回仓库模版</a>');
|
|
|
|
|
- }
|
|
|
|
|
, ImportData: function () {
|
|
, ImportData: function () {
|
|
|
- ExcelKind = 1;
|
|
|
|
|
layer.open({
|
|
layer.open({
|
|
|
type: 1,
|
|
type: 1,
|
|
|
title: '导入',
|
|
title: '导入',
|
|
@@ -386,8 +378,55 @@ layui.config({
|
|
|
cancel: function () {
|
|
cancel: function () {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- $("#excelTemp").html('<a href="/excelfile/模板文件.xlsx">点击下载模板文件</a>');
|
|
|
|
|
|
|
+ $("#excelTemp").html('<a href="/users/机具费率调整模版.xlsx">点击下载机具费率调整模板</a>');
|
|
|
}
|
|
}
|
|
|
|
|
+ // , ImportData: function () {
|
|
|
|
|
+ // var perContent = layer.open({
|
|
|
|
|
+ // type: 2
|
|
|
|
|
+ // , title: '费率调整结果导入'
|
|
|
|
|
+ // , content: 'Import'
|
|
|
|
|
+ // , maxmin: true
|
|
|
|
|
+ // , area: ['650px', '350px']
|
|
|
|
|
+ // , btn: ['确定', '取消']
|
|
|
|
|
+ // , yes: function (index, layero) {
|
|
|
|
|
+ // var iframeWindow = window['layui-layer-iframe' + index]
|
|
|
|
|
+ // , submitID = 'LAY-list-front-submit'
|
|
|
|
|
+ // , submit = layero.find('iframe').contents().find('#' + submitID);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // //监听提交
|
|
|
|
|
+ // iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
|
|
|
+ // var field = data.field; //获取提交的字段
|
|
|
|
|
+ // var userdata = "";
|
|
|
|
|
+ // for (var prop in field) {
|
|
|
|
|
+ // userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
|
|
|
|
|
+ // }
|
|
|
|
|
+ // //提交 Ajax 成功后,静态更新表格中的数据
|
|
|
|
|
+ // //$.ajax({});
|
|
|
|
|
+ // var loadindex = layer.load(1, {
|
|
|
|
|
+ // shade: [0.5, '#000']
|
|
|
|
|
+ // });
|
|
|
|
|
+ // $.ajax({
|
|
|
|
|
+ // type: "POST",
|
|
|
|
|
+ // url: "/Admin/PosMachinesTwoChange/ImportPost?r=" + Math.random(1),
|
|
|
|
|
+ // data: userdata,
|
|
|
|
|
+ // dataType: "text",
|
|
|
|
|
+ // success: function (data) {
|
|
|
|
|
+ // if (data.indexOf("success") == 0) {
|
|
|
|
|
+ // var datalist = data.split('|');
|
|
|
|
|
+ // var key = datalist[1];
|
|
|
|
|
+ // CheckImport(table, key, loadindex, index);
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // layer.msg(data);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
|
|
+
|
|
|
|
|
+ // submit.trigger('click');
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
, ExportExcel: function () {
|
|
, ExportExcel: function () {
|
|
|
var userdata = '';
|
|
var userdata = '';
|
|
|
$(".layuiadmin-card-header-auto input").each(function (i) {
|
|
$(".layuiadmin-card-header-auto input").each(function (i) {
|
|
@@ -401,7 +440,7 @@ layui.config({
|
|
|
});
|
|
});
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "GET",
|
|
type: "GET",
|
|
|
- url: "/Admin/PosMachinesTwo/ExportExcel?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/ExportExcel?r=" + Math.random(1),
|
|
|
data: userdata,
|
|
data: userdata,
|
|
|
dataType: "json",
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -411,12 +450,47 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ , BatchSetting: function () {
|
|
|
|
|
+ var checkStatus = table.checkStatus('LAY-list-manage')
|
|
|
|
|
+ , data = checkStatus.data; //得到选中的数据
|
|
|
|
|
+ if (data.length < 1) {
|
|
|
|
|
+ parent.layer.msg("请选择要设置调升费率的项");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var ids = "";
|
|
|
|
|
+ $.each(data, function (index, value) {
|
|
|
|
|
+ ids += data[index].Id + ",";
|
|
|
|
|
+ });
|
|
|
|
|
+ ids = ids.substring(0, ids.length - 1);
|
|
|
|
|
+ var index = layer.confirm('确定要调升吗?', function (index) {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ type: "POST",
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/BatchSetting?r=" + Math.random(1),
|
|
|
|
|
+ data: "Id=" + ids,
|
|
|
|
|
+ dataType: "text",
|
|
|
|
|
+ success: function (data) {
|
|
|
|
|
+ layer.close(index);
|
|
|
|
|
+ if (data == "success") {
|
|
|
|
|
+ table.reload('LAY-list-manage');
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (data.indexOf("Warning") == 0) {
|
|
|
|
|
+ var datalist = data.split('|');
|
|
|
|
|
+ layer.alert(datalist[1], { time: 20000 }, function () {
|
|
|
|
|
+ window.location.reload();
|
|
|
|
|
+ });}
|
|
|
|
|
+ else {
|
|
|
|
|
+ layer.msg(data);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
, Open: function () {
|
|
, Open: function () {
|
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
|
, data = checkStatus.data; //得到选中的数据
|
|
, data = checkStatus.data; //得到选中的数据
|
|
|
- if(data.length < 1){
|
|
|
|
|
|
|
+ if (data.length < 1) {
|
|
|
parent.layer.msg("请选择要开启的项");
|
|
parent.layer.msg("请选择要开启的项");
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
var ids = "";
|
|
var ids = "";
|
|
|
$.each(data, function (index, value) {
|
|
$.each(data, function (index, value) {
|
|
|
ids += data[index].Id + ",";
|
|
ids += data[index].Id + ",";
|
|
@@ -425,7 +499,7 @@ layui.config({
|
|
|
var index = layer.confirm('确定要开启吗?', function (index) {
|
|
var index = layer.confirm('确定要开启吗?', function (index) {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Open?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Open?r=" + Math.random(1),
|
|
|
data: "Id=" + ids,
|
|
data: "Id=" + ids,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|
|
@@ -443,9 +517,9 @@ layui.config({
|
|
|
, Close: function () {
|
|
, Close: function () {
|
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
var checkStatus = table.checkStatus('LAY-list-manage')
|
|
|
, data = checkStatus.data; //得到选中的数据
|
|
, data = checkStatus.data; //得到选中的数据
|
|
|
- if(data.length < 1){
|
|
|
|
|
|
|
+ if (data.length < 1) {
|
|
|
parent.layer.msg("请选择要关闭的项");
|
|
parent.layer.msg("请选择要关闭的项");
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
var ids = "";
|
|
var ids = "";
|
|
|
$.each(data, function (index, value) {
|
|
$.each(data, function (index, value) {
|
|
|
ids += data[index].Id + ",";
|
|
ids += data[index].Id + ",";
|
|
@@ -454,7 +528,7 @@ layui.config({
|
|
|
var index = layer.confirm('确定要关闭吗?', function (index) {
|
|
var index = layer.confirm('确定要关闭吗?', function (index) {
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
- url: "/Admin/PosMachinesTwo/Close?r=" + Math.random(1),
|
|
|
|
|
|
|
+ url: "/Admin/PosMachinesTwoChange/Close?r=" + Math.random(1),
|
|
|
data: "Id=" + ids,
|
|
data: "Id=" + ids,
|
|
|
dataType: "text",
|
|
dataType: "text",
|
|
|
success: function (data) {
|
|
success: function (data) {
|