|
@@ -42,45 +42,12 @@ function DutyRecord() {
|
|
}
|
|
}
|
|
|
|
|
|
function getlastmonthday(){
|
|
function getlastmonthday(){
|
|
- var now=new Date();
|
|
|
|
- var year = now.getFullYear();//getYear()+1900=getFullYear()
|
|
|
|
- var month = now.getMonth() +1;//0-11表示1-12月
|
|
|
|
- var day = now.getDate();
|
|
|
|
- if(parseInt(month)<10){
|
|
|
|
- month="0"+month;
|
|
|
|
- }
|
|
|
|
- if(parseInt(day)<10){
|
|
|
|
- day="0"+day;
|
|
|
|
- }
|
|
|
|
- now =year + '-'+ month + '-' + day;
|
|
|
|
- if (parseInt(month) ==1) {//如果是1月份,则取上一年的12月份
|
|
|
|
- return (parseInt(year) - 1) + '-12-' + day;
|
|
|
|
- }
|
|
|
|
- var preSize= new Date(year, parseInt(month)-1, 0).getDate();//上月总天数
|
|
|
|
- if (preSize < parseInt(day)) {//上月总天数<本月日期,比如3月的30日,在2月中没有30
|
|
|
|
- return year + '-' + month + '-01';
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(parseInt(month) <=10){
|
|
|
|
- return year + '-0' + (parseInt(month)-1) + '-' + day;
|
|
|
|
- }else{
|
|
|
|
- return year + '-' + (parseInt(month)-1) + '-' + day;
|
|
|
|
- }
|
|
|
|
|
|
+ let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
|
|
|
|
+ return time
|
|
}
|
|
}
|
|
function getNowFormatDate() {
|
|
function getNowFormatDate() {
|
|
- var date = new Date();
|
|
|
|
- var seperator1 = "-";
|
|
|
|
- var year = date.getFullYear();
|
|
|
|
- var month = date.getMonth() + 1;
|
|
|
|
- var strDate = date.getDate();
|
|
|
|
- if (month >= 1 && month <= 9) {
|
|
|
|
- month = "0" + month;
|
|
|
|
- }
|
|
|
|
- if (strDate >= 0 && strDate <= 9) {
|
|
|
|
- strDate = "0" + strDate;
|
|
|
|
- }
|
|
|
|
- var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
|
- return currentdate;
|
|
|
|
|
|
+ let time = new Date().toLocaleDateString()
|
|
|
|
+ return time
|
|
}
|
|
}
|
|
//表格数据
|
|
//表格数据
|
|
function getDutyRecord(param) {
|
|
function getDutyRecord(param) {
|
|
@@ -214,7 +181,6 @@ function DutyRecord() {
|
|
<Form.Item label="变更类型" name="type">
|
|
<Form.Item label="变更类型" name="type">
|
|
<Select
|
|
<Select
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- allowClear
|
|
|
|
>
|
|
>
|
|
<Option value="" key={0}>全部</Option>
|
|
<Option value="" key={0}>全部</Option>
|
|
<Option value="1" key={1}>{typeMap['1']}</Option>
|
|
<Option value="1" key={1}>{typeMap['1']}</Option>
|
|
@@ -228,6 +194,8 @@ function DutyRecord() {
|
|
defaultValue={[moment(lastmonthday), moment(today)]}
|
|
defaultValue={[moment(lastmonthday), moment(today)]}
|
|
disabledDate={disabledDate}
|
|
disabledDate={disabledDate}
|
|
placeholder={['开始时间', '结束时间']}
|
|
placeholder={['开始时间', '结束时间']}
|
|
|
|
+ allowClear={false}
|
|
|
|
+ inputReadOnly={true}
|
|
/>
|
|
/>
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Col>
|
|
</Col>
|