123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>详情-我的商户-爽客邦</title>
- <meta name="keywords" content="详情-我的商户-爽客邦">
- <meta name="description" content="详情-我的商户-爽客邦">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="详情-我的商户-爽客邦">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgcfff">
- <div class="merchant_current" id="app">
- <van-sticky>
- <van-nav-bar class="camp_title user_title_normal f16" title="商户信息" @click-left="goback" v-if="toptitleisshow" left-arrow v-cloak>
- <template #left>
- <van-icon name="arrow-left" color="#fff" size="20"></van-icon>
- </template>
- </van-nav-bar>
- </van-sticky>
- <div class="merchant-header merchant-header-back"></div>
- <div class="merchant-info ml16 mr16 bgcfff" v-cloak>
- <div class="pt16 pb16 pl16 pr16">
- <van-cell :title="merchant.MerchantName" center :border="false">
- <template #label><span class="mr16">{{merchant.MerRealName}}</span><span>{{merchant.MerchantMobile}}</span></template>
- <template #icon>
- <van-image src="./static/images/merchant-header.png" fit="cover" lazy-load>
- <template v-slot:loading><img src="./static/images/logo-gray.png" alt=""></template>
- </van-image>
- </template>
- <template #right-icon>
- <div class="merchant-phone" @click="takephone"><img src="./static/images/icon-phone.png" alt="" width="100%"></div>
- </template>
- </van-cell>
- <div class="merchant-info-content mt16" v-cloak>
- <div class="merchant-info-desc ovh" :class="active ? '' : 'merchant-info-close'">
- <van-cell-group class="pb8" :border="false">
- <van-cell title="商户姓名" :value="merchant.MerRealName" :border="false"></van-cell>
- <van-cell title="商户名称" :value="merchant.MerchantName" :border="false"></van-cell>
- <van-cell class="mb6" title="商户类型" :value="merchant.MerUserType" :border="false"></van-cell>
- <van-cell title="来源产品" :value="merchant.ProductType" :border="false"></van-cell>
- <van-cell title="参与状态" :value="merchant.ActiveStatus" :border="false"></van-cell>
- <van-cell title="参与时间" :value="merchant.MerStandardDate" :border="false"></van-cell>
- <van-cell title="注册时间" :value="merchant.CreateDate" :border="false"></van-cell>
- <van-cell class="mb6" title="SN号" :value="merchant.KqSnNo" :border="false"></van-cell>
- <van-cell title="商户说明" :value="merchant.Remark" :border="false"></van-cell>
- <van-cell title="活动状态" :value="merchant.ActStatus" :border="false"></van-cell>
- </van-cell-group>
- </div>
- <div class="merchant-info-content-title tc pt16 van-hairline--top" @click="toggleMerchantInfo()"><img class="vm pl6 pr6" src="./static/images/icon-arrow-down@3x.png" alt="" :class="active ? 'toUp' : ''"><span class="f12 c999 vm">{{active ? '收起' : '商户详情'}}</span></div>
- </div>
- </div>
- </div>
- <div class="merchant-info-statistics mt16">
- <div class="ml16 mr16 pt8 pb8 bgcfff">
- <van-cell class="merchant-info-statistics-cell mt8 mb20" title="总交易额" :value="merchant.TradeTotal" center :border="false"></van-cell>
- </div>
- <van-sticky>
- <van-tabs v-model="merchantactive">
- <van-tab title="交易记录"></van-tab>
- <van-tab disabled></van-tab>
- <van-tab disabled></van-tab>
- </van-tabs>
- </van-sticky>
- <div class="ml16 mr16 pt8 pb8 bgcfff">
- <van-cell class="merchant-info-cell mt8" value="32440.00元" center :border="false">
- <template #title><span class="f12 c999" @click="onShowDate">{{dateName}} ></span></template>
- </van-cell>
- <div class="mt8 merchant_detail_list">
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :class="transactions.length === 0 ? 'isnodata':''">
- <van-list v-model="loading" :finished="finished" finished-text="没有更多数据了" @load="onLoad" :immediate-check="false">
- <van-empty class="custom-image" image="./static/images/empty-img.png" description="暂无数据" v-if="isnodata"></van-empty>
- <van-cell-group :border="false">
- <van-cell v-for="item,index in transactions" center :title="item.TradeDate" :value="item.TradeAmt + '元'"></van-cell>
- </van-cell-group>
- </van-list>
- </van-pull-refresh>
- </div>
- </div>
- </div>
- <van-popup v-model="showDate" position="bottom" :style="{ height: '50%' }">
- <van-datetime-picker v-model="currentDate" type="year-month" title="选择年月" :min-date="minDate" :max-date="maxDate" :formatter="formatter" @confirm="onConfirmDate"></van-datetime-picker>
- </van-popup>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- isnodata:false,
- toptitleisshow:false,
- active: false,
- merchantactive:0,
- merchant:{
- },
- realMerchantMobile:'',
- showDate: false,
- minDate: new Date(2020, 0, 1),
- maxDate: new Date(2025, 10, 1),
- currentDate: new Date(),
- formatime:'',
- dateName: '本月',
- transactions: [
- ],
- pageinfo:{
- PageSize:10,
- PageNum:1
- },
- loading: false,
- finished: false,
- refreshing: false,
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.formatime = formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1);
- this.getmerchantinfo();
- this.getmerchantdetail();
- },
- methods: {
- toggleMerchantInfo(){
- this.active = !this.active;
- },
- onShowDate(){
- console.log(this.showDate);
- this.showDate = !this.showDate;
- },
- formatter(type, val) {
- if (type === 'year') {
- return `${val}年`;
- } else if (type === 'month') {
- return `${val}月`;
- }
- return val;
- },
- onConfirmDate() {
- this.transactions = [];
- this.showDate = false;
- this.dateName = this.currentDate.getFullYear() + '年' + (this.currentDate.getMonth() + 1) + '月';
- this.formatime = formatDate(this.currentDate.getFullYear(),this.currentDate.getMonth() + 1);
- this.getmerchantdetail();
- },
- onLoad() {
- if (this.refreshing) {
- this.transactions = [];
- this.refreshing = false;
- this.pageinfo.PageNum = 0;
- }
- this.pageinfo.PageNum++;
- this.getmerchantdetail();
- },
- onRefresh() {
- // 清空列表数据
- this.finished = false;
-
- // 重新加载数据
- // 将 loading 设置为 true,表示处于加载状态
- this.loading = true;
- this.onLoad();
- },
- async getmerchantinfo(){
- PublicLib.ShowLoading({Message:''});
- const Id = PublicLib.getCookieInfo('merchantId');
- const res = await getRequest('/api/v1/merchantinfo/detail',JSON.stringify({Id}));
- if(res.status !== '1') return tips('获取商户信息失败,请重试!');
- PublicLib.HideLoading();
- this.merchant = res.data;
- this.realMerchantMobile = res.data.MerchantMobile;
- this.merchant.MerchantMobile = hidemiddlenum(res.data.MerchantMobile,3,4);
- },
- async getmerchantdetail(){
- const MerchantId = PublicLib.getCookieInfo('merchantId');
- const res = await getRequest('/api/v1/usertradedaysummary/merchanttradelist',JSON.stringify({...this.pageinfo,TradeMonth:this.formatime,MerchantId}));
- if(res.status !== '1') return tips('获取交易记录失败,请重试!');
- if(res.data.length < this.pageinfo.PageSize) {
- this.finished = true;
- };
- this.transactions.push(...res.data);
- this.loading = false;
- if(this.transactions.length === 0) {this.isnodata = true}else{this.isnodata = false};
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- takephone(){
- PublicLib.PhoneCall(this.realMerchantMobile);
- }
- }
- });
- </script>
- </body>
- </html>
|