From c9686962d78c018a89c5be7023b4ef74960e5d5b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期六, 03 四月 2021 14:54:54 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/custOrder/custOrder.js | 84 ++++++++++++++++-------------------------
1 files changed, 33 insertions(+), 51 deletions(-)
diff --git a/src/main/webapp/static/js/custOrder/custOrder.js b/src/main/webapp/static/js/custOrder/custOrder.js
index 932e1f0..4227d59 100644
--- a/src/main/webapp/static/js/custOrder/custOrder.js
+++ b/src/main/webapp/static/js/custOrder/custOrder.js
@@ -16,13 +16,14 @@
}
layui.config({
base: baseUrl + "/static/layui/lay/modules/" // 閰嶇疆妯″潡鎵�鍦ㄧ殑鐩綍
-}).use(['table', 'laydate', 'form', 'tableX'], function(){
+}).use(['table', 'laydate', 'form', 'tableX', 'tableMerge'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
var layDate = layui.laydate;
var form = layui.form;
var tableX = layui.tableX;
+ var tableMerge = layui.tableMerge;
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -38,21 +39,22 @@
cols: [[
{type: 'checkbox'}
// ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
- ,{field: 'number', align: 'center',title: '閿�鍞崟鍙�'}
+ ,{field: 'number', align: 'center', merge: true, title: '鍗曞彿'}
- ,{field: 'btypeId', align: 'center',title: '瀹㈡埛缂栧彿'}
+ ,{field: 'btypeId', align: 'center', merge: ['number'], title: '瀹㈡埛缂栧彿'}
,{field: 'etypeId', align: 'center',title: '缁忔墜浜虹紪鍙�', hide: true}
+ ,{field: 'billDate', align: 'center',merge: ['number'],title: '鍗曟嵁鏃ユ湡'}
,{field: 'userCode', align: 'center',title: '鍟嗗搧缂栧彿'}
,{field: 'qty', align: 'center',title: '鍟嗗搧鏁伴噺'}
,{field: 'price', align: 'center',title: '鍟嗗搧鍗曚环', hide: true}
,{field: 'comment', align: 'center',title: '鍟嗗搧澶囨敞', hide: true}
,{field: 'status$', align: 'center',title: '鐘舵��', templet: '#statusTpl', width: 100}
- ,{field: 'billDate', align: 'center',title: '鍗曟嵁鏃ユ湡'}
+
// ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
// ,{field: 'memo', align: 'center',title: '澶囨敞'}
- ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 120}
+ ,{fixed: 'right', title:'鎿嶄綔', align: 'center', merge: ['number'], toolbar: '#operate', width: 120}
]],
request: {
pageName: 'curr',
@@ -74,16 +76,9 @@
top.location.href = baseUrl+"/";
}
pageCurr=curr;
- tableX.merges('custOrder', [1, 11]);
+ // tableX.merges('custOrder', [1, 11]);
+ tableMerge.render(this);
limit();
- form.on('checkbox(tableCheckbox)', function (data) {
- var _index = $(data.elem).attr('table-index')||0;
- if(data.elem.checked){
- res.data[_index][data.value] = 'Y';
- }else{
- res.data[_index][data.value] = 'N';
- }
- });
}
});
@@ -206,7 +201,7 @@
,closeBtn: false
,offset: '100px'
// ,area: ['800px','450px']
- ,area: '800px'
+ ,area: '1000px'
,shade: 0.5
,shadeClose: true
,id: 'LAY_layuipro'
@@ -223,16 +218,18 @@
// ,width: admin.screen() > 1 ? 892 : ''
height: 432,
cols: [[
- {field: 'title', title: '鍟嗗搧', align: 'center'},
- {field: 'anfme', title: '鎬绘暟閲�', align: 'center', style: 'font-weight: bold', width: 80},
+ {field: 'title', title: '鍟嗗搧', merge: true, align: 'center'},
+ {field: 'anfme', title: '鎬绘暟閲�', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90},
+ {field: 'type', title: '浠撳簱', merge: true, align: 'center', templet: '#typeTpl', width: 90},
{field: 'locNo', title: '璐т綅', align: 'center'},
{field: 'prior$', title: '鎺ㄨ崘璐т綅', align: 'center', width: 100},
- {field: 'reduce', title: '鏁伴噺', align: 'center', width: 80, style: 'font-weight: bold'},
+ {field: 'reduce', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
// {field: 'remQty', title: '浣欓噺', align: 'center', width: 80},
- {field: 'total', title: '鎬婚噺', align: 'center', width: 80},
+ {field: 'total', title: '鎬婚噺', align: 'center', width: 90},
]],
done: function () {
- tableX.merges('stoPreTab', [0,1]);
+ tableMerge.render(this);
+ // tableX.merges('stoPreTab', [0,1,2]);
$('.layui-table-body.layui-table-main').css("overflow", "auto")
}
});
@@ -249,23 +246,24 @@
});
// 缂烘枡
} else if (res.code === 20001) {
- layer.confirm(res.msg, {
- shadeClose: true
- , area: ['400px']
- , btn: ['搴撳瓨璋冩嫧', '鍙栨秷']
- }, function() {
- // 搴撳瓨璋冩嫧
- stockTransfer(data.number);
- layer.closeAll();
- }, function() {
- // printPakouts(data.number);
- layer.closeAll();
- }
- )
+ // layer.confirm(res.msg, {
+ // shadeClose: true
+ // , area: ['400px']
+ // , btn: ['搴撳瓨璋冩嫧', '鍙栨秷']
+ // }, function() {
+ // // 搴撳瓨璋冩嫧
+ // stockTransfer(data.number);
+ // layer.closeAll();
+ // }, function() {
+ // // printPakouts(data.number);
+ // layer.closeAll();
+ // }
+ // )
+ layer.msg(res.msg, {icon: 2})
} else if (res.code === 403){
top.location.href = baseUrl+"/";
} else {
- layer.msg(res.msg, {icon: 1})
+ layer.msg(res.msg, {icon: 2})
}
}
})
@@ -320,7 +318,7 @@
} else if (res.code === 403){
top.location.href = baseUrl+"/";
} else {
- layer.msg(res.msg)
+ layer.msg(res.msg, {icon: 2})
}
$(".layui-laypage-btn")[0].click();
}
@@ -511,22 +509,6 @@
page: {
curr: pageCurr
},
- // done: function (res, curr, count) {
- // if (res.code === 403) {
- // top.location.href = baseUrl+"/";
- // }
- // pageCurr=curr;
- // if (res.data.length === 0 && count !== 0) {
- // tableIns.reload({
- // where: searchData,
- // page: {
- // curr: pageCurr-1
- // }
- // });
- // pageCurr -= 1;
- // }
- // limit(child);
- // }
});
}
--
Gitblit v1.9.1