فهرست منبع

完善现状登记

shaogen1995 3 ماه پیش
والد
کامیت
749aad1a5d
2فایلهای تغییر یافته به همراه19 افزوده شده و 7 حذف شده
  1. 1 1
      src/components/ZGaddNow/index.tsx
  2. 18 6
      src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx

+ 1 - 1
src/components/ZGaddNow/index.tsx

@@ -89,7 +89,7 @@ function ZGaddNow({
 
       if (timeKey === 0) setTableListAll(arr)
     }
-  }, [canObj, nowSta.id, timeKey])
+  }, [canObj, httpType, nowSta.id, timeKey])
 
   useEffect(() => {
     getList()

+ 18 - 6
src/pages/E_goodsStorage/E3actuality/E3edit/index.tsx

@@ -29,7 +29,20 @@ import Z3upFiles from '@/components/Z3upFiles'
 import ZupFileTable from '@/components/ZupFileTable'
 import ZflowTable from '@/components/ZflowTable'
 import ZRichTexts from '@/components/ZRichTexts'
+import { useDispatch, useSelector } from 'react-redux'
+import { RootState } from '@/store'
+import { D7_APIList } from '@/store/action/D7check'
 function E3edit() {
+  // 相关盘点单下拉数据
+  // 从仓库拿数据
+  const dispatch = useDispatch()
+
+  useEffect(() => {
+    dispatch(D7_APIList({ pageNum: 1, pageSize: 99999 }))
+  }, [dispatch])
+
+  const relatedOrderNumArr = useSelector((state: RootState) => state.D7check.tableInfo.list)
+
   const { key, id } = useParams<any>()
   // key:1 新增 2编辑 3审批 4查看
 
@@ -440,13 +453,12 @@ function E3edit() {
                 disabled={['3', '4'].includes(key)}
                 placeholder={['3', '4'].includes(key) ? '空' : '请搜索盘点单编号'}
                 showSearch
-                // filterOption={(input, option) => {
-                //   const txt = option!.label + option!.num
+                filterOption={(input, option) => {
+                  const txt = option!.label
 
-                //   return txt.toLowerCase().includes(input.toLowerCase())
-                // }}
-                // 待完善相关盘点单
-                options={[]}
+                  return txt.toLowerCase().includes(input.toLowerCase())
+                }}
+                options={relatedOrderNumArr.map(v => ({ value: v.id + '', label: v.num }))}
                 // fieldNames={{ label: 'num', value: 'num' }}
                 allowClear={false}
                 value={topInfo.relatedOrderNum || null}