Commit 4177441a3c59385de1cea12afa304289f0dc6e71

Authored by zhangzzzz
1 parent 8dff3662

处理页面报错问题;

src/components/Common/CommonCostomTabBill.js
@@ -3680,42 +3680,45 @@ const SlaveTableComponent = props => { @@ -3680,42 +3680,45 @@ const SlaveTableComponent = props => {
3680 } 3680 }
3681 3681
3682 // 多表树形展示 3682 // 多表树形展示
3683 - useEffect(async () => {  
3684 - const { config, name } = tableProps;  
3685 - const { sTableType, sGrd } = config;  
3686 - if (sTableType === "multiple") {  
3687 - const { formData, currentId } = props;  
3688 - const sId = currentId !== undefined ? currentId : "";  
3689 - const tableInfoConfig = formData.find(  
3690 - item => item.sGrd === `${sGrd}_child`  
3691 - );  
3692 - if (tableInfoConfig) {  
3693 - let addState = {};  
3694 - if (tableInfoConfig.sSqlStr !== "noQuery") {  
3695 - const conditonValues = props.onGetSqlConditionValues(tableInfoConfig);  
3696 - addState =  
3697 - (await props.handleGetDataSet({  
3698 - name: `${name}Info`,  
3699 - configData: tableInfoConfig,  
3700 - condition: {  
3701 - sSqlCondition: { ...conditonValues, sParentId: sId }  
3702 - },  
3703 - isWait: true  
3704 - })) || {};  
3705 - }  
3706 - addState[`${name}InfoConfig`] = tableInfoConfig;  
3707 - addState[`${name}InfoColumn`] = commonFunc.getHeaderConfig(  
3708 - tableInfoConfig 3683 + useEffect(() => {
  3684 + const tempFun = async () => {
  3685 + const { config, name } = tableProps;
  3686 + const { sTableType, sGrd } = config;
  3687 + if (sTableType === "multiple") {
  3688 + const { formData, currentId } = props;
  3689 + const sId = currentId !== undefined ? currentId : "";
  3690 + const tableInfoConfig = formData.find(
  3691 + item => item.sGrd === `${sGrd}_child`
3709 ); 3692 );
3710 - addState[`${name}InfoPageSize`] =  
3711 - commonUtils.isNotEmptyNumber(tableInfoConfig.iPageSize) &&  
3712 - tableInfoConfig.iPageSize !== 0  
3713 - ? tableInfoConfig.iPageSize  
3714 - : commonConfig.pageSize; 3693 + if (tableInfoConfig) {
  3694 + let addState = {};
  3695 + if (tableInfoConfig.sSqlStr !== "noQuery") {
  3696 + const conditonValues = props.onGetSqlConditionValues(tableInfoConfig);
  3697 + addState =
  3698 + (await props.handleGetDataSet({
  3699 + name: `${name}Info`,
  3700 + configData: tableInfoConfig,
  3701 + condition: {
  3702 + sSqlCondition: { ...conditonValues, sParentId: sId }
  3703 + },
  3704 + isWait: true
  3705 + })) || {};
  3706 + }
  3707 + addState[`${name}InfoConfig`] = tableInfoConfig;
  3708 + addState[`${name}InfoColumn`] = commonFunc.getHeaderConfig(
  3709 + tableInfoConfig
  3710 + );
  3711 + addState[`${name}InfoPageSize`] =
  3712 + commonUtils.isNotEmptyNumber(tableInfoConfig.iPageSize) &&
  3713 + tableInfoConfig.iPageSize !== 0
  3714 + ? tableInfoConfig.iPageSize
  3715 + : commonConfig.pageSize;
3715 3716
3716 - props.onSaveState(addState); 3717 + props.onSaveState(addState);
  3718 + }
3717 } 3719 }
3718 - } 3720 + };
  3721 + tempFun();
3719 }, []); 3722 }, []);
3720 3723
3721 return ( 3724 return (
@@ -5791,41 +5794,44 @@ const GrandChildTableComponent = props => { @@ -5791,41 +5794,44 @@ const GrandChildTableComponent = props => {
5791 if (commonUtils.isEmptyObject(configCm) && bWzps) { 5794 if (commonUtils.isEmptyObject(configCm) && bWzps) {
5792 return ""; 5795 return "";
5793 } 5796 }
5794 - useEffect(async () => {  
5795 - let addState = {};  
5796 - if (config.sSqlStr !== "noQuery") {  
5797 - const conditonValues = props.onGetSqlConditionValues(config);  
5798 - addState =  
5799 - (await props.handleGetDataSet({  
5800 - name,  
5801 - configData: config,  
5802 - condition: { sSqlCondition: { ...conditonValues, sParentId: sId } },  
5803 - isWait: true  
5804 - })) || {};  
5805 - }  
5806 - addState[`${name}Config`] = config;  
5807 - addState[`${name}Column`] = commonFunc.getHeaderConfig(config);  
5808 - addState[`${name}PageSize`] =  
5809 - commonUtils.isNotEmptyNumber(config.iPageSize) && config.iPageSize !== 0  
5810 - ? config.iPageSize  
5811 - : commonConfig.pageSize;  
5812 - if(commonUtils.isNotEmptyObject(configCm)) { /* 特殊处理更新材料信息 */  
5813 - addState[`${nameCm}Config`] = configCm;  
5814 - addState[`${nameCm}Column`] = commonFunc.getHeaderConfig(configCm);  
5815 - addState[`${nameCm}PageSize`] =  
5816 - commonUtils.isNotEmptyNumber(configCm.iPageSize) && configCm.iPageSize !== 0  
5817 - ? configCm.iPageSize 5797 + useEffect(() => {
  5798 + const tempFun = async () => {
  5799 + let addState = {};
  5800 + if (config.sSqlStr !== "noQuery") {
  5801 + const conditonValues = props.onGetSqlConditionValues(config);
  5802 + addState =
  5803 + (await props.handleGetDataSet({
  5804 + name,
  5805 + configData: config,
  5806 + condition: { sSqlCondition: { ...conditonValues, sParentId: sId } },
  5807 + isWait: true
  5808 + })) || {};
  5809 + }
  5810 + addState[`${name}Config`] = config;
  5811 + addState[`${name}Column`] = commonFunc.getHeaderConfig(config);
  5812 + addState[`${name}PageSize`] =
  5813 + commonUtils.isNotEmptyNumber(config.iPageSize) && config.iPageSize !== 0
  5814 + ? config.iPageSize
5818 : commonConfig.pageSize; 5815 : commonConfig.pageSize;
  5816 + if(commonUtils.isNotEmptyObject(configCm)) { /* 特殊处理更新材料信息 */
  5817 + addState[`${nameCm}Config`] = configCm;
  5818 + addState[`${nameCm}Column`] = commonFunc.getHeaderConfig(configCm);
  5819 + addState[`${nameCm}PageSize`] =
  5820 + commonUtils.isNotEmptyNumber(configCm.iPageSize) && configCm.iPageSize !== 0
  5821 + ? configCm.iPageSize
  5822 + : commonConfig.pageSize;
  5823 + }
  5824 + if(commonUtils.isNotEmptyObject(configRm)) { /* 特殊处理更新材料信息 */
  5825 + addState[`${nameRm}Config`] = configRm;
  5826 + addState[`${nameRm}Column`] = commonFunc.getHeaderConfig(configRm);
  5827 + addState[`${nameRm}PageSize`] =
  5828 + commonUtils.isNotEmptyNumber(configRm.iPageSize) && configRm.iPageSize !== 0
  5829 + ? configRm.iPageSize
  5830 + : configRm.pageSize;
  5831 + }
  5832 + props.onSaveState(addState);
5819 } 5833 }
5820 - if(commonUtils.isNotEmptyObject(configRm)) { /* 特殊处理更新材料信息 */  
5821 - addState[`${nameRm}Config`] = configRm;  
5822 - addState[`${nameRm}Column`] = commonFunc.getHeaderConfig(configRm);  
5823 - addState[`${nameRm}PageSize`] =  
5824 - commonUtils.isNotEmptyNumber(configRm.iPageSize) && configRm.iPageSize !== 0  
5825 - ? configRm.iPageSize  
5826 - : configRm.pageSize;  
5827 - }  
5828 - props.onSaveState(addState); 5834 + tempFun();
5829 }, []); 5835 }, []);
5830 5836
5831 const { bGrdVisible } = config; 5837 const { bGrdVisible } = config;
src/components/Common/CommonNewTabBillEvent.js
@@ -6983,6 +6983,8 @@ export default (ChildComponent) => { @@ -6983,6 +6983,8 @@ export default (ChildComponent) => {
6983 render() { 6983 render() {
6984 const { masterData, sModelsType, app } = this.props; 6984 const { masterData, sModelsType, app } = this.props;
6985 const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app); 6985 const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType, app);
  6986 + const imgPersonSrc = commonBusiness.handleCheckIcon(masterData);
  6987 +
6986 return ( 6988 return (
6987 <ChildComponent 6989 <ChildComponent
6988 {...this.props} 6990 {...this.props}