|
|
@@ -104,6 +104,14 @@
|
|
|
</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.showStock == 0 ? false : true" @change="showStockChangeFn" style="transform: scale(0.8,0.8)" />
|
|
|
+ </div>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</templete>
|
|
|
@@ -127,6 +135,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 } from "@/api/custom"
|
|
|
import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName} from "@/api/custom";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
@@ -143,6 +152,7 @@ export default {
|
|
|
name:'',
|
|
|
debt: 0,
|
|
|
black: 1,
|
|
|
+ showStock:0,
|
|
|
},
|
|
|
discount:null,
|
|
|
tabsData: [
|
|
|
@@ -247,17 +257,20 @@ export default {
|
|
|
},
|
|
|
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)
|
|
|
+ },
|
|
|
+ showStockChangeFn(e){
|
|
|
+ this.form.showStock = e.detail.value ? 1 : 0
|
|
|
+ changeShowStock({customId:this.userInfo.id,showStock:this.form.showStock}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 客户黑白名单修改
|
|
|
async blackChangeFn(e){
|
|
|
@@ -287,6 +300,7 @@ export default {
|
|
|
this.userInfo = res.data;
|
|
|
this.form.debt = this.userInfo.debt
|
|
|
this.form.black = this.userInfo.black
|
|
|
+ this.form.showStock = this.userInfo.showStock
|
|
|
this.discount = parseFloat(res.data.discount)
|
|
|
});
|
|
|
},
|