|
|
@@ -5,40 +5,25 @@
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
|
|
|
- <block v-if="customId == 0">
|
|
|
- <view class="custom-app-casher-area">
|
|
|
- <view class="nav-left">
|
|
|
- <navComponent navType="casher"></navComponent>
|
|
|
- </view>
|
|
|
- <view class="select-custom">
|
|
|
- <customerList @fastKd="fastKd" @selectCustomer="selectCustomer" @cancelChooseCustomer="cancelSelect"> </customerList>
|
|
|
- </view>
|
|
|
+ <view class="item-app-casher-area">
|
|
|
+ <view class="nav-left">
|
|
|
+ <navComponent navType="casher"></navComponent>
|
|
|
</view>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
|
|
|
- <view class="item-app-casher-area">
|
|
|
- <view class="nav-left">
|
|
|
- <navComponent navType="casher"></navComponent>
|
|
|
- </view>
|
|
|
- <!-- 已选花材列表 -->
|
|
|
- <view class="itemList-box">
|
|
|
- <leftArea v-if="!$util.isEmpty(selectList)" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"></leftArea>
|
|
|
- <leftGroup v-else :customId.sync="customId"></leftGroup>
|
|
|
- </view>
|
|
|
- <!-- 分类和花材图片 -->
|
|
|
- <view class="all-item-area">
|
|
|
- <rightGoods v-if="currentProperty == 0" ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightGoods>
|
|
|
- <rightItem v-else ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightItem>
|
|
|
- </view>
|
|
|
- <!-- 按钮操作 -->
|
|
|
- <view class="open-box">
|
|
|
- <consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @clearAll="clearAll"
|
|
|
- :customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @cancelKdFn="cancelKdFn" @rightItemRefresh="rightItemRefresh"></consoleButton>
|
|
|
- </view>
|
|
|
+ <view class="itemList-box">
|
|
|
+ <leftArea v-if="!$util.isEmpty(selectList)" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"></leftArea>
|
|
|
+ <leftGroup v-else :customId.sync="customId"></leftGroup>
|
|
|
</view>
|
|
|
|
|
|
- </block>
|
|
|
+ <view class="all-item-area">
|
|
|
+ <rightItem ref="rightItemRef" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightItem>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="open-box">
|
|
|
+ <consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @clearAll="clearAll" @showCustomPop="showCustomPop"
|
|
|
+ :customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @rightItemRefresh="rightItemRefresh"></consoleButton>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
@@ -46,6 +31,10 @@
|
|
|
<uni-popup-dialog type="info" cancelText="取消" @close="cancelRefresh" confirmText="确认" title="提示" content="花材价格已修改,请刷新" @confirm="confirmRefresh"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <uni-popup ref="myCustomRef" background-color="#fff" type="center" :animation="false">
|
|
|
+ <customerList @fastKd="fastKd" ref="inCustomRef" @confirmCustom="confirmCustom" @cancelChoose="cancelChoose"> </customerList>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -90,12 +79,6 @@ export default {
|
|
|
|
|
|
this.beginRemind()
|
|
|
},
|
|
|
- onShow(){
|
|
|
- if(this.option.customId){
|
|
|
- this.customId = this.option.customId
|
|
|
- this.customName = this.option.customName
|
|
|
- }
|
|
|
- },
|
|
|
onUnload(){
|
|
|
clearInterval(this.T)
|
|
|
},
|
|
|
@@ -106,13 +89,22 @@ export default {
|
|
|
this.isLogin = 0
|
|
|
}else{
|
|
|
this.isLogin = 1
|
|
|
+
|
|
|
+ this.customId = this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0 ? Number(this.getLoginInfo.skCustomId):0
|
|
|
+ this.customName = '快捷开单'
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
watch:{
|
|
|
getLoginInfo: {
|
|
|
handler(newValue) {
|
|
|
if(this.$util.isEmpty(newValue.admin) == false && newValue.admin.currentShopId > 0){
|
|
|
this.isLogin = 1
|
|
|
+
|
|
|
+ this.customId = newValue.skCustomId && newValue.skCustomId>0 ? Number(newValue.skCustomId) : 0
|
|
|
+ this.customName = '快捷开单'
|
|
|
+
|
|
|
}else{
|
|
|
this.isLogin = 0
|
|
|
}
|
|
|
@@ -121,25 +113,30 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
fastKd(){
|
|
|
- if(this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0){
|
|
|
- let currentId = this.getLoginInfo.skCustomId
|
|
|
- this.customId = Number(currentId)
|
|
|
- this.customName = '快捷开单'
|
|
|
- }else{
|
|
|
- this.$msg('请先设置开单门店')
|
|
|
- }
|
|
|
+ this.$refs.inCustomRef.focusInput = false
|
|
|
+ this.$refs.myCustomRef.close()
|
|
|
+ this.customId = this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0 ? Number(this.getLoginInfo.skCustomId) : 0
|
|
|
+ this.customName = '快捷开单'
|
|
|
+ this.$refs.rightItemRef.currentCustomId = this.customId
|
|
|
+ this.$refs.rightItemRef.itemRefresh()
|
|
|
},
|
|
|
- cancelKdFn(){
|
|
|
- this.customId = 0
|
|
|
- this.customName = ''
|
|
|
+ showCustomPop(){
|
|
|
+ this.$refs.inCustomRef.searchUser = ''
|
|
|
+ this.$refs.inCustomRef.searchCustomer()
|
|
|
+ this.$refs.myCustomRef.open('top')
|
|
|
+ this.$refs.inCustomRef.focusInput = true
|
|
|
},
|
|
|
- cancelSelect(){
|
|
|
- this.customId = 0
|
|
|
- this.customName = ''
|
|
|
+ cancelChoose(){
|
|
|
+ this.$refs.inCustomRef.focusInput = false
|
|
|
+ this.$refs.myCustomRef.close()
|
|
|
},
|
|
|
- selectCustomer(info){
|
|
|
+ confirmCustom(info){
|
|
|
+ this.$refs.inCustomRef.focusInput = false
|
|
|
+ this.$refs.myCustomRef.close()
|
|
|
this.customId = Number(info.id)
|
|
|
this.customName = info.name
|
|
|
+ this.$refs.rightItemRef.currentCustomId = this.customId
|
|
|
+ this.$refs.rightItemRef.itemRefresh()
|
|
|
},
|
|
|
clearAll(){
|
|
|
this.customId = 0
|
|
|
@@ -166,8 +163,10 @@ export default {
|
|
|
})
|
|
|
}, 15000)
|
|
|
},
|
|
|
- //开单完成之后更新花材的库存
|
|
|
rightItemRefresh(){
|
|
|
+ this.customId = this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0 ? Number(this.getLoginInfo.skCustomId) : 0
|
|
|
+ this.customName = '快捷开单'
|
|
|
+ this.$refs.rightItemRef.currentCustomId = this.customId
|
|
|
this.$refs.rightItemRef.itemRefresh()
|
|
|
},
|
|
|
changeProperty(property){
|