From b48e39f542526a5be2a48c27a0dd780b0716d7e3 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 20 十一月 2023 15:35:57 +0800 Subject: [PATCH] 用户管理客户:子表选择客户,改为可以多选 --- WebTM/views/系统管理/用户管理/Gy_UserCustomer.html | 28 +++++++++++++++++++++++----- 1 files changed, 23 insertions(+), 5 deletions(-) diff --git "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserCustomer.html" "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserCustomer.html" index 0b4ef84..0e0c929 100644 --- "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserCustomer.html" +++ "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserCustomer.html" @@ -241,11 +241,29 @@ } //console.log(obj.data); //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊� - obj.update({ - HCusID: checkStatus.data[0].HItemID, - HCustomerNumber: checkStatus.data[0].HNumber, - HCustomerName: checkStatus.data[0].HName - }); + //obj.update({ + // HCusID: checkStatus.data[0].HItemID, + // HCustomerNumber: checkStatus.data[0].HNumber, + // HCustomerName: checkStatus.data[0].HName + //}); + + + var rowIndex = $(obj.tr).attr("data-index") * 1; + for (var i = 0; i < checkStatus.data.length; i++) { + if (rowIndex + i >= option.data.length) { + var NewRow = { "HCusID": 0, "HCustomerNumber": "", "HCustomerName": "" }; + table.cache["mainTable"].push(NewRow); + option.data = table.cache["mainTable"]; + table.render(option); + } + + option.data[rowIndex + i].HCusID = checkStatus.data[i].HItemID; + option.data[rowIndex + i].HCustomerNumber = checkStatus.data[i].HNumber; + option.data[rowIndex + i].HCustomerName = checkStatus.data[i].HName; + } + table.render(option); + + layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } -- Gitblit v1.9.1