Commit ddda25e8 authored by youjie's avatar youjie

no message

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