|  | @@ -90,7 +90,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    useEffect(() => {
 | 
	
		
			
				|  |  |      if (visible) {
 | 
	
		
			
				|  |  | -      form.setFieldsValue({ treeId: row.id, bidsectionId: row.bidsectionId })
 | 
	
		
			
				|  |  | +      form.setFieldsValue({ treeId: row.id, bidsectionId: tenderStore.bid })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        if (type === 'create') {
 | 
	
		
			
				|  |  |          initTreeSection()
 | 
	
	
		
			
				|  | @@ -127,18 +127,16 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
	
		
			
				|  |  |      return maxPrice
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  // 当row id或者type变化时,重置表单数据
 | 
	
		
			
				|  |  | -  useEffect(() => {
 | 
	
		
			
				|  |  | -    form.resetFields()
 | 
	
		
			
				|  |  | -  }, [ type, row.id ])
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return (
 | 
	
		
			
				|  |  |      <Modal
 | 
	
		
			
				|  |  |        getContainer={false}
 | 
	
		
			
				|  |  |        visible={visible}
 | 
	
		
			
				|  |  |        title={modalObj[type]?.title}
 | 
	
		
			
				|  |  | -      onCancel={onCancel}
 | 
	
		
			
				|  |  | +      onCancel={() => {
 | 
	
		
			
				|  |  | +        form.resetFields()
 | 
	
		
			
				|  |  | +        onCancel()
 | 
	
		
			
				|  |  | +      }}
 | 
	
		
			
				|  |  |        footer={
 | 
	
		
			
				|  |  |          <div className="pi-justify-end">
 | 
	
		
			
				|  |  |            {type === 'update' ? (
 | 
	
	
		
			
				|  | @@ -148,7 +146,10 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
	
		
			
				|  |  |                </Button>
 | 
	
		
			
				|  |  |              </Authorization>
 | 
	
		
			
				|  |  |            ) : 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}
 | 
	
		
			
				|  |  |            </Button>
 | 
	
		
			
				|  |  |            <Button
 | 
	
	
		
			
				|  | @@ -161,6 +162,8 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
 | 
	
		
			
				|  |  |                form
 | 
	
		
			
				|  |  |                  .validateFields()
 | 
	
		
			
				|  |  |                  .then(values => {
 | 
	
		
			
				|  |  | +                  console.log(values)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                    form.resetFields()
 | 
	
		
			
				|  |  |                    if (type === 'update') {
 | 
	
		
			
				|  |  |                      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>
 | 
	
		
			
				|  |  |            <Input />
 | 
	
		
			
				|  |  |          </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} />
 | 
	
		
			
				|  |  |          </Form.Item>
 | 
	
		
			
				|  |  |          {/* <Form.Item name="treeId" label="合同劳务" hidden>
 |