|
@@ -258,13 +258,30 @@
|
|
|
|
|
|
|
|
<uni-popup ref="memeberChangeRef" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
<uni-popup ref="memeberChangeRef" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
-
|
|
|
|
|
<view style="width:100vw;margin-top:8upx;" v-for="(item,index) in weal" :key="index"><button @click="modifyMember(item)">{{ item.name }}</button></view>
|
|
<view style="width:100vw;margin-top:8upx;" v-for="(item,index) in weal" :key="index"><button @click="modifyMember(item)">{{ item.name }}</button></view>
|
|
|
-
|
|
|
|
|
<view style="width:100vw;margin-top:50upx;"><button @click="cancelModifyMember()">取消</button></view>
|
|
<view style="width:100vw;margin-top:50upx;"><button @click="cancelModifyMember()">取消</button></view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
|
|
|
|
+ <modal-module :show="reduceShow" @click="confirmDeduct" :maskClosable="true" title="请输入金额" padding="30rpx 30rpx" >
|
|
|
|
|
+ <template v-slot:content>
|
|
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
|
|
+ <div class="inp-list-line">
|
|
|
|
|
+ <div class="line-input">
|
|
|
|
|
+ <input type="digit" style="width:60%;text-align:center;" v-model="deductAmount" class="inp-input" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inp-list-line">
|
|
|
|
|
+ <div class="line-input">
|
|
|
|
|
+ <input type="text" style="width:60%;text-align:center;" v-model="deductRemark" class="inp-input" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <view style="font-size:32upx;font-weight:bold;width:80%;margin:0 auto;">余额减少后,不会自动降等级,如需要请手动给客户降级</view>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </modal-module>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -279,6 +296,7 @@ import { getUserDet, remarkAdd, remarkDel, upgrade, resetPassword } from "@/api/
|
|
|
import { changeName,changeMemberLevel } from "@/api/custom"
|
|
import { changeName,changeMemberLevel } from "@/api/custom"
|
|
|
import { getWeal } from "@/api/member"
|
|
import { getWeal } from "@/api/member"
|
|
|
import {toManRecharge} from "@/api/recharge"
|
|
import {toManRecharge} from "@/api/recharge"
|
|
|
|
|
+import {deductBalance} from "@/api/deduct"
|
|
|
export default {
|
|
export default {
|
|
|
name: "detail",
|
|
name: "detail",
|
|
|
components: {
|
|
components: {
|
|
@@ -317,10 +335,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- name: "老带新",
|
|
|
|
|
- img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
|
|
|
|
|
|
|
+ name: "减少余额",
|
|
|
|
|
+ img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
|
|
|
funtion: () => {
|
|
funtion: () => {
|
|
|
- this.$msg("开发中");
|
|
|
|
|
|
|
+ this.deductAmount = ''
|
|
|
|
|
+ this.deductRemark = ''
|
|
|
|
|
+ this.reduceShow = true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -347,6 +367,8 @@ export default {
|
|
|
promptRemarkModal: false,
|
|
promptRemarkModal: false,
|
|
|
promptModalText: "是否要删除该备注?",
|
|
promptModalText: "是否要删除该备注?",
|
|
|
customName:'',
|
|
customName:'',
|
|
|
|
|
+ deductAmount:'',
|
|
|
|
|
+ deductRemark:'',
|
|
|
changeShow:false,
|
|
changeShow:false,
|
|
|
changeFocus:false,
|
|
changeFocus:false,
|
|
|
weal:[],
|
|
weal:[],
|
|
@@ -356,6 +378,7 @@ export default {
|
|
|
rechargeRemark:'',
|
|
rechargeRemark:'',
|
|
|
rechargePayWay:0,
|
|
rechargePayWay:0,
|
|
|
},
|
|
},
|
|
|
|
|
+ reduceShow:false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -373,6 +396,26 @@ export default {
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ confirmDeduct(val){
|
|
|
|
|
+ if (val.index == 0) {
|
|
|
|
|
+ this.deductAmount = ''
|
|
|
|
|
+ this.deductRemark = ''
|
|
|
|
|
+ this.reduceShow = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if(Number(this.deductAmount)<0){
|
|
|
|
|
+ this.$msg('金额要大于0')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ deductBalance({amount:this.deductAmount,customId:this.data.id,remark:this.deductRemark}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.deductAmount = ''
|
|
|
|
|
+ this.deductRemark = ''
|
|
|
|
|
+ this.reduceShow = false
|
|
|
|
|
+ this.$msg(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
beginModifyMember(){
|
|
beginModifyMember(){
|
|
|
this.$refs.memeberChangeRef.open('top')
|
|
this.$refs.memeberChangeRef.open('top')
|
|
|
},
|
|
},
|