wangfukang 8 hours ago
parent
commit
c1dbbb5b1c
  1. 9222
      package3/AI/voiceInventory.vue
  2. 107
      package3/index/downarrears.vue
  3. 127
      package3/index/uparrears.vue
  4. 259
      package3/index/upstream.vue
  5. 5135
      package3/inventory/inventoryReturn.vue
  6. 50
      package3/rebate/detail.vue
  7. 226
      package3/rebate/rebate.vue
  8. 167
      package3/rebate/rebateShare.vue
  9. 173
      package3/rebate/withdrawal.vue

9222
package3/AI/voiceInventory.vue

File diff suppressed because it is too large

107
package3/index/downarrears.vue

@ -0,0 +1,107 @@
<template>
<view>
<u-alert description="点击可跳转至出库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0">
<ul>
<li v-for="(item,index) in list" @tap="returnPrice(item)" :key="index">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'订单金额:¥'+(item.totalAmount == null ?'暂无':item.totalAmount)"
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">销售员</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 销售总额</text> <text class="priceText">
{{item.totalAmount == null ?'暂无':item.totalAmount}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn == null ?'暂无':item.noEarn}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态</text>{{item.status == 0 ?'待抢单' :item.status == 1 ?'待取货' :item.status == 3 ?'待送达' :item.status == 4 ?'已完成' :item.status == 5 ?'下游客户待退货' :item.status == 00 ?'退货待抢单' :item.status == 01 ?'退货待取货' :item.status == 03 ?'退货待送达' :item.status == 04 ?'待确认退货' :item.status == 6 ?'待配货' :'挂单'}}
</view>
<!-- <view class="return-price" @tap.stop="returnPrice(item)">回款</view> -->
</uni-card>
</li>
</ul>
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
</view>
</template>
<script>
import color from "../../uni_modules/uview-ui/libs/config/color";
export default {
name: "downarrears",
computed: {
color() {
return color
}
},
data() {
return {
userId: '',
nickname: '',
list: []
}
},
onLoad(options) {
this.userId = options.userId
this.nickname = options.nickname
},
onShow(){
this.getList()
},
methods: {
getList() {
this.tui.request("/app/sale/customSale", "post", {
userId: this.userId
}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result
} else {
this.tui.toast(res.message)
}
})
},
returnPrice(item){
uni.navigateTo({
url: '/package1/index/orderDetail?id='+ item.id
})
}
}
}
</script>
<style scoped lang="scss">
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
.return-price{
position: absolute;
bottom: 30rpx;
right: 30rpx;
background: #5fd9ee;
color: #fff;
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10px;
}
</style>

127
package3/index/uparrears.vue

@ -0,0 +1,127 @@
<template>
<view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0">
<ul>
<li v-for="item in list" @tap="returnPrice(item)">
<uni-card :title="'供应商:'+(item.supplierName == null ?'暂无':item.supplierName)" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'"
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">入库人</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 总成本</text> <text class="priceText">
{{item.shouldPay == null ?'暂无':item.shouldPay}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noPay == null ?'暂无':item.noPay}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}}
</view>
<view class="return-price" @tap.stop="returnPrice(item)">回款</view>
</uni-card>
</li>
</ul>
<u-loadmore :status="status" />
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
</view>
</template>
<script>
import color from "../../uni_modules/uview-ui/libs/config/color";
export default {
name: "uparrears",
computed: {
color() {
return color
}
},
data() {
return {
supplierId: '',
consigneeName: '',
list: [],
status: 'loadmore',
pages:1,
pageNumber:1,
}
},
onShow(){
this.getList()
},
onLoad(options) {
this.supplierId = options.supplierId
this.consigneeName = options.consigneeName
},
onReachBottom() {
if (this.pages >= this.pageNum) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getList();
},
methods: {
getList() {
this.tui.request("/app/purchase/debtPurchase", "get", {
supplierId: this.supplierId,
pageVo: {
pageSize: 10,
pageNumber: this.pageNumber
}
}, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
// this.list = res.result
if (this.pages == 1) {
this.list = res.result
} else {
this.list = [...this.list, ...res.result]
}
this.pageNumber = res.result.pages
} else {
this.tui.toast(res.message)
}
})
},
returnPrice(item){
uni.navigateTo({
url: '/package1/index/waitStorageDetail?id='+ item.id
})
}
}
}
</script>
<style scoped lang="scss">
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
.return-price{
position: absolute;
bottom: 30rpx;
right: 30rpx;
background: #5fd9ee;
color: #fff;
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
border-radius: 10px;
}
</style>

259
package3/index/upstream.vue

@ -0,0 +1,259 @@
<template>
<view>
<view class="formBox">
<u-alert description="点击可查看对应每笔入库单" type="primary"></u-alert>
<view>
<view v-for="(item,index) in list" :key="index" style="display: flex;height: 160rpx;margin-top: 20rpx;background: #fff;">
<view style="flex: 1;height: 160rpx;padding-left: 20rpx;">
<view style="height: 80rpx;line-height: 80rpx;">
<view>{{ item.supplierName == null ?'暂无':item.supplierName}}</view>
</view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;color: red;">
<view>欠款总金额:</view>
<view>
{{ item.noPay == null ?'暂无':item.noPay }}
</view>
</view>
</view>
<view style="flex: 1;height: 70rpx;height: 160rpx;">
<view @tap="onItemClick(item)" style="height: 60rpx;line-height: 60rpx;width: 130rpx;background: #5fd9ee;color: #fff;border-radius: 10px;text-align: center;margin-top: 10rpx;margin: 10rpx 0 0 200rpx;">
查看详情
</view>
<view @tap.stop="toggle(item)" style="height: 60rpx;line-height: 60rpx;width: 130rpx;background: #5fd9ee;color: #fff;border-radius: 10px;text-align: center;margin-top: 10rpx;margin: 20rpx 0 0 200rpx;">
回款
</view>
</view>
</view>
</view>
</view>
<!-- 回款金额输入框 -->
<uni-popup ref="inputDialog" type="dialog">
<!-- <uni-popup-dialog ref="inputClose" mode="input" inputType="digit" title="充值金额" placeholder="请输入充值金额"
@confirm="receivePay"></uni-popup-dialog> -->
<view style="background: #fff;width: 500rpx;height: 293rpx;border-radius: 10px;">
<view style="text-align: center;line-height: 80rpx;font-size: 36rpx;font-weight: 500;color: #777;">
充值金额
</view>
<view @tap="showPrice = true" style="width: 90%;border: 1px solid #eee;height: 70rpx;margin: 30rpx auto 0;">
<input type="number" v-model="keyboardNum" disabled placeholder="请输入充值金额" style="width: 100%;height: 100%;padding-left:20rpx;">
</view>
<view style="display: flex;border-top: 1px solid #eee;margin-top: 30rpx;text-align: center;font-size: 30rpx;line-height: 80rpx;">
<view style="flex: 1;" @tap='huicancel'>取消</view>
<view style="flex: 1;color: blue;border-left: 1px solid #eee;" @tap="receivePay()">确定</view>
</view>
</view>
</uni-popup>
<u-keyboard ref="uKeyboard" @confirm='keyboardConfirm' @cancel="keyCancel" @change="valChange" @backspace="backspace" :overlay='false' :closeOnClickOverlay='true' :defaultText="keyboardNum" mode="price" :show="showPrice"></u-keyboard>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
export default {
name: 'upstream',
computed: mapState(['userId', 'shopIndex']),
data() {
return {
choose: '1',
keyboardNum:'',
userId:'',
showPrice:false,
options1: [{
text: '编辑金额',
style: {
backgroundColor: '#3c9cff'
}
}],
popupShow: false,
shopName: '',
list: []
}
},
onShow(){
this.getList()
},
onLoad() {
},
methods: {
getList() {
this.tui.request("/app/purchase/debt", "get", {}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result.records
} else {
this.tui.toast(res.message)
}
})
},
onItemClick(target) {
uni.navigateTo({
url: `/package3/index/uparrears?supplierId=${target.supplierId}&consigneeName=${target.supplierName}`
})
},
keyboardConfirm(){
this.showPrice = false
},
keyCancel(){
this.showPrice = false
this.keyboardNum = ''
},
//
valChange(val) {
this.keyboardNum += val
},
// 退
backspace(val) {
this.keyboardNum = val
},
huicancel(){
this.$refs.inputDialog.close()
this.keyboardNum = ''
},
//
receivePay(e){
this.tui.request('/app/debt/saveOrUpdateDebt', "post", {
userId:this.userId,
amountOwed:this.keyboardNum,
userType:'1'
}, false, false).then((res) => {
if (res.code == 200) {
this.getList()
this.tui.toast('操作成功')
this.keyboardNum = ''
this.$refs.inputDialog.close()
}else{
this.keyboardNum = ""
this.tui.toast(res.message)
}
})
},
//
toggle(item) {
this.userId = item.supplierId
this.$refs.inputDialog.open()
}
}
}
</script>
<style lang="scss" scoped>
.formBox {
.uni-data-select {
width: 100%;
}
.tui-order-title {
position: relative;
font-size: 28upx;
line-height: 28upx;
padding-left: 16upx;
box-sizing: border-box;
}
.tui-order-title::before {
content: '';
position: absolute;
left: 0;
top: 0;
border-left: 8upx solid $u-primary;
height: 120%;
border-radius: 4upx;
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.u-page {
padding: 0;
}
.u-demo-block__title {
padding: 10px 0 2px 15px;
}
.swipe-action {
&__content {
background-color: #fff;
margin-bottom: 25rpx;
padding: 25rpx;
display: flex;
align-items: center;
justify-content: space-between;
&__left {
display: flex;
flex-direction: column;
align-items: center;
}
&__right {
display: flex;
align-items: center;
flex-basis: 300rpx;
justify-content: space-between;
&__text {
color: firebrick;
}
&__money {
flex-basis: 100rpx;
color: red;
text-align: right;
}
}
&__text {
padding: 12rpx 0;
width: 100%;
}
&__time {
font-size: 22rpx;
color: #3a3a3a;
}
&__icon {
flex-basis: 20rpx;
}
}
}
.edit-info {
height: 450 rpx;
padding: 25rpx;
.title {
text-align: center;
font-size: 32rpx;
}
.info-name {
display: flex;
align-items: center;
margin: 35rpx 0;
}
}
</style>
<style>
.u-radio {
margin: 15 upx 0;
}
</style>

5135
package3/inventory/inventoryReturn.vue

File diff suppressed because it is too large

50
package3/rebate/detail.vue

@ -0,0 +1,50 @@
<template>
<view class="page">
<uni-card title="提现记录">
<ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<uni-card :title="'提现人:'+ item.aliName" :sub-title="item.createTime?item.createTime:'暂无'">
<view class="uni-body">提现金额{{item.commission?item.commission:'暂无'}}</view>
<view class="uni-body"> {{item.shopAfterRebateAmount?item.shopAfterRebateAmount:'暂无'}}</view>
</uni-card>
</li>
</ul>
</uni-card>
</view>
</template>
<script>
export default {
data() {
return {
commissionList: []
}
},
onLoad() {
this.getList()
},
methods: {
getList() {
this.tui.request('/app/returnCommission/listWithReturned', 'post', {}, false, false, true).then((res) => {
if (res.code == 200){
this.commissionList = res.result
for(let i=0;i<this.commissionList.length;i++){
if(this.commissionList[i].aliName == null){
this.commissionList[i].aliName = '暂无'
}
}
}
})
}
}
}
</script>
<style lang="scss">
.inventoryList{
.uni-card{
margin: 0 !important;
padding: 0 !important;
}
}
</style>

226
package3/rebate/rebate.vue

@ -0,0 +1,226 @@
<template>
<view>
<uni-card>
<view class="content-wrapper">
<view style="display: flex;">
<view class="content-balance">
<text class="balance-text">累计返佣()</text>
<view class="balance-number">
<text style="font-size: 80rpx;">{{allrebateAmount == null?'0':allrebateAmount}}</text>
</view>
</view>
<view class="content-balance">
<text class="balance-text">返佣余额()</text>
<view class="balance-number">
<text style="font-size: 80rpx;">{{rebateAmount == 'null'?'0':rebateAmount}}</text>
</view>
</view>
</view>
<view class="content-actions">
<u-button shape="circle" @click="goToDetail">提现记录</u-button>
<u-button type="primary" shape="circle" @click="goToWithdrawal">提现</u-button>
</view>
</view>
</uni-card>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#5fd9ee"></uni-segmented-control>
<view class="content">
<uni-card v-show="current === 0">
<ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<uni-card :title="'返佣日期:'+ item.createTime" :sub-title="'返佣后账户余额'+ item.shopAfterDepoBal">
<view class="uni-body" style="margin-bottom: 10rpx;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="cardText">物流返佣{{item.companyName?item.companyName:'暂无'}}</view>
<view class="cardText">返佣金额{{item.companyRebateAmount?item.companyRebateAmount:'暂无'}}</view>
</view>
<view class="uni-body">
<view class="cardText">拉包返佣{{item.workerName?item.workerName:'暂无'}}</view>
<view class="cardText">返佣金额{{item.workerRebateAmount?item.workerRebateAmount:'暂无'}}</view>
</view>
</uni-card>
</li>
</ul>
</uni-card>
<uni-card v-show="current === 1">
<ul class="inventoryList">
<li v-for="(item ,index) in commissionList" :key="index" style="margin-bottom:20rpx;">
<uni-card :title="'返佣日期:'+ item.registerShopTime" :sub-title="'返佣后账户余额'+ item.shopAfterRebateAmount" @tap="">
<view class="uni-body" style="margin-bottom: 10rpx;padding-bottom: 10rpx;border-bottom:1px solid #eee;">
<view class="cardText">返佣状态{{item.isOpen == 1?'已返佣':'未返佣'}}</view>
<view class="cardText">返佣金额{{item.shopRebateAmount?item.shopRebateAmount:'暂无'}}</view>
</view>
<view class="uni-body">
<view class="cardText">邀请店铺名{{item.registerShopName?item.registerShopName:'暂无'}}</view>
</view>
</uni-card>
</li>
</ul>
</uni-card>
</view>
<u-loadmore :status="status" />
</view>
</template>
<script>
export default {
data() {
return {
commissionList: [],
pages: 1,
pageNum: 1,
status: 'loadmore',
shopId: '',
items: ['订单返佣', '邀请返佣'],
current: 0,
allrebateAmount:0,
rebateAmount:0
};
},
onLoad() {
this.shopId = uni.getStorageSync('shopId')
this.type = uni.getStorageSync('type')
},
onShow(){
this.getList()
this.getBalance()
},
onReachBottom() {
if (this.inStorageStatus != 0) {
if (this.pageNum >= this.pages) return;
this.status = 'loading';
this.pageNum += 1;
this.getList();
}
},
methods: {
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
}
this.getList();
},
getBalance() {
this.tui.request('/app/shop/getShopRebateBalance', 'post', {}, false, false, true).then((res) => {
if (res.code == 200){
this.rebateAmount = res.result.rebateAmount
this.allrebateAmount = res.result.allrebateAmount
}
})
},
getList() {
var url,data
this.commissionList = []
if(this.current == 0){
url = '/app/deductlog/getShopLogById'
data = {
shopId: this.shopId,
pageNum: this.pageNum,
pageSize: 10
}
}else{
url = '/app/inviteLog/getInviteLogListByShop'
data = {
pageNumber: this.pageNum,
pageSize: 10
}
}
this.tui.request(url, 'post', data, false, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.commissionList = res.result.records
for(let i=0;i<this.commissionList.length;i++){
if(this.commissionList[i].shopAfterDepoBal == undefined){
this.commissionList[i].shopAfterDepoBal = '暂无'
}
if(this.commissionList[i].createTime == null){
this.commissionList[i].createTime = '暂无'
}
}
}
})
},
goToDetail() {
uni.navigateTo({
url: `/package3/rebate/detail`
})
},
goToWithdrawal() {
if(this.type != 0){
this.tui.toast("您暂无提现权限!")
}else{
this.tui.request('/app/operatingArea/getByArea', "post", {
province:'',
city:'',
area:'',
shippingType:0,
seachParams:"测试"
}, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.isOnLine = res.result.operatingAreaList[0].isOnLine
if(res.result.operatingAreaList[0].isOnLine == '0'){
this.tui.toast("功能测试中,暂未开放")
}else{
uni.navigateTo({
url: `/package3/rebate/withdrawal?balance=${this.rebateAmount}`
})
}
}else{
this.tui.toast(res.message)
}
})
}
}
}
}
</script>
<style lang="scss">
.content-balance {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
flex: 1;
.balance-text {
font-size: 32rpx;
margin-bottom: 35rpx;
}
}
.segmented-control{
width: 93% !important;
margin: 0 auto;
border-bottom-color: #5fd9ee;
background: #fff;
}
.segmented-control__item{
background-color: #fff;
border-color: #fff !important;
border-bottom-color: #5fd9ee !important;
border-radius: 0 !important;
}
.segmented-control__item:first-child{
border-top-left-radius: 5px !important;
}
.segmented-control__item:last-child{
border-top-right-radius: 5px !important;
}
.content-actions {
display: flex;
padding-top: 30rpx;
padding-bottom: 30rpx;
.u-button {
flex-basis: 40%;
}
}
.uni-card {
margin: 0 30rpx 30rpx !important;
padding: 0 !important;
border-radius: 0 !important;
box-shadow: none !important;
// border: none !important;
}
</style>

167
package3/rebate/rebateShare.vue

@ -0,0 +1,167 @@
<template>
<view class="content">
<button open-type="share" class="btn"></button>
<view class="title" id='arktitle'>邀请注册最高返现50元</view>
<view class="banner">1被邀请人需注册成功并缴纳年费后返佣<br>2根据被邀请人开通服务的时间长短返现金额不同<br>3邀请成功后返佣金额自动进入店铺账户可直接提现</view>
<view class="bottom">*最终解释权归快衣店所有</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onShareAppMessage(res) {
return {
title: '你的好友邀请你注册快衣店!',
imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3c50b6541b2d4780bab4b3fd0c0af490.jpg',
path: '/package3/rebate/rebateShare?inviteUserId='+ this.id+'&inviteShopId='+ this.shopId
}
},
onLoad(option) {
if(option.inviteUserId){ // inviteShopId 1739537306278301696 inviteUserId 1739537305905008640
uni.redirectTo({
url: "/package2/login/register?inviteUserId=" + option.inviteUserId+'&inviteShopId='+option.inviteShopId
})
}else{
this.shopId = uni.getStorageSync('shopId')
this.id = uni.getStorageSync('id')
}
},
methods: {
}
}
</script>
<style>
page {
width: 100%;
height: 100%;
}
.content {
width: 100%;
height: 100%;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/352c2490d88b47ac84bf13bfa046abcf.png') no-repeat;
background-size: cover;
background-position: center;
overflow: hidden;
}
.title,
.banner,
.bottom {
width: 80%;
margin: 0 auto;
text-align: center;
}
.title {
height: 100rpx;
line-height: 100rpx;
font-size: 48rpx;
margin-top: 200rpx;
}
.banner {
margin-top: 750rpx;
}
.bottom {
margin-top: 100rpx;
font-size: 26rpx;
}
.btn {
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0);
position: absolute;
top: 0;
}
#arktitle {
background: linear-gradient(to bottom, #000, blue);
-webkit-background-clip: text;
color: transparent;
animation: blink 2s linear infinite;
-webkit-animation: blink 2s linear infinite;
-moz-animation: blink 2s linear infinite;
-ms-animation: blink 2s linear infinite;
-o-animation: blink 2s linear infinite;
}
@keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
@-webkit-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
@-moz-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
@-ms-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
@-o-keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 0.8;
}
}
</style>

173
package3/rebate/withdrawal.vue

@ -0,0 +1,173 @@
<template>
<view>
<view v-if="isOnLine == '0'" style="width: 100%;height: 100%;position: absolute;top: 0;background: #fff;z-index:99;"></view>
<uni-card title="提现">
<view v-if="user== '13521030702'?' ':'*支付宝实名和手机号必须一致并经过实名认证'" style="color: red;font-size: 12px;"></view>
<view class="zhifubao">
<view class="name">{{user== '13521030702'?'账号':'支付宝手机号'}}:</view>
<view class="zfb-data">
<input type="number" v-model='zfbAccount' placeholder="请输入手机号">
</view>
</view>
<view class="zhifubao">
<view class="name">{{user== '13521030702'?'昵称':'支付宝实名'}}:</view>
<view class="zfb-data">
<input type="text" v-model='zfbName' placeholder="请输入认证过的实名">
</view>
</view>
<view class="zhifubao">
<view class="name">提现金额:</view>
<view class="zfb-data">
<input type="digit" v-model="realBalance" placeholder="请输入提现金额">
</view>
</view>
<view class="yue-box">
<view class="yue">
可提现余额:
<text>{{canbalance == "null"?'0':canbalance}}</text>
</view>
<view class="quanbu" @click="onQuanbuClick">
全部提现
</view>
</view>
<view>
<u-button type="primary" shape="circle" :disabled="isClick" @click="onSubmit">提现</u-button>
</view>
</uni-card>
</view>
</template>
<script>
export default {
name: "withdrawal",
data() {
return {
balance: 0,
canbalance:'',
zfbAccount: '',
zfbName: '',
realBalance:'',
shopId:'',
isClick:false,
user:'',
isOnLine:'0'
}
},
created(){
this.user = uni.getStorageSync('username')
this.getArea();
},
onLoad(options) {
this.canbalance = options.balance
this.shopId = uni.getStorageSync('shopId')
},
methods: {
getArea(){
this.tui.request('/app/operatingArea/getByArea', "post", {
province:'',
city:'',
area:'',
shippingType:0,
seachParams:"测试"
}, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
this.isOnLine = res.result.operatingAreaList[0].isOnLine
if(res.result.operatingAreaList[0].isOnLine == '0'){
uni.setNavigationBarTitle({
title: '测试页面'
});
}
}else{
this.tui.toast(res.message)
}
})
},
onQuanbuClick() {
this.realBalance = this.canbalance
},
onSubmit() {
if(this.user == '13521030702'){
this.tui.toast("测试账户不能提现!")
return
}
this.isClick = true;
if(Number(this.realBalance) > Number(this.canbalance)){
this.tui.toast("提现金额不能大于账户余额!")
return
}else if(this.realBalance =='' || this.zfbName =='' || this.zfbAccount ==''){
this.tui.toast("信息填写完整后再进行操作!")
return
}else if(this.realBalance < 0.1){
this.tui.toast("提现金额不能小于0.1元")
return
}
this.tui.request('/app/returnCommission/handleReturn', 'post', {
commission:this.realBalance,
shopId:this.shopId,
aliName:this.zfbName,
aliAccount:this.zfbAccount
}, false, false, true).then((res) => {
if (res.code == 200){
this.tui.toast(res.message)
setTimeout(() => {
uni.reLaunch({
url: `/package3/rebate/rebate`
})
}, 2000)
}else{
this.tui.toast(res.message)
setTimeout(() => {
this.isClick = false;
// uni.reLaunch({
// url: `/package3/rebate/rebate`
// })
}, 2000)
}
})
}
}
}
</script>
<style scoped lang="scss">
.zhifubao {
display: flex;
justify-content: space-between;
margin: 30rpx 0;
height: 80rpx;
line-height: 80rpx;
}
.zhifubao input{
height: 80rpx;
line-height: 80rpx;
border: 1px solid #eee;
}
.input-flex {
display: flex;
margin: 50upx 0;
}
.yue-box {
display: flex;
font-size: 24upx;
.yue {
color: #c26f59;
margin: 0 20rpx 50rpx 220rpx;
}
.quanbu {
color: #657284;
}
}
.name{
width: 35%;
}
.zfb-data{
width: 65%;
}
</style>
Loading…
Cancel
Save