1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<template>
<view style="background: #fff; min-height: calc(100vh - 44px)">
<view class="search-header">
<scanlistener
v-if="showScanlistener"
suffixIcon="scan"
v-model="keyword"
:placeholder="$t('请扫描自编号')"
@iconClick="scanCode"
@confirm="searchOrder"
@submit="keyword=$event; searchOrder()"></scanlistener>
</view>
<view class="scroll">
<view class="list-row list-header">
<view class="">{{$t('自编号')}}</view>
<view class="">{{$t('柜号')}}</view>
<view class="">{{$t('目的地')}}</view>
<view class="">{{$t('订单数')}}</view>
<view class="">{{$t('入仓原因')}}</view>
<view class="">{{$t('状态')}}</view>
</view>
<view>
<view v-for="(v, key) in listData" :class="{'list-row': true, 'row-bg' : key % 2 === 0}" :key="key" @tap="toDetail(v)">
<view class="">
{{ v.selfNo }}
</view>
<view class="">{{ v.cubNo }}</view>
<view class="">{{ v.destWarehouseResp.titleZh }}</view>
<view class="">{{ v.orderNum }}</view>
<view v-if="v.overMachineAbnormalStatus === 1">{{$t('删单退场')}}</view>
<view v-else class="">{{ {1: $t('全部退场'), 2: $t('部分退场'), 3: $t('删单退场')}[v.dcCheckStatus] }}</view>
<view class="">{{ v.checkDealStatus == 1 ? $t('已处理') : $t('待处理') }}</view>
</view>
<uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
</view>
</view>
</view>
</template>
<script>
import util from '../../util/util.js';
import { getExitPage } from './api'
export default {
name: 'warehouseing-list',
data() {
return {
listData: [],
page: 1,
keyword: '',
// oldKeyword: '',
status: 'more',
contentText: {
contentdown: this.$t('上拉加载更多'),
contentrefresh: this.$t('加载中'),
contentnomore: this.$t('没有更多')
},
returnLoadId: null,
// 7(垫),8(木),9(纸)
advanceTypeList:[
{id:7,value:this.$t('垫')},
{id:8,value:this.$t('木')},
{id:9,value:this.$t('纸')},
],
modalShow:!1,
modalId:'',
modalData:{},
onHideFlag:false
};
},
methods: {
scanCode() {
uni.scanCode({
success: (res) => {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
this.keyword = res.result
this.searchOrder()
}
})
},
searchOrder() {
this.page = 1
setTimeout(() => {
this.getData(this.keyword)
}, 100)
},
getData(selfNo) {
let that = this
const params = {
page: this.page,
rows: 20,
selfNo
}
getExitPage(params).then(res => {
const data = res.list
if (that.page == 1) this.listData = [];
if (data.length > 0) {
that.listData = that.listData.concat(data);
that.status = 'more';
}
if (res.total === that.listData.length) that.status = 'noMore';
uni.stopPullDownRefresh();
});
},
toDetail(data) {
console.log(data);
this.modalId = data.id;
this.modalData = data;
uni.navigateTo({
url: './detail?id=' + data.id
});
},
},
onPullDownRefresh() {
this.page = 1;
this.getData();
},
onReachBottom() {
if (this.status == 'more') {
this.status = 'loading';
this.page++;
this.getData();
}
},
onLoad: function(option) {
uni.setNavigationBarTitle({
title:this.$t('空运退场到仓列表')
})
this.getData();
},
onShow(){
if(this.onHideFlag){
this.page = 1;
this.getData(this.keyword);
}
},
onHide(){
this.onHideFlag = true;
},
onBackPress(options) {
uni.reLaunch({
url: '../index/index'
});
return true;
}
};
</script>
<style lang="scss" scoped>
.search-header{
::v-deep .uni-easyinput__content {
border-radius: 20px;
padding-right: 10px;
background: rgba($color: #fff, $alpha: 0.5) !important;
border: none;
// opacity: 0.5;
}
::v-deep .uni-input-placeholder {
padding-left: 8px;
color: #b2c9f3;
}
::v-deep .uni-input-input {
padding-left: 8px;
}
}
.scroll {
margin-top: -8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
padding: 8px;
background: #fff;
.list-row {
display: flex;
align-items: center;
// line-height: 24px;
padding: 8px 0;
view {
flex: 1;
text-align: center;
padding: 0 2px;
}
}
.list-header {
font-weight: bold;
}
.row-bg {
background: #ebebed;
}
}
</style>