Blame view

admin-web-master/src/views/serve/salesReport.vue 5.56 KB
ad7d1a78   杨鑫   '最新'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <template>
    <div style="background-color:#f7f7f7;padding:10px 10px;">
      <div class="zhuti">
        <div style="height:58px;line-height:58px;">
          <div style="color:#0006"> <span>客服服务管理</span> <span style="padding:0 5px;">></span> <span
              style="color:#000000e6">销售上报</span></div>
        </div>
        <div>
  
          <!-- 搜索 -->
          <div class="formSearch">
            <el-form
              :inline="true"
              :model="pageIndex"
  
              label-position="left"
            >
ba02632e   杨鑫   '1'
18
  		  <el-form-item label="品牌" >
ad7d1a78   杨鑫   '最新'
19
20
21
  		   <el-input
  		     placeholder="请输入"
  		  
ba02632e   杨鑫   '1'
22
  		     v-model="pageIndex.brand">
ad7d1a78   杨鑫   '最新'
23
24
  		   </el-input>
  		  </el-form-item>
ba02632e   杨鑫   '1'
25
              
ad7d1a78   杨鑫   '最新'
26
27
28
29
30
31
              
              
              <el-form-item label="商品名称">
               <el-input
                 placeholder="请输入"
  
ba02632e   杨鑫   '1'
32
                 v-model="pageIndex.productName">
ad7d1a78   杨鑫   '最新'
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
               </el-input>
              </el-form-item>
  
            </el-form>
            <div>
              <el-button
                style="background-color: #3F9B6A;color: #fff;"
                @click="search"
                >查询
              </el-button>
              <el-button
               class="buttonHover"
                 style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"
                @click="resetting"
                >重置
              </el-button>
            </div>
          </div>
ad7d1a78   杨鑫   '最新'
51
52
53
54
55
          <!-- 表格 -->
  
          <div class="tableBox">
            <el-table
              ref="multipleTable"
ba02632e   杨鑫   '1'
56
              :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
ad7d1a78   杨鑫   '最新'
57
58
59
60
61
62
63
             :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
              tooltip-effect="dark"
  
            >
              <el-table-column label="序号" width="150">
                <template slot-scope="scope">{{ scope.$index +1 }}</template>
              </el-table-column>
ba02632e   杨鑫   '1'
64
65
66
67
68
69
70
              <el-table-column prop="productName" label="商品名称" width="180" />
              <el-table-column prop="brand" label="品牌" width="180" show-overflow-tooltip />
              <el-table-column prop="productType" label="商品类型" show-overflow-tooltip />
              <el-table-column prop="price" label="单价" show-overflow-tooltip />
              <el-table-column prop="saleTime" label="销售时间" show-overflow-tooltip />
  			<el-table-column prop="merchantId" label="上报人" show-overflow-tooltip />
              <!-- <el-table-column label="操作" fixed="right">
ad7d1a78   杨鑫   '最新'
71
72
                <template slot-scope="scope">
                  <div class="btnList">
ba02632e   杨鑫   '1'
73
  				  <div class="tableBtn greens" @click="addbuss(scope.row)">删除</div>
ad7d1a78   杨鑫   '最新'
74
75
                  </div>
                </template>
ba02632e   杨鑫   '1'
76
              </el-table-column> -->
ad7d1a78   杨鑫   '最新'
77
78
            </el-table>
            <div class="fenye">
ba02632e   杨鑫   '1'
79
  			  <div>共{{total}}条</div>
ad7d1a78   杨鑫   '最新'
80
              <el-pagination
ba02632e   杨鑫   '1'
81
                :current-page="currentPage"
ad7d1a78   杨鑫   '最新'
82
                :page-sizes="[10, 20, 50, 100]"
ba02632e   杨鑫   '1'
83
84
                :page-size="pageSize"
                layout=" prev, pager, next"
ad7d1a78   杨鑫   '最新'
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
  			  background
                :total="total"
                @current-change="handleCurrentChange"
              />
            </div>
          </div>
  
  
        </div>
      </div>
  
    </div>
  </template>
  
  <script>
ba02632e   杨鑫   '1'
100
101
102
103
  import {
     cereSalesAdd,
     cereSalesPage
    } from '@/api/salesReport';
ad7d1a78   杨鑫   '最新'
104
105
106
107
  export default {
    data () {
      return {
        pageIndex: {
ba02632e   杨鑫   '1'
108
109
110
           brand:'',
           productName:'',
            pageNumber: 0,
ad7d1a78   杨鑫   '最新'
111
112
113
114
            shopName: '',
            pageSize: 10
  
        },
ba02632e   杨鑫   '1'
115
116
  	  currentPage:1,
  	  pageSize:10,
ad7d1a78   杨鑫   '最新'
117
118
119
120
121
122
123
        total: 0,
        flag: false,
  	  tableData:[]
      }
    },
    computed: {},
    mounted(){
ba02632e   杨鑫   '1'
124
  	this.getAll()
ad7d1a78   杨鑫   '最新'
125
126
    },
    methods: {
ba02632e   杨鑫   '1'
127
128
129
130
131
  	 async getAll(){
  		const res= await cereSalesPage(this.pageIndex)
  		this.tableData = res.data.content
  		this.total = res.data.totalElements
  	  },
ad7d1a78   杨鑫   '最新'
132
  	  search(){
ba02632e   杨鑫   '1'
133
134
  		  this.currentPage=1
  		  this.getAll()
ad7d1a78   杨鑫   '最新'
135
136
137
  	  },
  	  resetting(){
  		  this.pageIndex={
ba02632e   杨鑫   '1'
138
139
140
           brand:'',
           productName:'',
            pageNumber: 0,
ad7d1a78   杨鑫   '最新'
141
142
            shopName: '',
            pageSize: 10
ba02632e   杨鑫   '1'
143
  
ad7d1a78   杨鑫   '最新'
144
        }
ba02632e   杨鑫   '1'
145
  	  this.getAll()
ad7d1a78   杨鑫   '最新'
146
147
  	  },
  	  handleCurrentChange(val){
ba02632e   杨鑫   '1'
148
  		  this.currentPage = val
ad7d1a78   杨鑫   '最新'
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
  	  }
    }
  }
  </script>
  
  <style scoped >
  .zhuti {
      padding: 0 20px 20px 20px;
      min-height: calc(100vh - 50px - 20px);
      background-color: #Fff;
      position: relative;
    }
  
  /deep/ .el-form-item__content {
    line-height: 0;
  }
  
  .tableBtn {
    display: inline-block;
    margin-right: 10px;
  }
  
  ::v-deep .formSearch {
    position: relative;
    margin: 20px 0;
    display: flex;
    width: 100%;
    font-size: 14px;
    justify-content: space-between;
    .el-form-item__label{
      font-size: 14px;
      color: #000;
    }
  }
  
  .greens {
    color: #3F9B6A;
  }
  
  
  .fenye {
    margin-top: 20px;
    display: flex;
ba02632e   杨鑫   '1'
192
193
    justify-content:space-between;
    align-items: center;
ad7d1a78   杨鑫   '最新'
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    position: relative;
  }
  
  /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: #3F9B6A;
  }
  
  .el-row {
    margin-bottom: 20px;
  }
  :last-child {
    margin-bottom: 0;
  }
  
  .el-col {
    border-radius: 4px;
  }
  
  .bg-purple-dark {
    background: #99a9bf;
  }
  
  .bg-purple {
    background: #d3dce6;
  }
  
  .bg-purple-light {
    background: #e5e9f2;
  }
  
  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }
  
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
  
  /deep/ .bg-purple[data-v-0e3fe4ec] {
    background: #fff;
    height: 50px;
  }
  
  /deep/ .el-form--label-top .el-form-item__label {
    padding: 0;
  }
  .demo-input-suffix{
    display: flex;
    margin-right: 20px;
  }
  .pagination{
    text-align:right;
    line-height: 20px;
  }
  
  </style>
  <style lang="scss" scoped>
  
    ::v-deep .buttonHover:hover {
      color: #3f9b6a !important;
      border-color: #c5e1d2 !important;
      background-color: #ecf5f0 !important;
      outline: none;
    }
  
  
  </style>