Commit ddda25e8 authored by youjie's avatar youjie

no message

parent df00aebe
......@@ -4,15 +4,24 @@
<q-separator color="grey-3" class="q-my-sm" />
<div class=" q-pt-md"
:class="[$q.platform.is.desktop?'q-px-lg':'q-px-md']">
<q-field clearable v-model="queryTime"
<q-field clearable @clear="activeMonths=0" v-model="queryTime"
label="时间选择" standout class="col-2" style="width: 190px" dense>
<div class="self-center full-width no-outline" tabindex="0">{{ queryTime }}</div>
<q-separator color="grey-3" class="q-my-sm" />
<q-popup-proxy :offset="[0, 10]" ref="qDateProxy">
<q-date v-model="queryTime"
<!-- <q-date v-model="queryTime"
mask="YYYY/MM"
default-view="Months"
@update:model-value="dateRangeHandler"></q-date>
@update:model-value="dateRangeHandler"></q-date> -->
<div class="bg-blue text-white q-px-lg q-py-md fz18">选择月份</div>
<div class="row" style="width: 300px;">
<div v-for="(item,index) in chineseMonth"
class="col-4 text-center q-py-lg">
<span class="cursor-pointer q-py-sm q-px-md rounded-borders useDetails-hover" :class="[activeMonths==index+1?'bg-blue text-white':'']"
@click="activeMonths=index+1,dateRangeHandler()">{{item}}</span>
</div>
</div>
</q-popup-proxy>
</q-field>
</div>
......@@ -64,18 +73,25 @@
const qDateProxy = ref(null) as any
const { t } = useI18n()
const main = ref();
const timeStamp = Date.now()
const formattedString = date.formatDate(timeStamp, 'MM')
const data=reactive({
dateRange: {} as any,
queryTime: '',
titleHead: '使用明细',
dataList: [],
chineseWeek:[]
chineseMonth:[],
activeMonths: 0,
})
// data.chineseWeek = useHotel.getMonthType()
data.activeMonths = formattedString>10?formattedString:formattedString.slice(1)
data.chineseMonth = useHotel.getMonthType()
const methods = {
dateRangeHandler(e: any) {
dateRangeHandler() {
data.queryTime = `${date.formatDate(timeStamp, 'YYYY')}/${data.activeMonths>10?data.activeMonths:'0'+data.activeMonths}`
qDateProxy.value.hide()
methods.getList()
if (qDateProxy.value) qDateProxy.value.hide()
},
getList(){
passbookService.getBankbookUseDetail(data.queryTime)
......@@ -91,6 +107,7 @@
})
},
}
onMounted(() => {
methods.getList()
});
......@@ -112,5 +129,8 @@
.left-text:nth-child(2n){
background: #E0E0E0;
}
.useDetails-hover:hover{
background: #F2F2F2;
}
</style>
\ No newline at end of file
......@@ -87,6 +87,7 @@ import scheduledTripService from 'src/api/scheduledTrip'
import { ApiResult } from 'src/@types/enumHelper'
import message from 'src/utils/message'
import { moneyFormat } from 'src/utils/tools'
import { useHotel } from '../../utils/hotelRate'
export default defineComponent({
components: { },
props: ['priceList'],
......@@ -102,20 +103,7 @@ export default defineComponent({
})
const data= reactive({
chineseWeek: [t('dayOfWeek.sun'), t('dayOfWeek.mon'), t('dayOfWeek.tues'), t('dayOfWeek.wed'), t('dayOfWeek.thur'), t('dayOfWeek.fri'), t('dayOfWeek.sat')],
chineseMonth: [
t('v103.scheduledTripDetails.month.january'),
t('v103.scheduledTripDetails.month.february'),
t('v103.scheduledTripDetails.month.march'),
t('v103.scheduledTripDetails.month.april'),
t('v103.scheduledTripDetails.month.may'),
t('v103.scheduledTripDetails.month.june'),
t('v103.scheduledTripDetails.month.july'),
t('v103.scheduledTripDetails.month.august'),
t('v103.scheduledTripDetails.month.september'),
t('v103.scheduledTripDetails.month.october'),
t('v103.scheduledTripDetails.month.november'),
t('v103.scheduledTripDetails.month.december'),
],
chineseMonth: [] as String,
data: [],
months: [],
currentMonth: 0,
......@@ -123,6 +111,7 @@ export default defineComponent({
prices: props.priceList,
currentDate: "",
})
data.chineseMonth = useHotel.getMonthType()
data.prices = props.priceList;
const methods = {
init() {
......
......@@ -1358,18 +1358,18 @@ export default {
dateoption: '選択日期、選項',
pleasedateoption: '出発日を選んでください',
month: {
january: '1月',
february: '2月',
march: '3月',
april: '4月',
may: '5月',
june: '6月',
july: '7月',
august: '8月',
september: '9月',
october: '10月',
november: '11月',
december: '12月',
month1: '一月',
        month2: '二月',
        month3: '三月',
        month4: '四月',
        month5: '五月',
        month6: '六月',
        month7: '七月',
        month8: '八月',
        month9: '九月',
        month10: '十月',
        month11: '十一月',
        month12: '十二月',
},
reselect: '全部やり直します',
selectionquantity: '選択の数',
......
......@@ -1358,18 +1358,18 @@ export default {
dateoption:"날짜 선택, 옵션",
pleasedateoption:"출발 날짜를 선택해주세요",
month: {
january: '1월',
february: '2월',
march: '3월',
april: '4월',
may: '5월',
june: '6월',
july: '7월',
august: '8월',
september: '9월',
october: '10월',
november: '11월',
december: '12월',
month1: '一월',
        month2: '二월',
        month3: '三월',
        month4: '四월',
        month5: '五월',
        month6: '六월',
        month7: '七월',
        month8: '八월',
        month9: '九월',
        month10: '十월',
        month11: '十一월',
        month12: '十二월',
},
reselect:"모두 다시 선택",
selectionquantity:"선택 갯수",
......
......@@ -1346,18 +1346,18 @@ export default {
dateoption: '選擇日期、選項',
pleasedateoption: '請選擇出發日期',
month: {
january: '一月',
february: '二月',
march: '三月',
april: '四月',
may: '五月',
june: '六月',
july: '七月',
august: '八月',
september: '九月',
october: '十月',
november: '十一月',
december: '十二月',
month1: '一月',
        month2: '二月',
        month3: '三月',
        month4: '四月',
        month5: '五月',
        month6: '六月',
        month7: '七月',
        month8: '八月',
        month9: '九月',
        month10: '十月',
        month11: '十一月',
        month12: '十二月',
},
reselect: '全部重選',
selectionquantity: '選擇數量',
......
......@@ -160,13 +160,13 @@ const useHotel={
return rates
},
// 12月份
// getMonthType(){
// let rates=[]
// for(let i=0;i<11;i++){
// rates.push(t(`v102.CharteredBus.baochetype${i+1}`))
// }
// return rates
// },
getMonthType(){
let rates=[]
for(let i=0;i<12;i++){
rates.push(t(`v103.scheduledTripDetails.month.month${i+1}`))
}
return rates
},
}
export {useHotel,
type HotelRate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment