salesReport.vue 7.04 KB
<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"
          >
		  <el-form-item label="品牌" >
		   <el-input
		     placeholder="请输入"
		  
		     v-model="pageIndex.brand">
		   </el-input>
		  </el-form-item>
            
            
            
            <el-form-item label="商品名称">
             <el-input
               placeholder="请输入"

               v-model="pageIndex.productName">
             </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>
        <!-- 表格 -->

        <div class="tableBox">
          <el-table
            ref="multipleTable"
            :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
           :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
            tooltip-effect="dark"

          >
            <el-table-column label="序号" width="50">
              <template slot-scope="scope">{{ scope.$index +1 }}</template>
            </el-table-column>
            <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="salesQuantity" label="销售数量" show-overflow-tooltip />
            <el-table-column prop="saleTime" label="销售时间" show-overflow-tooltip />
			<el-table-column prop="createUser" label="上报人" show-overflow-tooltip />
            <!-- <el-table-column label="操作" fixed="right">
              <template slot-scope="scope">
                <div class="btnList">
				  <div class="tableBtn greens" @click="addbuss(scope.row)">删除</div>
                </div>
              </template>
            </el-table-column> -->
          </el-table>
          <div class="fenye">
			  <div>共{{total}}条</div>
            <el-pagination
              :current-page="currentPage"
              :page-sizes="[10, 20, 50, 100]"
              :page-size="pageSize"
              layout=" prev, pager, next"
			  background
              :total="total"
              @current-change="handleCurrentChange"
            />
          </div>
        </div>


      </div>
    </div>
<!-- <iframe src="http://localhost:9528/investigation/wenjuanList?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiIxODEwODE0Mzk0NSIsImp0aSI6Imt3Z1c4aU96NkVtTFZsNWg0UWdORF9aUFBRRSIsImNsaWVudF9pZCI6ImNiOGYxNDE2M2QxYzExZWM5NmU4MDBlMDRjMzEwMjUzIiwic2NvcGUiOlsiZ2V0X3VzZXJfaW5mbyJdfQ.T1zOJ9N78NJ01yW0C7Kv7QdgqDoLGt4EC4XoZ76jnocIGAgH30gFqI6o-dbQuSYeXGmgTfGfbqSINUksP91GEsEHpJK_knLrmpfHTMf7gtfzx8nIsRQLtf_GPZbUn3hoWnHpEuhH5c__3KEdVaruOZDxrevHqO7IfFRjp3giw19n0ymmDDmvtCidtrVM4XvyQEHTQ9iikWaAqW3W582MEh1GsIBh5S2fqBU_h6vc5q4OIFyQeNb-tEhcMb0gEY3rxbukdCKP3pgAZeZtFYpWn4MY8W4CZeRU9A6JcU8pFNj0Ar8zrveLrx0Oh3FRcNADsx0nUA4dXPvERnEMAZpDOQ" ref="iframe" frameborder="0" width="100%" height="700px" /> -->
<!-- <iframe v-if="show" src="https://zhgw-uat.028wlkj.com/cdwlMall/investigation/wenjuanList?token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiIxODEwODE0Mzk0NSIsImp0aSI6Imt3Z1c4aU96NkVtTFZsNWg0UWdORF9aUFBRRSIsImNsaWVudF9pZCI6ImNiOGYxNDE2M2QxYzExZWM5NmU4MDBlMDRjMzEwMjUzIiwic2NvcGUiOlsiZ2V0X3VzZXJfaW5mbyJdfQ.T1zOJ9N78NJ01yW0C7Kv7QdgqDoLGt4EC4XoZ76jnocIGAgH30gFqI6o-dbQuSYeXGmgTfGfbqSINUksP91GEsEHpJK_knLrmpfHTMf7gtfzx8nIsRQLtf_GPZbUn3hoWnHpEuhH5c__3KEdVaruOZDxrevHqO7IfFRjp3giw19n0ymmDDmvtCidtrVM4XvyQEHTQ9iikWaAqW3W582MEh1GsIBh5S2fqBU_h6vc5q4OIFyQeNb-tEhcMb0gEY3rxbukdCKP3pgAZeZtFYpWn4MY8W4CZeRU9A6JcU8pFNj0Ar8zrveLrx0Oh3FRcNADsx0nUA4dXPvERnEMAZpDOQ" ref="iframe" frameborder="0" width="100%" height="700px" /> -->
  </div>
</template>

<script>
import {
   cereSalesAdd,
   cereSalesPage
  } from '@/api/salesReport';
export default {
  data () {
    return {
      pageIndex: {
         brand:'',
         productName:'',
          pageNumber: 0,
          shopName: '',
          pageSize: 10

      },
	  currentPage:1,
	  pageSize:10,
      total: 0,
      flag: false,
	  tableData:[],
    }
  },
  computed: {},
  mounted(){
	this.getAll()
  },
  methods: {
	 async getAll(){
		const res= await cereSalesPage(this.pageIndex)
		this.tableData = res.data.content
		this.total = res.data.totalElements
	  },
	  search(){
		  this.currentPage=1
		  this.getAll()
	  },
	  resetting(){
		  this.pageIndex={
         brand:'',
         productName:'',
          pageNumber: 0,
          shopName: '',
          pageSize: 10

      }
	  this.getAll()
	  },
	  handleCurrentChange(val){
		  this.currentPage = val
	  }
  }
}
</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;
  justify-content:space-between;
  align-items: center;
  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>