账单开发,选品广场接口对接
This commit is contained in:
parent
f4181b6dfa
commit
0297de1f53
|
|
@ -681,5 +681,13 @@ export default {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
return res[1].data;
|
return res[1].data;
|
||||||
|
},
|
||||||
|
async addCustomerSelection(params = {}) {
|
||||||
|
let res = await uni.request({
|
||||||
|
url: '/customer/selection/app/add',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
return res[1].data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,11 @@
|
||||||
},
|
},
|
||||||
// searchGoods(e) {
|
// searchGoods(e) {
|
||||||
// uni.$emit(this.$globalFun.VERTICAL_NAV_SEARCH, e.detail.value);
|
// uni.$emit(this.$globalFun.VERTICAL_NAV_SEARCH, e.detail.value);
|
||||||
// }
|
// }
|
||||||
|
clearChosenItem() {
|
||||||
|
this.chosenCategoryIds = [];
|
||||||
|
uni.$emit(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chosenCategoryIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@
|
||||||
"path": "withdraw"
|
"path": "withdraw"
|
||||||
}, {
|
}, {
|
||||||
"path": "b-account-bind"
|
"path": "b-account-bind"
|
||||||
|
}, {
|
||||||
|
"path": "my-money-bag"
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
"root":"pages/publish/",
|
"root":"pages/publish/",
|
||||||
|
|
|
||||||
|
|
@ -5,40 +5,27 @@
|
||||||
<block slot="backText">返回</block>
|
<block slot="backText">返回</block>
|
||||||
<block slot="content">我的钱包</block>
|
<block slot="content">我的钱包</block>
|
||||||
</cu-custom>
|
</cu-custom>
|
||||||
<view class="margin-sm shadow-warp">
|
|
||||||
<view class="padding-tb-lg padding-lr bg-gradual-color light">
|
|
||||||
<view>账户余额(元)</view>
|
|
||||||
<view class="flex justify-between margin-top-sm">
|
|
||||||
<!-- <view class="text-xxl">{{myMoneyBag.balance}}</view> -->
|
|
||||||
<view class="text-xxl">--</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="bindBankCard && bindBankCard.bankNum" class="flex justify-end margin-top-sm align-center">
|
|
||||||
<view class="margin-lr-sm text-lg">{{bindBankCard.encodeBankNum}}</view>
|
|
||||||
<view class="cu-btn bg-white radius" @click="bindBankAccount">账户另绑</view>
|
|
||||||
</view>
|
|
||||||
<view v-else class="flex justify-end margin-top-sm align-center">
|
|
||||||
<view class="cu-btn bg-white radius" @click="bindBankAccount">账户绑定</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
|
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
|
||||||
<uni-collapse-item>
|
<uni-collapse-item>
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<view class="padding bg-white" :data-index="index" @click="showStatement">
|
<view class="padding bg-white" :data-index="index" @click="showStatement">
|
||||||
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
|
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="margin-right"><text>支出:</text><text class="text-price text-black">{{billItem.payCount}}</text></text>
|
|
||||||
<text><text>收入:</text><text class="text-price text-black">{{billItem.incomeCount}}</text></text>
|
<text><text>收入:</text><text class="text-price text-black">{{billItem.incomeCount}}</text></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view>
|
<view>
|
||||||
<view v-for="(item, index1) in billItem.statement" class="bg-white padding flex justify-between align-center" @click="showDetail(bill[index].statement[index1])">
|
<view v-for="(item, index1) in billItem.statement"
|
||||||
|
class="bg-white padding flex justify-between align-center solid-bottom" @click="showDetail(bill[index].statement[index1])">
|
||||||
<view>
|
<view>
|
||||||
<view class="margin-bottom-xs" v-if="item.financialDetailType == 1">师傅转派</view>
|
<view class="flex">
|
||||||
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 2">多级分销</view>
|
<view class="margin-right-sm">提现单号:{{item.code}}</view>
|
||||||
<view class="margin-bottom-xs" v-else-if="item.financialDetailType == 3">平台抽成</view>
|
<view class="text-gray">
|
||||||
<view>{{item.createTime}}</view>
|
<view class="margin-bottom-xs" v-if="item.financialDetailType == 3">分销金额</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="text-gray">{{item.createTime}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-price text-black">{{item.payMoney}}</view>
|
<view class="text-price text-black">{{item.payMoney}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -53,43 +40,25 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
openStatusArr: [], //0打开,1收起
|
openStatusArr: [], //0打开,1收起
|
||||||
myMoneyBag: {},
|
bill: [],
|
||||||
curUserInfo: {},
|
curUserInfo: {}
|
||||||
bindBankCard: null,
|
|
||||||
bill: []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
},
|
},
|
||||||
onShow() {
|
|
||||||
this.reloadData();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
this.myMoneyBag = await this.$api.data('myMoneyBag');
|
|
||||||
// 查询账单
|
// 查询账单
|
||||||
let billRes = await this.$request.qryFinancialCount();
|
this.curUserInfo = this.$request.getCurUserInfo();
|
||||||
|
let billRes = await this.$request.qryFinancialCount({
|
||||||
|
financialDetailTypes: [3],
|
||||||
|
workerId: this.curUserInfo.customerId
|
||||||
|
});
|
||||||
this.bill = billRes.data;
|
this.bill = billRes.data;
|
||||||
for (let i = 0; i < this.bill.length; i++) {
|
for (let i = 0; i < this.bill.length; i++) {
|
||||||
this.openStatusArr.push('1');
|
this.openStatusArr.push('1');
|
||||||
}
|
}
|
||||||
this.curUserInfo = this.$request.getCurUserInfo();
|
|
||||||
this.loadBindBankCard();
|
|
||||||
uni.showToast({
|
|
||||||
title: '功能开发中,暂无法使用',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
async reloadData() {
|
|
||||||
this.loadBindBankCard();
|
|
||||||
},
|
|
||||||
async loadBindBankCard() {
|
|
||||||
let res = await this.$request.getBindBankCardByCustomerId({
|
|
||||||
customerId: this.curUserInfo.customerId
|
|
||||||
});
|
|
||||||
this.bindBankCard = res.data;
|
|
||||||
this.bindBankCard.encodeBankNum = '****' + this.bindBankCard.bankNum.substring(this.bindBankCard.bankNum.length - 4);
|
|
||||||
},
|
},
|
||||||
async showStatement(e) {
|
async showStatement(e) {
|
||||||
let curIndex = e.currentTarget.dataset.index;
|
let curIndex = e.currentTarget.dataset.index;
|
||||||
|
|
@ -110,11 +79,10 @@
|
||||||
})
|
})
|
||||||
let res = await this.$request.qryFinancialDetail({
|
let res = await this.$request.qryFinancialDetail({
|
||||||
beginTime: createTimeStr,
|
beginTime: createTimeStr,
|
||||||
endTime: finishTimeStr
|
endTime: finishTimeStr,
|
||||||
|
financialDetailTypes: [3],
|
||||||
|
payeeId: this.curUserInfo.customerId
|
||||||
});
|
});
|
||||||
// let newStatements = this.statements.concat();
|
|
||||||
// newStatements[curIndex] = res.rows;
|
|
||||||
// this.statements = newStatements;
|
|
||||||
let newBill = this.bill.concat();
|
let newBill = this.bill.concat();
|
||||||
newBill[curIndex].statement = res.rows;
|
newBill[curIndex].statement = res.rows;
|
||||||
this.bill = newBill;
|
this.bill = newBill;
|
||||||
|
|
@ -130,11 +98,6 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item))
|
url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item))
|
||||||
})
|
})
|
||||||
},
|
|
||||||
bindBankAccount() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/my/b-arrive-bind'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,14 +89,14 @@
|
||||||
<view class="margin-right">
|
<view class="margin-right">
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="margin-right-xs">全选</text>
|
<text class="margin-right-xs">全选</text>
|
||||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 0"
|
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 1"
|
||||||
@click="changeAgreeShield(0)">
|
@click="changeAgreeShield(1)">
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="margin-right-xs">反选</text>
|
<text class="margin-right-xs">反选</text>
|
||||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 1"
|
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 2"
|
||||||
@click="changeAgreeShield(1)">
|
@click="changeAgreeShield(2)">
|
||||||
</checkbox>
|
</checkbox>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-bar bg-white">
|
<view class="cu-bar bg-white">
|
||||||
<view class="action margin-0 flex-sub text-black" @tap="hideModal">取消</view>
|
<view class="action margin-0 flex-sub text-black" @tap="hideModal">取消</view>
|
||||||
<view class="action margin-0 flex-sub text-main-color solid-left" @tap="hideModal"
|
<view class="action margin-0 flex-sub text-main-color solid-left"
|
||||||
@click="confirmShield">确定</view>
|
@click="confirmShield">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -124,7 +124,7 @@
|
||||||
<view class="cuIcon-roundclosefill"></view>
|
<view class="cuIcon-roundclosefill"></view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="DrawerWindow bg-gray" :class="modalName=='categoryModal'?'show':''">
|
<scroll-view scroll-y class="DrawerWindow bg-gray" :class="modalName=='categoryModal'?'show':''">
|
||||||
<multiselect-vertical-nav :list="categoryList" :containerHeight="'calc(100vh - 200rpx)'"></multiselect-vertical-nav>
|
<multiselect-vertical-nav ref="multiSelectNav" :list="categoryList" :containerHeight="'calc(100vh - 200rpx)'"></multiselect-vertical-nav>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -160,10 +160,12 @@
|
||||||
code: '',
|
code: '',
|
||||||
name: '组建/审批区域团队'
|
name: '组建/审批区域团队'
|
||||||
}],
|
}],
|
||||||
agreeShield: 0,
|
agreeShield: 1,
|
||||||
modalName: null,
|
modalName: null,
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
chosenCategoryIds: []
|
chosenCategoryIds: [],
|
||||||
|
allLevel3CategoryIds: [],
|
||||||
|
curUserInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
@ -201,12 +203,27 @@
|
||||||
this.categoryList = this.categoryList.concat(firstCategory.child)
|
this.categoryList = this.categoryList.concat(firstCategory.child)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 遍历得到所有的第三级类目
|
||||||
|
this.getTargetLevelCategory(res, 3, this.allLevel3CategoryIds);
|
||||||
|
},
|
||||||
|
async getTargetLevelCategory(list ,level, res = []) {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.level !== level) {
|
||||||
|
if (item.child && item.child.length) {
|
||||||
|
this.getTargetLevelCategory(item.child, level, res);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res.push(item.goodsCategoryId);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
showModal(modalName) {
|
showModal(modalName) {
|
||||||
this.modalName = modalName;
|
this.modalName = modalName;
|
||||||
},
|
},
|
||||||
hideModal() {
|
hideModal() {
|
||||||
this.modalName = null
|
this.modalName = null;
|
||||||
|
this.$refs.multiSelectNav.clearChosenItem();
|
||||||
},
|
},
|
||||||
bindEvent() {
|
bindEvent() {
|
||||||
uni.$on(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.tmpChooseCategory);
|
uni.$on(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.tmpChooseCategory);
|
||||||
|
|
@ -234,13 +251,53 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeAgreeShield(agreeShield) {
|
changeAgreeShield(agreeShield) {
|
||||||
this.agreeShield = agreeShield;
|
this.agreeShield = agreeShield;
|
||||||
|
this.$refs.multiSelectNav.clearChosenItem();
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请重新进行逐条选品'
|
||||||
|
})
|
||||||
},
|
},
|
||||||
tmpChooseCategory(chosenCategoryIds) {
|
tmpChooseCategory(chosenCategoryIds) {
|
||||||
this.chosenCategoryIds = chosenCategoryIds;
|
this.chosenCategoryIds = chosenCategoryIds;
|
||||||
console.log("chosenCategoryIds=" + JSON.stringify(this.chosenCategoryIds))
|
|
||||||
},
|
},
|
||||||
confirmShield(e) {},
|
async confirmShield(e) {
|
||||||
|
if (this.agreeShield === 2 && this.chosenCategoryIds.length === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请至少选择一个类目'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let chosenCategoryIds = this.chosenCategoryIds;
|
||||||
|
if (this.agreeShield === 1 && this.chosenCategoryIds.length === 0) {
|
||||||
|
// 全选,带上所有的类目id
|
||||||
|
chosenCategoryIds = this.allLevel3CategoryIds;
|
||||||
|
}
|
||||||
|
let res = await this.$request.addCustomerSelection({
|
||||||
|
customerId: this.curUserInfo.customerId,
|
||||||
|
deptCategoryIds: chosenCategoryIds,
|
||||||
|
selectionType: this.agreeShield
|
||||||
|
});
|
||||||
|
if (res && res.code === 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'success',
|
||||||
|
title: '设置成功'
|
||||||
|
})
|
||||||
|
this.hideModal();
|
||||||
|
} else if (res && res.msg){
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.msg,
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'error',
|
||||||
|
title: '设置失败'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
showCertificationForm() {
|
showCertificationForm() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/my/Certification'
|
url: '/pages/my/Certification'
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="text-gray">详情说明:</text>
|
<text class="text-gray">详情说明:</text>
|
||||||
<text v-if="statementDesc.remark">{{statementDesc.remark}}</text>
|
<!-- <text v-if="statementDesc.remark">{{statementDesc.remark}}</text> -->
|
||||||
|
<text v-if="statementDesc.financialDetailType == 0">结单金额</text>
|
||||||
|
<text v-else-if="statementDesc.financialDetailType == 1">大师傅/店铺提成金额</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="text-gray">到帐备注:</text>
|
<text class="text-gray">到帐备注:</text>
|
||||||
|
|
@ -30,19 +32,19 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="text-gray">提现单号:</text>
|
<text class="text-gray">提现单号:</text>
|
||||||
<text v-if="statementDesc.extractCode">{{statementDesc.extractCode}}</text>
|
<text v-if="statementDesc.code">{{statementDesc.code}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="text-gray">发起时间:</text>
|
<text class="text-gray">发起时间:</text>
|
||||||
<text v-if="statementDesc.payTime">{{statementDesc.payTime}}</text>
|
<text v-if="statementDesc.updateTime">{{statementDesc.updateTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="margin-bottom-sm">
|
<!-- <view class="margin-bottom-sm">
|
||||||
<text class="text-gray">订单编号:</text>
|
<text class="text-gray">订单编号:</text>
|
||||||
<text v-if="statementDesc.orderDetailCode">{{statementDesc.orderDetailCode}}</text>
|
<text v-if="statementDesc.orderDetailCode">{{statementDesc.orderDetailCode}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="margin-bottom-sm">
|
<view class="margin-bottom-sm">
|
||||||
<text class="text-gray">订单时间:</text>
|
<text class="text-gray">订单时间:</text>
|
||||||
<text v-if="statementDesc.orderCreateTime">{{statementDesc.orderCreateTime}}</text>
|
<text v-if="statementDesc.createTime">{{statementDesc.createTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<!-- <view class="margin-lr">
|
<view class="margin-lr">
|
||||||
<button class="cu-btn lg bg-main-color long-btn shadow-blur" @click="withdraw">提现</button>
|
<button class="cu-btn lg line-main-color long-btn shadow-blur" @click="showFinanalDetails">分销明细</button>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -140,8 +140,10 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
withdraw() {
|
showFinanalDetails() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/my/my-money-bag'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue