]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-258] индексы
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 15:18:42 +0000 (18:18 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 5 Dec 2024 15:18:42 +0000 (18:18 +0300)
erp24/views/shift-transfer/update.php
erp24/web/js/shift-transfer/update.js

index 1cc954af51f3febee7d93462d2f0fc7c541740b7..c5f42439d645669fc7a2eedb845c7c1fa13603a5 100644 (file)
@@ -92,6 +92,17 @@ $this->registerCss('
             'min' => 0,
             'max' => 2000,
             'columns' => [
+                [
+                    'name' => 'index',
+                    'title' => '№',
+                    'value' => function () {
+                        static $counter = 1;
+                        return $counter++;
+                    },
+                     'headerOptions' => [
+                        'style' => 'width: 40px;',
+                    ]
+                ],
                 [
                     'name'  => 'product_guid',
                     'title' => 'Продукт',
index 5614ad28f02aed974a533ca149219e4ed7649efc..fcc7d8a9fea844ab91199dc185c1578e73666e8d 100644 (file)
@@ -114,5 +114,7 @@ $(document).ready(() => {
         }
     }).on('afterAddRow', function(e, row, currentIndex) {
         setMultipleInputHandlers(currentIndex, row);
+        const index = $(row).find('#shifttransfer-shiftremainscopy-' + currentIndex + '-index');
+        index.val(currentIndex);
     });
 });