From f68b291e69b92864db57bd76a614d2f312536b41 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期二, 29 八月 2023 17:23:09 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/reimburseOnline/reimburseOnline.js |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/src/main/webapp/static/js/reimburseOnline/reimburseOnline.js b/src/main/webapp/static/js/reimburseOnline/reimburseOnline.js
index 766a7de..42e40a7 100644
--- a/src/main/webapp/static/js/reimburseOnline/reimburseOnline.js
+++ b/src/main/webapp/static/js/reimburseOnline/reimburseOnline.js
@@ -452,7 +452,7 @@
                     cellMinWidth: 100,
                     cols: [[
                         {type: 'numbers', title: '#'},
-                        {field: 'occupation', title: '浜嬬敱', width: 100},
+                        {field: 'occupation', title: '浜嬬敱', width: 100, style: 'color: blue;font-weight: bold', templet: '#occupation'},
                         // {field: 'expenseType', title: '璐圭敤绫诲瀷', width: 100},
                         {field: 'expenseType$', title: '璐圭敤绫诲瀷', width: 100},
                         {field: 'taxRate', title: '绋庣巼', width: 60},
@@ -476,8 +476,29 @@
                         // {field: 'creationTime', title: '鍒涘缓鏃ユ湡', width: 160}
                         {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] || {};
+                        };
+
+                        $('.input-occupation').on('text', function(){
+                            var value = this.value; // 鑾峰彇閫変腑椤� value
+                            var data = table.getRowData(this);
+                            console.log(value);
+                            console.log("value------===");
+                            xxDataList.forEach(res => {
+                                if (data.id === res.id){
+                                    console.log(res)
+                                    res.occupation = value;
+                                }
+                            })
+
+                        });
                     },
                     size: ''
                 };
@@ -560,6 +581,7 @@
                             // 琛ㄥ崟鎻愪氦浜嬩欢
                             form.on('submit(matEditSubmit)', function (data) {
                                 let selectList = matXmSelect.getValue();
+                                console.log(selectList)
                                 for (let i = 0; i<selectList.length; i++) {
                                     let item = selectList[i];
                                     // 鏌ヨ鐗╂枡璇︽儏
@@ -571,13 +593,16 @@
                                         success: function (res) {
                                             if (res.code === 200){
                                                 var bige=true;
-                                                for (var j = 0; j < xxDataList.length; j++) {
-                                                    if (xxDataList[j].matnr === res.data.matnr && xxDataList[j].batch === res.data.batch) {
-                                                        bige=false;
-                                                        break;
-                                                    }
-                                                }
+                                                // console.log("-------2.1-------")
+                                                // for (var j = 0; j < xxDataList.length; j++) {
+                                                //     if (xxDataList[j].expenseType === res.data.expenseType && xxDataList[j].batch === res.data.batch) {
+                                                //         bige=false;
+                                                //         console.log("-------2.2-------")
+                                                //         break;
+                                                //     }
+                                                // }
                                                 if (bige){
+                                                    // console.log("-------2.3-------")
                                                     xxDataList.push(res.data);
                                                     insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
                                                 }

--
Gitblit v1.9.1