|
|
@ -25,15 +25,15 @@ |
|
|
|
<image class="nmm-close" @click="isChangeNum = false" src="/static/images/icon/x_close.png"></image> |
|
|
|
<view class="nmm-tit">修改现场散客人数</view> |
|
|
|
<view class="nmm-info"> |
|
|
|
<view class="ni-num">当前现场散客人数为:69</view> |
|
|
|
<view class="ni-num">当前现场散客人数为:{{peopleInfo.present_person_number || 0}}</view> |
|
|
|
<view class="ni-ipt"> |
|
|
|
<input placeholder="请输入散客人数" type="number" /> |
|
|
|
<input placeholder="请输入散客人数" v-model="changeNum" type="number" /> |
|
|
|
</view> |
|
|
|
<view class="ni-tip">修改现场人数可能会影响现场灯光开关,请谨慎操作!</view> |
|
|
|
</view> |
|
|
|
<view class="nmm-btns"> |
|
|
|
<view @click="isChangeNum = false">取消</view> |
|
|
|
<view>确认</view> |
|
|
|
<view @click="confirmChange">确认</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -58,7 +58,8 @@ export default { |
|
|
|
name: '' |
|
|
|
}, |
|
|
|
peopleInfo: {}, |
|
|
|
dateStr: '-' |
|
|
|
dateStr: '-', |
|
|
|
changeNum: '', |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
@ -70,6 +71,41 @@ export default { |
|
|
|
this.clearTime(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
confirmChange: util.debounce(function(){ |
|
|
|
let { changeNum } = this; |
|
|
|
if(isNaN(changeNum))return util.showNone('请输入正确人数!'); |
|
|
|
this.isChangeNum = false; |
|
|
|
this.setStadiumPresentNumber(changeNum); |
|
|
|
}, 200, true), |
|
|
|
setStadiumPresentNumber(num){ |
|
|
|
let { curStadium } = this; |
|
|
|
util.showLoad(); |
|
|
|
servers.get({ |
|
|
|
url: API.writeOff.setStadiumPresentNumber, |
|
|
|
data: { |
|
|
|
brand_id: curStadium.curStadium, |
|
|
|
stadium_id: curStadium.id, |
|
|
|
number: +num, |
|
|
|
}, |
|
|
|
isDefaultGet: false, |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
util.hideLoad(); |
|
|
|
if(res.data.code == 0){ |
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
setTimeout(_=>{ |
|
|
|
this.getUserNum({ |
|
|
|
stadium_id: curStadium.id, |
|
|
|
brand_id: curStadium.brand_id |
|
|
|
}) |
|
|
|
this.initInertval(); |
|
|
|
}, 1200) |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(util.hideLoad) |
|
|
|
}, |
|
|
|
initInertval(){ |
|
|
|
this.clearTime(); |
|
|
|
let { curStadium } = this; |
|
|
@ -86,6 +122,7 @@ export default { |
|
|
|
clearInterval(timer); |
|
|
|
timer = null; |
|
|
|
}, |
|
|
|
|
|
|
|
stadiumChange(e){ |
|
|
|
let { stadiumList } = this; |
|
|
|
let _curStadium = stadiumList[e.detail.value] || {}; |
|
|
|