|
@@ -92,23 +92,23 @@ 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) {
|
|
|
|
|
|
|
+ excel.importExcel(files, {}, function (data) {
|
|
|
ExcelData = data[0].sheet1;
|
|
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/PosMachinesTwo/Sort?r=" + Math.random(1),
|
|
@@ -119,38 +119,38 @@ layui.config({
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//列表数据
|
|
//列表数据
|
|
|
table.render({
|
|
table.render({
|
|
|
elem: '#LAY-list-manage'
|
|
elem: '#LAY-list-manage'
|
|
|
, url: '/Admin/PosMachinesTwo/IndexData' //模拟接口
|
|
, url: '/Admin/PosMachinesTwo/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: 'CreateDate', 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: 'CreateDate', 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' }
|
|
|
]]
|
|
]]
|
|
|
, where: {
|
|
, where: {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
, page: true
|
|
, page: true
|
|
|
, limit: 30
|
|
, limit: 30
|
|
@@ -177,7 +177,7 @@ layui.config({
|
|
|
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 {
|
|
@@ -200,20 +200,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) {
|
|
@@ -224,7 +224,7 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
//$.ajax({});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
url: "/Admin/PosMachinesTwo/Edit?r=" + Math.random(1),
|
|
url: "/Admin/PosMachinesTwo/Edit?r=" + Math.random(1),
|
|
@@ -256,14 +256,18 @@ layui.config({
|
|
|
form.on('submit(LAY-list-front-search)', function (data) {
|
|
form.on('submit(LAY-list-front-search)', function (data) {
|
|
|
var field = data.field;
|
|
var field = data.field;
|
|
|
field.ShowFlag = 1;
|
|
field.ShowFlag = 1;
|
|
|
-
|
|
|
|
|
- //执行重载
|
|
|
|
|
- table.reload('LAY-list-manage', {
|
|
|
|
|
- where: field,
|
|
|
|
|
- page: {
|
|
|
|
|
- curr: 1
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (field.PosSn == "" || field.UserIdMakerCode == "") {
|
|
|
|
|
+ layer.alert('请填写创客编号或者机具Sn');
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ //执行重载
|
|
|
|
|
+ table.reload('LAY-list-manage', {
|
|
|
|
|
+ where: field,
|
|
|
|
|
+ page: {
|
|
|
|
|
+ curr: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
form.on('submit(LAY-list-front-searchall)', function (data) {
|
|
form.on('submit(LAY-list-front-searchall)', function (data) {
|
|
|
table.reload('LAY-list-manage', {
|
|
table.reload('LAY-list-manage', {
|
|
@@ -318,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) {
|
|
@@ -342,7 +346,7 @@ layui.config({
|
|
|
}
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
//$.ajax({});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
type: "POST",
|
|
type: "POST",
|
|
|
url: "/Admin/PosMachinesTwo/Add?r=" + Math.random(1),
|
|
url: "/Admin/PosMachinesTwo/Add?r=" + Math.random(1),
|
|
@@ -416,9 +420,9 @@ layui.config({
|
|
|
, 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 + ",";
|
|
@@ -445,9 +449,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 + ",";
|