|
|
@@ -68,6 +68,13 @@
|
|
|
<text></text>
|
|
|
<switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
</div>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">拉黑</div>
|
|
|
+ <div class="switch_bx">
|
|
|
+ <text></text>
|
|
|
+ <switch :checked="form.black == 1 ? false : true" @change="blackChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
+ </div>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.debt == 1">
|
|
|
<div class="tui-title">欠款额度</div>
|
|
|
@@ -86,7 +93,7 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from '@/components/plugin/list-cell'
|
|
|
import { share } from "@/mixins";
|
|
|
import { getUserDet,debt} from "@/api/member";
|
|
|
-import { updateDebtLimit} from "@/api/custom";
|
|
|
+import { updateDebtLimit,updateCustomBlack} from "@/api/custom";
|
|
|
export default {
|
|
|
name: "member-detail",
|
|
|
components: {
|
|
|
@@ -97,37 +104,51 @@ export default {
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- debtLimit:null,
|
|
|
+ debtLimit:null,
|
|
|
userInfo: {},
|
|
|
form:{
|
|
|
name:'',
|
|
|
- debt: 0
|
|
|
+ debt: 0,
|
|
|
+ black: 1,
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
onLoad() {},
|
|
|
methods: {
|
|
|
- //修改欠款额度
|
|
|
+ //修改欠款额度
|
|
|
amendMoney(){
|
|
|
- updateDebtLimit({ id: this.option.id,debtLimit:this.debtLimit }).then(res => {
|
|
|
- uni.showToast({title:'修改成功',icon: "none"});
|
|
|
- });
|
|
|
- },
|
|
|
+ updateDebtLimit({ id: this.option.id,debtLimit:this.debtLimit }).then(res => {
|
|
|
+ uni.showToast({title:'修改成功',icon: "none"});
|
|
|
+ });
|
|
|
+ },
|
|
|
async remindChangeFn(e){
|
|
|
this.form.debt = e.detail.value ? 1 : 0;
|
|
|
try {
|
|
|
- let res = await debt({
|
|
|
- debt: this.form.debt,
|
|
|
- customId: this.userInfo.id
|
|
|
- })
|
|
|
- let msg = e.detail.value?'已开启':'已禁用'
|
|
|
- this.$msg(msg);
|
|
|
- } catch (err) {
|
|
|
- console.log(err)
|
|
|
- // 错误捕获
|
|
|
- }
|
|
|
-
|
|
|
+ let res = await debt({
|
|
|
+ debt: this.form.debt,
|
|
|
+ customId: this.userInfo.id
|
|
|
+ })
|
|
|
+ let msg = e.detail.value?'已开启':'已禁用'
|
|
|
+ this.$msg(msg);
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err)
|
|
|
+ // 错误捕获
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 客户黑白名单修改
|
|
|
+ async blackChangeFn(e){
|
|
|
+ this.form.black = e.detail.value ? 2 : 1;
|
|
|
+ try {
|
|
|
+ let res = await updateCustomBlack({
|
|
|
+ black: this.form.black,
|
|
|
+ customId: this.userInfo.id
|
|
|
+ })
|
|
|
+ let msg = e.detail.value ? '已拉黑' : '已开放'
|
|
|
+ this.$msg(msg);
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err)
|
|
|
+ }
|
|
|
},
|
|
|
callUp() {
|
|
|
uni.makePhoneCall({
|
|
|
@@ -142,6 +163,7 @@ export default {
|
|
|
this.debtLimit = res.data.debtLimit;
|
|
|
this.userInfo = res.data;
|
|
|
this.form.debt = this.userInfo.debt
|
|
|
+ this.form.black = this.userInfo.black
|
|
|
});
|
|
|
},
|
|
|
orderMoreFn() {
|