修改本地生活商家账单页面
This commit is contained in:
parent
5c2161d2fa
commit
0fbcbd5b2c
@ -91,3 +91,12 @@ export function modifyCart(data) {
|
||||
export function clearCart(data) {
|
||||
return request.post("LocalStoreGoods/clearCart", data)
|
||||
}
|
||||
|
||||
export function countData(data) {
|
||||
return request.post("LocalStore/countData", data)
|
||||
}
|
||||
|
||||
export function huifu(data) {
|
||||
return request.post("huifu/payTest", data)
|
||||
}
|
||||
|
||||
|
||||
@ -3,19 +3,20 @@
|
||||
<view class="block">
|
||||
<u-section title="东龙汇生活超市" :right="false" class="m-b-20"></u-section>
|
||||
<view class="u-text-center m-t-20">
|
||||
<price-format weight="bold" :first-size="66" :subscript-size="46" :second-size="36" :price="100"
|
||||
<view class="text-center">总金额(元)</view>
|
||||
<price-format weight="bold" :first-size="66" :subscript-size="46" :second-size="36" :price="info.history_total_amount"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
<view class="container">
|
||||
<view class="item">
|
||||
<view class="label">本月业绩(元)</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="100"
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="info.current_month_total_amount"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
<view class="divider"></view>
|
||||
<view class="item">
|
||||
<view class="label">上月业绩(元)</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="100"
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="info.last_month_total_amount"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
</view>
|
||||
@ -26,7 +27,7 @@
|
||||
<view class="header">
|
||||
<view class="button-group">
|
||||
<button :class="'btn ' + ( report == 1 ? 'active' : '' )" @click="changeReport(1)">日报</button>
|
||||
<button :class="'btn ' + ( report == 2 ? 'active' : '' )" @click="changeReport(2)">月报</button>
|
||||
<button :class="'btn ' + ( report == 2 ? 'active' : '' )" @click="changeReport(2)">月报(当月)</button>
|
||||
</view>
|
||||
<view class="date-display" @click="showDate = true">
|
||||
<text class="m-r-10">{{day}}</text>
|
||||
@ -35,29 +36,29 @@
|
||||
</view>
|
||||
|
||||
<view class="center">
|
||||
<view class="text-center">日营业额(元)</view>
|
||||
<view class="text-center">营业额(元)</view>
|
||||
<view class="u-text-center m-t-20">
|
||||
<price-format weight="bold" :first-size="66" :subscript-size="46" :second-size="36" :price="100"
|
||||
<price-format weight="bold" :first-size="66" :subscript-size="46" :second-size="36" :price="info.current_day_total_amount"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="sale-info">
|
||||
<view class="item">
|
||||
<view class="label">交易笔数(笔)</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="100"
|
||||
<view class="label">共交易笔数</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="info.count_trade"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
<view class="divider"></view>
|
||||
<view class="item">
|
||||
<view class="label">顾客数(人)</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="100"
|
||||
<view class="label">成功交易笔数</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="info.success_trade"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
<view class="divider"></view>
|
||||
<view class="item">
|
||||
<view class="label">单笔均价(元)</view>
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="100"
|
||||
<price-format weight="bold" :first-size="36" :subscript-size="36" :second-size="36" :price="info.average_price"
|
||||
:color="colorConfig.primary" />
|
||||
</view>
|
||||
</view>
|
||||
@ -65,7 +66,12 @@
|
||||
</view>
|
||||
|
||||
<view class="block m-t-20">
|
||||
<u-cell-group title="营业汇总明细" :border="false">
<u-cell-item icon="order" title="订单金额" value="¥100"></u-cell-item>
<u-cell-item icon="gift" title="充值金额" value="¥100" :border-bottom="false"></u-cell-item>
</u-cell-group>
</view>
|
||||
<u-cell-group title="营业汇总明细" :border="false">
|
||||
{{lstore_id}}
|
||||
<router-link :to="{path: '/bundle_b/pages/local_shop/local_bill_order', query: {lstore_id}}">
|
||||
<u-cell-item icon="order" title="订单列表" :border-bottom="false" @click="toOrder" hover-class="none"></u-cell-item>
|
||||
</router-link>
|
||||
</u-cell-group>
</view>
|
||||
|
||||
<u-calendar v-model="showDate" mode="range" range-bg-color="#ff2c3c80" active-color="#fff" active-bg-color="#FF2C3C" range-color="#fff" @change="filterDate" btn-type="default"></u-calendar>
|
||||
</view>
|
||||
@ -73,15 +79,17 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getLocalOrderList
|
||||
} from '@/api/order';
|
||||
countData
|
||||
} from '@/api/local_store';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
lstore_id: 0,
|
||||
showDate: false,
|
||||
day: '',
|
||||
report: 1
|
||||
report: 1,
|
||||
info: [],
|
||||
filterDay: []
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@ -90,12 +98,28 @@
|
||||
}
|
||||
|
||||
const date = new Date().getTime()
|
||||
this.day = this.$u.date(date, 'yyyy-mm-dd')
|
||||
this.day = this.$u.date(date, 'yyyy-mm-d')
|
||||
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const {code, data} = await countData({
|
||||
lstore_id: this.lstore_id,
|
||||
report: this.report,
|
||||
filter_day: this.filterDay
|
||||
})
|
||||
|
||||
if (code == 1) {
|
||||
this.info = data
|
||||
}
|
||||
},
|
||||
|
||||
// 切换日报/月报
|
||||
changeReport(type) {
|
||||
this.report = type
|
||||
this.filterDay = []
|
||||
this.getData()
|
||||
},
|
||||
|
||||
// 获取日期
|
||||
@ -105,8 +129,17 @@
|
||||
startDate: e.startDate,
|
||||
endDate: e.endDate
|
||||
}
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
|
||||
toOrder() {
|
||||
this.$Router.push({
|
||||
path: '/bundle_b/pages/local_shop/local_bill_order',
|
||||
query: {
|
||||
lstore_id: this.lstore_id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -174,7 +174,8 @@
|
||||
localBalance
|
||||
} from '@/api/user.js'
|
||||
import {
|
||||
payTest
|
||||
payTest,
|
||||
huifu
|
||||
} from '@/api/local_store.js'
|
||||
import {
|
||||
getLocalShopById
|
||||
|
||||
@ -1221,6 +1221,15 @@
|
||||
"auth": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/local_shop/local_bill_order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家账单列表"
|
||||
},
|
||||
"meta": {
|
||||
"auth": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/subsidy_withdrawal/index",
|
||||
"style": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user