|
|
@@ -8,12 +8,12 @@
|
|
|
</view>
|
|
|
<scroll-view class="itemList-item_box" scroll-y="true" @scrolltolower="reachBottom" lower-threshold="50" refresher-enabled="true"
|
|
|
:refresher-triggered="triggered" @refresherrefresh="onRefresh" @refresherrestore="onRestore">
|
|
|
- <view v-for="item in list.data" :key="item.id" class="show-item_box" @click="getOrder(item,1)">
|
|
|
+ <view v-for="item in list.data" :key="item.id" class="show-item_box" @click="getOrderInfo(item,1)">
|
|
|
<view :class="[selectOrderId==item.id ? 'active' : 'not-active', 'item-body_box']">
|
|
|
<view class="flower-name_box">
|
|
|
<view class="current-item-title">
|
|
|
<text v-if="item.fromType==4">美团 {{item.thirdSn}}</text>
|
|
|
- <text v-else>{{item.fromType==2 ? '商城' : item.staffName}} {{item.name}}</text>
|
|
|
+ <text v-else>{{item.fromType==2 ? '商城' : item.staffName}}</text>
|
|
|
</view>
|
|
|
<image class="flower-image" :src="item.cover"></image>
|
|
|
<text style="position:absolute;top:2upx;left:90upx;font-size:11upx;">{{item.sn}}</text>
|
|
|
@@ -86,6 +86,11 @@ export default {
|
|
|
if(this.mt == 'yes'){
|
|
|
this.snTitle = '美团编号'
|
|
|
}
|
|
|
+
|
|
|
+ let that = this
|
|
|
+ setInterval(function () {
|
|
|
+ that.getWorkInfoList(1)
|
|
|
+ },5000)
|
|
|
},
|
|
|
methods:{
|
|
|
refreshList(){
|
|
|
@@ -124,12 +129,12 @@ export default {
|
|
|
onRestore(){
|
|
|
console.log('onRestore')
|
|
|
},
|
|
|
- getOrder(item,click=0){
|
|
|
+ getOrderInfo(item,click=0){
|
|
|
if(click == 1){
|
|
|
this.$util.hitVoice()
|
|
|
}
|
|
|
this.selectOrderId = item.id
|
|
|
- this.$emit('getOrder',item)
|
|
|
+ this.$emit('getOrderInfo',item)
|
|
|
},
|
|
|
changeStatus(status){
|
|
|
this.status = status
|
|
|
@@ -145,16 +150,20 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
}
|
|
|
},
|
|
|
- getWorkInfoList(){
|
|
|
- let params = {page: this.list.page,status:this.status,sn:this.sn,thirdSn:this.thirdSn,isCashier:1}
|
|
|
+ getWorkInfoList(type=0){
|
|
|
+ let params = {page: this.list.page,pageSize:50,status:this.status,sn:this.sn,thirdSn:this.thirdSn,isCashier:1}
|
|
|
if(this.mt == 'yes'){
|
|
|
params = {...params,fromType:4}
|
|
|
}
|
|
|
return getWorkList(params).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
+ if(type == 1){
|
|
|
+ this.list.data = res.data.list
|
|
|
+ return
|
|
|
+ }
|
|
|
this.completes(res)
|
|
|
if(this.list.data && this.list.data[0]){
|
|
|
- this.getOrder(this.list.data[0])
|
|
|
+ this.getOrderInfo(this.list.data[0])
|
|
|
}
|
|
|
}
|
|
|
})
|