zoukankan      html  css  js  c++  java
  • 电子--用章统计

    <template>
      <div class="projectBox project_list">
        <!-- 项目列表 -->
        <basic-container class="projectManange">
          <div class="search-head">
            <el-input v-model="keywork" size="small" class="select-law" placeholder="文件名称/编号/申请人"></el-input>
            <el-date-picker
              v-model="searchDate"
              class="select-date"
              size="small"
              type="daterange"
              range-separator="~"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              value-format="yyyy-MM-dd">
            </el-date-picker>
            <el-button
              size="small"
              type="primary"
              @click="search"
              >搜索</el-button>
          </div>
          <div class="statistics-table">
            <el-table
              :data="tableData"
              style=" 100%">
              <el-table-column
                label="文件名称"
                show-overflow-tooltip>
                <template slot-scope="scope">
                  <div class="file_name">{{scope.row.FileName}}</div>
                </template>
              </el-table-column>
              <el-table-column
                prop="FileCode"
                label="编号">
              </el-table-column>
              <el-table-column
                prop="CreateName"
                label="申请人">
              </el-table-column>
               <el-table-column
                prop="CreateDate"
                label="日期">
              </el-table-column>
            </el-table>
            <div class="fenye-page clearfix">
              <div class="left">
                <span>份数:{{printInfo.SignNum}}</span>
                <span>金额:{{printInfo.SignNum * printInfo.Price}}(元)</span>
              </div>
              <div class="right">
                <el-pagination
                background
                layout="total, sizes, prev, pager, next"
                :page-size.sync="page.pageSize"
                :page-sizes=[10,20,50]
                @size-change="changeSize"
                @current-change="changeCurrent"
                :total="page.total">
                </el-pagination>
              </div>
            </div>
          </div>
        </basic-container>
      </div>
    </template>

    <script>
    import * as Api from "@/api/signature/index";
    import { encryptionObject } from "@/util/util";
    export default {
      name:"statistics",
      data(){
        return{
          keywork:'',
          searchDate:[],
          options: [{
              value: '选项1',
              label: '黄金糕'
            }, {
              value: '选项2',
              label: '双皮奶'
            }],
          tableData:[],
          page: {
            total: 0,
            pageSize: 20,
            currentPage: 1
          },
          printInfo:{}
        }
      },
      created(){
        this.getSignList();
        this.getPrintInfo();
      },
      methods:{
        getSignList(){
          const Begin = this.searchDate[0] ? new Date(this.searchDate[0]).toISOString() : "";
          const End = this.searchDate[1] ? new Date(this.searchDate[1]).toISOString() : "";
          const pageData = {
            pageNo: this.page.currentPage - 1,
            pageSize: this.page.pageSize,
            Keywork: this.keywork,
            Begin,
            End
          };
          const dataObj = encryptionObject({
            data: pageData,
            type: "Base64",
            key: "avue"
          });
          const param = {
            param: dataObj
          };
          Api.SignListOld(param).then((res )=> {
            if(res.data.Code == 200){
              this.tableData = res.data.Data.Items;
              this.page.total = res.data.Data.Count;   
            }else{
              this.$alert(res.data.ShowData, '提示', {
                confirmButtonText: '确定',
                type: 'error'
              });
            }         
          }).catch((error)=>{
            if(error.data.Code == 400){
              this.$alert(error.data.ShowData, '提示', {
                confirmButtonText: '确定',
                type: 'error'
              });
            }
          });
        },
        getPrintInfo(){
          Api.LawSign().then((res )=> {
            if(res.data.Code == 200){
              this.printInfo = res.data.Data;
            }else{
              this.$alert(res.data.ShowData, '提示', {
                confirmButtonText: '确定',
                type: 'error'
              });
            }         
          }).catch((error)=>{
            if(error.data.Code == 400){
              this.$alert(error.data.ShowData, '提示', {
                confirmButtonText: '确定',
                type: 'error'
              });
            }
          });
        },
        changeSize(value){
          this.page.currentPage = 1;
          this.page.pageSize = value;
          this.getSignList();
        },
        changeCurrent(value){
          this.page.currentPage = value;
          this.getSignList();
        },
        search(){
          this.getSignList();
        }
      }
    }
    </script>

    <style lang="scss">
    .search-head{
      .select-law{
         160px;
      }
      .select-date{
         260px;
        margin: 0 30px;
      }
    }
    .statistics-table{
      margin-top: 24px;
      .fenye-page{
        margin-top: 30px;
        line-height: 32px;
        .left{
          float: left;
          color: #666666;
          font-size: 13px;
          span{
            margin-right: 80px;
            &:last-child{
              margin-right: 0;
            }
          }
        }
        .right{
          float: right;
        }
      }
    }
    </style>
  • 相关阅读:
    27、深入理解计算机系统笔记,网络编程
    29、深入理解计算机系统笔记,并发编程(concurrent)(1)
    28、深入理解计算机系统笔记,Web服务器简介
    18、Linux下编程风格
    26、深入理解计算机系统笔记,系统级I/O
    32、深入理解计算机系统笔记,Unix下处理错误的风格
    31、深入理解计算机系统笔记,并发编程(concurrent)(3)
    19、Linux编码规范
    ASP.NET 中 DropDownList+DataList(数据列表)的使用前台绑定
    ASP.NET中 DetailsView(详细视图)的使用前台绑定
  • 原文地址:https://www.cnblogs.com/xiaoxiao95/p/12836075.html
Copyright © 2011-2022 走看看