소스 검색

feat: 软件锁服务记录完整版

outaozhen 4 년 전
부모
커밋
58b8b2b402
2개의 변경된 파일27개의 추가작업 그리고 3개의 파일을 삭제
  1. 10 3
      src/pages/Product/Lock/LockStore/components/LockDetail/TabList.tsx
  2. 17 0
      src/services/typding.d.ts

+ 10 - 3
src/pages/Product/Lock/LockStore/components/LockDetail/TabList.tsx

@@ -46,7 +46,11 @@ type LockTabListProps = {
   logList: {
     log: any[]
   }
+  actionPayload: { main: string; target: string }
   serviceList: API.ServiceLogItem[]
+  StockStatus: API.StockStatusItem[]
+  SellStatus: API.SellStatusItem[]
+  PreserveStatus: API.PreserveStatusItem[]
 }
 const LockTabList: React.FC<LockTabListProps> = ({
   longle: { id: longleId, keyNum, status, stockStatus, sellStatus, preserveStatus } = {},
@@ -214,7 +218,7 @@ const LockTabList: React.FC<LockTabListProps> = ({
         </Tabs>
       </div>
       <div className="sheet-btns pl-4 pt-4 flex">
-        {[1].includes(stockStatus) ? (
+        {[StockStatus.CHUKU].includes(stockStatus) ? (
           <Button
             type="primary"
             ghost
@@ -224,7 +228,9 @@ const LockTabList: React.FC<LockTabListProps> = ({
             接收
           </Button>
         ) : null}
-        {([1, 2].includes(stockStatus) && sellStatus === 0) || preserveStatus === 3 ? (
+        {([StockStatus.CHUKU, StockStatus.CREATE].includes(stockStatus) &&
+          [SellStatus.NONE].includes(sellStatus)) ||
+        [PreserveStatus.REPLACE].includes(preserveStatus) ? (
           <Button
             type="primary"
             ghost
@@ -234,7 +240,8 @@ const LockTabList: React.FC<LockTabListProps> = ({
             借销赠
           </Button>
         ) : null}
-        {[1, 2].includes(sellStatus) && [1, 3].includes(preserveStatus) ? (
+        {[SellStatus.SALES, SellStatus.LENDING].includes(sellStatus) &&
+        [PreserveStatus.SAFEGUARD, PreserveStatus.REPLACE].includes(preserveStatus) ? (
           <Button
             type="primary"
             ghost

+ 17 - 0
src/services/typding.d.ts

@@ -174,4 +174,21 @@ declare namespace API {
     updateStr?: string
     updateFile?: string
   }
+  type StockStatusItem = {
+    RECEIVE: number
+    CHUKU: number
+    CREATE: number
+  }
+  type SellStatusItem = {
+    NONE: number
+    SALES: number
+    LENDING: number
+    GIFT: number
+  }
+  type PreserveStatusItem = {
+    NONE: number
+    SAFEGUARD: number
+    UPGRADE: number
+    REPLACE: number
+  }
 }