فهرست منبع

refactor: 优化锁库弹窗代码

lanjianrong 4 سال پیش
والد
کامیت
2a28369c02
1فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
  1. 14 9
      src/pages/Product/Lock/LockStore/components/LocksDetail/LockModal.jsx

+ 14 - 9
src/pages/Product/Lock/LockStore/components/LocksDetail/LockModal.jsx

@@ -257,7 +257,8 @@ const LockModal = props => {
             </Button>
           </div>
         )
-      }>
+      }
+    >
       {type === lockTypeEnum.SALE ? (
         <div className="text-center mb-6">
           <Radio.Group value={state.sellStatus} buttonStyle="solid" onChange={checkGroupOnChange}>
@@ -272,7 +273,8 @@ const LockModal = props => {
           className={styles.modalContainer}
           ref={scrollRef}
           onScroll={handleListScroll}
-          style={{ paddingBottom: 0 }}>
+          style={{ paddingBottom: 0 }}
+        >
           <div className={styles.modalContent}>
             <Spin spinning={state.loading}>
               {type === lockTypeEnum.SALE &&
@@ -287,7 +289,8 @@ const LockModal = props => {
                         title="确认选择ta"
                         onConfirm={() => connectClient(item.id)}
                         okText="确认"
-                        cancelText="取消">
+                        cancelText="取消"
+                      >
                         <Button type="primary" size="small">
                           选择ta
                         </Button>
@@ -305,7 +308,8 @@ const LockModal = props => {
                         title="确认选择ta"
                         onConfirm={() => connectLongle(item.id)}
                         okText="确认"
-                        cancelText="取消">
+                        cancelText="取消"
+                      >
                         <Button type="primary" size="small">
                           更换
                         </Button>
@@ -339,7 +343,8 @@ const LockModal = props => {
                     return Promise.resolve(value)
                   }
                 })
-              ]}>
+              ]}
+            >
               <Select
                 placeholder="请选择产品"
                 onDropdownVisibleChange={async e => {
@@ -357,10 +362,10 @@ const LockModal = props => {
           </>
         ) : null}
 
-        {type === lockTypeEnum.RECOVER ? (
+        {type === lockTypeEnum.RECOVER || type === lockTypeEnum.RECEIVE ? (
           <>
             <p>
-              收回锁号 <b>{keyNum}</b>
+              {type === lockTypeEnum.RECOVER ? '收回锁号' : '确认接收锁'} <b>{keyNum}</b>
             </p>
             <Form.Item name="longleId" hidden>
               <Input />
@@ -368,7 +373,7 @@ const LockModal = props => {
           </>
         ) : null}
 
-        {type === lockTypeEnum.RECEIVE ? (
+        {/* {type === lockTypeEnum.RECEIVE ? (
           <>
             <p>
               确认接收锁 <b>{keyNum}</b>
@@ -377,7 +382,7 @@ const LockModal = props => {
               <Input />
             </Form.Item>
           </>
-        ) : null}
+        ) : null} */}
       </Form>
     </Modal>
   )