|
@ -43,7 +43,7 @@ |
|
|
<view v-for="(item, index) in [...recordList]" :key="index" class="record-item" @tap="viewDetail(item)"> |
|
|
<view v-for="(item, index) in [...recordList]" :key="index" class="record-item" @tap="viewDetail(item)"> |
|
|
<view class="record-header"> |
|
|
<view class="record-header"> |
|
|
<!-- <text class="record-id">{{ item.senderName }}</text> --> |
|
|
<!-- <text class="record-id">{{ item.senderName }}</text> --> |
|
|
<text class="record-id">{{ item.remark }}</text> |
|
|
<text class="record-id">{{ item.billCode }}</text> |
|
|
<view class="record-amount"> |
|
|
<view class="record-amount"> |
|
|
<text class="amount-value" :style="{ color: getColor(item.changeBalance) }"> |
|
|
<text class="amount-value" :style="{ color: getColor(item.changeBalance) }"> |
|
|
{{item.changeBalance>0?'+':''}}{{ item.changeBalance }} (KIP) |
|
|
{{item.changeBalance>0?'+':''}}{{ item.changeBalance }} (KIP) |
|
@ -51,7 +51,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="record-content"> |
|
|
<view class="record-content"> |
|
|
<text class="record-time">{{ item.time }}</text> |
|
|
<text class="record-time">{{ item.timeFormat }}</text> |
|
|
<uni-tag :inverted="true" :text="item.typeStr" /> |
|
|
<uni-tag :inverted="true" :text="item.typeStr" /> |
|
|
<!-- <uni-tag :inverted="true" :text="item.typeStr" :type="getStatusText(item.type)" /> --> |
|
|
<!-- <uni-tag :inverted="true" :text="item.typeStr" :type="getStatusText(item.type)" /> --> |
|
|
</view> |
|
|
</view> |
|
@ -65,19 +65,19 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 加载状态 --> |
|
|
<!-- 加载状态 --> |
|
|
<view v-if="isLoading && recordList.length > 0" class="loading-more"> |
|
|
<!-- <view v-if="isLoading && recordList.length > 0" class="loading-more"> |
|
|
<text>{{this.$languageData.settings.loading}}</text> |
|
|
<text>{{this.$languageData.settings.loading}}</text> |
|
|
</view> |
|
|
</view> --> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
<loading ref="loading" :custom="false" :shadeClick="false" :type="1" /> |
|
|
<!-- <loading ref="loading" :custom="false" :shadeClick="false" :type="1" /> --> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getRecordList |
|
|
getTransRecord |
|
|
} from '@/api/account/transactionRecord.js' |
|
|
} from '@/api/account/transactionRecord.js' |
|
|
import { |
|
|
import { |
|
|
getCurrentDate |
|
|
getCurrentDate |
|
@ -87,14 +87,7 @@ |
|
|
return { |
|
|
return { |
|
|
searchText: '', |
|
|
searchText: '', |
|
|
selectedDate: '', |
|
|
selectedDate: '', |
|
|
recordList: [{ |
|
|
recordList: [], |
|
|
remark: 'salary', |
|
|
|
|
|
changeBalance: 4106.32, |
|
|
|
|
|
time: "2025/05/01", |
|
|
|
|
|
typeStr: this.$languageData.settings.reci |
|
|
|
|
|
}, |
|
|
|
|
|
{remark: 'McDonald\'s', changeBalance: -106.32, time: "2025/05/11", typeStr: this.$languageData.settings.pay}, |
|
|
|
|
|
], |
|
|
|
|
|
isLoading: false, |
|
|
isLoading: false, |
|
|
isRefreshing: false, |
|
|
isRefreshing: false, |
|
|
page: 1, |
|
|
page: 1, |
|
@ -106,7 +99,7 @@ |
|
|
phonenumber: '', |
|
|
phonenumber: '', |
|
|
key: '', |
|
|
key: '', |
|
|
key2: getCurrentDate(), //获取当前年月, |
|
|
key2: getCurrentDate(), //获取当前年月, |
|
|
type: "1" |
|
|
type: "" |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -126,7 +119,6 @@ |
|
|
console.error("解析 JSON 失败:", error); |
|
|
console.error("解析 JSON 失败:", error); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.selectRecordList(); |
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
downloadEmptyFile() { |
|
|
downloadEmptyFile() { |
|
@ -162,19 +154,29 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
selectRecordList() { |
|
|
selectRecordList() { |
|
|
if (false) { |
|
|
getTransRecord(this.params).then(res => { |
|
|
this.$nextTick(() => { |
|
|
this.recordList = res.data; |
|
|
this.$refs.loading.open(); |
|
|
this.recordList.forEach(item => { |
|
|
|
|
|
item.billCode = item.billCode.split("@")[0]; |
|
|
|
|
|
if (item.billCode == "BTR") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.transferAccounts; //转账 |
|
|
|
|
|
} else if (item.billCode == "BPY") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.proxyPayment; //代缴 |
|
|
|
|
|
} else if (item.billCode == "BPT") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.payment; //付款 |
|
|
|
|
|
} else if (item.billCode == "BRT") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.receivePayment; //收款 |
|
|
|
|
|
} else if (item.billCode == "BWL") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.withdrawal; //提现 |
|
|
|
|
|
} else if (item.billCode == "BRE") { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.recharge; //充值 |
|
|
|
|
|
} else { |
|
|
|
|
|
item.billCode = this.$languageData.tmp.other; //其他 |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
getRecordList(this.params).then(res => { |
|
|
|
|
|
this.recordList = res.rows |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.$refs.loading.close(); |
|
|
|
|
|
}, 700) |
|
|
|
|
|
}).catch(e => { |
|
|
}).catch(e => { |
|
|
this.$refs.loading.close(); |
|
|
//this.$refs.loading.close(); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
mockrecordList() { |
|
|
mockrecordList() { |
|
|
const statuses = ['success', 'pending', 'failed'] |
|
|
const statuses = ['success', 'pending', 'failed'] |
|
@ -244,6 +246,7 @@ |
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title: this.$languageData.navBar.transactionRecord |
|
|
title: this.$languageData.navBar.transactionRecord |
|
|
}); |
|
|
}); |
|
|
|
|
|
this.selectRecordList(); |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
languageData() { |
|
|
languageData() { |
|
|