tabulation.vue
7.8 KB
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
194
195
196
197
198
199
200
201
202
203
204
205
206
<template>
<div>
<!-- 列表区域-->
<el-row>
<template>
<el-table
:data="tableData"
border
:cell-style="{textAlign:'center'}"
style="border-radius: 10px 10px 0px 0px;line-height: 25px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
>
<el-table-column
fixed
prop="waybill"
label="货物单号"
width="120">
</el-table-column>
<el-table-column
prop="vol"
label="体积"
width="60">
</el-table-column>
<el-table-column
prop="weight"
label="重量"
width="60">
</el-table-column>
<el-table-column
prop="pcs"
label="件数"
width="60">
</el-table-column>
<el-table-column
prop="billweight"
label="计费重量"
width="70">
</el-table-column>
<el-table-column
prop="area"
label="库区"
width="60">
</el-table-column>
<el-table-column
prop="location"
label="库位"
width="60">
</el-table-column>
<el-table-column
prop="serialnumber"
label="流水号"
width="160">
</el-table-column>
<el-table-column
prop="station"
label="出入库场站"
width="100">
</el-table-column>
<el-table-column
prop="status"
label="状态"
width="80">
<template slot-scope="scope">
<span v-if="scope.row.status ==='0'">失败</span>
<span v-if="scope.row.status ==='1'">成功</span>
</template>
</el-table-column>
<el-table-column
prop="transcar"
label="运输车辆信息"
width="100">
</el-table-column>
<el-table-column
prop="transtype"
label="交易类型"
width="100">
</el-table-column>
<el-table-column
prop="custel"
label="客户联系电话"
width="140">
</el-table-column>
<el-table-column
prop="customer"
label="联系人姓名"
width="100">
</el-table-column>
<el-table-column
prop="customername"
label="客户名称"
width="80">
</el-table-column>
<el-table-column
prop="goodstype"
label="货物类型"
width="80">
</el-table-column>
<el-table-column
prop="house"
label="出入库仓库"
width="100">
</el-table-column>
<el-table-column
prop="ietype"
label="类型"
width="60">
<template slot-scope="scope">
<span v-if="scope.row.ietype ==='I'">进</span>
<span v-if="scope.row.ietype ==='E'">出</span>
</template>
</el-table-column>
<el-table-column
prop="opter"
label="出入库经办人"
width="100">
</el-table-column>
<el-table-column
prop="opttime"
label="出入库时间"
width="140">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="160">
<template slot-scope="scope">
<el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-row>
<el-row style="margin-top: 10px" class="toolbar">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="tabulationInfo.pageNum"
:page-size="tabulationInfo.pageSize"
:page-sizes="[10, 50, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-row>
</div>
</template>
<script>
import {selectNewInventroyrecords} from "../../api/consigner/station";
export default {
name: "Tabulation",
props: [
'tabulationInfo'
],
data(){
return {
tableData: [],
total: 0
}
},
methods:{
getList() {
const _this = this
selectNewInventroyrecords(this.tabulationInfo).then((response) => {
const res = response.data
console.log(response.data)
if (res.code !== '200') {
return _this.$message.error('获取消息收发记录,失败!')
}
// 获取列表数据
_this.tableData = res.data.list
// 获取列表的总记录数
_this.total = res.data.total
_this.$message.success('获取消息收发记录,成功!')
}).catch(error => {
// 关闭加载
_this.$message.error(error.toString())
})
},
handleSizeChange(val) {
this.tabulationInfo.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.tabulationInfo.pageNum = val
this.getList()
},
},
mounted() {
this.getList();
},
watch:{
tabulationInfo(value){
console.log('from parent='+JSON.stringify(value))
}
}
}
</script>
<style scoped>
</style>