Browse Source

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/WorkloadWeb into develop

Renxy 2 năm trước cách đây
mục cha
commit
ccec253af6

+ 6 - 2
src/components/DDComponents/InnerContactField/index.js

@@ -1,17 +1,21 @@
 import React from 'react';
-import { Select } from 'antd';
+import { message, Select } from 'antd';
 import { connect } from 'dva';
 
 const { Option } = Select;
 
 function InnerContactField(props) {
-  const { userList, onChange } = props;
+  const { value, userList, onChange } = props;
 
   return (
     <Select
       showSearch
       onChange={value => {
         // onChange(JSON.stringify(['16569001414345099']));
+        if (!value) {
+          message.error('该用户未绑定钉钉userID,请联系管理员。');
+          return;
+        }
         onChange(JSON.stringify([value]));
       }}
       filterOption={(input, option) => option.children.toLowerCase().includes(input.toLowerCase())}

+ 12 - 5
src/pages/PurchaseAdmin/PurchaseList/List/NewList.js

@@ -13,6 +13,8 @@ function List(props) {
   const [version, setVersion] = useState({});
   const [versionVisible, setVersionVisible] = useState(false);
   const [flowDetail, setFlowDetail] = useState();
+  const [loading2, setLoading2] = useState(false);
+
   let token = getToken();
 
   const columns = [
@@ -38,10 +40,15 @@ function List(props) {
             onClick={async () => {
               localStorage.excelId = record.id;
 
-              const data = await queryBoomFlowDetail({ id: record.template_id });
-              setFlowDetail(data);
-              setVersion(record);
-              setFlowVisible(true);
+              setLoading2(true);
+              try {
+                const data = await queryBoomFlowDetail({ id: record.template_id });
+                setFlowDetail(data);
+                setVersion(record);
+                setFlowVisible(true);
+              } catch (error) {
+                setLoading2(false);
+              }
               // router.push(`/home/detail/${record.project_id}/${record.template_id}`);
             }}
           >
@@ -129,7 +136,7 @@ function List(props) {
   return (
     <div>
       <Table
-        loading={loading}
+        loading={loading || loading2}
         rowKey="id"
         dataSource={excel.list}
         pagination={excel.pagination}