|
|
@@ -83,9 +83,10 @@
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">欠款开关</div>
|
|
|
+ <div class="tui-title">允许欠款</div>
|
|
|
<div class="switch_bx">
|
|
|
- <text></text>
|
|
|
+ <text v-if="form.debt == 0">禁止</text>
|
|
|
+ <text v-else>允许</text>
|
|
|
<switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
</div>
|
|
|
</tui-list-cell>
|
|
|
@@ -99,7 +100,8 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">列入黑名单</div>
|
|
|
<div class="switch_bx">
|
|
|
- <text></text>
|
|
|
+ <text v-if="form.black == 1">否</text>
|
|
|
+ <text v-else>是</text>
|
|
|
<switch :checked="form.black == 1 ? false : true" @change="blackChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
</div>
|
|
|
</tui-list-cell>
|
|
|
@@ -107,11 +109,21 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">允许看库存</div>
|
|
|
<div class="switch_bx">
|
|
|
- <text></text>
|
|
|
+ <text v-if="form.showStock == 0">否</text>
|
|
|
+ <text v-else>是</text>
|
|
|
<switch :checked="form.showStock == 0 ? false : true" @change="showStockChangeFn" 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 v-if="form.isHd == 1">是</text>
|
|
|
+ <text v-else>否</text>
|
|
|
+ <switch :checked="form.isHd == 1 ? true : false" @change="isHdChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
+ </div>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">配送物流</div>
|
|
|
<input v-model="userInfo.wlName" @click="userInfo.wlName=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="text" style="width:48%;border:1upx solid #ddd;margin-right:15upx;height:52upx;" />
|
|
|
@@ -141,7 +153,7 @@ import TuiListCell from '@/components/plugin/list-cell'
|
|
|
import { share } from "@/mixins";
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
import { getUserDet,debt} from "@/api/member";
|
|
|
-import { changeShowStock,changeWl,changeWlName } from "@/api/custom"
|
|
|
+import { changeShowStock,changeIsHd,changeWlName } from "@/api/custom"
|
|
|
import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName} from "@/api/custom";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
@@ -159,7 +171,8 @@ export default {
|
|
|
debt: 0,
|
|
|
black: 1,
|
|
|
showStock:0,
|
|
|
- wlId:0
|
|
|
+ wlId:0,
|
|
|
+ isHd:0
|
|
|
},
|
|
|
wlSelData: {},
|
|
|
discount:null,
|
|
|
@@ -289,14 +302,18 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 客户黑白名单修改
|
|
|
+ isHdChangeFn(e){
|
|
|
+ this.form.isHd = e.detail.value ? 1 : 0;
|
|
|
+ changeIsHd({ isHd: this.form.isHd, customId: this.userInfo.id }).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
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 res = await updateCustomBlack({ black: this.form.black, customId: this.userInfo.id })
|
|
|
let msg = e.detail.value ? '已拉黑' : '已开放'
|
|
|
this.$msg(msg);
|
|
|
} catch (err) {
|
|
|
@@ -318,6 +335,7 @@ export default {
|
|
|
this.userInfo = res.data;
|
|
|
this.form.debt = this.userInfo.debt
|
|
|
this.form.black = this.userInfo.black
|
|
|
+ this.form.isHd = this.userInfo.isHd
|
|
|
this.form.showStock = this.userInfo.showStock
|
|
|
this.discount = parseFloat(res.data.discount)
|
|
|
})
|