|
|
@@ -4,26 +4,70 @@
|
|
|
<view class="top-bar">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
</view>
|
|
|
-
|
|
|
<view class="main-view">
|
|
|
<view class="space-view ex-table">
|
|
|
<block>
|
|
|
<t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
- <t-tr header><t-th>收款方式</t-th><t-th>收入金额</t-th><t-th>退款金额</t-th></t-tr>
|
|
|
-
|
|
|
+ <t-tr header><t-th><view style="width:260upx;">渠道</view></t-th><t-th>笔数</t-th><t-th>金额</t-th><t-th>操作</t-th></t-tr>
|
|
|
<view v-for="(item, index) in profile" :key="index">
|
|
|
<t-tr>
|
|
|
- <t-td><view>{{item.name}}</view></t-td>
|
|
|
- <t-td><view>{{item.kd}}</view></t-td>
|
|
|
- <t-td><view>{{item.refund}}</view></t-td>
|
|
|
+ <t-td><view style="width:260upx;color:black;font-size:30upx;">{{item.name}}</view></t-td>
|
|
|
+ <t-td><view style="color:black;font-size:30upx;">{{item.num}}</view></t-td>
|
|
|
+ <t-td><view style="color:black;font-size:30upx;">{{item.amount?parseFloat(item.amount):0}}</view></t-td>
|
|
|
+ <t-td>
|
|
|
+ <view>
|
|
|
+ <button class="admin-button-com middel blue" @click="getDetail(item)">明细</button>
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
</t-tr>
|
|
|
</view>
|
|
|
|
|
|
+ <t-tr>
|
|
|
+ <t-td align="center">
|
|
|
+ <view style="font-weight:bold;color:black;font-size:32upx;">
|
|
|
+ 合计 ¥{{totalIncome}}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ </t-tr>
|
|
|
+
|
|
|
</t-table>
|
|
|
</block>
|
|
|
</view>
|
|
|
- <view class="act-income">扣除退款后收入:¥{{income}}</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <modal-module :show="showDetailPop" @click="confirmDetail" :maskClosable="true" title="明细" padding="30rpx 30rpx" >
|
|
|
+ <template slot="customContent">
|
|
|
+ <view style="font-size:30upx;margin-bottom:30upx;margin-top:20upx;">
|
|
|
+
|
|
|
+ <block v-if="detailItem.class && !$util.isEmpty(detailItem.class)">
|
|
|
+ <t-table>
|
|
|
+ <block v-for="(it, idx) in detailItem.class" :key="idx">
|
|
|
+ <t-tr>
|
|
|
+ <t-td align="center">{{it.name}}</t-td>
|
|
|
+ <t-td align="center">{{it.num}}笔</t-td>
|
|
|
+ <t-td align="center">¥{{it.amount?parseFloat(it.amount):0}}</t-td>
|
|
|
+ </t-tr>
|
|
|
+ </block>
|
|
|
+ </t-table>
|
|
|
+ <view style="height:30upx;"> </view>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <block v-if="detailItem.category && !$util.isEmpty(detailItem.category)">
|
|
|
+ <t-table>
|
|
|
+ <block v-for="(item, index) in detailItem.category" :key="index">
|
|
|
+ <t-tr>
|
|
|
+ <t-td align="center">{{item.name}}</t-td>
|
|
|
+ <t-td align="center">{{item.num}}笔</t-td>
|
|
|
+ <t-td align="center">¥{{item.amount?parseFloat(item.amount):0}}</t-td>
|
|
|
+ </t-tr>
|
|
|
+ </block>
|
|
|
+ </t-table>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -35,8 +79,9 @@ import { list } from "@/mixins";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
import {mapActions, mapGetters} from "vuex";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
export default {
|
|
|
- components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
|
|
|
+ components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,ModalModule},
|
|
|
mixins: [list],
|
|
|
computed: { ...mapGetters(["getDictionariesInfo","getLoginInfo"]) },
|
|
|
data() {
|
|
|
@@ -51,26 +96,6 @@ export default {
|
|
|
showTimeDropdown: false,
|
|
|
nowShop: "",
|
|
|
showShopDropdown: false,
|
|
|
- columns: [
|
|
|
- {
|
|
|
- name: "姓名",
|
|
|
- dataIndex: "name",
|
|
|
- color: "info"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "开单额",
|
|
|
- dataIndex: "amount",
|
|
|
- color: "info",
|
|
|
- width: 120,
|
|
|
- align: "center"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "开单数",
|
|
|
- dataIndex: "num",
|
|
|
- color: "info",
|
|
|
- align: "center"
|
|
|
- }
|
|
|
- ],
|
|
|
dataList: [],
|
|
|
params:{
|
|
|
itemId: '',
|
|
|
@@ -78,14 +103,17 @@ export default {
|
|
|
startTime: "",
|
|
|
endTime: "",
|
|
|
shopId: "",
|
|
|
+ contain:0
|
|
|
},
|
|
|
profile:[],
|
|
|
- income:0
|
|
|
+ totalIncome:0,
|
|
|
+ showDetailPop:false,
|
|
|
+ detailItem:[]
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.resetList();
|
|
|
- this._list().then(res => {
|
|
|
+ this.getIncomeList().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
});
|
|
|
},
|
|
|
@@ -96,26 +124,38 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
- //选择分店
|
|
|
+ confirmDetail(val){
|
|
|
+ if (val.index === 0) {
|
|
|
+ this.cancelShowDetail();
|
|
|
+ } else {
|
|
|
+ this.cancelShowDetail();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancelShowDetail(){
|
|
|
+ this.showDetailPop = false
|
|
|
+ },
|
|
|
selectShopFn(val){
|
|
|
this.params.shopId = val.id;
|
|
|
this.init();
|
|
|
},
|
|
|
- //选择时间
|
|
|
+ getDetail(item){
|
|
|
+ this.detailItem = item
|
|
|
+ this.showDetailPop = true
|
|
|
+ },
|
|
|
selectDateFn(val) {
|
|
|
this.params = {...this.params,...val}
|
|
|
this.init();
|
|
|
},
|
|
|
async init() {
|
|
|
- this._list();
|
|
|
+ this.getIncomeList();
|
|
|
},
|
|
|
- _list() {
|
|
|
+ getIncomeList() {
|
|
|
let that = this
|
|
|
uni.showLoading()
|
|
|
getStatKdProfile(this.params).then(res => {
|
|
|
uni.hideLoading()
|
|
|
that.profile = res.data.list
|
|
|
- that.income = res.data.income
|
|
|
+ that.totalIncome = res.data.totalIncome
|
|
|
});
|
|
|
}
|
|
|
}
|