From c98f5558bccd7744f61cc25367e98e56598f0ebd Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期六, 03 六月 2023 12:45:27 +0800
Subject: [PATCH] 地图编辑器增加隐藏显示按钮

---
 src/main/webapp/static/js/order/order.js |   44 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 8be75d1..65ada4d 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -191,9 +191,11 @@
                             {type: 'numbers'},
                             {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
                             {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
-                            {field: 'batch', title: '鎵瑰彿'},
+                            {field: 'owner$', title: '璐т富', width: 160},
+                            {field: 'payment$', title: '璐х墿鐗瑰緛', width: 160},
+                            // {field: 'batch', title: '鎵瑰彿'},
                             {field: 'anfme', title: '鏁伴噺'},
-                            // {field: 'workQty', title: '浣滀笟鏁伴噺'},
+                            {field: 'workQty', title: '浣滀笟鏁伴噺'},
                             {field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold'},
                             // {field: 'unit', title: '鍗曚綅'},
                             // {
@@ -203,7 +205,8 @@
                             // },
                             // {field: 'inQty', title: '宸插叆搴撻噺'},
                             // {field: 'color', title: '棰滆壊'},
-                            {field: 'specs', title: '瑙勬牸'}
+                            // {field: 'specs', title: '瑙勬牸'},
+                            // {field: 'weight', title: '閲嶉噺'}
                         ]],
                         request: {
                             pageName: 'curr',
@@ -253,6 +256,7 @@
                         return false;
                     }
                     let nList = admin.util.deepClone(xxDataList);
+                    console.log(nList);
                     for (let xi = 0; xi < nList.length; xi++) {
                         if (nList[xi].anfme <= 0){
                             layer.msg('鏄庣粏淇敼鏁伴噺涓嶅悎娉�', {icon: 2});
@@ -260,6 +264,12 @@
                         }
                         if (nList[xi].anfme < nList[xi].workQty){
                             layer.msg('鏁伴噺涓嶈兘灏忎簬宸蹭綔涓氭暟閲�', {icon: 2});
+                            return false;
+                        }
+                    }
+                    for (let xi = 0; xi < nList.length; xi++) {
+                        if (nList[xi].owner <= 0){
+                            layer.msg('璐т富缂栧彿璇锋煡鐪嬭揣涓绘。妗�', {icon: 2});
                             return false;
                         }
                     }
@@ -306,13 +316,37 @@
                         {field: 'batch', title: '鎵瑰彿', edit: true},
                         {field: 'specs', title: '瑙勬牸'},
                         {field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
+                        {field: 'owner', title: '璐т富缂栧彿', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
+                        {field: 'payment', title: '璐т富缂栧彿', style: 'color: blue;font-weight: bold', templet: '#payment'},
+                        // {field: 'payment', title: '璐х墿鐘舵��',align: 'center', templet: '#payment'},
                         {field: 'qty', title: '浣滀笟鏁伴噺',  minWidth: 100, width: 100},
                         // {field: 'unit', title: '鍗曚綅', width: 80},
                         {field: 'memo', title: '澶囨敞' , edit: true},
                         {align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
                     ]],
-                    done: function (res) {
+                    done: function (res, curr, count) {
                         $(layero).find('.layui-table-view').css('margin', '0');
+                        var options = this;
+
+                        // 鑾峰彇褰撳墠琛屾暟鎹�
+                        table.getRowData = function(elem){
+                            var index = $(elem).closest('tr').data('index');
+                            return table.cache[options.id][index] || {};
+                        };
+
+                        $('.select-primary').on('change', function(){
+                            var value = this.value; // 鑾峰彇閫変腑椤� value
+                            var data = table.getRowData(this);
+                            console.log(value);
+                            xxDataList.forEach(res => {
+                                if (data.id === res.id){
+                                    console.log(res)
+                                    res.payment = value;
+                                }
+                            })
+
+
+                        });
                     },
                     size: ''
                 };
@@ -547,4 +581,6 @@
         ,type: 'datetime'
         ,range: true
     });
+
+
 });

--
Gitblit v1.9.1