Blame view

merchant-web-master/src/views/comprehensive/productOutbound/index.vue 5.99 KB
2f60abcc   杨鑫   最新
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
  <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">
  
  				<!-- 顶部搜索 -->
  				<div class="toolbar">
  					<el-form ref="formInline" :inline="true" :model="formInline">
  						<el-form-item label="日期">
  							<el-date-picker v-model="formInline.dates" 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>
  			<!-- 表格 -->
  			<div class="content_table" style="padding: 15px 0px 10px 0px;background-color:#F2F3F5">
  				<div style="background-color: #fff;padding: 10px;margin-bottom: 20px;">
  					<div class="table">
  						<el-table :data="tableData"
  							:header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
  							<el-table-column prop="id" label="序号" min-width="50">
  								<template slot-scope="scope">
  									{{scope.$index+1}}
  								</template>
  							</el-table-column>
  							<el-table-column label="商品图片" prop="productImage" min-width="100">
  								<template slot-scope="scope">
  									<img :src="$baseURL+scope.row.productImage" style="height: 80px;width:80px;" />
  								</template>
  
  							</el-table-column>
  							<el-table-column prop="productName" label="商品名称" min-width="120" show-overflow-tooltip>
  
  							</el-table-column>
726bc80b   杨鑫   最新
44
  							<!-- <el-table-column label="货号/属性" prop="specification" min-width="80" show-overflow-tooltip>
2f60abcc   杨鑫   最新
45
46
47
48
  								<template slot-scope="scope">
  									<div v-for="item in scope.row.specification">{{item.skuName}}:{{item.skuValue}}
  									</div>
  								</template>
726bc80b   杨鑫   最新
49
  							</el-table-column> -->
2f60abcc   杨鑫   最新
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
207
208
209
210
211
212
  
  							<el-table-column prop="orderNo" label="订单号" min-width="120" show-overflow-tooltip>
  								<template slot-scope="scope">
  									<div>{{scope.row.orderNo!=''?scope.row.orderNo:'N/A'}}</div>
  								</template>
  							</el-table-column>
  							<el-table-column label="库存" min-width="80" >
  								<template slot-scope="scope">
  									<div>数量:{{scope.row.inventory.variationNum}}</div>
  									<div>剩余:{{scope.row.inventory.nowNum}}</div>
  								</template>
  							</el-table-column>
  							<el-table-column prop="inventoryType" label="库存类型" min-width="80" >
  								<template slot-scope="scope">
  									商品库存
  								</template>
  									</el-table-column>
  								<el-table-column prop="operateType" label="操作类型" min-width="80" >
  									<template slot-scope="scope">
  										{{scope.row.operateType==1?'增加商品':scope.row.operateType==2?'购买商品':scope.row.operateType==3?'退货':scope.row.operateType==4?'订单取消':''}}
  									</template>
  								</el-table-column>
  								<el-table-column prop="operatingInformation" label="操作信息" min-width="120" >
  									<template slot-scope="scope">
  									<div>{{scope.row.operatingInformation.createUser}}</div>
  									<div>{{scope.row.operatingInformation.createTime}}</div>
  									</template>
  								</el-table-column>
  						</el-table>
  					</div>
  					<!-- 分页 -->
  					<div class="fenye">
  						<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 "
  							@current-change="handleCurrentChange" />
  					</div>
  				</div>
  			</div>
  		</div>
  
  	</div>
  </template>
  
  <script>
  	import {
  		productInventory,
  	} from '@/api/psRanking'
  	export default {
  		data() {
  			return {
  				total: 0,
  				pageSize: 10,
  				currentPage: 1,
  
  				formInline: {
  					pageNumber: 0,
  					pageSize: 10,
  					productName: "",
  					operateType: [2],
  					startTime: "",
  					endTime: ""
  				},
  				tableData: [],
  				flag: false,
  			}
  		},
  		mounted() {
  			this.getAll()
  		},
  		methods: {
  			async getAll() {
  				const Orderlist = await productInventory(this.formInline)
  				this.tableData = Orderlist.data.content
  				this.total = Orderlist.data.totalElements
  
  			},
  			async search() {
  				this.formInline.pageNumber = 0
  				if (this.formInline.dates.length != 0) {
  					this.formInline.startTime = this.formInline.dates[0]+' 00:00:00'
  					this.formInline.endTime = this.formInline.dates[1]+' 23:59:59'
  				}
  				const Orderlist = await productInventory(this.formInline)
  				this.tableData = Orderlist.data.content
  				this.total = Orderlist.data.totalElements
  			},
  			clear() {
  				this.formInline = {
  					pageNumber: 0,
  					pageSize: 10,
  					productName: "",
  					operateType: [2],
  					startTime: "",
  					endTime: ""
  				}
  				this.getAll()
  			},
  			handleCurrentChange(val) {
  				this.formInline.pageNumber = val - 1
  				this.getAll()
  			},
  			handleSizeChange(val) {
  				this.formInline.pageSize = val
  			},
  		},
  	}
  </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;
  		font-size: 14px;
  
  	}
  
  	::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;
  		justify-content: space-between;
  		position: relative;
  	}
  
  	.pagination {
  		text-align: right;
  		line-height: 20px;
  	}
  
  	.toolbar {
  		.el-form-item {
  			margin-bottom: 0px;
  		}
  	}
  </style>
  <style>
  	.el-tooltip__popper {
  		max-width: 50%;
  	}
  </style>