|
|
@@ -28,18 +28,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- </template>
|
|
|
-
|
|
|
-
|
|
|
- <uni-popup ref="refrshRef" type="dialog">
|
|
|
- <view style="width:60vw;height:70vh;background-color: white;padding:70upx 20upx 0 20upx;">
|
|
|
- <view style="margin-bottom:40upx;text-align: center;font-size:24upx;">花材价格已修改,请刷新页面</view>
|
|
|
- <view style="text-align:center;">
|
|
|
- <button class="admin-button-com mini-btn default" @click="cancelRefresh">取消</button>
|
|
|
- <button class="admin-button-com mini-btn default" @click="confirmRefresh" style="margin-left:30upx;">确认</button>
|
|
|
- </view>
|
|
|
+ <view style="display: flex;align-items: center;justify-content: center;width:56vw;height:70upx;
|
|
|
+ background-color: white;color:black;position: absolute;bottom:0upx;border:1upx solid #CCCCCC;left:33vw;font-size:25upx;z-index:80;" v-if="mustUpdate">
|
|
|
+ 花材价格已修改,请
|
|
|
+ <button class="admin-button-com mini-btn" @click="confirmRefresh" style="font-size:20upx;margin-left:10upx;margin-right:28upx;">刷新</button>
|
|
|
+ <text @click="cancelRefresh">x</text>
|
|
|
</view>
|
|
|
- </uni-popup>
|
|
|
+
|
|
|
+ </template>
|
|
|
|
|
|
|
|
|
<uni-popup ref="myCustomRef" background-color="#fff" type="center" :animation="false">
|
|
|
@@ -83,7 +79,8 @@ export default {
|
|
|
hasChooseCustomer:true,
|
|
|
T:null,
|
|
|
customerInfo:{hasSelect:0,customId:0,customName:''},
|
|
|
- myCustomList:[]
|
|
|
+ myCustomList:[],
|
|
|
+ mustUpdate:false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -148,6 +145,7 @@ export default {
|
|
|
this.customId = this.getMyShopInfo.defaultCustomId && this.getMyShopInfo.defaultCustomId > 0 ? Number(this.getMyShopInfo.defaultCustomId):0
|
|
|
this.customName = '快捷开单'
|
|
|
this.$refs.rightItemRef.renewMyRightItem(this.customId)
|
|
|
+ this.beginRemind()
|
|
|
},
|
|
|
init(){
|
|
|
//这个页面有二个这方法,不能去掉,不然会造成:全部缓存清了,点选客没有客户可选
|
|
|
@@ -175,6 +173,7 @@ export default {
|
|
|
this.customId = Number(info.id)
|
|
|
this.customName = info.name
|
|
|
this.$refs.rightItemRef.renewMyRightItem(this.customId)
|
|
|
+ this.beginRemind()
|
|
|
},
|
|
|
cancelRefresh(){
|
|
|
this.beginRemind()
|
|
|
@@ -185,17 +184,18 @@ export default {
|
|
|
},
|
|
|
beginRemind(){
|
|
|
let that = this
|
|
|
+ this.mustUpdate = false
|
|
|
clearInterval(that.T)
|
|
|
that.T = setInterval(function(){
|
|
|
checkRefresh().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
if(res.data.remind && res.data.remind == 1){
|
|
|
clearInterval(that.T)
|
|
|
- that.$refs.refrshRef.open('center')
|
|
|
+ that.mustUpdate = true
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- }, 20000)
|
|
|
+ }, 30000)
|
|
|
},
|
|
|
updateRightItem(){
|
|
|
this.customId = this.getMyShopInfo.defaultCustomId && this.getMyShopInfo.defaultCustomId > 0 ? Number(this.getMyShopInfo.defaultCustomId):0
|
|
|
@@ -203,6 +203,7 @@ export default {
|
|
|
//要调用rightItemRef里的方法更新,不能这边直接请求product.js里方法更新,因为会造成扫码那块出问题,识别不到,关键词hzg_scan_right_item
|
|
|
this.$refs.rightItemRef.renewMyRightItem(this.customId)
|
|
|
this.getCustomData()
|
|
|
+ this.beginRemind()
|
|
|
},
|
|
|
changeProperty(property){
|
|
|
this.currentProperty = property
|