Browse Source

fix: 清单模板上下移

lanjianrong 3 năm trước cách đây
mục cha
commit
c260af3af9
1 tập tin đã thay đổi với 9 bổ sung3 xóa
  1. 9 3
      src/pages/Business/Inventory/index.tsx

+ 9 - 3
src/pages/Business/Inventory/index.tsx

@@ -140,7 +140,7 @@ const Inventory = () => {
                     size="small"
                     type="primary"
                     ghost
-                    disabled={!record?.moveable || record.position !== 'bottom'}
+                    disabled={!record?.moveable || record?.position === 'top'}
                     onClick={() => moveWithOperation('up')}>
                     上移
                   </Button>
@@ -149,7 +149,7 @@ const Inventory = () => {
                     size="small"
                     type="primary"
                     ghost
-                    disabled={!record?.moveable || record.position !== 'top'}
+                    disabled={!record?.moveable || record?.position === 'bottom'}
                     onClick={() => moveWithOperation('down')}>
                     下移
                   </Button>
@@ -172,7 +172,13 @@ const Inventory = () => {
             size="small"
             bordered
             expandable={{ defaultExpandAllRows: true }}
-            onRow={record => ({ onClick: () => rowClick(record) })}
+            onRow={record => ({
+              onClick: () => {
+                console.log(record)
+
+                rowClick(record)
+              }
+            })}
             rowClassName={row => (row.ID === record?.ID ? 'ant-table-row-selected' : '')}
           />
         )}