|  | @@ -23,10 +23,12 @@ interface iTableContentPorps {
 | 
												
													
														
															|  |    changeModalType: (type: string) => void
 |  |    changeModalType: (type: string) => void
 | 
												
													
														
															|  |    row: iIncomeTree
 |  |    row: iIncomeTree
 | 
												
													
														
															|  |    setRow: (record: iIncomeTree) => void
 |  |    setRow: (record: iIncomeTree) => void
 | 
												
													
														
															|  | 
 |  | +  history: any
 | 
												
													
														
															|  |  }
 |  |  }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow }) => {
 |  | 
 | 
												
													
														
															|  | 
 |  | +const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow, history }) => {
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |    const [ sectionTemplate, setSectionTemplate ] = useState<iShowTemplateState>({
 |  |    const [ sectionTemplate, setSectionTemplate ] = useState<iShowTemplateState>({
 | 
												
													
														
															|  |      isShow: false,
 |  |      isShow: false,
 | 
												
													
														
															|  |      template: '',
 |  |      template: '',
 | 
												
											
												
													
														
															|  | @@ -63,9 +65,9 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |    const { TabPane } = Tabs
 |  |    const { TabPane } = Tabs
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |    useEffect(() => {
 |  |    useEffect(() => {
 | 
												
													
														
															|  | -    initHandler()
 |  | 
 | 
												
													
														
															|  | 
 |  | +    initData()
 | 
												
													
														
															|  |    }, [])
 |  |    }, [])
 | 
												
													
														
															|  | -  const initHandler = async () => {
 |  | 
 | 
												
													
														
															|  | 
 |  | +  const initData = async () => {
 | 
												
													
														
															|  |      const data  = await apiContractIncome(tenderStore.bid)
 |  |      const data  = await apiContractIncome(tenderStore.bid)
 | 
												
													
														
															|  |      if (data.code === consts.RET_CODE.SUCCESS) {
 |  |      if (data.code === consts.RET_CODE.SUCCESS) {
 | 
												
													
														
															|  |        if (data.isTemplate && data.isTemplate === 1) {
 |  |        if (data.isTemplate && data.isTemplate === 1) {
 | 
												
											
												
													
														
															|  | @@ -83,13 +85,13 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |        }
 |  |        }
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
													
														
															|  | -  interface iLabelHandlerProps {
 |  | 
 | 
												
													
														
															|  | 
 |  | +  interface HandleLabelProps {
 | 
												
													
														
															|  |      id: string
 |  |      id: string
 | 
												
													
														
															|  |      bidsectionId: string
 |  |      bidsectionId: string
 | 
												
													
														
															|  |      name?: string
 |  |      name?: string
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -  const newLabelHandler = async (type: string, payload: iLabelHandlerProps) => {
 |  | 
 | 
												
													
														
															|  | 
 |  | +  const handleNewLabel = async (type: string, payload: HandleLabelProps) => {
 | 
												
													
														
															|  |      let RET_CODE: number = -1
 |  |      let RET_CODE: number = -1
 | 
												
													
														
															|  |      if (type === 'create') {
 |  |      if (type === 'create') {
 | 
												
													
														
															|  |        payload.name = inputEl.current?.state.value
 |  |        payload.name = inputEl.current?.state.value
 | 
												
											
												
													
														
															|  | @@ -109,7 +111,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |    const codeChange = async (row: iIncomeTree, value: string) => {
 |  |    const codeChange = async (row: iIncomeTree, value: string) => {
 | 
												
													
														
															|  |      const { code = -1 } = await apiUpdateSerial(row.id, row.bidsectionId, value)
 |  |      const { code = -1 } = await apiUpdateSerial(row.id, row.bidsectionId, value)
 | 
												
													
														
															|  |      if (code === consts.RET_CODE.SUCCESS) {
 |  |      if (code === consts.RET_CODE.SUCCESS) {
 | 
												
													
														
															|  | -      initHandler()
 |  | 
 | 
												
													
														
															|  | 
 |  | +      initData()
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
													
														
															|  |    const inputEl = useRef<Input>(null)
 |  |    const inputEl = useRef<Input>(null)
 | 
												
											
												
													
														
															|  | @@ -165,8 +167,8 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |              size="small"
 |  |              size="small"
 | 
												
													
														
															|  |              type="text"
 |  |              type="text"
 | 
												
													
														
															|  |              ref={inputEl}
 |  |              ref={inputEl}
 | 
												
													
														
															|  | -            onPressEnter={() => newLabelHandler(type, { id: type === 'edit' ? record.id : record.parentId, bidsectionId: record.bidsectionId })}
 |  | 
 | 
												
													
														
															|  | -            onBlur={() => newLabelHandler(type, { id: type === 'edit' ? record.id : record.parentId, bidsectionId: record.bidsectionId })}
 |  | 
 | 
												
													
														
															|  | 
 |  | +            onPressEnter={() => handleNewLabel(type, { id: type === 'edit' ? record.id : record.parentId, bidsectionId: record.bidsectionId })}
 | 
												
													
														
															|  | 
 |  | +            onBlur={() => handleNewLabel(type, { id: type === 'edit' ? record.id : record.parentId, bidsectionId: record.bidsectionId })}
 | 
												
													
														
															|  |              />)
 |  |              />)
 | 
												
													
														
															|  |          } else {
 |  |          } else {
 | 
												
													
														
															|  |            return <span>{text}</span>
 |  |            return <span>{text}</span>
 | 
												
											
												
													
														
															|  | @@ -219,7 +221,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |      const { code = -1 } = await apiSetTemplate(sectionTemplate.template, tenderStore.tender.bidsectionId, 0)
 |  |      const { code = -1 } = await apiSetTemplate(sectionTemplate.template, tenderStore.tender.bidsectionId, 0)
 | 
												
													
														
															|  |      if (code === consts.RET_CODE.SUCCESS) {
 |  |      if (code === consts.RET_CODE.SUCCESS) {
 | 
												
													
														
															|  | -      await initHandler()
 |  | 
 | 
												
													
														
															|  | 
 |  | +      await initData()
 | 
												
													
														
															|  |      }
 |  |      }
 | 
												
													
														
															|  |      setSectionTemplate({
 |  |      setSectionTemplate({
 | 
												
													
														
															|  |        ...sectionTemplate,
 |  |        ...sectionTemplate,
 | 
												
											
												
													
														
															|  | @@ -227,6 +229,12 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |        isShow: false
 |  |        isShow: false
 | 
												
													
														
															|  |      })
 |  |      })
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  | 
 |  | +  // modal 关闭 - 回调
 | 
												
													
														
															|  | 
 |  | +  const handleModalCancel = () => {
 | 
												
													
														
															|  | 
 |  | +    history.push('/console/contract/content/summary')
 | 
												
													
														
															|  | 
 |  | +  }
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |    // 模板选择radio切换回调
 |  |    // 模板选择radio切换回调
 | 
												
													
														
															|  |    const handleRadioEvent = (e: RadioChangeEvent) => {
 |  |    const handleRadioEvent = (e: RadioChangeEvent) => {
 | 
												
													
														
															|  |      if (e.target.checked) {
 |  |      if (e.target.checked) {
 | 
												
											
												
													
														
															|  | @@ -283,6 +291,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
 | 
												
													
														
															|  |      okText="确定"
 |  |      okText="确定"
 | 
												
													
														
															|  |      confirmLoading={sectionTemplate.loading}
 |  |      confirmLoading={sectionTemplate.loading}
 | 
												
													
														
															|  |      cancelText="关闭"
 |  |      cancelText="关闭"
 | 
												
													
														
															|  | 
 |  | +    onCancel={handleModalCancel}
 | 
												
													
														
															|  |      closable={false}
 |  |      closable={false}
 | 
												
													
														
															|  |      keyboard={false}
 |  |      keyboard={false}
 | 
												
													
														
															|  |      onOk={() => handleModalConfirm()}
 |  |      onOk={() => handleModalConfirm()}
 |