This commit is contained in:
Mauve
2026-09-16 10:43:59 +08:00
parent a7f2e0ca01
commit 9f2becfa67
36 changed files with 3997 additions and 264 deletions
+101 -47
View File
@@ -98,8 +98,15 @@
<view class="hz-flex-row" style="align-items: flex-start;">
<view class="text-container" v-if="!rowRecord.showDetail">
<span v-for="(itemRecord,index) in rowRecord.descriptions" :key="'item'+index"
class="hz-date-des"
style="display:flex;flex-direction:row;align-items:center;">{{getItemDescription(itemRecord)}}
class="hz-date-des todo-summary-description"
style="display:block;">
<template v-for="(part, partIndex) in getDescriptionWithSharerIconParts(itemRecord)">
<image v-if="part.type === 'sharerIcon'" :key="'item-sharer-'+index+'-'+partIndex"
src="../../static/images/sharer_line.svg"
class="icon-img-sharer todo-description-sharer-icon">
</image>
<span v-else :key="'item-text-'+index+'-'+partIndex">{{part.text}}</span>
</template>
<image
v-show="index == 0 && currentIndex !== 2 && rowRecord.hasFlightRecord ===1"
src="../../static/images/flight_line.svg" class="icon-img-flight">
@@ -107,11 +114,11 @@
<image
v-show="index == 0 && currentIndex !== 2 && rowRecord.hasLimoRecord ===1"
src="../../static/images/limo_line.svg" class="icon-img-limo"></image>
<image v-show="getItemShowSharerIcon(itemRecord)"
src="../../static/images/sharer_line.svg" class="icon-img-sharer">
</image>
<span v-show="itemRecord.isQueue"> (In Queue) </span>
<span v-show="itemRecord.roomReady"> (Room Ready) </span>
<image
v-show="index == 0 && currentIndex !== 2 && rowRecord.hasLimoRecord =='-1'"
src="../../static/images/limo_warn.png" class="icon-img-limo"></image>
<span v-show="index === 0 && rowRecord.isQueue"> (In Queue) </span>
<span v-show="index === 0 && rowRecord.roomReady"> (Room Ready) </span>
</span>
</view>
<!-- 直接使用v-if配合CSS动画类 -->
@@ -134,7 +141,7 @@
<u-col v-show="currentIndex === 2" span="6">
<view class="hz-font-12px">Trip TPD: {{formatNumber(rowRecord.detailData.tripTPD)}}</view>
<view class="hz-font-12px">Trip Win: {{formatNumber(rowRecord.detailData.tripWin)}}</view>
<view class="hz-font-12px">Trip RI%: {{getPercentFormat(rowRecord.detailData.tripRIPercentage)}}
<view class="hz-font-12px">Trip RI: {{getPercentFormat(rowRecord.detailData.tripRIPercentage)}}
</view>
<view v-show="currentIndex === 2 && filterType ==='MASS'" class="hz-font-12px">Trip Theo : {{formatNumber(rowRecord.detailData.tripTheo)}}
</view>
@@ -182,6 +189,7 @@
</view>
<view class="hz-font-12px">Today Win : {{formatNumber(rowRecord.detailData.todayWin)}}
</view>
</u-col>
<u-col span="6">
<view class="hz-font-12px">Yesterday T/O: {{formatNumber(rowRecord.detailData.yesterdayTO)}}</view>
@@ -198,6 +206,8 @@
</view>
<view class="hz-font-12px">Prg Avg PlayHour : {{formarHour(rowRecord.detailData.averagePlayHour)}}
</view>
<view class="hz-font-12px">IRC Prg Bal : {{formatNumber(rowRecord.detailData.iRCProgramFundBalance)}}
</view>
<view class="hz-font-12px">Exp comm : {{formatNumber(rowRecord.detailData.expComm)}}
</view>
<view class="hz-font-12px">Unsettled Expenses : {{formatNumber(rowRecord.detailData.unsettledExpenses)}}
@@ -206,6 +216,8 @@
<u-col span="6">
<view class="hz-font-12px">Front Money: {{formatNumber(rowRecord.detailData.frontMoney)}}</view>
<view class="hz-font-12px">TTO: {{formatNumber(rowRecord.detailData.tto)}}</view>
<!-- <view class="hz-font-12px">HA : {{getPercentFormat(rowRecord.detailData.houseAdvantage)}}
</view> -->
<view class="hz-font-12px">0.1Comp Balance: {{formatNumber(rowRecord.detailData.comBalance)}}
</view>
<view class="hz-font-12px">Net Credit outstanding: {{formatNumber(rowRecord.detailData.netCreditOutstanding)}}
@@ -218,7 +230,7 @@
<u-col span="6">
<view class="hz-font-12px">R3M TPD: {{formatNumber(rowRecord.detailData.r3MTPD)}}</view>
<view class="hz-font-12px">R3M Win: {{formatNumber(rowRecord.detailData.r3MWin)}}</view>
<view class="hz-font-12px">R3M RI%:
<view class="hz-font-12px">R3M RI:
{{getPercentFormat(rowRecord.detailData.r3MRIPercentage)}}</view>
<view v-show="currentIndex === 2 && filterType ==='MASS'" class="hz-font-12px">R3M Theo : {{formatNumber(rowRecord.detailData.r3MTheo)}}
</view>
@@ -226,7 +238,7 @@
<u-col span="6">
<view class="hz-font-12px">R6M TPD: {{formatNumber(rowRecord.detailData.r6MTPD)}}</view>
<view class="hz-font-12px">R6M Win: {{formatNumber(rowRecord.detailData.r6MWin)}}</view>
<view class="hz-font-12px">R6M RI%:
<view class="hz-font-12px">R6M RI:
{{getPercentFormat(rowRecord.detailData.r6MRIPercentage)}}</view>
<view v-show="currentIndex === 2 && filterType ==='MASS'" class="hz-font-12px">R6M Theo : {{formatNumber(rowRecord.detailData.r6MTheo)}}
</view>
@@ -250,7 +262,7 @@
<view v-show="rowRecord.showOffer">
<view class="hz-font-color-dark hz-font-md">Available & Unredeem Offer</view>
<view v-for="(record,index) in rowRecord.detailData.descriptions"
:key="'offer-'+index" class="hz-font-12px">{{getOfferDescription(record)}}
:key="'offer-'+index" class="hz-font-12px todo-description-text">{{getOfferDescription(record)}}
</view>
<view class="hz-split"></view>
</view>
@@ -263,11 +275,11 @@
class="icon-img-flight" style="margin-left:0px;margin-right:4px;">
</image>
</view>
<view class="hz-flex-col">
<view class="hz-flex-col todo-description-list">
<view v-for="(record,index) in rowRecord.detailData.descriptions"
:key="'flight'+index" class="hz-flex-row"
:key="'flight'+index" class="hz-flex-row todo-description-row"
style="align-items: flex-start;">
<span class="hz-font-12px">{{getFlightDescription(record)}}</span>
<span class="hz-font-12px todo-description-text">{{getFlightDescription(record)}}</span>
</view>
</view>
</view>
@@ -277,11 +289,11 @@
<image src="../../static/images/limo_line_2.svg" class="icon-img-limo"
style="margin-left:0px;margin-right:4px;"></image>
</view>
<view class="hz-flex-col">
<view class="hz-flex-col todo-description-list">
<view v-for="(record,index) in rowRecord.detailData.descriptions"
:key="'limo'+index" class="hz-flex-row"
:key="'limo'+index" class="hz-flex-row todo-description-row"
style="align-items: flex-start;">
<span class="hz-font-12px">{{getLimoDescription(record)}}</span>
<span class="hz-font-12px todo-description-text">{{getLimoDescription(record)}}</span>
</view>
</view>
</view>
@@ -291,21 +303,26 @@
<image src="../../static/images/room_line_2.svg" class="icon-img-room"
style="margin-top:2px;margin-right:3px;"></image>
</view>
<view class="hz-flex-col">
<view class="hz-flex-col todo-description-list">
<view v-for="(record,index) in rowRecord.detailData.descriptions"
:key="'room'+index" class="hz-flex-row"
style="align-items: flex-start;">
<span class="hz-font-12px">{{getRoomDescription(record)}}</span>
<!-- <view v-show="showSharerIcon(record)" class="icon-group"> -->
<view v-show="getItemShowSharerIcon(record.itemRecordDescription)" class="icon-group">
<image src="../../static/images/sharer_line_2.svg"
class="icon-img-limo"></image>
</view>
:key="'room'+index" class="hz-flex-row todo-description-row"
style="align-items: center;">
<span class="hz-font-12px todo-description-text">
<template v-for="(part, partIndex) in getRoomDescriptionParts(record)">
<image v-if="part.type === 'sharerIcon'" :key="'room-sharer-'+index+'-'+partIndex"
src="../../static/images/sharer_line_2.svg"
class="icon-img-sharer todo-description-sharer-icon"></image>
<span v-else :key="'room-text-'+index+'-'+partIndex">{{part.text}}</span>
</template>
</span>
</view>
</view>
</view>
</view>
</view>
<view v-if="currentIndex === 2 && rowRecord.roomReady" class="hz-font-12px todo-description-text" >
[Room Ready]
</view>
</uni-card>
<template v-slot:right>
<view v-if="currentIndex === 0" class="hz-flex-row" style="height:100%;align-items: center;margin-left:15px;"
@@ -332,11 +349,11 @@
<view v-if="currentIndex === 3" v-for="(record,index) in listData" :key="'record'+index" style="margin-bottom:8px;">
<view class="hz-date-title">{{record.date}}</view>
<uni-card v-for="(rowRecord,index) in record.dateRecords" :key="'rowRecord'+index" style="margin-left:4rpx;margin-right:4rpx;padding:12px;">
<u-row v-for="(rowDescription,index) in getOtherDescription(rowRecord.descriptions)" :key="'rowDescription'+index">
<uni-card v-for="(rowRecord,rowIndex) in record.dateRecords" :key="'other-card-' + index + '-' + rowIndex" style="margin-left:4rpx;margin-right:4rpx;padding:12px;">
<u-row v-for="(rowDescription,descIndex) in getOtherDescription(rowRecord.descriptions)" :key="'other-desc-' + index + '-' + rowIndex + '-' + descIndex">
<u-col span="12">
<view class="hz-font-color-dark hz-font-md" style="margin-bottom:6px;">
<span v-if="index !== 0">•</span> {{getEmojiDescription(rowDescription)}}
<view class="hz-font-color-dark hz-font-md todo-description-text" style="margin-bottom:6px;">
<span v-if="descIndex !== 0">•</span> {{getEmojiDescription(rowDescription)}}
</view>
</u-col>
</u-row>
@@ -430,6 +447,7 @@
getSetting,
getExtendBooking
} from '../../api/configApi.js';
import { normalizeApiKeys } from '../../common/normalizeApiKeys.js';
export default {
components: {
mgmHeader, // 注册组件
@@ -540,7 +558,8 @@
calendarSave: [null, null],
rangeTip: this.$t("common.rangeTip"),
calendarIconColor: "#000000",
currentTask: null
currentTask: null,
todoListRequestSeq: 0
}
},
@@ -1182,6 +1201,7 @@
}
},
async getTodoListByData() {
const requestSeq = ++this.todoListRequestSeq;
if (this.currentTask) {
try {
@@ -1232,11 +1252,12 @@
}
});
if (requestSeq !== this.todoListRequestSeq) return;
this.currentTask = null;
if (Array.isArray(res.data.records) && res.data.records.length > 0) {
const records = res && res.data && Array.isArray(res.data.records) ? res.data.records : [];
if (res && res.success == true && records.length > 0) {
this.showTodoListView=true;
this.listData = res.data.records.map(record => ({
this.listData = records.map(record => ({
...record,
dateRecords: record.dateRecords.map(dateRecord => ({
...dateRecord,
@@ -1251,9 +1272,10 @@
}))
}));
}else{
if(res.data.records.length === 0){
const errorCode = res && (res.errorCode || res.code) ? String(res.errorCode || res.code).toUpperCase() : '';
if(errorCode.indexOf('NO RECORD') !== -1 || (res && res.success == true && records.length === 0)){
this.dataNull = this.$t("common.noRecord");
}else if(res.errorCode.toUpperCase().indexOf('NO RECORD') != -1){
}else{
this.dataNull = this.$t("todo.returnError");
}
@@ -1261,7 +1283,8 @@
}
} catch (e) {
if (e.errMsg.includes("abort")) {
if (requestSeq !== this.todoListRequestSeq) return;
if (e.errMsg && e.errMsg.includes("abort")) {
} else if (e.data!==null&&e.data!==undefined&&e.data.message!==undefined){
this.dataNull = e.data.message;
@@ -1273,7 +1296,7 @@
console.error(e);
}
} finally {
if(!this.currentTask){
if(requestSeq === this.todoListRequestSeq && !this.currentTask){
uni.hideLoading();
}
}
@@ -1306,7 +1329,7 @@
else params.Date = this.formatDate(record.actionDate);
const res = await getTodoDetail(params);
if (res != null && res.success == true) {
record.detailData = res.data;
record.detailData = normalizeApiKeys(res.data);
if(record.detailData.descriptions!==null){
for(let i=0;i<record.detailData.descriptions.length;i++){
if(record.detailData.descriptions[i].itemRecordType == 'Offer'){
@@ -1481,10 +1504,44 @@
getRoomDescription() {
return function(record) {
if (record.itemRecordType == 'Room'){
return record.itemRecordDescription.split('|').slice(0, 2).join("|");
return record.itemRecordDescription.replace(/\s*\|\s*Sharer:\s*[YN]\s*/," ");
}
};
},
getRoomDescriptionParts() {
return (record) => {
if (!record || record.itemRecordType !== 'Room') {
return [];
}
return this.getDescriptionWithSharerIconParts(record.itemRecordDescription);
};
},
getDescriptionWithSharerIconParts() {
return (description) => {
if (description === null || description === undefined || description === '') {
return [];
}
const segments = String(description).split('|');
const parts = [];
for (let i = 0; i < segments.length; i++) {
const segment = segments[i].trim();
if (segment === '') {
continue;
}
const sharerMatch = segment.match(/^Sharer\s*:\s*([YN])$/i);
if (sharerMatch) {
if (String(sharerMatch[1]).toUpperCase() === 'Y') {
parts.push({ type: 'sharerIcon' });
}
continue;
}
const lastPart = parts.length ? parts[parts.length - 1] : null;
const text = lastPart && lastPart.type === 'text' ? ` | ${segment}` : segment;
parts.push({ type: 'text', text });
}
return parts;
};
},
hasRoomRecord() {
return function(record) {
let result = false;
@@ -1502,7 +1559,7 @@
getItemDescription() {
return function(record) {
if (this.currentIndex !== 3 && record.indexOf("Sharer") !== -1) {
return record.split('|').slice(0, 2).join("|");
return record.replace(/\s*\|\s*Sharer:\s*[YN]\s*/," ");
} else {
return record;
}
@@ -1534,11 +1591,8 @@
},
getItemShowSharerIcon() {
return function(record) {
let sharerRecord = record.split("Sharer:");
let hasSharer = "N";
if (sharerRecord.length > 1) {
hasSharer = sharerRecord[1].trim();
}
let sharerRecord = record.match(/\|\s*Sharer:\s*([YN])(?:\s*\||\s*$)/);
let hasSharer = sharerRecord !== null ? sharerRecord[1] : "N";
return hasSharer == "N" ? false : true;
}
},
@@ -1643,4 +1697,4 @@
@import '../../static/css/todo.scss';
@import '../../static/css/custom.scss';
</style>
</style>