Browse Source

提交换卡信息查询页面

mashengyi 2 years ago
parent
commit
f9ccb3b980
3 changed files with 267 additions and 15435 deletions
  1. 20 15433
      package-lock.json
  2. 2 2
      src/config/globle.js
  3. 245 0
      src/views/customer/customerEtcChangeInfo.vue

File diff suppressed because it is too large
+ 20 - 15433
package-lock.json


+ 2 - 2
src/config/globle.js

@@ -1,3 +1,3 @@
-window.hostUrl = "http://invoice.jkcredit.com:80/";
-//window.hostUrl = "http://127.0.0.1:18081/"
+//window.hostUrl = "http://invoice.jkcredit.com:80/";
+window.hostUrl = "http://127.0.0.1:18081/"
 window.tableHeight =  (document.body.clientHeight*0.6-20);

+ 245 - 0
src/views/customer/customerEtcChangeInfo.vue

@@ -0,0 +1,245 @@
+<template>
+    <div class="cuctomerChange_container">
+      <div class="title">
+        <el-row>
+          <el-col :span="24">
+            <div class="top">
+                <el-input  placeholder="客户名称" class="input-demo" v-model="formCondition.customeId"></el-input>
+                <el-input  placeholder="公司名称" class="input-demo" v-model="formCondition.companyName"></el-input>
+               <el-button type="success" style="margin-left: 1%;" @click="firstLoadData">查询</el-button>
+               <el-button type="primary" style="margin-left: 1%;" @click="exportExcel">导出报表</el-button>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+      <!-- 表格部分 -->
+        <template>
+        <el-table
+         class="table"
+          v-loading="loading"
+          ref="multipleTable"
+          :data="customerChangeListTable"
+          :height="heightt"
+          border
+          tooltip-effect="dark">
+
+           <el-table-column
+            label="客户名称"
+            prop="customerId"
+            show-overflow-tooltip>
+          </el-table-column>
+           <!-- <el-table-column
+            prop="companyLeader"
+            label="公司负责人"
+            show-overflow-tooltip>
+          </el-table-column> -->
+          <el-table-column
+            prop="companyName"
+            label="原公司名称"
+            show-overflow-tooltip>
+          </el-table-column>
+           <el-table-column
+            prop="companyNum"
+            label="原公司编号"
+            show-overflow-tooltip>
+          </el-table-column>
+
+            <el-table-column
+            prop="targetCompanyName"
+            label="目标公司名称"
+            show-overflow-tooltip>
+          </el-table-column>
+
+            <el-table-column
+            prop="changeTime"
+            label="更换时间"
+            show-overflow-tooltip>
+          </el-table-column>
+
+           <el-table-column
+            prop="applyId"
+            label="申请id"
+            show-overflow-tooltip>
+          </el-table-column>
+
+           <el-table-column
+            prop="info"
+            label="更换信息"
+            show-overflow-tooltip>
+          </el-table-column>
+           <el-table-column
+            label="操作"
+            width="280">
+            <template slot-scope="scope" show-overflow-tooltip>
+               <el-link style="margin-left: 10px; cursor:pointer; color: blue;" @click="showChangeInfo(scope.row)">换卡信息</el-link>
+            </template>
+          </el-table-column>
+        </el-table>
+      </template>
+      <!-- 分页 -->
+      <div class="block">
+        <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="current"
+        :page-sizes="[6, 8, 10, 20, 50, 100,300,500,1000,3000,5000,8000]"
+        :page-size="pagesize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total">
+        </el-pagination>
+      </div>
+    </div>
+</template>
+<script type="text/javascript">
+import FileSaver from "file-saver";
+import XLSX from "xlsx";
+      export default {
+        data(){
+          return{
+            formCondition:{
+              companyName:'',
+              customerId:''
+            },
+            customerChangeListTable:[],
+             hightt:'0px',
+            current: 1,
+            pagesize: 50,
+            total:''
+          }
+        },
+        created() {
+          this.heightt = tableHeight;
+          this.loadData();
+        },
+        methods:{
+           firstLoadData(){
+            this.current = 1;
+            this.pagesize = 50;
+            this.loadData();
+          },
+          // 列表展示
+          async loadData() {
+            const formData = new FormData();
+            formData.append('current', this.current);
+            formData.append('size', this.pagesize);
+            formData.append('companyName', this.formCondition.companyName);
+            formData.append('customerId', this.formCondition.customerId);
+            const response = await this.$http.post(`customer/customerChangeListTable`, formData);
+            if (response.data.code === 0) {
+              this.customeRecTimeListTable = response.data.data.records;
+              this.total = response.data.data.total;
+            }
+          },
+          showChangeInfo(recoder){
+
+          },
+          // 分页方法
+          handleSizeChange(val) {
+            this.pagesize = val;
+            this.loadData();
+          },
+          handleCurrentChange(val) {
+            this.current = val;
+              this.loadData();
+          },
+
+        async    exportExcel() {
+        const loading = this.$loading({
+                              lock: true,
+                              text: '系统正在努力接收中,过程大概需要几分钟的时间,请您耐心等待...',
+                              spinner: 'el-icon-loading',
+                              background: 'rgba(0, 0, 0, 0.7)'
+                            });
+          let curr = this.current;
+      let pagesize1 = this.pagesize;
+      this.current = 1;
+      this.pagesize = pagesize1;
+      await this.loadData();
+      // 设置当前日期
+      let time = new Date();
+      let year = time.getFullYear();
+      let month = time.getMonth() + 1;
+      let day = time.getDate();
+      let name = "客户换卡信息查询列表_"+year + "" + month + "" + day;
+      /* generate workbook object from table */
+      //  .table要导出的是哪一个表格
+      var wb = XLSX.utils.table_to_book(document.querySelector(".table"),{ raw: true });
+      /* get binary string as output */
+      var wbout = XLSX.write(wb, {
+        bookType: "xlsx",
+        bookSST: true,
+        type: "array"
+      });
+      try {
+        //  name+'.xlsx'表示导出的excel表格名字
+        FileSaver.saveAs(
+          new Blob([wbout], { type: "application/octet-stream" }),
+          name + ".xlsx"
+        );
+      } catch (e) {
+        if (typeof console !== "undefined") console.log(e, wbout);
+      }
+       this.current = curr;
+      this.pagesize = pagesize1;
+      this.loadData();
+      loading.close();
+      return wbout;
+    },
+        }
+      };
+</script>
+<style>
+.cuctomerChange_container {
+  border: 1px solid #d9d9d9;
+  border-radius: 10px;
+}
+.cuctomerChange_container .title {
+  font-size: 5px;
+  margin-bottom: 20px;
+}
+.cuctomerChange_container .top {
+  padding-top: 20px;
+  padding-left: 20px;
+}
+.cuctomerChange_container .text {
+  display: inline-block;
+  color: #000;
+  font-size: 16px ;
+  margin-left: 1%;
+}
+.cuctomerChange_container .input-demo {
+  display: inline-block;
+  width: 20%;
+  margin-left: 1%;
+}
+.cuctomerChange_container .block {
+  font-size: 5px;
+  text-align: center;
+  margin-top: 25px;
+  margin-bottom: 25px;
+}
+.cuctomerChange_container .el-dialog {
+  width: 60%;
+}
+.cuctomerChange_container .el-dialog__header, .el-dialog__body {
+  padding: 0 20px;
+}
+.cuctomerChange_container .tou {
+  font-size: 20px;
+  height: 30px;
+  line-height: 30px;
+  padding-top: 15px;
+}
+.cuctomerChange_container .line {
+  margin-top: 15px;
+  margin-bottom: 15px;
+  width: 100%;
+  height: 2px;
+  background-color: #d9d9d9;
+}
+.cuctomerChange_container .xinxi {
+  text-align: center;
+  margin: 15px auto;
+  font-size: 18px;
+}
+</style>