From 918cf69e763d30a1315fa1c83a964dae4dd88f12 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <xltys1995>
Date: 星期六, 03 四月 2021 15:11:08 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/custOrder/custOrder.js |   77 ++++++++++++++------------------------
 1 files changed, 29 insertions(+), 48 deletions(-)

diff --git a/src/main/webapp/static/js/custOrder/custOrder.js b/src/main/webapp/static/js/custOrder/custOrder.js
index beae1f1..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';
-                }
-            });
         }
     });
 
@@ -223,9 +218,9 @@
                                         // ,width: admin.screen() > 1 ? 892 : ''
                                         height: 432,
                                         cols: [[
-                                            {field: 'title', title: '鍟嗗搧', align: 'center'},
-                                            {field: 'anfme', title: '鎬绘暟閲�', align: 'center', style: 'font-weight: bold', width: 90},
-                                            {field: 'type', title: '浠撳簱', align: 'center', templet: '#typeTpl', width: 90},
+                                            {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: 90, style: 'font-weight: bold'},
@@ -233,7 +228,8 @@
                                             {field: 'total', title: '鎬婚噺', align: 'center', width: 90},
                                         ]],
                                         done: function () {
-                                            tableX.merges('stoPreTab', [0,1,2]);
+                                            tableMerge.render(this);
+                                            // tableX.merges('stoPreTab', [0,1,2]);
                                             $('.layui-table-body.layui-table-main').css("overflow", "auto")
                                         }
                                     });
@@ -250,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})
                         }
                     }
                 })
@@ -512,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