shaogen1995 hace 2 meses
padre
commit
dddd6ff6e2
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  1. 5 5
      src/pages/E_goodsStorage/E4repair/E4edit/index.tsx
  2. 1 1
      src/utils/tableData.ts

+ 5 - 5
src/pages/E_goodsStorage/E4repair/E4edit/index.tsx

@@ -112,8 +112,8 @@ function E4edit() {
   }, [key])
 
   const timeChange = useCallback(
-    (e: any, key: 'date' | 'returnDate ') => {
-      setTopInfo({ ...topInfo, [key]: dayjs(e).format('YYYY-MM-DD') })
+    (e: any, key: 'date' | 'returnDate') => {
+      setTopInfo({ ...topInfo, [key]: e ? dayjs(e).format('YYYY-MM-DD') : '' })
     },
     [topInfo]
   )
@@ -505,9 +505,9 @@ function E4edit() {
                   ['3', '4'].includes(key) && !topInfo.returnDate ? '(空)' : '请选择日期'
                 }
                 disabled={['3', '4'].includes(key)}
-                allowClear={false}
-                value={topInfo.returnDate ? dayjs(topInfo.returnDate) : null}
-                onChange={e => timeChange(e, 'returnDate ')}
+                allowClear={true}
+                value={topInfo.returnDate ? dayjs(topInfo.returnDate) : undefined}
+                onChange={e => timeChange(e, 'returnDate')}
               />
             </div>
           </div>

+ 1 - 1
src/utils/tableData.ts

@@ -407,7 +407,7 @@ export const E3tableC = [
 //文物修复
 export const E4tableC = [
   ['txt', '申请编号', 'num'],
-  ['txt', '交修日期', 'dateStart'],
+  ['txt', '交修日期', 'date'],
   ['txt', '交修部门', 'authUnit'],
   ['txt', '发起人', 'creatorName'],
   ['txt', '发送日期', 'createTime'],