Browse Source

Merge pull request 'tall' (#11) from tall into master

Reviewed-on: http://101.201.226.163:3000/TALL/check-work/pulls/11
master
wally 4 years ago
parent
commit
9678c01619
  1. 1
      src/components/List/List.vue
  2. 12
      src/components/TimePicker/TimePicker.vue

1
src/components/List/List.vue

@ -377,6 +377,7 @@ export default {
checkTime(listIndex, index, clockType, id, memberId, checkerId, clockTime) { checkTime(listIndex, index, clockType, id, memberId, checkerId, clockTime) {
this.auditOptions = { id, clockType }; this.auditOptions = { id, clockType };
this.checkerId = checkerId;
this.showModal(); this.showModal();
const time = Date.now(); const time = Date.now();
const selectTime = this.$moment(time).format('HH:mm'); const selectTime = this.$moment(time).format('HH:mm');

12
src/components/TimePicker/TimePicker.vue

@ -97,16 +97,20 @@ export default {
// //
setYesterday(open) { setYesterday(open) {
const day = this.$moment(new Date().getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD'); const day = this.$moment(new Date().getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD');
this.startValue = day; // this.startValue = day;
this.endValue = day; // this.endValue = day;
this.setStartTime(this.$moment(`${day} 00:00`).format('x') - 0);
this.setEndTime(this.$moment(`${day} 23:59`).format('x') - 0);
this[open] = false; this[open] = false;
}, },
// //
setToday(open) { setToday(open) {
const today = this.$moment(new Date()).format('YYYY-MM-DD'); const today = this.$moment(new Date()).format('YYYY-MM-DD');
this.startValue = today; // this.startValue = today;
this.endValue = today; // this.endValue = today;
this.setStartTime(this.$moment(`${today} 00:00`).format('x') - 0);
this.setEndTime(this.$moment(`${today} 23:59`).format('x') - 0);
this[open] = false; this[open] = false;
}, },

Loading…
Cancel
Save