@@ -7456,6 +7456,11 @@ | |||||
"minimist": "^1.2.5" | "minimist": "^1.2.5" | ||||
} | } | ||||
}, | }, | ||||
"moment": { | |||||
"version": "2.29.1", | |||||
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz?cache=0&sync_timestamp=1601983320283&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.29.1.tgz", | |||||
"integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=" | |||||
}, | |||||
"move-concurrently": { | "move-concurrently": { | ||||
"version": "1.0.1", | "version": "1.0.1", | ||||
"resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", | "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", | ||||
@@ -28,7 +28,7 @@ Vue.config.devtools = process.env.NODE_ENV === 'development'; | |||||
Vue.config.productionTip = process.env.NODE_ENV === 'production'; | Vue.config.productionTip = process.env.NODE_ENV === 'production'; | ||||
window.EventBus = new Vue(); | window.EventBus = new Vue(); | ||||
import { Button, NumberKeyboard, Form, Field, DatetimePicker, Icon, List,} from 'vant'; | |||||
import { Button, NumberKeyboard, Form, Field, DatetimePicker, Icon, List, Toast,} from 'vant'; | |||||
Vue.use(Button); | Vue.use(Button); | ||||
Vue.use(NumberKeyboard); | Vue.use(NumberKeyboard); | ||||
Vue.use(Form); | Vue.use(Form); | ||||
@@ -36,6 +36,7 @@ Vue.use(Field); | |||||
Vue.use(DatetimePicker); | Vue.use(DatetimePicker); | ||||
Vue.use(Icon); | Vue.use(Icon); | ||||
Vue.use(List); | Vue.use(List); | ||||
Vue.use(Toast); | |||||
// 注册过滤器 | // 注册过滤器 | ||||
Object.keys(filters).forEach((key) => { | Object.keys(filters).forEach((key) => { | ||||
@@ -25,8 +25,9 @@ const Login = () => import(/* webpackChunkName: "login" */ '@/views/login'); | |||||
const Home = () => import(/* webpackChunkName: "home" */ '@/views/home'); | const Home = () => import(/* webpackChunkName: "home" */ '@/views/home'); | ||||
const Person = () => import(/* webpackChunkName: "person" */ '@/views/person'); | const Person = () => import(/* webpackChunkName: "person" */ '@/views/person'); | ||||
const PointRecord = () => import(/* webpackChunkName: "PointRecord" */ '@/views/person/pointRecord.vue'); | const PointRecord = () => import(/* webpackChunkName: "PointRecord" */ '@/views/person/pointRecord.vue'); | ||||
const MyTicket = () => import(/* webpackChunkName: "PointRecord" */ '@/views/person/myTicket.vue'); | |||||
const MyTicket = () => import(/* webpackChunkName: "MyTicket" */ '@/views/person/myTicket.vue'); | |||||
const UserInfo = () => import(/* webpackChunkName: "UserInfo" */ '@/views/person/userInfo.vue'); | const UserInfo = () => import(/* webpackChunkName: "UserInfo" */ '@/views/person/userInfo.vue'); | ||||
const Account = () => import(/* webpackChunkName: "Account" */ '@/views/person/account.vue'); | |||||
Vue.use(Router); | Vue.use(Router); | ||||
@@ -68,6 +69,15 @@ const routes = [ | |||||
title: '我的' | title: '我的' | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
path: '/account', | |||||
name: 'account', | |||||
component: Account, | |||||
meta: { | |||||
isShowNav: false, | |||||
title: '收款账户管理' | |||||
} | |||||
}, | |||||
{ | { | ||||
path: '/myTicket', | path: '/myTicket', | ||||
name: 'myTicket', | name: 'myTicket', | ||||
@@ -19,6 +19,16 @@ export const apiUrl = { | |||||
wxMerchantcouponSend: "/api/couponSend/list", | wxMerchantcouponSend: "/api/couponSend/list", | ||||
// 商户注券记录 | // 商户注券记录 | ||||
wxMerchantcouponStory: "/api/couponSend/actionLog", | wxMerchantcouponStory: "/api/couponSend/actionLog", | ||||
//查询商户授权状态 | |||||
getOpenIdByPhone:"/api/merchant/getOpenIdByPhone", | |||||
//查询账户信息 | |||||
findAccountById:"/api/merchant/findAccountById", | |||||
//删除分账账户 | |||||
deleteByReceiverId: "/api/merchant/deleteByReceiverId", | |||||
//某日期交易总流水 | |||||
getUnverifiedAmountOnDate: '/api/couponOrder/getUnverifiedAmountOnDate', | |||||
//首页账单列表 | |||||
listBillOweAndWaitPay:"/api/bill/listBillOweAndWaitPay", | |||||
loginOut: '/api/loginOut', | loginOut: '/api/loginOut', | ||||
@@ -11,7 +11,7 @@ Vue.use(Vuex) | |||||
export default new Vuex.Store({ | export default new Vuex.Store({ | ||||
state: { | state: { | ||||
token: '', | |||||
token: '914e314e-81cb-4064-93f8-79b9ac5cc7d1', | |||||
merchant_id:'', | merchant_id:'', | ||||
merchant_id_scan:'', | merchant_id_scan:'', | ||||
@@ -24,6 +24,7 @@ | |||||
@fontSize12: .33rem; | @fontSize12: .33rem; | ||||
@fontSize14: .38rem; | @fontSize14: .38rem; | ||||
@fontSize15: .41rem; | |||||
@fontSize16: .43rem; | @fontSize16: .43rem; | ||||
@fontSize18: .48rem; | @fontSize18: .48rem; | ||||
@fontSize20: .53rem; | @fontSize20: .53rem; | ||||
@@ -8,14 +8,12 @@ | |||||
<p>富茂服务商</p> | <p>富茂服务商</p> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="writeOff "> | |||||
<div class="classification " > | |||||
<div v-for="(item,index) in classIfyList" :key="index" class="category" @click="toWriteoff(item.path)"> | |||||
<div hover-class="active" :style="`background:${item.bg}`" > | |||||
<i :class="item.icon"></i> | |||||
</div> | |||||
<span>{{item.text}}</span> | |||||
</div> | |||||
<div class="nav-list"> | |||||
<div class="nav-item" v-for="(item,index) in classIfyList" :key="index" @click="toWriteoff(item.path)"> | |||||
<!-- <img class="nav-bg" :src="item.bg"> --> | |||||
<van-icon size="1rem" :color="item.color" :name="item.icon" /> | |||||
<span class="nav-text">{{item.text}}</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<!-- --> | <!-- --> | ||||
@@ -68,6 +66,7 @@ | |||||
import Vue from "vue"; | import Vue from "vue"; | ||||
import {mapMutations} from 'vuex' | import {mapMutations} from 'vuex' | ||||
import { Toast } from "vant"; | import { Toast } from "vant"; | ||||
import {formatDate} from '@/filters' | |||||
// 组件 | // 组件 | ||||
export default { | export default { | ||||
name: 'page-index', | name: 'page-index', | ||||
@@ -79,34 +78,42 @@ export default { | |||||
showJiaoyi: true, | showJiaoyi: true, | ||||
showHexiao: true, | showHexiao: true, | ||||
showShouyin: true, | showShouyin: true, | ||||
djMoney: '', | |||||
djArr: [], | |||||
djMoney: '', | |||||
classIfyList: [ | classIfyList: [ | ||||
{ | { | ||||
text: "会员核销", | text: "会员核销", | ||||
icon: "iconfont icon-hexiao", | |||||
icon: "coupon-o", | |||||
color: 'orange', | |||||
id: 0, | id: 0, | ||||
path:"/memberCancel" | path:"/memberCancel" | ||||
}, | }, | ||||
{ | { | ||||
text: "消费卡收款", | text: "消费卡收款", | ||||
icon: "iconfont icon-shouye1", | |||||
icon: "gold-coin-o", | |||||
color: '#FF9797', | |||||
id: 1, | id: 1, | ||||
path:"/memberGathering" | path:"/memberGathering" | ||||
}, | }, | ||||
{ | { | ||||
text: "会员积分", | text: "会员积分", | ||||
icon: "iconfont icon-jifen", | |||||
icon: "balance-o", | |||||
color: '#52CD00', | |||||
id: 4, | id: 4, | ||||
path:"/memberIntegral" | path:"/memberIntegral" | ||||
}, | }, | ||||
{ | { | ||||
text: "会员赠券", | text: "会员赠券", | ||||
icon: "iconfont icon-quan", | |||||
icon: "gift-o", | |||||
color: '#FF5683', | |||||
id: 5, | id: 5, | ||||
path:"/memberTicket" | path:"/memberTicket" | ||||
}, | }, | ||||
{ | { | ||||
text: "营销结算", | text: "营销结算", | ||||
icon: "iconfont icon-jiesuan", | |||||
icon: "notes-o", | |||||
color: '#6580FF', | |||||
id: 6, | id: 6, | ||||
path:"/marketingClose" | path:"/marketingClose" | ||||
}, | }, | ||||
@@ -118,12 +125,41 @@ export default { | |||||
this.getTabletListOrder(); | this.getTabletListOrder(); | ||||
this.getTabletListVerify(); | this.getTabletListVerify(); | ||||
this.getMicroPayAmountOnDate(); | this.getMicroPayAmountOnDate(); | ||||
this.getUnverifiedAmountOnDate(); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
...mapMutations(['setMerchantId','setMerchantIdScan']), | ...mapMutations(['setMerchantId','setMerchantIdScan']), | ||||
toWriteoff(path){ | toWriteoff(path){ | ||||
this.$router.push(path) | this.$router.push(path) | ||||
}, | }, | ||||
listBillOweAndWaitPay(data) { | |||||
this.$http.listBillOweAndWaitPay({ | |||||
method: 'post', | |||||
data: { | |||||
merchantId: data.merchant_id, | |||||
tenantId: data.tenant_id, | |||||
} | |||||
}).then(res => { | |||||
res.data.map(file => { | |||||
if (file.starttime && file.endtime) { | |||||
file.end = file.starttime.substring(0, 7).replace(/-/g, ".") + "-" + file.endtime.substring(0, 7).replace(/-/g, "."); | |||||
} else { | |||||
file.end = ""; | |||||
file.endtime = "" | |||||
} | |||||
file.receiveDate = formatDate(new Date(file.receiveDate),'yyyy-MM-dd') | |||||
}) | |||||
this.billList = res.data, | |||||
this.djArr = res.data.filter(item => item.status == 2), | |||||
this.djMoney = this.djArr.map(item => parseInt(item.owe / 100)) | |||||
let money = 0 | |||||
this.djMoney.filter(function (item, index) { | |||||
money += item; | |||||
}) | |||||
this.djZmoney = this.changePeoNumber(money) | |||||
}) | |||||
}, | |||||
/** | /** | ||||
* 交易记录 | * 交易记录 | ||||
*/ | */ | ||||
@@ -399,14 +435,38 @@ export default { | |||||
if(code==200){ | if(code==200){ | ||||
this.setMerchantId(data.merchant_id) | this.setMerchantId(data.merchant_id) | ||||
this.setMerchantIdScan(data.merchant_id_scan) | this.setMerchantIdScan(data.merchant_id_scan) | ||||
this.listBillOweAndWaitPay(data); | |||||
}else{ | }else{ | ||||
Toast(message); | Toast(message); | ||||
} | } | ||||
}).catch(res=>{ | }).catch(res=>{ | ||||
Toast(res); | Toast(res); | ||||
}) | }) | ||||
}, | |||||
//货币单位转换 | |||||
changeNumber(num) { | |||||
var changeNum = 0; | |||||
if (num < 1000000) { | |||||
return num / 100; | |||||
} else if (num >= 1000000 && num < 10000000000) { | |||||
return (num / 1000000).toFixed(2) + '万' | |||||
} else if (num > 10000000000) { | |||||
return (num / 10000000000).toFixed(2) + '亿' | |||||
} | |||||
}, | |||||
changePeoNumber(num) { | |||||
var changeNum = 0; | |||||
if (num < 10000) { | |||||
return num; | |||||
} else if (num >= 10000 && num < 100000000) { | |||||
return (num / 10000).toFixed(2) + '万' | |||||
} else if (num > 100000000) { | |||||
return (num / 100000000).toFixed(2) + '亿' | |||||
} | |||||
} | } | ||||
} | |||||
}, | |||||
} | } | ||||
@@ -440,8 +500,6 @@ export default { | |||||
z-index: 1000; | z-index: 1000; | ||||
width: 9.5rem; | width: 9.5rem; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
display: flex; | |||||
flex-wrap: wrap; | |||||
} | } | ||||
.category{ | .category{ | ||||
@@ -536,4 +594,30 @@ export default { | |||||
margin-top: .2rem; | margin-top: .2rem; | ||||
} | } | ||||
.nav-list { | |||||
margin: .1rem .4rem .2rem; | |||||
overflow: hidden; | |||||
.nav-item { | |||||
float: left; | |||||
width: 24%; | |||||
height: 2.5rem; | |||||
background: #fff; | |||||
padding-top: .4rem; | |||||
margin: .05rem .05rem 0 0; | |||||
.nav-bg { | |||||
display: block; | |||||
margin: .3rem auto .5rem; | |||||
width: 1rem; | |||||
height: 1rem; | |||||
} | |||||
.nav-text { | |||||
display: block; | |||||
text-align: center; | |||||
margin-top: .2rem; | |||||
} | |||||
} | |||||
} | |||||
</style> | </style> |
@@ -1,6 +1,10 @@ | |||||
<template> | <template> | ||||
<div> | |||||
<member-public :data="rule"/> | |||||
<div class='page-home'> | |||||
<div class="back-box"> | |||||
<van-icon class="back-icon" @click="goBack" size=".6rem" name="arrow-left" color="#fff" /> | |||||
<span>会员核销</span> | |||||
</div> | |||||
<member-public style="margin-top:1.3rem;" :data="rule"/> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -22,10 +26,36 @@ export default { | |||||
methods: { | methods: { | ||||
goDetails(){ | goDetails(){ | ||||
this.$router.push('/details') | this.$router.push('/details') | ||||
} | |||||
}, | |||||
goBack() { | |||||
this.$router.go(-1) | |||||
}, | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
}, | }, | ||||
} | } | ||||
</script> | |||||
</script> | |||||
<style lang="less" scoped> | |||||
.page-home { | |||||
text-align: left; | |||||
.back-box { | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
z-index: 1000; | |||||
width: 100%; | |||||
height: 1.3rem; | |||||
line-height: 1.3rem; | |||||
background: #52A0FD; | |||||
color: #fff; | |||||
font-size: @fontSize16; | |||||
text-align: center; | |||||
.back-icon { | |||||
float: left; | |||||
margin: .4rem 0 0 .1rem; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,204 @@ | |||||
<template> | |||||
<div class='page-home'> | |||||
<div class="back-box"> | |||||
<van-icon class="back-icon" @click="goBack" size=".6rem" name="arrow-left" color="#fff" /> | |||||
<span>收款账户管理</span> | |||||
</div> | |||||
<div class="title-h1">商家收款账户</div> | |||||
<div class="item-box"> | |||||
<span class="item-left">账号类型</span> | |||||
<span class="item-right">{{accountData.receiverType == 0?'微信商户号':'个人微信号'}}</span> | |||||
</div> | |||||
<div class="item-box"> | |||||
<span class="item-left">{{accountData.receiverType == 0?'商户号':(accountData.receiverType == 1?'微信号':'openId')}}</span> | |||||
<span class="item-right" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{accountData.receiverAccount}}</span> | |||||
</div> | |||||
<div class="item-box"> | |||||
<span class="item-left">{{accountData.receiverType == 0?'商户名':'姓名'}}</span> | |||||
<span class="item-right">账号类型</span> | |||||
</div> | |||||
<div class="item-box" v-if="accountData.receiverType == 1||accountData.receiverType == 3"> | |||||
<span class="item-left">收款授权状态</span> | |||||
<span class="item-right" style="color:red;" v-if="haveAccount">已授权</span> | |||||
<span class="item-right" style="color:red;" v-if="!haveAccount">未授权(请打开本广场用户端小程序领取任意一张优惠券,然后刷新本页面点击保存完成授权)</span> | |||||
</div> | |||||
<div class="btn-delete" @click="deleteByReceiverId">删除账号</div> | |||||
<div class="btn-delete" @click="submitAccount" v-if="accountData.receiverType == 1">提交</div> | |||||
</div> | |||||
</template> | |||||
<script type="text/babel"> | |||||
import {formatDate} from '@/filters' | |||||
import { Toast } from 'vant'; | |||||
// 组件 | |||||
export default { | |||||
name: 'page-index', | |||||
components: { | |||||
}, | |||||
data() { | |||||
return { | |||||
accountData: { | |||||
receiverType: 0, | |||||
}, | |||||
haveAccount: false, | |||||
userInfo: null, | |||||
}; | |||||
}, | |||||
mounted() { | |||||
this.userInfo = JSON.parse(this.$route.query.userInfo) | |||||
this.getOpenIdByPhone() | |||||
this.findAccountById() | |||||
}, | |||||
methods: { | |||||
/** | |||||
* 查询商户C端授权状态 | |||||
*/ | |||||
getOpenIdByPhone() { | |||||
this.$http.getOpenIdByPhone({ | |||||
method: 'get', | |||||
params: { | |||||
phone: this.userInfo.phone | |||||
} | |||||
}).then(res => { | |||||
if (res.data != undefined) { | |||||
this.haveAccount = res.data | |||||
} | |||||
if (res.code==1993) { | |||||
this.haveAccount = false | |||||
} | |||||
}) | |||||
}, | |||||
findAccountById() { | |||||
this.$http.findAccountById({ | |||||
method: 'get', | |||||
params: { | |||||
id: this.userInfo.merchant_id | |||||
} | |||||
}).then(res => { | |||||
this.accountData = res.data | |||||
}) | |||||
}, | |||||
goBack() { | |||||
this.$router.go(-1) | |||||
}, | |||||
//删除账号得信息 | |||||
deleteByReceiverId() { | |||||
this.$http.deleteByReceiverId({ | |||||
method: 'get', | |||||
params: { | |||||
id: this.accountData.id | |||||
} | |||||
}).then(res => { | |||||
console.log(res) | |||||
if (res.code != 1993) { | |||||
this.goBack() | |||||
} else { | |||||
Toast(res.message); | |||||
console.log(333) | |||||
} | |||||
}) | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="less" rel="stylesheet/less" scoped> | |||||
.floatR { | |||||
float: right; | |||||
} | |||||
@font-face { | |||||
font-family: 'iconfont'; /* project id 1353693 */ | |||||
src: url('//at.alicdn.com/t/font_1353693_617eu8di04k.eot'); | |||||
src: url('//at.alicdn.com/t/font_1353693_617eu8di04k.eot?#iefix') format('embedded-opentype'), | |||||
url('//at.alicdn.com/t/font_1353693_617eu8di04k.woff2') format('woff2'), | |||||
url('//at.alicdn.com/t/font_1353693_617eu8di04k.woff') format('woff'), | |||||
url('//at.alicdn.com/t/font_1353693_617eu8di04k.ttf') format('truetype'), | |||||
url('//at.alicdn.com/t/font_1353693_617eu8di04k.svg#iconfont') format('svg'); | |||||
} | |||||
.page-home { | |||||
text-align: left; | |||||
.back-box { | |||||
position: absolute; | |||||
left: 0; | |||||
top: 0; | |||||
z-index: 1000; | |||||
width: 100%; | |||||
height: 1.3rem; | |||||
line-height: 1.3rem; | |||||
background: #52A0FD; | |||||
color: #fff; | |||||
font-size: @fontSize16; | |||||
text-align: center; | |||||
.back-icon { | |||||
float: left; | |||||
margin: .4rem 0 0 .1rem; | |||||
} | |||||
} | |||||
} | |||||
.header-wrap { | |||||
width: 100%; | |||||
height: 4rem; | |||||
position: relative; | |||||
top: -1rem; | |||||
.header-bg { | |||||
width: 100%; | |||||
height: 4rem; | |||||
} | |||||
} | |||||
.title-h1 { | |||||
height: 1.5rem; | |||||
line-height: 1.5rem; | |||||
color: #000; | |||||
font-size: @fontSize20; | |||||
margin-top: 1.5rem; | |||||
font-weight: 900; | |||||
padding: 0 .4rem; | |||||
} | |||||
.item-box { | |||||
width: 100%; | |||||
padding: 0 .4rem; | |||||
font-size: @fontSize15; | |||||
margin-bottom: .3rem; | |||||
overflow: hidden; | |||||
line-height: .6rem; | |||||
.item-left { | |||||
float: left; | |||||
width: 2.8rem; | |||||
} | |||||
.item-right { | |||||
float: left; | |||||
width: 6.2rem; | |||||
} | |||||
} | |||||
.btn-delete { | |||||
width: 4rem; | |||||
height: 1.2rem; | |||||
line-height: 1.2rem; | |||||
text-align: center; | |||||
border-radius: .1rem; | |||||
background: #52A0FD; | |||||
color: #fff; | |||||
font-size: @fontSize16; | |||||
margin: .5rem auto; | |||||
} | |||||
</style> |
@@ -68,7 +68,7 @@ export default { | |||||
name: '', | name: '', | ||||
merchant_id: '' | merchant_id: '' | ||||
}, | }, | ||||
routerUrl: ['/accountManage','/myTicket','/mermberList','/pointRecord'] | |||||
routerUrl: ['/account','/myTicket','/mermberList','/pointRecord'] | |||||
}; | }; | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
@@ -107,7 +107,7 @@ export default { | |||||
this.userInfo.phone = res.data.phone | this.userInfo.phone = res.data.phone | ||||
this.userInfo.service_phone = res.data.service_phone | this.userInfo.service_phone = res.data.service_phone | ||||
this.userInfo.name = res.data.name | this.userInfo.name = res.data.name | ||||
this.userInfo.name = res.data.merchant_id | |||||
this.userInfo.merchant_id = res.data.merchant_id | |||||
} | } | ||||
}) | }) | ||||