|  | @@ -90,7 +90,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |    useEffect(() => {
 |  |    useEffect(() => {
 | 
												
													
														
															|  |      if (visible) {
 |  |      if (visible) {
 | 
												
													
														
															|  | -      form.setFieldsValue({ treeId: row.id, bidsectionId: row.bidsectionId })
 |  | 
 | 
												
													
														
															|  | 
 |  | +      form.setFieldsValue({ treeId: row.id, bidsectionId: tenderStore.bid })
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |        if (type === 'create') {
 |  |        if (type === 'create') {
 | 
												
													
														
															|  |          initTreeSection()
 |  |          initTreeSection()
 | 
												
											
												
													
														
															|  | @@ -127,18 +127,16 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
												
													
														
															|  |      return maxPrice
 |  |      return maxPrice
 | 
												
													
														
															|  |    }
 |  |    }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -  // 当row id或者type变化时,重置表单数据
 |  | 
 | 
												
													
														
															|  | -  useEffect(() => {
 |  | 
 | 
												
													
														
															|  | -    form.resetFields()
 |  | 
 | 
												
													
														
															|  | -  }, [ type, row.id ])
 |  | 
 | 
												
													
														
															|  | -
 |  | 
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |    return (
 |  |    return (
 | 
												
													
														
															|  |      <Modal
 |  |      <Modal
 | 
												
													
														
															|  |        getContainer={false}
 |  |        getContainer={false}
 | 
												
													
														
															|  |        visible={visible}
 |  |        visible={visible}
 | 
												
													
														
															|  |        title={modalObj[type]?.title}
 |  |        title={modalObj[type]?.title}
 | 
												
													
														
															|  | -      onCancel={onCancel}
 |  | 
 | 
												
													
														
															|  | 
 |  | +      onCancel={() => {
 | 
												
													
														
															|  | 
 |  | +        form.resetFields()
 | 
												
													
														
															|  | 
 |  | +        onCancel()
 | 
												
													
														
															|  | 
 |  | +      }}
 | 
												
													
														
															|  |        footer={
 |  |        footer={
 | 
												
													
														
															|  |          <div className="pi-justify-end">
 |  |          <div className="pi-justify-end">
 | 
												
													
														
															|  |            {type === 'update' ? (
 |  |            {type === 'update' ? (
 | 
												
											
												
													
														
															|  | @@ -148,7 +146,10 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
												
													
														
															|  |                </Button>
 |  |                </Button>
 | 
												
													
														
															|  |              </Authorization>
 |  |              </Authorization>
 | 
												
													
														
															|  |            ) : null}
 |  |            ) : null}
 | 
												
													
														
															|  | -          <Button type="default" size="small" key="cancel" className="pi-btn-secondary" onClick={onCancel}>
 |  | 
 | 
												
													
														
															|  | 
 |  | +          <Button type="default" size="small" key="cancel" className="pi-btn-secondary" onClick={() => {
 | 
												
													
														
															|  | 
 |  | +            form.resetFields()
 | 
												
													
														
															|  | 
 |  | +            onCancel()
 | 
												
													
														
															|  | 
 |  | +          }}>
 | 
												
													
														
															|  |              {modalObj[type]?.cancelText}
 |  |              {modalObj[type]?.cancelText}
 | 
												
													
														
															|  |            </Button>
 |  |            </Button>
 | 
												
													
														
															|  |            <Button
 |  |            <Button
 | 
												
											
												
													
														
															|  | @@ -161,6 +162,8 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
												
													
														
															|  |                form
 |  |                form
 | 
												
													
														
															|  |                  .validateFields()
 |  |                  .validateFields()
 | 
												
													
														
															|  |                  .then(values => {
 |  |                  .then(values => {
 | 
												
													
														
															|  | 
 |  | +                  console.log(values)
 | 
												
													
														
															|  | 
 |  | +
 | 
												
													
														
															|  |                    form.resetFields()
 |  |                    form.resetFields()
 | 
												
													
														
															|  |                    if (type === 'update') {
 |  |                    if (type === 'update') {
 | 
												
													
														
															|  |                      values.signerTime = dayjsFormat(values.signerTime, 'YYYY-MM-DD HH:mm:ss')
 |  |                      values.signerTime = dayjsFormat(values.signerTime, 'YYYY-MM-DD HH:mm:ss')
 | 
												
											
												
													
														
															|  | @@ -185,7 +188,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
												
													
														
															|  |          <Form.Item name="bidsectionId" hidden>
 |  |          <Form.Item name="bidsectionId" hidden>
 | 
												
													
														
															|  |            <Input />
 |  |            <Input />
 | 
												
													
														
															|  |          </Form.Item>
 |  |          </Form.Item>
 | 
												
													
														
															|  | -        <Form.Item name="treeId" label="合同劳务" hidden={type === 'create' ? false : true}>
 |  | 
 | 
												
													
														
															|  | 
 |  | +        <Form.Item name="treeId" label="合同劳务" hidden={type === 'create' ? false : true} rules={[ { required: true, message: '请选择项目节' } ]}>
 | 
												
													
														
															|  |            <TreeSelect treeData={contractSection} />
 |  |            <TreeSelect treeData={contractSection} />
 | 
												
													
														
															|  |          </Form.Item>
 |  |          </Form.Item>
 | 
												
													
														
															|  |          {/* <Form.Item name="treeId" label="合同劳务" hidden>
 |  |          {/* <Form.Item name="treeId" label="合同劳务" hidden>
 |