shish преди 1 година
родител
ревизия
61067f5101
променени са 2 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 5 1
      ghsApp/src/admin/custom/set.vue
  2. 5 2
      ghsApp/src/pagesClient/member/detail.vue

+ 5 - 1
ghsApp/src/admin/custom/set.vue

@@ -51,7 +51,10 @@
 
 				<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"/>
+					<button class="admin-button-com mini-btn" :class="[form.homeType == 0 ? 'blue' : 'default']" @click="form.homeType=0">金额</button>
+					<button class="admin-button-com mini-btn" :class="[form.homeType == 1 ? 'blue' : 'default']" @click="form.homeType=1" style="margin-left:8upx;">扎数</button>
+					<input v-model="form.homeAmount" placeholder-class="phcolor" @focus="form.homeAmount=''" class="tui-input" name="homeAmount" placeholder="输数值,没门槛填0" type="digit"
+					style="width:38%;border:1upx solid #ddd;margin-left:8upx;height:52upx;text-align:center;" />
 				</tui-list-cell>
 
 				<tui-list-cell class="line-cell" :hover="false">
@@ -90,6 +93,7 @@ export default {
 				needCheck:0,
 				home:1,
 				homeAmount:0,
+				homeType:0,
 				allowDebtAmount:5000,
 				showStock:1,
 				showSold:0,

+ 5 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -157,7 +157,9 @@
 
             <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="digit" style="width:48%;border:1upx solid #ddd;margin-right:15upx;height:52upx;text-align:center;" />
+              <button class="admin-button-com mini-btn" :class="[userInfo.homeType == 0 ? 'blue' : 'default']" @click="userInfo.homeType=0">金额</button>
+              <button class="admin-button-com mini-btn" :class="[userInfo.homeType == 1 ? 'blue' : 'default']" @click="userInfo.homeType=1" style="margin-left:6upx;margin-right:6upx;">扎数</button>
+              <input v-model="userInfo.homeAmount" @click="userInfo.homeAmount=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="不限填0" type="digit" style="width:100upx;border:1upx solid #ddd;margin-right:6upx;height:52upx;text-align:center;" />
               <button class="admin-button-com blue mini-btn" @tap="changeHomeAmount">确定</button>
             </tui-list-cell>
 
@@ -478,7 +480,8 @@ export default {
     },
     changeHomeAmount(){
       let homeAmount = this.userInfo.homeAmount||0
-      modifyHomeAmount({id:this.option.id,homeAmount:homeAmount}).then(res=>{
+      let homeType = this.userInfo.homeType||0
+      modifyHomeAmount({id:this.option.id,homeAmount:homeAmount,homeType:homeType}).then(res=>{
         if(res.code == 1){
           this.$msg(res.msg)
         }