|
|
@@ -1,4 +1,4 @@
|
|
|
-var ExcelData,ExcelKind;
|
|
|
+var ExcelData, ExcelKind;
|
|
|
function ConfirmImport() {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
@@ -114,20 +114,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/Orders/Sort?r=" + Math.random(1),
|
|
|
@@ -138,7 +138,7 @@ layui.config({
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
//列表数据
|
|
|
table.render({
|
|
|
elem: '#LAY-list-manage'
|
|
|
@@ -146,30 +146,32 @@ layui.config({
|
|
|
, cols: [[
|
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
|
, { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
|
|
|
- ,{field:'OrderNo', width: 200, title:'平台订单号-渠道订单号', sort: true}
|
|
|
- ,{field:'ProductName', width: 200, title:'商品名称', sort: true}
|
|
|
- ,{field:'Store', width: 200, title:'发货仓库信息', sort: true}
|
|
|
- ,{field:'StoreContact', width: 200, title:'仓库联系人信息', sort: true}
|
|
|
- ,{field:'StoreFrom', width: 200, title:'仓库归属信息', sort: true}
|
|
|
- ,{field:'UserInfo', width: 200, title:'创客信息', sort: true}
|
|
|
- ,{field:'TopUserInfo', width: 200, title:'顶级创客信息', sort: true}
|
|
|
- ,{field:'Address', width: 200, title:'收货地址', sort: true}
|
|
|
- ,{field:'RecieveInfo', width: 200, title:'收件人姓名-联系电话', sort: true}
|
|
|
- ,{field:'PayMode', width: 200, title:'支付渠道', sort: true}
|
|
|
- ,{field:'TotalPrice', width: 200, title:'订单金额', sort: true}
|
|
|
- ,{field:'PayStatus', width: 200, title:'支付状态', sort: true}
|
|
|
- ,{field:'DeliveryType', width: 200, title:'提货类型', sort: true}
|
|
|
- ,{field:'Remark', width: 200, title:'订单备注', sort: true}
|
|
|
- ,{field:'SendInfo', width: 200, title:'发货状态-发货时间', sort: true}
|
|
|
- ,{field:'RefundStatusName', width: 200, title:'退款状态', sort: true}
|
|
|
- ,{field:'ErpInfo', width: 200, title:'快递单号-快递名称', sort: true}
|
|
|
- ,{field:'CreateDate', width: 200, title:'下单时间', sort: true}
|
|
|
- ,{field:'PayDate', width: 200, title:'支付时间', sort: true}
|
|
|
+ , { field: 'SendInfo', width: 200, title: '发货状态-发货时间', sort: true }
|
|
|
+ , { field: 'OrderNo', width: 200, title: '平台订单号-渠道订单号', sort: true }
|
|
|
+ , { field: 'ProductName', width: 200, title: '商品名称', sort: true }
|
|
|
+ , { field: 'ProductKind', width: 200, title: '商品类型', sort: true }
|
|
|
+ , { field: 'TotalPrice', width: 200, title: '订单金额', sort: true }
|
|
|
+ , { field: 'BuyCount', width: 200, title: '购买数量', sort: true }
|
|
|
+ , { field: 'Store', width: 200, title: '发货仓库信息', sort: true }
|
|
|
+ , { field: 'StoreContact', width: 200, title: '仓库联系人信息', sort: true }
|
|
|
+ , { field: 'StoreFrom', width: 200, title: '仓库归属信息', sort: true }
|
|
|
+ , { field: 'UserInfo', width: 200, title: '创客信息', sort: true }
|
|
|
+ , { field: 'TopUserInfo', width: 200, title: '顶级创客信息', sort: true }
|
|
|
+ , { field: 'Address', width: 200, title: '收货地址', sort: true }
|
|
|
+ , { field: 'RecieveInfo', width: 200, title: '收件人姓名-联系电话', sort: true }
|
|
|
+ , { field: 'PayMode', width: 200, title: '支付渠道', sort: true }
|
|
|
+ , { field: 'PayStatusName', width: 200, title: '支付状态', sort: true }
|
|
|
+ , { field: 'DeliveryType', width: 200, title: '提货类型', sort: true }
|
|
|
+ , { field: 'Remark', width: 200, title: '订单备注', sort: true }
|
|
|
+ , { field: 'RefundStatusName', width: 200, title: '退款状态', sort: true }
|
|
|
+ , { field: 'ErpInfo', width: 200, title: '快递单号-快递名称', sort: true }
|
|
|
+ , { field: 'CreateDate', width: 200, title: '下单时间', sort: true }
|
|
|
+ , { field: 'PayDate', width: 200, title: '支付时间', sort: true }
|
|
|
|
|
|
, { title: '操作', align: 'center', width: 300, fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
]]
|
|
|
, where: {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
, page: true
|
|
|
, limit: 30
|
|
|
@@ -235,7 +237,7 @@ layui.config({
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/Orders/Edit?r=" + Math.random(1),
|
|
|
@@ -327,7 +329,7 @@ layui.config({
|
|
|
});
|
|
|
userdata += "&SnNosList=" + SnNosList;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/Orders/Send?r=" + Math.random(1),
|
|
|
@@ -385,7 +387,7 @@ layui.config({
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/Orders/Return?r=" + Math.random(1),
|
|
|
@@ -511,20 +513,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) {
|
|
|
@@ -535,7 +537,7 @@ layui.config({
|
|
|
}
|
|
|
//提交 Ajax 成功后,静态更新表格中的数据
|
|
|
//$.ajax({});
|
|
|
-
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: "/Admin/Orders/Add?r=" + Math.random(1),
|
|
|
@@ -569,7 +571,7 @@ layui.config({
|
|
|
}
|
|
|
});
|
|
|
$("#excelTemp").html('<a href="/excelfile/模板文件.xlsx">点击下载模板文件</a>');
|
|
|
- },ExportsExcel: function () {
|
|
|
+ }, ExportsExcel: function () {
|
|
|
var userdata = '';
|
|
|
$(".layuiadmin-card-header-auto input").each(function (i) {
|
|
|
console.log($(this).attr('name'));
|
|
|
@@ -608,7 +610,7 @@ layui.config({
|
|
|
'color': '#fff',
|
|
|
'text-align': 'center'
|
|
|
});
|
|
|
- var st = setInterval(function () {
|
|
|
+ var st = setInterval(function () {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: "/Admin/Orders/CheckExport?r=" + Math.random(1),
|
|
|
@@ -616,7 +618,7 @@ layui.config({
|
|
|
success: function (data) {
|
|
|
if (data == "finish") {
|
|
|
clearInterval(st);
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
obj.text(data);
|
|
|
}
|
|
|
}
|
|
|
@@ -634,7 +636,7 @@ layui.config({
|
|
|
if (data.indexOf("success|") > -1) {
|
|
|
var datalist = data.split('|');
|
|
|
window.location.href = datalist[1];
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
layer.msg('导出失败');
|
|
|
}
|
|
|
// data.Obj.unshift(data.Fields);
|
|
|
@@ -645,9 +647,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 + ",";
|
|
|
@@ -674,9 +676,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 + ",";
|