|
@@ -102,17 +102,22 @@
|
|
|
</div>
|
|
|
<div class="popup__rangetime__main flex flex-row flex-row-aic">
|
|
|
<van-field
|
|
|
- v-model="timeStart"
|
|
|
+ :value="timeStart"
|
|
|
+ :disabled="true"
|
|
|
clearable
|
|
|
placeholder="开始时间"
|
|
|
:center="true"
|
|
|
+ @click-input="handleClickTimeStart"
|
|
|
/>
|
|
|
<span class="horization"></span>
|
|
|
+
|
|
|
<van-field
|
|
|
- v-model="timeEnd"
|
|
|
+ :value="timeEnd"
|
|
|
+ :disabled="true"
|
|
|
clearable
|
|
|
placeholder="结束时间"
|
|
|
:center="true"
|
|
|
+ @click-input="handleClickTimeEnd"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -121,7 +126,20 @@
|
|
|
<div class="btn-popup" @click="handleSubmitFilter">
|
|
|
<span>提交</span>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
+ <ChooseTime
|
|
|
+ ref="chooseTimeRef"
|
|
|
+ v-model="timeStart"
|
|
|
+ :min-date="minDate"
|
|
|
+ :max-date="maxDate"
|
|
|
+ />
|
|
|
+
|
|
|
+ <ChooseTime
|
|
|
+ ref="chooseTimeRef2"
|
|
|
+ v-model="timeEnd"
|
|
|
+ :min-date="minDate"
|
|
|
+ :max-date="maxDate"
|
|
|
+ />
|
|
|
|
|
|
</van-popup>
|
|
|
</div>
|
|
@@ -134,10 +152,13 @@ import ApproveItem from './approve/components/ApproveItem.vue'
|
|
|
import { getApproveList } from '@/api/approve'
|
|
|
import { formatApproveItemRow } from '@/utils/approve-item'
|
|
|
import { mapState } from 'vuex'
|
|
|
+import ChooseTime from '@/components/ChooseTime'
|
|
|
+import dayjs from 'dayjs'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- ApproveItem
|
|
|
+ ApproveItem,
|
|
|
+ ChooseTime
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('enum', {
|
|
@@ -203,9 +224,22 @@ export default {
|
|
|
finished: false,
|
|
|
finishedText: '暂无更多数据',
|
|
|
tableData: [],
|
|
|
+ minDate: '',
|
|
|
+ maxDate: ''
|
|
|
}
|
|
|
},
|
|
|
+ created () {
|
|
|
+ this.__init__()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ __init__ () {
|
|
|
+ // NOTE: 设置时间返回是前6个月 - 现在
|
|
|
+ let now = new Date()
|
|
|
+ now.setMonth(now.getMonth() - 7)
|
|
|
+ this.minDate = now
|
|
|
+ let nowMax = new Date()
|
|
|
+ this.maxDate = nowMax
|
|
|
+ },
|
|
|
onLoadData () {
|
|
|
this.__record_list__()
|
|
|
},
|
|
@@ -288,12 +322,28 @@ export default {
|
|
|
},
|
|
|
|
|
|
|
|
|
- // TODO: 缺少module无法准确进入某一审批详情页面
|
|
|
+ // NOTE: 缺少module无法准确进入某一审批详情页面
|
|
|
handleGoInfo(item) {
|
|
|
console.log('%c handle Go_info >>>', 'background: blue; color: #fff', item);
|
|
|
|
|
|
},
|
|
|
|
|
|
+ handleClickTimeStart () {
|
|
|
+ const THAT = this
|
|
|
+ THAT.timeVal = THAT.timeStart
|
|
|
+ this.$refs.chooseTimeRef.openChooseTime(date => {
|
|
|
+ THAT.timeStart = dayjs(date).format('YYYY-MM-DD HH:mm')
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ handleClickTimeEnd () {
|
|
|
+ const THAT = this
|
|
|
+ THAT.timeVal = THAT.timeEnd
|
|
|
+ this.$refs.chooseTimeRef.openChooseTime(date => {
|
|
|
+ THAT.timeEnd = dayjs(date).format('YYYY-MM-DD HH:mm')
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
goexamine () {
|
|
|
this.$router.push({
|
|
|
name: 'Examine',
|