|
|
@@ -98,7 +98,7 @@
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <modal-module :show="userTagModal" @cancel="modalCancel" @click="userTagModalClick" :maskClosable="false" title="客户标签" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="userTagModal" @click="userTagModalClick" :maskClosable="false" title="客户标签" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<view style="padding:0 8upx 10upx 8upx;">
|
|
|
@@ -118,26 +118,48 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="rechargeModal" @cancel="modalCancel" @click="rechargeModalClick" :maskClosable="false" title="充值" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="rechargeModal" @click="toRecharge" :maskClosable="false" title="充值" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
<div class="line-label">充值金额</div>
|
|
|
<div class="line-input">
|
|
|
- <input type="text" placeholder="请输入金额(元)" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
|
|
|
+ <input type="text" placeholder="请输入金额" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="inp-list-line" style="margin-top:35upx;">
|
|
|
+ <div class="line-label">付款方式</div>
|
|
|
+ <div class="line-input">
|
|
|
+ <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 0 ? 'blue' : '']" @click="rechargeForm.payWay = 0">微 信</button>
|
|
|
+ <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 1 ? 'blue' : '']" @click="rechargeForm.payWay = 1">支付宝</button>
|
|
|
+ <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 4 ? 'blue' : '']" @click="rechargeForm.payWay = 4">现 金</button>
|
|
|
+ <button class="admin-button-com middle" :class="[rechargeForm.payWay == 5 ? 'blue' : '']" @click="rechargeForm.payWay = 5">银行卡</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="inp-list-line">
|
|
|
- <div class="line-label">确认密码</div>
|
|
|
+ <div class="line-label"></div>
|
|
|
<div class="line-input">
|
|
|
- <input type="password" v-model="rechargeForm.confirmPassword" :adjust-position="false" class="inp-input" />
|
|
|
+ <input type="text" style="text-align:center;margin-top:40upx;font-size:32upx;" v-model="rechargeForm.rechargeRemark" class="inp-input" placeholder="这里写备注" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <view v-if="rechargeWeal == 1" style="font-size:28upx;">
|
|
|
+ <view v-for="(item,index) in weal" :key="index">
|
|
|
+ <view>充值{{ item.recharge }} 升{{ item.name }} ({{item.discount*100}}折)</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-if="rechargeWeal == 2" style="font-size:28upx;">
|
|
|
+ <view v-for="(item,index) in weal" :key="index">
|
|
|
+ <view>充值{{ item.recharge }} 送{{ item.give }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="passwordModal" @cancel="modalCancel" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="passwordModal" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
@@ -155,7 +177,7 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="upgradeModal" @cancel="modalCancel" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="upgradeModal" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
@@ -177,7 +199,7 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="remarkModal" @cancel="modalCancel" @click="remarkModalClick" :maskClosable="false" title="添加客户备注" padding="30rpx 30rpx" >
|
|
|
+ <modal-module :show="remarkModal" @click="remarkModalClick" :maskClosable="false" title="添加客户备注" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
<div class="app-modal-input-wrap">
|
|
|
<div class="inp-list-line">
|
|
|
@@ -187,7 +209,7 @@
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
|
|
|
- <modal-module :show="promptRemarkModal" @cancel="modalCancel" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx" ></modal-module>
|
|
|
+ <modal-module :show="promptRemarkModal" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx" ></modal-module>
|
|
|
|
|
|
<modal-module :show="changeShow" @click="confirmChange" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
|
@@ -211,8 +233,9 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import { getLevel } from "@/utils/config";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
-import { getUserDet, remarkAdd, remarkDel, upgrade, rechargeB, resetPassword } from "@/api/member";
|
|
|
+import { getUserDet, remarkAdd, remarkDel, upgrade, resetPassword } from "@/api/member";
|
|
|
import { changeName } from "@/api/custom"
|
|
|
+import { getWeal } from "@/api/member"
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
components: {
|
|
|
@@ -250,86 +273,81 @@ export default {
|
|
|
name: "优惠券",
|
|
|
img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
|
|
|
funtion: () => {
|
|
|
- this.$msg("即将开通...");
|
|
|
+ this.$msg("开发中");
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
name: "老带新",
|
|
|
img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
|
|
|
funtion: () => {
|
|
|
- this.$msg("即将开通...");
|
|
|
+ this.$msg("开发中");
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- name: "备注",
|
|
|
- img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
|
|
|
+ name: "充值",
|
|
|
+ img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
|
|
|
funtion: () => {
|
|
|
- this.$msg("即将开通...")
|
|
|
+ this.rechargeModal = true
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
name: "重置密码",
|
|
|
img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
|
|
|
funtion: () => {
|
|
|
- this.$msg("即将开通...")
|
|
|
+ this.$msg("开发中")
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
- // 重置密码
|
|
|
passwordForm: {
|
|
|
password: ""
|
|
|
},
|
|
|
- // 充值
|
|
|
rechargeForm: {
|
|
|
- rechargeAmount: "",
|
|
|
- confirmPassword: ""
|
|
|
+ rechargeAmount:'',
|
|
|
+ rechargeRemark:'',
|
|
|
+ payWay:0,
|
|
|
},
|
|
|
- // 升级
|
|
|
levelSelData: {},
|
|
|
upgradeForm: {
|
|
|
member: "",
|
|
|
confirmPassword: ""
|
|
|
},
|
|
|
- // 备注
|
|
|
remarkForm: {
|
|
|
remark: ""
|
|
|
},
|
|
|
remarkOperateData: {},
|
|
|
- // 订单
|
|
|
orderMoreStatus: false,
|
|
|
- // 确认操作提示
|
|
|
promptRemarkModal: false,
|
|
|
promptModalText: "是否要删除该备注?",
|
|
|
customName:'',
|
|
|
changeShow:false,
|
|
|
- changeFocus:false
|
|
|
+ changeFocus:false,
|
|
|
+ weal:[],
|
|
|
+ rechargeWeal:0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({ levelData: "getLevel" })
|
|
|
},
|
|
|
onLoad(){
|
|
|
-
|
|
|
+ getWeal().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.weal = res.data.weal ? res.data.weal:[]
|
|
|
+ this.rechargeWeal = res.data.rechargeWeal ? res.data.rechargeWeal : 0
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onShow(){
|
|
|
this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
- navigate(latitude, longitude, address) {
|
|
|
- // 将经纬度转换成Number
|
|
|
- let latituded = Number(latitude)
|
|
|
- let longituded = Number(longitude)
|
|
|
- uni.openLocation({
|
|
|
- latitude: latituded,
|
|
|
- longitude: longituded,
|
|
|
- address: address,
|
|
|
- success: function() { }
|
|
|
- })
|
|
|
- },
|
|
|
+ toRecharge(e){
|
|
|
+ if(e.index === 0){
|
|
|
+ this.rechargeModal = false
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
callMobile() {
|
|
|
- uni.makePhoneCall({
|
|
|
- phoneNumber:this.data.mobile
|
|
|
- });
|
|
|
+ uni.makePhoneCall({ phoneNumber:this.data.mobile })
|
|
|
},
|
|
|
changeNameFn(){
|
|
|
this.customName = this.data.name
|
|
|
@@ -384,23 +402,12 @@ export default {
|
|
|
this.fundsData[2].value = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
|
|
|
});
|
|
|
},
|
|
|
- _rechargeB() {
|
|
|
- rechargeB({
|
|
|
- userId: this.data.id,
|
|
|
- ...this.rechargeForm
|
|
|
- }).then(res => {
|
|
|
- this.getCustomInfo();
|
|
|
- this.$msg("充值成功!");
|
|
|
- this.modalCancel();
|
|
|
- });
|
|
|
- },
|
|
|
_upgrade() {
|
|
|
upgrade({
|
|
|
userId: this.data.id,
|
|
|
...this.upgradeForm
|
|
|
}).then(res => {
|
|
|
this.$msg("升级成功!");
|
|
|
- this.modalCancel();
|
|
|
});
|
|
|
},
|
|
|
_resetPassword() {
|
|
|
@@ -409,7 +416,6 @@ export default {
|
|
|
...this.passwordForm
|
|
|
}).then(res => {
|
|
|
this.$msg("重置成功!");
|
|
|
- this.modalCancel();
|
|
|
});
|
|
|
},
|
|
|
_remarkAdd() {
|
|
|
@@ -418,14 +424,12 @@ export default {
|
|
|
...this.remarkForm
|
|
|
}).then(res => {
|
|
|
this.$msg("添加成功!");
|
|
|
- this.modalCancel();
|
|
|
this.getCustomInfo();
|
|
|
});
|
|
|
},
|
|
|
_delRemark() {
|
|
|
remarkDel({ id: this.remarkOperateData.id }).then(res => {
|
|
|
this.$msg("删除成功!");
|
|
|
- this.modalCancel();
|
|
|
this.getCustomInfo();
|
|
|
});
|
|
|
},
|
|
|
@@ -444,48 +448,35 @@ export default {
|
|
|
},
|
|
|
passwordModalClick(e) {
|
|
|
if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
+
|
|
|
} else {
|
|
|
- this.modalCancel();
|
|
|
this.promptModalText = "确认重置密码?";
|
|
|
this.promptRemarkModal = true;
|
|
|
}
|
|
|
},
|
|
|
upgradeModalClick(e) {
|
|
|
if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
+
|
|
|
} else {
|
|
|
- this.modalCancel();
|
|
|
this.promptModalText = "确认升级?";
|
|
|
this.promptRemarkModal = true;
|
|
|
}
|
|
|
},
|
|
|
- rechargeModalClick(e) {
|
|
|
- if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
- } else {
|
|
|
- this.modalCancel();
|
|
|
- this.promptModalText = "确认充值?";
|
|
|
- this.promptRemarkModal = true;
|
|
|
- }
|
|
|
- },
|
|
|
userTagModalClick(e){
|
|
|
if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
+
|
|
|
} else {
|
|
|
- this.modalCancel();
|
|
|
}
|
|
|
},
|
|
|
remarkModalClick(e) {
|
|
|
if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
+
|
|
|
} else {
|
|
|
this._remarkAdd();
|
|
|
}
|
|
|
},
|
|
|
promptModalClick(e) {
|
|
|
if (e.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
} else {
|
|
|
if (this.promptModalText == "是否要删除该备注?") {
|
|
|
this._delRemark();
|
|
|
@@ -493,21 +484,10 @@ export default {
|
|
|
if (this.promptModalText == "确认升级?") {
|
|
|
this._upgrade();
|
|
|
}
|
|
|
- if (this.promptModalText == "确认充值?") {
|
|
|
- this._rechargeB();
|
|
|
- }
|
|
|
if (this.promptModalText == "确认重置密码?") {
|
|
|
this._resetPassword();
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- modalCancel() {
|
|
|
- this.rechargeModal = false;
|
|
|
- this.userTagModal = false;
|
|
|
- this.passwordModal = false;
|
|
|
- this.upgradeModal = false;
|
|
|
- this.remarkModal = false;
|
|
|
- this.promptRemarkModal = false;
|
|
|
}
|
|
|
}
|
|
|
};
|