shish пре 1 година
родитељ
комит
c7fcefefea
3 измењених фајлова са 68 додато и 9 уклоњено
  1. 17 0
      ghsApp/src/admin/custom/set.vue
  2. 8 0
      ghsApp/src/api/custom/index.js
  3. 43 9
      ghsApp/src/pagesClient/member/detail.vue

+ 17 - 0
ghsApp/src/admin/custom/set.vue

@@ -42,6 +42,18 @@
 					</view>
 					</view>
 				</tui-list-cell>
 				</tui-list-cell>
 
 
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">默认送货上门</view>
+					<view>
+						<switch style="transform:scale(0.7,0.7)" :checked="form.home == 0 ? false : true" @change="homeChange" /> {{form.home==1 ? '是' : '否'}}
+					</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
+					<view class="tui-title">上门最低消费</view>
+					<input v-model="form.homeAmount" placeholder-class="phcolor" @focus="form.homeAmount=''" class="tui-input" name="homeAmount" placeholder="请输入,0表示没门槛" type="digit"/>
+				</tui-list-cell>
+
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">客户可看销量</view>
 					<view class="tui-title">客户可看销量</view>
 					<view>
 					<view>
@@ -76,6 +88,8 @@ export default {
 			form: {
 			form: {
 				allowDebt:0,
 				allowDebt:0,
 				needCheck:0,
 				needCheck:0,
+				home:1,
+				homeAmount:0,
 				allowDebtAmount:5000,
 				allowDebtAmount:5000,
 				showStock:1,
 				showStock:1,
 				showSold:0,
 				showSold:0,
@@ -122,6 +136,9 @@ export default {
 		needCheckChange(e){
 		needCheckChange(e){
 			this.form.needCheck = e.target.value ? 1 : 0
 			this.form.needCheck = e.target.value ? 1 : 0
 		},
 		},
+		homeChange(e){
+			this.form.home = e.target.value ? 1 : 0
+		},
 		toSubmit() {
 		toSubmit() {
 			uni.showLoading({title: '稍等几秒...',mask:true})
 			uni.showLoading({title: '稍等几秒...',mask:true})
 			setChange(this.form).then(res => {
 			setChange(this.form).then(res => {

+ 8 - 0
ghsApp/src/api/custom/index.js

@@ -44,6 +44,10 @@ export const modifyShortName = data => {
 	return https.get('/custom/modify-short-name', data)
 	return https.get('/custom/modify-short-name', data)
 }
 }
 
 
+export const modifyHomeAmount = data => {
+	return https.get('/custom/modify-home-amount', data)
+}
+
 export const changeWlName = data => {
 export const changeWlName = data => {
 	return https.get('/custom/change-wl-name', data)
 	return https.get('/custom/change-wl-name', data)
 }
 }
@@ -56,6 +60,10 @@ export const changeShowStock = data => {
 	return https.get('/custom/change-show-stock', data)
 	return https.get('/custom/change-show-stock', data)
 }
 }
 
 
+export const toChangeHome = data => {
+	return https.get('/custom/change-home', data)
+}
+
 export const changePassStatus = data => {
 export const changePassStatus = data => {
 	return https.get('/custom/change-pass-status', data)
 	return https.get('/custom/change-pass-status', data)
 }
 }

+ 43 - 9
ghsApp/src/pagesClient/member/detail.vue

@@ -138,14 +138,29 @@
             </tui-list-cell>
             </tui-list-cell>
 
 
             <tui-list-cell class="line-cell" :hover="false">
             <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">列入黑名单</div>
+              <div class="tui-title">审核状态</div>
               <div class="switch_bx">
               <div class="switch_bx">
-                <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)" />
+                <text v-if="form.passStatus == 0">待审</text>
+                <text v-else>通过</text>
+                <switch :checked="form.passStatus == 0 ? false : true" @change="passStatusChangeFn" style="transform: scale(0.8,0.8)" />
               </div>
               </div>
             </tui-list-cell>
             </tui-list-cell>
 
 
+            <tui-list-cell class="line-cell" :hover="false">
+              <div class="tui-title">送货上门</div>
+              <div class="switch_bx">
+                <text v-if="form.home == 0">不支持</text>
+                <text v-else>支持</text>
+                <switch :checked="form.home == 0 ? false : true" @change="homeChangeFn" style="transform: scale(0.8,0.8)" />
+              </div>
+            </tui-list-cell>
+
+            <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
+              <div class="tui-title">上门最低消费</div>
+              <input v-model="userInfo.homeAmount" @click="userInfo.homeAmount=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写,0表示没门槛" type="text" style="width:48%;border:1upx solid #ddd;margin-right:15upx;height:52upx;text-align:center;" />
+              <button class="admin-button-com blue mini-btn" @tap="changeHomeAmount">确定</button>
+            </tui-list-cell>
+
             <tui-list-cell class="line-cell" :hover="false">
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">查看库存</div>
               <div class="tui-title">查看库存</div>
               <div class="switch_bx">
               <div class="switch_bx">
@@ -156,11 +171,11 @@
             </tui-list-cell>
             </tui-list-cell>
 
 
             <tui-list-cell class="line-cell" :hover="false">
             <tui-list-cell class="line-cell" :hover="false">
-              <div class="tui-title">审核状态</div>
+              <div class="tui-title">列入黑名单</div>
               <div class="switch_bx">
               <div class="switch_bx">
-                <text v-if="form.passStatus == 0">待审</text>
-                <text v-else>通过</text>
-                <switch :checked="form.passStatus == 0 ? false : true" @change="passStatusChangeFn" style="transform: scale(0.8,0.8)" />
+                <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>
               </div>
             </tui-list-cell>
             </tui-list-cell>
 
 
@@ -253,7 +268,7 @@ import ModalModule from "@/components/plugin/modal"
 import { getUserDet,debt} from "@/api/member";
 import { getUserDet,debt} from "@/api/member";
 import { IMGHOST } from '@/config'
 import { IMGHOST } from '@/config'
 import { mapGetters } from "vuex"
 import { mapGetters } from "vuex"
-import { changeShowStock,changePassStatus,changeWlName,modifyShortName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
+import { changeShowStock,changePassStatus,toChangeHome,changeWlName,modifyShortName,modifyHomeAmount,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
 import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn,getGatheringCode} from "@/api/custom";
 import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn,getGatheringCode} from "@/api/custom";
 export default {
 export default {
   name: "detail",
   name: "detail",
@@ -272,6 +287,8 @@ export default {
         black: 1,
         black: 1,
         showStock:0,
         showStock:0,
         passStatus:0,
         passStatus:0,
+        home:1,
+        homeAmount:0,
         wlId:0,
         wlId:0,
         level:1,
         level:1,
         staffName:'',
         staffName:'',
@@ -459,6 +476,14 @@ export default {
         })
         })
       })
       })
     },
     },
+    changeHomeAmount(){
+      let homeAmount = this.userInfo.homeAmount||0
+      modifyHomeAmount({id:this.option.id,homeAmount:homeAmount}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+        }
+      })
+    },
     changeShortName(){
     changeShortName(){
       let shortName = this.userInfo.shortName||''
       let shortName = this.userInfo.shortName||''
       modifyShortName({id:this.option.id,shortName:shortName}).then(res=>{
       modifyShortName({id:this.option.id,shortName:shortName}).then(res=>{
@@ -573,6 +598,14 @@ export default {
       let msg = e.detail.value?'已开启':'已禁用'
       let msg = e.detail.value?'已开启':'已禁用'
       this.$msg(msg)
       this.$msg(msg)
     },
     },
+    homeChangeFn(e){
+      this.form.home = e.detail.value ? 1 : 0
+      toChangeHome({customId:this.userInfo.id,home:this.form.home}).then(res=>{
+        if(res.code == 1){
+          this.$msg(res.msg)
+        }
+      })
+    },
     passStatusChangeFn(e){
     passStatusChangeFn(e){
       this.form.passStatus = e.detail.value ? 1 : 0
       this.form.passStatus = e.detail.value ? 1 : 0
       changePassStatus({customId:this.userInfo.id,passStatus:this.form.passStatus}).then(res=>{
       changePassStatus({customId:this.userInfo.id,passStatus:this.form.passStatus}).then(res=>{
@@ -616,6 +649,7 @@ export default {
         this.form.black = this.userInfo.black
         this.form.black = this.userInfo.black
         this.form.showStock = this.userInfo.showStock
         this.form.showStock = this.userInfo.showStock
         this.form.passStatus = this.userInfo.passStatus
         this.form.passStatus = this.userInfo.passStatus
+        this.form.home = this.userInfo.home
         this.form.staffId = this.userInfo.staffId
         this.form.staffId = this.userInfo.staffId
         this.form.staffName = this.userInfo.staffName
         this.form.staffName = this.userInfo.staffName
         this.discount = parseFloat(res.data.discount)
         this.discount = parseFloat(res.data.discount)