|
@@ -18,6 +18,7 @@ class BasicInformation extends Component{
|
|
|
createTimeFormattedDate: '',
|
|
|
createName: '',
|
|
|
address: [],
|
|
|
+ addressList: [],
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -111,25 +112,32 @@ class BasicInformation extends Component{
|
|
|
|
|
|
componentDidMount() {
|
|
|
this.getOrgProject();
|
|
|
+ getAddressSelect().then(v=>{
|
|
|
+ v.unshift({
|
|
|
+ label: '全国',
|
|
|
+ value: 0,
|
|
|
+ });
|
|
|
+ this.setState({
|
|
|
+ addressList :v
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
formRef=React.createRef();
|
|
|
|
|
|
render() {
|
|
|
- let addressSelect = getAddressSelect()
|
|
|
- addressSelect.unshift({
|
|
|
- label: '全国',
|
|
|
- value: 0,
|
|
|
- })
|
|
|
return (
|
|
|
<ProForm
|
|
|
formRef={this.formRef}
|
|
|
onFinish={this.updateProject}
|
|
|
+ layout={this.props.isReadOnly?'horizontal':'vertical'}
|
|
|
+ submitter={!this.props.isReadOnly}
|
|
|
>
|
|
|
<ProForm.Group>
|
|
|
<ProFormText
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="bname"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
label="项目名称"
|
|
|
placeholder="请输入项目名称"
|
|
|
rules={[
|
|
@@ -140,8 +148,9 @@ class BasicInformation extends Component{
|
|
|
]}
|
|
|
/>
|
|
|
<ProFormSelect
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="cid"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
label='业务品类'
|
|
|
placeholder="请选择业务品类"
|
|
|
request={this.getAllCname}
|
|
@@ -152,8 +161,6 @@ class BasicInformation extends Component{
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
|
- </ProForm.Group>
|
|
|
- <ProForm.Group>
|
|
|
<Form.Item
|
|
|
label="省-市-区:"
|
|
|
name='address'
|
|
@@ -164,22 +171,23 @@ class BasicInformation extends Component{
|
|
|
}
|
|
|
]}
|
|
|
>
|
|
|
- <Cascader
|
|
|
+ {this.props.isReadOnly ? this.formRef.current && this.formRef.current.getFieldsValue(['address']).address : <Cascader
|
|
|
changeOnSelect
|
|
|
style={{
|
|
|
- width: '329px',
|
|
|
+ width: '216px',
|
|
|
}}
|
|
|
- options={addressSelect}
|
|
|
+ options={this.state.addressList}
|
|
|
onChange={()=>{
|
|
|
this.setState({
|
|
|
address: ''
|
|
|
})
|
|
|
}}
|
|
|
- placeholder='请选择省-市-区'/>
|
|
|
+ placeholder='请选择省-市-区'/>}
|
|
|
</Form.Item>
|
|
|
<ProFormDigit
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="price"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
label="市场价"
|
|
|
placeholder="请输入市场价"
|
|
|
rules={[
|
|
@@ -189,12 +197,11 @@ class BasicInformation extends Component{
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
|
- </ProForm.Group>
|
|
|
- <ProForm.Group>
|
|
|
<ProFormDigit
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="firstPayment"
|
|
|
label="首付金额"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
placeholder="请输入首付金额"
|
|
|
rules={[
|
|
|
{
|
|
@@ -204,29 +211,29 @@ class BasicInformation extends Component{
|
|
|
]}
|
|
|
/>
|
|
|
<ProFormDigit
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="activityPrice"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
label="活动价"
|
|
|
placeholder="请输入活动价"
|
|
|
/>
|
|
|
- </ProForm.Group>
|
|
|
- <ProForm.Group>
|
|
|
<ProFormDigit
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="offset"
|
|
|
label="最低折扣"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
placeholder="请输入最低折扣"
|
|
|
/>
|
|
|
<ProFormDigit
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="memberPrice"
|
|
|
label="会员价"
|
|
|
- width='m'
|
|
|
+ width='s'
|
|
|
placeholder="请输入会员价"
|
|
|
/>
|
|
|
- </ProForm.Group>
|
|
|
- <ProForm.Group>
|
|
|
<ProFormSelect
|
|
|
- width="m"
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
+ width="s"
|
|
|
name="activityFlag"
|
|
|
label="活动生效"
|
|
|
placeholder="请选择活动生效"
|
|
@@ -242,7 +249,8 @@ class BasicInformation extends Component{
|
|
|
]}
|
|
|
/>
|
|
|
<ProFormSelect
|
|
|
- width="m"
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
+ width="s"
|
|
|
name="status"
|
|
|
label="项目状态"
|
|
|
placeholder="请选择项目状态"
|
|
@@ -257,10 +265,9 @@ class BasicInformation extends Component{
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
|
- </ProForm.Group>
|
|
|
- <ProForm.Group>
|
|
|
<ProFormSelect
|
|
|
- width="m"
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
+ width="s"
|
|
|
name="type"
|
|
|
label="项目分类"
|
|
|
placeholder="请选择项目分类"
|
|
@@ -295,19 +302,20 @@ class BasicInformation extends Component{
|
|
|
}
|
|
|
]}
|
|
|
/>
|
|
|
- <div style={{display:'flex',alientItem:'center',paddingBottom:'25px'}}>
|
|
|
- <div style={{paddingRight:'35px'}}>
|
|
|
- <span>创建人:</span>
|
|
|
- <span style={{paddingLeft:'15px'}}>{this.state.createName}</span>
|
|
|
- </div>
|
|
|
- <div style={{paddingRight:'35px'}}>
|
|
|
- <span>创建时间:</span>
|
|
|
- <span style={{paddingLeft:'15px'}}>{this.state.createTimeFormattedDate}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</ProForm.Group>
|
|
|
+ <div style={{display:'flex',alientItem:'center',paddingBottom:'25px'}}>
|
|
|
+ <div style={{paddingRight:'35px'}}>
|
|
|
+ <span>创建人:</span>
|
|
|
+ <span style={{paddingLeft:'15px'}}>{this.state.createName}</span>
|
|
|
+ </div>
|
|
|
+ <div style={{paddingRight:'35px'}}>
|
|
|
+ <span>创建时间:</span>
|
|
|
+ <span style={{paddingLeft:'15px'}}>{this.state.createTimeFormattedDate}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<ProForm.Group>
|
|
|
<ProFormTextArea
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="projectUrl"
|
|
|
width='m'
|
|
|
label="项目地址"
|
|
@@ -316,6 +324,7 @@ class BasicInformation extends Component{
|
|
|
</ProForm.Group>
|
|
|
<ProForm.Group>
|
|
|
<ProFormTextArea
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="introduce"
|
|
|
width='m'
|
|
|
label="业务项目服务内容"
|
|
@@ -324,6 +333,7 @@ class BasicInformation extends Component{
|
|
|
</ProForm.Group>
|
|
|
<ProForm.Group>
|
|
|
<ProFormTextArea
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="valueEffect"
|
|
|
width='m'
|
|
|
label="业务项目价值及作用"
|
|
@@ -332,6 +342,7 @@ class BasicInformation extends Component{
|
|
|
</ProForm.Group>
|
|
|
<ProForm.Group>
|
|
|
<ProFormTextArea
|
|
|
+ readonly={this.props.isReadOnly}
|
|
|
name="clientSize"
|
|
|
width='m'
|
|
|
label="业务项目客户基本条件"
|