|
@@ -202,45 +202,53 @@
|
|
|
|
|
|
|
|
<view style="border:2upx solid #CCCCCC;margin-top:20upx;">
|
|
<view style="border:2upx solid #CCCCCC;margin-top:20upx;">
|
|
|
<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 style="margin-left: auto; display: flex; align-items: center;">
|
|
<view style="margin-left: auto; display: flex; align-items: center;">
|
|
|
- <button class="admin-button-com middle" :class="[form.home == 1 ? 'blue' : 'default']" @click="changeHomeBtn(1)">启用</button>
|
|
|
|
|
- <button class="admin-button-com middle" :class="[form.home == 0 ? 'blue' : 'default']" @click="changeHomeBtn(0)" style="margin-left:20upx;">禁用</button>
|
|
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.homeRule == 0 ? 'blue' : 'default']" @click="changeHomeRuleBtn(0)">遵循总设置</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.homeRule == 1 ? 'blue' : 'default']" @click="changeHomeRuleBtn(1)" style="margin-left:20upx;">自定义设置</button>
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
- <view class="tui-title">最低消费金额</view>
|
|
|
|
|
- <view style="display:flex;align-items:center;">
|
|
|
|
|
- <input v-model="userInfo.homeAmount" @click="userInfo.homeAmount=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="不限制填0" type="digit" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
- <text style="margin-right:30upx;">元</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button class="admin-button-com blue middle" @tap="changeHomeParams">确定</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
- <view class="tui-title">最低消费扎数</view>
|
|
|
|
|
- <view style="display:flex;align-items:center;">
|
|
|
|
|
- <input v-model="userInfo.homeNum" @click="userInfo.homeNum=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="不限制填0" type="number" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
- <text style="margin-right:30upx;">扎</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button class="admin-button-com blue middle" @tap="changeHomeParams">确定</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <!-- 不满最低消费要求时的处理方式:收运费 / 收包装费 / 不能下单 -->
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
- <view class="tui-title">不满最低要求</view>
|
|
|
|
|
- <button class="admin-button-com middle" :class="[form.homeUnMeet == 0 ? 'blue' : 'default']" @click="homeUnMeetBtn(0)">收运费</button>
|
|
|
|
|
- <button class="admin-button-com middle" :class="[form.homeUnMeet == 1 ? 'blue' : 'default']" @click="homeUnMeetBtn(1)" style="margin-left:4upx;">收包装费</button>
|
|
|
|
|
- <button class="admin-button-com middle" :class="[form.homeUnMeet == 2 ? 'blue' : 'default']" @click="homeUnMeetBtn(2)" style="margin-left:4upx;">不能买</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
- <!-- homeUnMeet 为 0/1 时填写对应费用;为 2(不能下单)时不展示 -->
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1 && form.homeUnMeet != 2">
|
|
|
|
|
- <view class="tui-title">{{ homeUnFeeLabel }}</view>
|
|
|
|
|
- <view style="display:flex;align-items:center;">
|
|
|
|
|
- <input v-model="userInfo.homeUnFee" @click="userInfo.homeUnFee=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="digit" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
- <text style="margin-right:30upx;">元</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button class="admin-button-com blue middle" @tap="changeHomeParams(true)">确定</button>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <block v-if="form.homeRule == 1">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">送货上门</view>
|
|
|
|
|
+ <view style="margin-left: auto; display: flex; align-items: center;">
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.home == 1 ? 'blue' : 'default']" @click="changeHomeBtn(1)">启用</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.home == 0 ? 'blue' : 'default']" @click="changeHomeBtn(0)" style="margin-left:20upx;">禁用</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
+ <view class="tui-title">最低消费金额</view>
|
|
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
|
|
+ <input v-model="userInfo.homeAmount" @click="userInfo.homeAmount=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="不限制填0" type="digit" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
+ <text style="margin-right:30upx;">元</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="admin-button-com blue middle" @tap="changeHomeParams">确定</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
+ <view class="tui-title">最低消费扎数</view>
|
|
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
|
|
+ <input v-model="userInfo.homeNum" @click="userInfo.homeNum=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="不限制填0" type="number" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
+ <text style="margin-right:30upx;">扎</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="admin-button-com blue middle" @tap="changeHomeParams">确定</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <!-- 不满最低消费要求时的处理方式:收运费 / 收包装费 / 不能下单 -->
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1">
|
|
|
|
|
+ <view class="tui-title">不满最低要求</view>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.homeUnMeet == 0 ? 'blue' : 'default']" @click="homeUnMeetBtn(0)">收运费</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.homeUnMeet == 1 ? 'blue' : 'default']" @click="homeUnMeetBtn(1)" style="margin-left:4upx;">收包装费</button>
|
|
|
|
|
+ <button class="admin-button-com middle" :class="[form.homeUnMeet == 2 ? 'blue' : 'default']" @click="homeUnMeetBtn(2)" style="margin-left:4upx;">不能买</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <!-- homeUnMeet 为 0/1 时填写对应费用;为 2(不能下单)时不展示 -->
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.home == 1 && form.homeUnMeet != 2">
|
|
|
|
|
+ <view class="tui-title">{{ homeUnFeeLabel }}</view>
|
|
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
|
|
+ <input v-model="userInfo.homeUnFee" @click="userInfo.homeUnFee=''" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="digit" style="width:245upx;border:1upx solid #ddd;margin-right:10upx;height:70upx;text-align:center;" />
|
|
|
|
|
+ <text style="margin-right:30upx;">元</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button class="admin-button-com blue middle" @tap="changeHomeParams(true)">确定</button>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ </block>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -491,6 +499,7 @@ export default {
|
|
|
showStock:0,
|
|
showStock:0,
|
|
|
passStatus:0,
|
|
passStatus:0,
|
|
|
home:1,
|
|
home:1,
|
|
|
|
|
+ homeRule: 0,
|
|
|
homeAmount:0,
|
|
homeAmount:0,
|
|
|
homeNum:0,
|
|
homeNum:0,
|
|
|
homeUnMeet:0,
|
|
homeUnMeet:0,
|
|
@@ -1122,6 +1131,24 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ changeHomeRuleBtn(value) {
|
|
|
|
|
+ if (Number(this.form.homeRule) === value) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.form.homeRule = value
|
|
|
|
|
+ modifyHomeParams({
|
|
|
|
|
+ id: this.option.id,
|
|
|
|
|
+ homeRule: value,
|
|
|
|
|
+ homeAmount: this.userInfo.homeAmount,
|
|
|
|
|
+ homeNum: this.userInfo.homeNum,
|
|
|
|
|
+ homeUnMeet: this.form.homeUnMeet,
|
|
|
|
|
+ homeUnFee: this.form.homeUnMeet === 2 ? 0 : (this.userInfo.homeUnFee || 0)
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ this.$msg(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
changeHomeBtn(value){
|
|
changeHomeBtn(value){
|
|
|
if (Number(this.form.home) === value) {
|
|
if (Number(this.form.home) === value) {
|
|
|
return
|
|
return
|
|
@@ -1189,6 +1216,7 @@ export default {
|
|
|
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.home = this.userInfo.home
|
|
|
|
|
+ this.form.homeRule = this.userInfo.homeRule != null ? Number(this.userInfo.homeRule) : 0
|
|
|
this.form.homeUnMeet = this.userInfo.homeUnMeet != null ? Number(this.userInfo.homeUnMeet) : 0
|
|
this.form.homeUnMeet = this.userInfo.homeUnMeet != null ? Number(this.userInfo.homeUnMeet) : 0
|
|
|
this.form.staffId = this.userInfo.staffId
|
|
this.form.staffId = this.userInfo.staffId
|
|
|
this.form.staffName = this.userInfo.staffName
|
|
this.form.staffName = this.userInfo.staffName
|