|
@@ -53,6 +53,7 @@ class PunchClocks extends Component {
|
|
|
isCalendar: true,
|
|
|
//isVacation: false, // 是否节假日
|
|
|
isVopen: false, // 节假日提示
|
|
|
+ dayInfo: {},
|
|
|
|
|
|
year: new Date().getFullYear(),
|
|
|
month: new Date().getMonth() + 1,
|
|
@@ -229,6 +230,7 @@ class PunchClocks extends Component {
|
|
|
let obj = val.detail.obj
|
|
|
let date = dayjs(data)
|
|
|
this.setState({
|
|
|
+ dayInfo: val.detail.obj,
|
|
|
dateSel: data,
|
|
|
year: date.year(),
|
|
|
month: date.month() + 1,
|
|
@@ -245,7 +247,7 @@ class PunchClocks extends Component {
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
- const { data, dateList, year, month, day, isVacation, isVopen } = this.state;
|
|
|
+ const { dayInfo, data, dateList, year, month, day, isVacation, isVopen } = this.state;
|
|
|
return (
|
|
|
<View className='punchClock'>
|
|
|
<View className='header'>
|
|
@@ -317,92 +319,87 @@ class PunchClocks extends Component {
|
|
|
}}
|
|
|
/>
|
|
|
}
|
|
|
- <View className='items'>
|
|
|
- <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发工时:
|
|
|
- <Input value={this.state.duration} type='digit' className='input' placeholder='请输入'
|
|
|
- style={{ textAlign: "center", background: "#F5F5F5", borderRadius: "15px", padding: "3px 5px" }}
|
|
|
- // border: "1px solid #d6e4ef",
|
|
|
- onInput={e => {
|
|
|
- this.setState({
|
|
|
- duration: e.detail.value
|
|
|
- })
|
|
|
- }}
|
|
|
- /> 小时
|
|
|
- <Text style={{ color: "red", fontSize: "15px" }}>剩余打卡({this.state.hours}h)</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+ {
|
|
|
+ (dayInfo.dayStatus != 1 && dayInfo.color != 3)
|
|
|
+ ? <View>
|
|
|
+ <View className='items'>
|
|
|
+ <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发工时:
|
|
|
+ <Input value={this.state.duration} type='digit' className='input' placeholder='请输入'
|
|
|
+ style={{ textAlign: "center", background: "#F5F5F5", borderRadius: "15px", padding: "3px 5px" }}
|
|
|
+ // border: "1px solid #d6e4ef",
|
|
|
+ onInput={e => {
|
|
|
+ this.setState({
|
|
|
+ duration: e.detail.value
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ /> 小时
|
|
|
+ <Text style={{ color: "red", fontSize: "15px" }}>剩余打卡({this.state.hours}h)</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
|
|
|
- <View className='item'>
|
|
|
- <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发阶段:
|
|
|
- <Picker mode='selector' range={this.state.selector} rangeKey="lable"
|
|
|
- value={this.state.selectorChecked.value}
|
|
|
- onChange={e => {
|
|
|
- this.setState({
|
|
|
- selectorChecked: this.state.selector[e.detail.value]
|
|
|
- })
|
|
|
- }}>
|
|
|
- <View className='picker'>
|
|
|
- {!!this.state.selectorChecked.lable ? this.state.selectorChecked.lable : "请选择"}
|
|
|
+ <View className='item'>
|
|
|
+ <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发阶段:
|
|
|
+ <Picker mode='selector' range={this.state.selector} rangeKey="lable"
|
|
|
+ value={this.state.selectorChecked.value}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ selectorChecked: this.state.selector[e.detail.value]
|
|
|
+ })
|
|
|
+ }}>
|
|
|
+ <View className='picker'>
|
|
|
+ {!!this.state.selectorChecked.lable ? this.state.selectorChecked.lable : "请选择"}
|
|
|
+ </View>
|
|
|
+ </Picker>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </Picker>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
|
|
|
- <View className='items'>
|
|
|
- <View className='ititles'><Text style={{ width: "7px" }}></Text>研发记录:
|
|
|
- <AtTextarea
|
|
|
- value={this.state.remark}
|
|
|
- onChange={value => {
|
|
|
- this.setState({
|
|
|
- remark: value,
|
|
|
- });
|
|
|
- }}
|
|
|
- maxLength={500}
|
|
|
- placeholder="请填写研发过程记录"
|
|
|
- />
|
|
|
- {/*
|
|
|
- <Textarea
|
|
|
- value={this.state.remark}
|
|
|
- placeholder="请填写研发过程记录不能超过500字"
|
|
|
- style='background:#D7D7D7;width:66%;min-height:70px;padding:10px;border-radius: 10px'
|
|
|
- autoHeight
|
|
|
- maxlength={500}
|
|
|
- onInput={e => {
|
|
|
- this.setState({
|
|
|
- remark: e.detail.value
|
|
|
- })
|
|
|
- }}
|
|
|
- /> */}
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+ <View className='items'>
|
|
|
+ <View className='ititles'><Text style={{ width: "7px" }}></Text>研发记录:
|
|
|
+ <AtTextarea
|
|
|
+ value={this.state.remark}
|
|
|
+ onChange={value => {
|
|
|
+ this.setState({
|
|
|
+ remark: value,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ maxLength={500}
|
|
|
+ placeholder="请填写研发过程记录"
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
|
|
|
- <View className='items'>
|
|
|
- <View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
|
|
|
- <ImagePicker
|
|
|
- showAddBtn
|
|
|
- ref={(ref) => (this.imagePickerRef = ref)}
|
|
|
- url="/api/project/upload"
|
|
|
- onChange={this.onChange}
|
|
|
- />
|
|
|
- <View>
|
|
|
- <Text className='text'>注:包括研发日志、实验报告、实验记录、检测报告、会议纪要、会议照片等</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+ <View className='items'>
|
|
|
+ <View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
|
|
|
+ <ImagePicker
|
|
|
+ showAddBtn
|
|
|
+ ref={(ref) => (this.imagePickerRef = ref)}
|
|
|
+ url="/api/project/upload"
|
|
|
+ onChange={this.onChange}
|
|
|
+ />
|
|
|
+ <View>
|
|
|
+ <Text className='text'>注:包括研发日志、实验报告、实验记录、检测报告、会议纪要、会议照片等</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
|
|
|
- <View className='content'>
|
|
|
- <View className='punchClockContent'
|
|
|
- onClick={() => {
|
|
|
- isVacation
|
|
|
- ? this.setState({ isVopen: true })
|
|
|
- : this.publicReleaseClockIn()
|
|
|
- }}
|
|
|
- style={{
|
|
|
- boxShadow: '1px 1px 15px 1px #acb8ad',
|
|
|
- background: '#009DD9',
|
|
|
- }}>
|
|
|
- <View className='punchClockTitle'>研发打卡</View>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
+ <View className='content'>
|
|
|
+ <View className='punchClockContent'
|
|
|
+ onClick={() => {
|
|
|
+ isVacation
|
|
|
+ ? this.setState({ isVopen: true })
|
|
|
+ : this.publicReleaseClockIn()
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ boxShadow: '1px 1px 15px 1px #acb8ad',
|
|
|
+ background: '#009DD9',
|
|
|
+ }}>
|
|
|
+ <View className='punchClockTitle'>研发打卡</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ : <View style={{ color: "red" }}>
|
|
|
+ 当前时间不可打卡,请重新选择研发时间
|
|
|
+ </View>
|
|
|
+ }
|
|
|
</View>
|
|
|
}
|
|
|
</Skeleton>
|