3f535f30
杨鑫
'初始'
|
1
2
3
4
5
|
<template>
<!-- <div style="padding: 10px;background-color:#F2F3F5"> -->
<div style="background-color:#F2F3F5">
<div class="history">
<div style="background-color:#Fff;padding:20px 20px 0 20px">
|
9683c4af
杨鑫
'最新'
|
6
|
|
3f535f30
杨鑫
'初始'
|
7
8
|
<!-- 顶部搜索 -->
<div class="toolbar">
|
8dca79c8
杨鑫
1
|
9
|
<el-form ref="formInline" :inline="true" :model="formInline">
|
3f535f30
杨鑫
'初始'
|
10
11
|
<el-form-item label="日期">
<el-date-picker
|
8dca79c8
杨鑫
1
|
12
|
v-model="formInline.dates"
|
3f535f30
杨鑫
'初始'
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
type="daterange"
style="width:220px"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd"
/>
</el-form-item>
<el-form-item label-width="0">
<el-button @click="search" style="background-color: #3F9B6A;color: #fff;">查询</el-button>
<el-button @click="clear" class="buttonHover"
style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button>
</el-form-item>
</el-form>
</div>
</div>
<!-- 表格 -->
|
8dca79c8
杨鑫
1
|
32
|
<div class="content_table" style="padding: 15px 0px 10px 0px;background-color:#F2F3F5">
|
3f535f30
杨鑫
'初始'
|
33
34
35
|
<div style="background-color: #fff;padding: 10px;margin-bottom: 20px;">
<div class="table">
<el-table
|
8dca79c8
杨鑫
1
|
36
|
:data="tableData"
|
3f535f30
杨鑫
'初始'
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
>
<el-table-column prop="id" label="序号">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column label="库存类型" prop="cl">
<template slot-scope="scope">
商品库存
</template>
</el-table-column>
<el-table-column prop="productName" label="商品名称">
</el-table-column>
|
8dca79c8
杨鑫
1
|
52
53
|
<el-table-column prop="nowNum" label="现存数量" />
<el-table-column prop="variationType" label="变动类型">
|
3f535f30
杨鑫
'初始'
|
54
|
<template slot-scope="scope">
|
8dca79c8
杨鑫
1
|
55
|
{{scope.row.variationType==1?'增加':'减少'}}
|
3f535f30
杨鑫
'初始'
|
56
57
|
</template>
</el-table-column>
|
8dca79c8
杨鑫
1
|
58
|
<el-table-column prop="variationNum" label="变动数量" />
|
3f535f30
杨鑫
'初始'
|
59
60
61
62
63
64
65
|
<!-- <el-table-column prop="btime" label="变动时间" />
<el-table-column prop="by" label="变动原因" />
<el-table-column prop="bp" label="操作人员" /> -->
</el-table>
</div>
<!-- 分页 -->
<div class="fenye">
|
8dca79c8
杨鑫
1
|
66
67
68
|
<div style="line-height:200%">共{{total}}条</div>
<el-pagination class="pagination" :hide-on-single-page="flag" background :current-page="formInline.pageNumber+1"
layout="prev, pager,next" :total="total "
|
9683c4af
杨鑫
'最新'
|
69
|
@current-change="handleCurrentChange" />
|
3f535f30
杨鑫
'初始'
|
70
71
72
73
74
75
76
77
78
|
</div>
</div>
</div>
</div>
</div>
</template>
<script>
|
8dca79c8
杨鑫
1
|
79
|
import {cereShopProductInventoryLog} from '@/api/psRanking'
|
3f535f30
杨鑫
'初始'
|
80
81
82
|
export default {
data() {
return {
|
9683c4af
杨鑫
'最新'
|
83
|
total: 0,
|
3f535f30
杨鑫
'初始'
|
84
85
|
pageSize: 10,
currentPage: 1,
|
8dca79c8
杨鑫
1
|
86
|
|
3f535f30
杨鑫
'初始'
|
87
|
formInline: {
|
8dca79c8
杨鑫
1
|
88
89
90
91
|
dates:[],
startTime:'',
endTime:'',
pageNumber:0,
|
3f535f30
杨鑫
'初始'
|
92
93
94
|
pageSize: 10
},
tableData: [],
|
8dca79c8
杨鑫
1
|
95
|
flag:false,
|
3f535f30
杨鑫
'初始'
|
96
97
98
99
100
101
102
|
}
},
mounted() {
this.getAll()
},
methods: {
async getAll(){
|
8dca79c8
杨鑫
1
|
103
104
|
const Orderlist = await cereShopProductInventoryLog(this.formInline)
this.tableData = Orderlist.data.content
|
3f535f30
杨鑫
'初始'
|
105
|
this.total = this.tableData.length
|
9683c4af
杨鑫
'最新'
|
106
|
|
3f535f30
杨鑫
'初始'
|
107
108
|
},
async search(){
|
8dca79c8
杨鑫
1
|
109
110
111
112
113
114
|
if(this.formInline.dates.length!=0){
this.formInline.startTime = this.formInline.dates[0]
this.formInline.endTime = this.formInline.dates[1]
}
const Orderlist = await cereShopProductInventoryLog(this.formInline)
this.tableData = Orderlist.data.content
|
9683c4af
杨鑫
'最新'
|
115
|
this.total = this.tableData.length
|
3f535f30
杨鑫
'初始'
|
116
117
|
},
clear(){
|
8dca79c8
杨鑫
1
|
118
119
120
121
122
123
124
|
this.formInline= {
dates:[],
startTime:'',
endTime:'',
pageNumber:0,
pageSize: 10
}
|
3f535f30
杨鑫
'初始'
|
125
126
127
|
this.getAll()
},
handleCurrentChange(val) {
|
8dca79c8
杨鑫
1
|
128
129
|
this.formInline.pageNumber = val -1
this.getAll()
|
3f535f30
杨鑫
'初始'
|
130
131
|
},
handleSizeChange(val) {
|
8dca79c8
杨鑫
1
|
132
|
this.formInline.pageSize = val
|
3f535f30
杨鑫
'初始'
|
133
134
135
136
137
138
139
140
141
142
143
144
145
|
},
},
}
</script>
<style lang='scss' scoped>
.history{
padding: 0px;
padding-left: 10px;
min-height: calc(100vh - 50px - 20px);
}
::v-deep .el-form-item__label{
font-weight: normal;
|
8dca79c8
杨鑫
1
|
146
|
font-size: 14px;
|
3f535f30
杨鑫
'初始'
|
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
}
::v-deep .btn .el-button:focus,
.el-button:hover {
border: 1px solid #3F9B6A;
}
::v-deep .el-button {
border: 1px solid #3F9B6A;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #3F9B6A;
}
</style>
<style scoped>
.history /deep/ .el-table .cell.el-tooltip img {
max-height: 100px;
}
.fenye {
margin-top: 20px;
display: flex;
|
8dca79c8
杨鑫
1
|
167
|
justify-content: space-between;
|
3f535f30
杨鑫
'初始'
|
168
169
170
171
172
173
174
|
position: relative;
}
.pagination {
text-align: right;
line-height: 20px;
}
|
3f535f30
杨鑫
'初始'
|
175
176
177
178
179
180
181
182
183
184
185
|
.toolbar{
.el-form-item{
margin-bottom:0px;
}
}
</style>
<style>
.el-tooltip__popper {
max-width: 50%;
}
</style>
|