|
|
@@ -56,6 +56,10 @@
|
|
|
<text></text>
|
|
|
<switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" />
|
|
|
</div>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">欠款额度</div>
|
|
|
+ <input v-model="debtLimit" @confirm="amendMoney" placeholder-class="phcolor" class="tui-input" placeholder="请填写" type="text" />
|
|
|
</tui-list-cell>
|
|
|
<!-- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<div class="tui-title">消费记录</div>
|
|
|
@@ -73,10 +77,8 @@ import { mapGetters } from "vuex";
|
|
|
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 { getUserDet,debt} from "@/api/member";
|
|
|
+import { updateDebtLimit} from "@/api/custom";
|
|
|
export default {
|
|
|
name: "member-detail",
|
|
|
components: {
|
|
|
@@ -87,6 +89,7 @@ export default {
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
+ debtLimit:null,
|
|
|
userInfo: {},
|
|
|
form:{
|
|
|
name:'',
|
|
|
@@ -121,6 +124,12 @@ export default {
|
|
|
computed: {},
|
|
|
onLoad() {},
|
|
|
methods: {
|
|
|
+ //修改欠款额度
|
|
|
+ amendMoney(){
|
|
|
+ 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 {
|
|
|
@@ -146,6 +155,7 @@ export default {
|
|
|
},
|
|
|
_getUserDet() {
|
|
|
getUserDet({ id: this.option.id }).then(res => {
|
|
|
+ this.debtLimit = res.data.debtLimit;
|
|
|
this.userInfo = res.data;
|
|
|
this.form.debt = this.userInfo.debt
|
|
|
this.orderData[0].value = this.userInfo.debtAmount
|