189 lines
7.3 KiB
JavaScript
189 lines
7.3 KiB
JavaScript
|
import Taro, { Component } from '@tarojs/taro'
|
|||
|
import { View, Button, Text } from '@tarojs/components'
|
|||
|
import { AtInput, AtButton, Picker,AtIcon } from 'taro-ui'
|
|||
|
|
|||
|
import copyrightComponent from '../../component/copyrightComponent/copyrightComponent'
|
|||
|
import searchBarComponent from '../../component/searchBarComponent/searchBarComponent'
|
|||
|
|
|||
|
|
|||
|
import './mySupplyDemand.scss'
|
|||
|
|
|||
|
|
|||
|
console.log('hi')
|
|||
|
class MySupplyDemand extends Component {
|
|||
|
|
|||
|
config = {
|
|||
|
navigationBarTitleText: '我的供求'
|
|||
|
}
|
|||
|
constructor() {
|
|||
|
super(...arguments)
|
|||
|
this.state = {
|
|||
|
selector: ['全部','需求', '供应', '人才'],
|
|||
|
selectorChecked: '全部',
|
|||
|
selector1: ['全部','上架', '下架'],
|
|||
|
selectorChecked1: '全部',
|
|||
|
dateSel: '2018-04-22',
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
onChange = e => {
|
|||
|
this.setState({
|
|||
|
selectorChecked: this.state.selector[e.detail.value]
|
|||
|
})
|
|||
|
}
|
|||
|
onChange1 = e => {
|
|||
|
this.setState({
|
|||
|
selectorChecked1: this.state.selector1[e.detail.value]
|
|||
|
})
|
|||
|
}
|
|||
|
onDateChange = e => {
|
|||
|
this.setState({
|
|||
|
dateSel: e.detail.value
|
|||
|
})
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
componentWillReceiveProps(nextProps) {
|
|||
|
console.log(this.props, nextProps)
|
|||
|
}
|
|||
|
|
|||
|
componentWillUnmount() { }
|
|||
|
|
|||
|
componentDidShow() { }
|
|||
|
|
|||
|
componentDidHide() { }
|
|||
|
|
|||
|
render() {
|
|||
|
return (
|
|||
|
<View className='mySupplyDemand'>
|
|||
|
<searchBarComponent></searchBarComponent>
|
|||
|
|
|||
|
<View className='page-section'>
|
|||
|
<View>
|
|||
|
<Picker mode='selector' range={this.state.selector} onChange={this.onChange}>
|
|||
|
<View className='picker'>
|
|||
|
<View className='title-box'>
|
|||
|
<Text className='title'><Text className='require'>*</Text>供求类型:</Text> <Text className='selected'>{this.state.selectorChecked}</Text>
|
|||
|
</View>
|
|||
|
|
|||
|
</View>
|
|||
|
</Picker>
|
|||
|
</View>
|
|||
|
</View>
|
|||
|
<View className='page-section'>
|
|||
|
|
|||
|
<View>
|
|||
|
<Picker mode='selector' range={this.state.selector1} onChange={this.onChange1}>
|
|||
|
<View className='picker'>
|
|||
|
<View className='title-box'>
|
|||
|
<Text className='title'> <Text className='require'>*</Text>供求状态:</Text> <Text className='selected'>{this.state.selectorChecked1}</Text>
|
|||
|
</View>
|
|||
|
|
|||
|
</View>
|
|||
|
</Picker>
|
|||
|
</View>
|
|||
|
</View>
|
|||
|
<View className='input-box'>
|
|||
|
<Text className='require'>*</Text>
|
|||
|
<AtInput
|
|||
|
name='value'
|
|||
|
title='供求标题:'
|
|||
|
placeholder='供求标题·'
|
|||
|
type='text'
|
|||
|
value={this.state.value}
|
|||
|
onChange={this.handleChange.bind(this)}
|
|||
|
/>
|
|||
|
</View>
|
|||
|
<View className='page-section'>
|
|||
|
|
|||
|
<View className='picker-box'>
|
|||
|
<Picker mode='date' className='picker-container' onChange={this.onDateChange}>
|
|||
|
<View className='picker'>
|
|||
|
<View className='title-box'>
|
|||
|
<Text className='title'><Text className='require'>*</Text>开始日期:</Text> <Text className='selected'>{this.state.dateSel}</Text>
|
|||
|
</View>
|
|||
|
|
|||
|
</View>
|
|||
|
</Picker>
|
|||
|
<Picker className='picker-container' mode='date' onChange={this.onDateChange}>
|
|||
|
<View className='picker'>
|
|||
|
<View className='title-box'>
|
|||
|
<Text className='title'><Text className='require'>*</Text>结束日期:</Text> <Text className='selected'>{this.state.dateSel}</Text>
|
|||
|
</View>
|
|||
|
|
|||
|
</View>
|
|||
|
</Picker>
|
|||
|
|
|||
|
</View>
|
|||
|
</View>
|
|||
|
|
|||
|
<View className='button-box'>
|
|||
|
<View className='button'>
|
|||
|
<AtButton type='primary' size='small'>
|
|||
|
<AtIcon value='search' size='12' color='white'></AtIcon>
|
|||
|
搜索</AtButton>
|
|||
|
</View>
|
|||
|
<View className='button'>
|
|||
|
<AtButton type='primary' size='small'>
|
|||
|
<AtIcon value='add' size='12' color='white'></AtIcon>
|
|||
|
新增</AtButton>
|
|||
|
</View>
|
|||
|
</View>
|
|||
|
<View className='total-count'>一共<Text className='number'>20</Text> 条记录</View>
|
|||
|
<View className='info-box'>
|
|||
|
<View className='info-container'>
|
|||
|
|
|||
|
<View className='type'>
|
|||
|
<Text className='title'>需求类型:</Text>
|
|||
|
<Text className='info'>1</Text>
|
|||
|
</View>
|
|||
|
<View className='demand-title'>
|
|||
|
<Text className='title'>需求标题:</Text>
|
|||
|
<Text className='info'>1</Text>
|
|||
|
</View>
|
|||
|
<View className='contact-name'>
|
|||
|
<Text className='title'>联系人:</Text>
|
|||
|
<Text className='info'>1</Text>
|
|||
|
</View>
|
|||
|
<View className='contact-number'>
|
|||
|
<Text className='title'>电话号码:</Text>
|
|||
|
<Text className='info'>1</Text>
|
|||
|
</View>
|
|||
|
<View className='demand-status'>
|
|||
|
<Text className='title'>需求状态:</Text>
|
|||
|
<Text className='info'></Text>
|
|||
|
</View>
|
|||
|
<View className='update-time'>
|
|||
|
<Text className='title'>更新时间:</Text>
|
|||
|
<Text className='info'>1</Text>
|
|||
|
</View>
|
|||
|
<View className='info-button-box'>
|
|||
|
<View className='button'>
|
|||
|
<AtButton type='primary' size='small'>查看</AtButton>
|
|||
|
</View>
|
|||
|
<View className='button'>
|
|||
|
<AtButton type='primary' size='small'>编辑</AtButton>
|
|||
|
</View>
|
|||
|
<View className='button'>
|
|||
|
<AtButton type='primary' size='small'>删除</AtButton>
|
|||
|
</View>
|
|||
|
</View>
|
|||
|
|
|||
|
|
|||
|
</View>
|
|||
|
|
|||
|
|
|||
|
</View>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<copyrightComponent></copyrightComponent>
|
|||
|
|
|||
|
</View>
|
|||
|
)
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
export default MySupplyDemand
|