duhe
2023-11-20 b48e39f542526a5be2a48c27a0dd780b0716d7e3
WebTM/views/ϵͳ¹ÜÀí/Óû§¹ÜÀí/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); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }