177 lines
4.8 KiB
Vue
177 lines
4.8 KiB
Vue
<template>
|
|
<tpx-page>
|
|
<tpx-layout>
|
|
<template v-slot:header>
|
|
|
|
</template>
|
|
|
|
<template v-slot:body>
|
|
<view class="pos-abt-all">
|
|
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
|
|
ref="listRef"
|
|
>
|
|
<view class="pgb-header">
|
|
<view class="com-jianju">
|
|
<!-- 关键字搜索框 -->
|
|
<tpx-search placeholder="请输入" v-model:value="searchParam.searchValue" @change="handleSearchParamChange()" ></tpx-search>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="pgb-cont">
|
|
<!-- 列表数据 -->
|
|
<!-- -->
|
|
<view>
|
|
<view v-for="(item) in dataList" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
|
|
@click="handleTODetail(item)"
|
|
>
|
|
<view>
|
|
<u-row justify="between">
|
|
<u-row @click="handleItemClick(item)">
|
|
<u-avatar size="100" shape="square"></u-avatar>
|
|
<view class="pl-10">
|
|
<u-text :text="'月结账号 TANO2500123'" size="30" :bold="true" lines="1"></u-text>
|
|
<u-text margin="10rpx 0 0 0" :text="'平湖华盛进出口有限公司'" size="28" color="#999"></u-text>
|
|
</view>
|
|
</u-row>
|
|
<u-row justify="end" align="top" custom-style="width: 100rpx;height:100rpx;"
|
|
@click="setClipboardData('xxxxxxx' + item.id)"
|
|
>
|
|
<u-icon name="file-text" size="38"></u-icon>
|
|
</u-row>
|
|
</u-row>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</tpx-scroll-view>
|
|
</view>
|
|
</template>
|
|
|
|
<template v-slot:footer>
|
|
<view class="blcok-white-noradius">
|
|
<u-button @click="handleEditItem()" type="primary" size="large" shape="circle"
|
|
custom-style="height:80rpx;font-size: 30rpx;"
|
|
>
|
|
<u-row>
|
|
<u-icon size="34" color="#fff" name="plus"></u-icon>
|
|
<text class="pl-10">添加月结卡</text>
|
|
<u-icon size="34" color="#fff" ></u-icon>
|
|
</u-row>
|
|
</u-button>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
|
|
<tpx-dialog title="申请月结卡绑定" v-model:show="bindModal.show" >
|
|
<tpx-layout>
|
|
<template v-slot:body>
|
|
<view class="pl-30 pr-30">
|
|
<u-row custom-style="margin-top: 20rpx;">
|
|
<tpx-input placeholder="输入月结卡号" v-model:value="bindModal.data.monthPayCode"></tpx-input>
|
|
<view class="ml-20">
|
|
<u-button @click="handleSendCode" type="primary"
|
|
custom-style="height:66rpx;font-size: 30rpx;">
|
|
申请绑定
|
|
</u-button>
|
|
</view>
|
|
</u-row>
|
|
<view v-if="bindModal.data._msg" class="mt-40">
|
|
<u-row justify="center">
|
|
<text class="font-28 clr-sub">{{ bindModal.data._msg }}</text>
|
|
</u-row>
|
|
</view>
|
|
<view v-if="bindModal.data._msg" class="mt-40">
|
|
<u-row justify="center">
|
|
<u-code-input v-model="bindModal.data.code" maxlength="4" space="20" fontSize="36" size="80"></u-code-input>
|
|
</u-row>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<template v-slot:footer>
|
|
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
|
|
<u-button @click="handleConfirmBind" :disabled="!bindModal.data._msg" type="primary" size="large" shape="circle"
|
|
custom-style="height:80rpx;font-size: 30rpx;">
|
|
确认
|
|
</u-button>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
</tpx-dialog>
|
|
</tpx-page>
|
|
</template>
|
|
|
|
<script>
|
|
import getCdnUrl from "@/common/getCdnUrl"
|
|
import * as apiService from "@/common/api"
|
|
|
|
export default {
|
|
props: {
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
searchParam: {
|
|
searchValue: '',
|
|
},
|
|
resData: { list: [] },
|
|
queryOption: {},
|
|
bindModal: {
|
|
show: false,
|
|
data: {}
|
|
}
|
|
}
|
|
},
|
|
onLoad(queryOption) {
|
|
this.queryOption = queryOption
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
},
|
|
methods: {
|
|
getListFun: apiService.getMonthpayAccountList,
|
|
initData(){
|
|
},
|
|
triggerListReload(){
|
|
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
|
|
},
|
|
handleEditItem(item={}) {
|
|
this.bindModal.show = true
|
|
this.bindModal.data = {}
|
|
},
|
|
|
|
async handleSendCode(){
|
|
let res = await apiService.sendBindMonthPayCode({ ...this.bindModal.data, _loading: true })
|
|
this.bindModal.data._msg = res.msg
|
|
},
|
|
async handleConfirmBind(){
|
|
let res = await apiService.verifyBindMonthPayCode({ ...this.bindModal.data, _loading: true })
|
|
this.showToast('绑定成功')
|
|
this.triggerListReload()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import '@/common/uni-nvue.scss';
|
|
page {
|
|
background-color: #F6F6F6;
|
|
height: 100% !important;
|
|
}
|
|
|
|
</style>
|
|
<style scoped lang="scss">
|
|
.pgb-header {
|
|
// padding-top: --status-bar-height;
|
|
padding-top: 30rpx;
|
|
padding-bottom: 30rpx;
|
|
background-color: #FFF;
|
|
position: relative;
|
|
}
|
|
.pgb-cont{
|
|
padding: 30rpx 30rpx 0 30rpx;
|
|
}
|
|
</style> |