|
@@ -33,6 +33,11 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <uni-popup ref="refrshRef" type="dialog">
|
|
|
|
|
+ <uni-popup-dialog type="info" cancelText="取消" @close="cancelRefresh" confirmText="确认" title="提示" content="花材价格已修改,请刷新" @confirm="confirmRefresh"></uni-popup-dialog>
|
|
|
|
|
+ </uni-popup>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -46,6 +51,7 @@ import leftArea from './components/leftArea.vue'
|
|
|
import leftGroup from './components/leftGroup.vue'
|
|
import leftGroup from './components/leftGroup.vue'
|
|
|
import navComponent from './components/nav.vue'
|
|
import navComponent from './components/nav.vue'
|
|
|
import loginComponent from './login.vue'
|
|
import loginComponent from './login.vue'
|
|
|
|
|
+import { checkRefresh } from '@/api/item'
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
export default {
|
|
export default {
|
|
|
name: "cash",
|
|
name: "cash",
|
|
@@ -64,7 +70,8 @@ export default {
|
|
|
currentJobType:'bill',
|
|
currentJobType:'bill',
|
|
|
currentJobId:0,
|
|
currentJobId:0,
|
|
|
hasChooseCustomer:true,
|
|
hasChooseCustomer:true,
|
|
|
- changeFlower:2
|
|
|
|
|
|
|
+ changeFlower:2,
|
|
|
|
|
+ T:null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -72,6 +79,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
this.initDataFromStorage()
|
|
this.initDataFromStorage()
|
|
|
|
|
+
|
|
|
|
|
+ this.beginRemind()
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ onUnload(){
|
|
|
|
|
+ clearInterval(this.T)
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
},
|
|
},
|
|
@@ -94,6 +107,26 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ cancelRefresh(){
|
|
|
|
|
+ this.beginRemind()
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmRefresh(){
|
|
|
|
|
+ clearInterval(this.T)
|
|
|
|
|
+ this.$util.pageTo({ url: "/pages/home/cash",type:2})
|
|
|
|
|
+ },
|
|
|
|
|
+ beginRemind(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ clearInterval(that.T)
|
|
|
|
|
+ that.T = setInterval(function(){
|
|
|
|
|
+ checkRefresh().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ if(res.data.remind && res.data.remind == 1){
|
|
|
|
|
+ that.$refs.refrshRef.open('center')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 8000);
|
|
|
|
|
+ },
|
|
|
//开单完成之后更新花材的库存
|
|
//开单完成之后更新花材的库存
|
|
|
rightItemRefresh(){
|
|
rightItemRefresh(){
|
|
|
this.$refs.rightItemRef.itemRefresh()
|
|
this.$refs.rightItemRef.itemRefresh()
|