Browse Source

批量插入清单部位,输入编号,在签约清单中查询,填入名称、单位

MaiXinRong 5 năm trước cách đây
mục cha
commit
b51147f139
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      app/public/js/ledger.js

+ 12 - 0
app/public/js/ledger.js

@@ -2150,6 +2150,18 @@ $(document).ready(function() {
                     }
                 }
             });
+            this.qdSpread.bind(spreadNS.Events.EditEnded, function (e, info) {
+                if (info.col === 0) {
+                    const dealBills = self.dealSpread.getActiveSheet().zh_data;
+                    if (dealBills && dealBills.length > 0) {
+                        const bills = _.find(dealBills, {code: info.editingText});
+                        if (bills) {
+                            info.sheet.getCell(info.row, 1).value(bills.name);
+                            info.sheet.getCell(info.row, 2).value(bills.unit);
+                        }
+                    }
+                }
+            });
 
             this.obj.bind('shown.bs.modal', function () {
                 self.qdSpread.refresh();