diff --git a/package-lock.json b/package-lock.json index 725477a..0a578d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7456,6 +7456,11 @@ "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": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz", diff --git a/src/main.js b/src/main.js index fe9055a..c0cb08a 100644 --- a/src/main.js +++ b/src/main.js @@ -28,7 +28,7 @@ Vue.config.devtools = process.env.NODE_ENV === 'development'; Vue.config.productionTip = process.env.NODE_ENV === 'production'; 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(NumberKeyboard); Vue.use(Form); @@ -36,6 +36,7 @@ Vue.use(Field); Vue.use(DatetimePicker); Vue.use(Icon); Vue.use(List); +Vue.use(Toast); // 注册过滤器 Object.keys(filters).forEach((key) => { diff --git a/src/routers/index.js b/src/routers/index.js index f7340ac..7023c88 100644 --- a/src/routers/index.js +++ b/src/routers/index.js @@ -25,8 +25,9 @@ const Login = () => import(/* webpackChunkName: "login" */ '@/views/login'); const Home = () => import(/* webpackChunkName: "home" */ '@/views/home'); const Person = () => import(/* webpackChunkName: "person" */ '@/views/person'); 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 Account = () => import(/* webpackChunkName: "Account" */ '@/views/person/account.vue'); Vue.use(Router); @@ -68,6 +69,15 @@ const routes = [ title: '我的' } }, + { + path: '/account', + name: 'account', + component: Account, + meta: { + isShowNav: false, + title: '收款账户管理' + } + }, { path: '/myTicket', name: 'myTicket', diff --git a/src/services/apiUrl.js b/src/services/apiUrl.js index 34f8ff3..1fe2eb9 100644 --- a/src/services/apiUrl.js +++ b/src/services/apiUrl.js @@ -19,6 +19,16 @@ export const apiUrl = { wxMerchantcouponSend: "/api/couponSend/list", // 商户注券记录 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', diff --git a/src/stores/index.js b/src/stores/index.js index b530970..c2a9c63 100644 --- a/src/stores/index.js +++ b/src/stores/index.js @@ -11,7 +11,7 @@ Vue.use(Vuex) export default new Vuex.Store({ state: { - token: '', + token: '914e314e-81cb-4064-93f8-79b9ac5cc7d1', merchant_id:'', merchant_id_scan:'', diff --git a/src/styles/variables.less b/src/styles/variables.less index e4023da..a6055ca 100644 --- a/src/styles/variables.less +++ b/src/styles/variables.less @@ -24,6 +24,7 @@ @fontSize12: .33rem; @fontSize14: .38rem; +@fontSize15: .41rem; @fontSize16: .43rem; @fontSize18: .48rem; @fontSize20: .53rem; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 2c42635..dcd712e 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -8,14 +8,12 @@

富茂服务商

-
-
-
-
- -
- {{item.text}} -
+ + @@ -68,6 +66,7 @@ import Vue from "vue"; import {mapMutations} from 'vuex' import { Toast } from "vant"; +import {formatDate} from '@/filters' // 组件 export default { name: 'page-index', @@ -79,34 +78,42 @@ export default { showJiaoyi: true, showHexiao: true, showShouyin: true, + djMoney: '', + djArr: [], + djMoney: '', classIfyList: [ { text: "会员核销", - icon: "iconfont icon-hexiao", + icon: "coupon-o", + color: 'orange', id: 0, path:"/memberCancel" }, { text: "消费卡收款", - icon: "iconfont icon-shouye1", + icon: "gold-coin-o", + color: '#FF9797', id: 1, path:"/memberGathering" }, { text: "会员积分", - icon: "iconfont icon-jifen", + icon: "balance-o", + color: '#52CD00', id: 4, path:"/memberIntegral" }, { text: "会员赠券", - icon: "iconfont icon-quan", + icon: "gift-o", + color: '#FF5683', id: 5, path:"/memberTicket" }, { text: "营销结算", - icon: "iconfont icon-jiesuan", + icon: "notes-o", + color: '#6580FF', id: 6, path:"/marketingClose" }, @@ -118,12 +125,41 @@ export default { this.getTabletListOrder(); this.getTabletListVerify(); this.getMicroPayAmountOnDate(); + + this.getUnverifiedAmountOnDate(); }, methods: { ...mapMutations(['setMerchantId','setMerchantIdScan']), toWriteoff(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){ this.setMerchantId(data.merchant_id) this.setMerchantIdScan(data.merchant_id_scan) + + this.listBillOweAndWaitPay(data); + }else{ Toast(message); } }).catch(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; width: 9.5rem; margin: 0 auto; - display: flex; - flex-wrap: wrap; } .category{ @@ -536,4 +594,30 @@ export default { 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; + } + + } +} + diff --git a/src/views/navigation/memberCancel.vue b/src/views/navigation/memberCancel.vue index 9c936f5..f68b6fd 100644 --- a/src/views/navigation/memberCancel.vue +++ b/src/views/navigation/memberCancel.vue @@ -1,6 +1,10 @@ @@ -22,10 +26,36 @@ export default { methods: { goDetails(){ this.$router.push('/details') - } + }, + goBack() { + this.$router.go(-1) + }, }, mounted() { }, } - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/person/account.vue b/src/views/person/account.vue new file mode 100644 index 0000000..d9b70f3 --- /dev/null +++ b/src/views/person/account.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/src/views/person/index.vue b/src/views/person/index.vue index 1a13e54..30ea756 100644 --- a/src/views/person/index.vue +++ b/src/views/person/index.vue @@ -68,7 +68,7 @@ export default { name: '', merchant_id: '' }, - routerUrl: ['/accountManage','/myTicket','/mermberList','/pointRecord'] + routerUrl: ['/account','/myTicket','/mermberList','/pointRecord'] }; }, mounted() { @@ -107,7 +107,7 @@ export default { this.userInfo.phone = res.data.phone this.userInfo.service_phone = res.data.service_phone this.userInfo.name = res.data.name - this.userInfo.name = res.data.merchant_id + this.userInfo.merchant_id = res.data.merchant_id } })