|
|
@@ -209,23 +209,89 @@
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
<span class="demonstration"></span>
|
|
|
- <el-date-picker @blur="laborReportsCountingRecordApi('')"
|
|
|
- v-model="laborReportsCountingRecordsDate"
|
|
|
- type="daterange"
|
|
|
- align="right"
|
|
|
- unlink-panels
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- :picker-options="pickerOptions">
|
|
|
- </el-date-picker>
|
|
|
+{{-- <el-date-picker @blur="laborReportsCountingRecordApi('')"--}}
|
|
|
+{{-- v-model="laborReportsCountingRecordsDate"--}}
|
|
|
+{{-- type="daterange"--}}
|
|
|
+{{-- align="right"--}}
|
|
|
+{{-- unlink-panels--}}
|
|
|
+{{-- range-separator="-"--}}
|
|
|
+{{-- start-placeholder="开始日期"--}}
|
|
|
+{{-- end-placeholder="结束日期"--}}
|
|
|
+{{-- value-format="yyyy-MM-dd"--}}
|
|
|
+{{-- :picker-options="pickerOptions">--}}
|
|
|
+{{-- </el-date-picker>--}}
|
|
|
+
|
|
|
+ <div class="block">
|
|
|
+ <span v-show="laborReportsCountingRecordsDayShow" class="demonstration">起始日期</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsDayShow"
|
|
|
+ v-model="laborReportsCountingRecordsStart"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选起始日期">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <span v-show="laborReportsCountingRecordsDayShow" class="demonstration">结束日期</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsDayShow"
|
|
|
+ v-model="laborReportsCountingRecordsEnd"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration">起始月</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsMonthShow"
|
|
|
+ v-model="laborReportsCountingRecordsStart"
|
|
|
+ type="month"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择起始月">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <span v-show="laborReportsCountingRecordsMonthShow" class="demonstration">结束月</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsMonthShow"
|
|
|
+ v-model="laborReportsCountingRecordsEnd"
|
|
|
+ type="month"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择结束月">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <span v-show="laborReportsCountingRecordsYearShow" class="demonstration">起始年</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsYearShow"
|
|
|
+ v-model="laborReportsCountingRecordsStart"
|
|
|
+ type="year"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择年">
|
|
|
+ </el-date-picker>
|
|
|
+
|
|
|
+ <span v-show="laborReportsCountingRecordsYearShow" class="demonstration">结束年</span>
|
|
|
+ <el-date-picker
|
|
|
+ @blur="laborReportsCountingRecordApi('')"
|
|
|
+ v-show="laborReportsCountingRecordsYearShow"
|
|
|
+ v-model="laborReportsCountingRecordsEnd"
|
|
|
+ type="year"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择年">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-button type="primary" value="日" @click="laborReportsCountingRecordApi('日')"
|
|
|
v-model="laborReportsCountingRecordUnit">日
|
|
|
</el-button>
|
|
|
<el-button type="primary" value="月" @click="laborReportsCountingRecordApi('月')"
|
|
|
v-model="laborReportsCountingRecordUnit">月
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" value="年" @click="laborReportsCountingRecordApi('年')"
|
|
|
+ v-model="laborReportsCountingRecordUnit">年
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="card-body row">
|
|
|
<div v-show="laborReportsCountingRecordsShow" id="laborReportsCountingRecords"
|
|
|
@@ -346,7 +412,12 @@
|
|
|
orderCountingRecordsMonthShow: false,
|
|
|
orderCountingRecordsYearShow: false,
|
|
|
orderCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
- orderCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD')
|
|
|
+ orderCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
+ laborReportsCountingRecordsDayShow: true,
|
|
|
+ laborReportsCountingRecordsMonthShow: false,
|
|
|
+ laborReportsCountingRecordsYearShow:false ,
|
|
|
+ laborReportsCountingRecordsStart: moment().subtract('1', 'month').format('yyyy-MM-DD'),
|
|
|
+ laborReportsCountingRecordsEnd: moment(new Date()).format('yyyy-MM-DD'),
|
|
|
},
|
|
|
mounted: function () {
|
|
|
$('#list').removeClass('d-none');
|
|
|
@@ -594,9 +665,27 @@
|
|
|
laborReportsCountingRecordUnit = this.laborReportsCountingRecordUnit;
|
|
|
}
|
|
|
this.laborReportsCountingRecordUnit = laborReportsCountingRecordUnit;
|
|
|
+ switch (laborReportsCountingRecordUnit) {
|
|
|
+ case '日':
|
|
|
+ this.laborReportsCountingRecordsDayShow = true;
|
|
|
+ this.laborReportsCountingRecordsMonthShow = false;
|
|
|
+ this.laborReportsCountingRecordsYearShow = false;
|
|
|
+ break;
|
|
|
+ case '月':
|
|
|
+ this.laborReportsCountingRecordsDayShow = false;
|
|
|
+ this.laborReportsCountingRecordsMonthShow = true;
|
|
|
+ this.laborReportsCountingRecordsYearShow = false;
|
|
|
+ break;
|
|
|
+ case '年':
|
|
|
+ this.laborReportsCountingRecordsDayShow = false;
|
|
|
+ this.laborReportsCountingRecordsMonthShow = false;
|
|
|
+ this.laborReportsCountingRecordsYearShow = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
let formData = new FormData();
|
|
|
- formData.append('start', this.laborReportsCountingRecordsDate[0]);
|
|
|
- formData.append('end', this.laborReportsCountingRecordsDate[1]);
|
|
|
+ formData.append('start', this.laborReportsCountingRecordsStart);
|
|
|
+ formData.append('end', this.laborReportsCountingRecordsEnd);
|
|
|
formData.append('unit', laborReportsCountingRecordUnit);
|
|
|
let _this = this;
|
|
|
axios.post('{{url('apiLocal/control/panel/menu/laborReportsCountingRecordApi')}}', formData).then(function (res) {
|