Browse Source

merge business

maqingyang 11 months ago
parent
commit
fcb7dcaa42
5 changed files with 470 additions and 2 deletions
  1. 1 1
      package.json
  2. 17 0
      src/api/index.js
  3. 1 1
      src/router/index.js
  4. 451 0
      src/views/system/business.vue
  5. 0 0
      src/views/system/temp.vue

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {
     
     
-    "serve": "vue-cli-service serve",
+    "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
     "build": "vue-cli-service build"
     "build": "vue-cli-service build"
   },
   },
   "dependencies": {
   "dependencies": {

+ 17 - 0
src/api/index.js

@@ -174,7 +174,24 @@ export function findCooperatorFieldsByName(cooperatorName){
         method: 'get',
         method: 'get',
     })
     })
 }
 }
+export function businessList(pageNum,pageSize,businessType){
+    return request.post('/business/businessList',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            businessType:businessType
+        });
+    }
+export function selectBusiness(pageNum,pageSize,customerName,businessType){
+    return request.post('/business/selectBusiness',
+        {
+            pageNum:pageNum,
+            pageSize:pageSize,
+            customerName:customerName,
+            businessType:businessType
 
 
+        });
+}
 export function businessToDoList(pageNum,pageSize){
 export function businessToDoList(pageNum,pageSize){
     return request.post('/business/businessToDoList',
     return request.post('/business/businessToDoList',
         {
         {

+ 1 - 1
src/router/index.js

@@ -349,7 +349,7 @@ var routes = [{
             {
             {
                 path: '/businesstodo',
                 path: '/businesstodo',
                 name: '待办业务',
                 name: '待办业务',
-                component: () => import('../views/system/businesstodo.vue'),
+                component: () => import('../views/system/business.vue'),
                 meta: {
                 meta: {
                     keepAlive: false,
                     keepAlive: false,
                     show: true,
                     show: true,

+ 451 - 0
src/views/system/business.vue

@@ -0,0 +1,451 @@
+<template>
+  <div class="container" style="min-height: 100%; padding-bottom: 100px;">
+    <el-container>
+      <el-aside :width="isCollapse?'65px':'150px'">
+        <el-button   @click = "toggleCollapse" type="primary"
+                     style="display:block;margin:0 auto"
+                     size="medium"
+                     class="el-icon-s-fold">
+        </el-button>
+
+        <el-menu
+          default-active="1"
+          class="el-menu-vertical-demo"
+
+          :collapse="isCollapse"
+          >
+          <el-menu-item  @click="gotolink1" class="vertical-center" index="1">
+            <i class="el-icon-location"></i>
+            <span slot="title">待办业务</span>
+          </el-menu-item>
+          <el-menu-item @click="gotolink2" class="vertical-center" index="2">
+            <i class="el-icon-menu"></i>
+            <span slot="title">解析业务</span>
+          </el-menu-item>
+          <el-menu-item  @click="gotolink3" class="vertical-center" index="3">
+            <i class="el-icon-setting"></i>
+            <span slot="title">失败业务</span>
+          </el-menu-item>
+        </el-menu>
+
+      </el-aside>
+      <el-divider direction="vertical"></el-divider>
+
+      <el-main style="height: 80vh;">
+        <div class = "filter-container">
+          <el-input v-model="input" placeholder="客户名称" style="width: 30%" size="small" clearable/>
+          <el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" @click="filterTable">查询</el-button>
+        </div>
+        <el-divider></el-divider>
+
+        <div class="line-between-divs"></div>
+
+        <el-table :data="businessShowData" style="width: 100%;" @row-click="onButtonClick" stripe>
+          <el-table-column align="center" label="申请编号" >
+            <template v-slot="{row}">
+              <span>{{ row.businessNum}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="客户名称" >
+            <template v-slot="{row}">
+              <span>{{ row.customerName}}</span>
+            </template>
+          </el-table-column>
+
+
+          <el-table-column align="center" label="合作方" >
+            <template v-slot="{row}">
+              <span>{{ row.cooperatorName}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="产品名称" >
+            <template v-slot="{row}">
+              <span>{{ row.productName}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="证件号码" >
+            <template v-slot="{row}">
+              <span>{{ row.certificateNum}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="流程状态" >
+            <template v-slot="{row}">
+              <span>{{ row.status}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="申请时间" >
+            <template v-slot="{row}">
+              <span>{{ row.createTime}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column align="center" label="经办人员" >
+            <template v-slot="{row}">
+              <span>自动</span>
+            </template>
+          </el-table-column>
+
+        </el-table>
+
+        <el-pagination background
+                        @size-change="handleSizeChange"
+                        @current-change="handleCurrentChange"
+                        :current-page="currentPage"
+                        :page-sizes="[5,10,15]"
+                        :page-size="pagesize"
+                        layout="total,jumper,prev, pager, next,sizes"
+                        :total=showSize >
+        </el-pagination>
+      </el-main>
+
+    </el-container>
+    <div class="yema">
+    </div>
+  </div>
+</template>
+
+<script>
+
+import {
+  businessList,selectBusiness
+} from '@/api/index.js'
+import store from "@/store";
+import request from '@/utils/request.js'
+import { fieldInfo, modelInfo } from '../../api';
+import {
+  cooperatorList
+} from '@/api/index.js'
+export default {
+
+  name: "cooperatorInfo",
+  props: [],
+  components: {},
+  data() {
+    return {
+      activeKey: 0,
+      activeName: "second",
+      currentPage: 1,
+      pagesize:10,
+      businessData : [],
+      selectBusinessData : [],
+      businessShowData : [],
+      isCollapse: false,
+      status:"",
+      selected1: false,
+      selected2: true,
+      selected3: true,
+      selected4: false,
+      selected5: true,
+      selected6: false,
+      input:'',
+      showSize:'',
+      totalSize:'',
+      businessType:0,
+    }
+  },
+  watch: {},
+  computed: {},
+  beforeCreate() {},
+  created() {},
+  beforeMount() {},
+  mounted()
+  {
+    businessList(this.currentPage,this.pagesize,this.businessType).then(
+          res=>
+          {
+            this.businessData=res.data.business_list.list;
+            this.businessShowData = this.businessData
+            var j = parseInt(res.data.business_list.total)
+            this.totalSize = j
+            this.showSize = this.totalSize
+  
+          }
+      )
+  },
+  beforeUpdate() {},
+  updated() {},
+  destroyed() {},
+  methods: {
+    toggleCollapse(){
+      this.isCollapse = !this.isCollapse;
+    },
+    request() {},
+    handleClick(tab, event) {
+      if(tab.name=='first'){
+        this.gotolinkHome();
+      }
+      if(tab.name=='second'){
+        this.gotolinkbusiness();
+      }
+      if(tab.name=='third'){
+        this.gotolinkCooperator();
+      }
+      if(tab.name=='fourth'){
+        this.gotolinkField();
+      }
+    },
+    gotolinkHome()
+    {
+      this.$router.replace('/homePage');
+    },
+    gotolinkbusiness()
+    {
+      this.$router.replace('/businesstodo');
+    },
+    gotolinkCooperator()
+    {
+      this.$router.replace('/cooperatorInfo');
+    },
+
+    gotolinkField()
+    {
+      this.$router.replace('/fieldInfo');
+    },
+    handleCurrentChange:function(currentPage){
+      this.currentPage=currentPage;
+      if(!this.input){
+        businessList(this.currentPage,this.pagesize,this.businessType).then(
+              res=>
+              {
+                this.businessData=res.data.business_list.list;
+                this.businessShowData = this.businessData
+              }
+          )
+        }
+      else {
+        selectBusiness(this.currentPage,this.pagesize,this.input,this.businessType).then(
+              res=>
+              {
+                this.selectBusinessData=res.data.business_list.list;
+                this.businessShowData = this.selectBusinessData
+              }
+          )
+        }
+      },
+    handleSizeChange:function(size){
+      this.pagesize=size;
+      if(!this.input){
+        businessList(this.currentPage,this.pagesize,this.businessType).then(
+              res=>
+              {
+                this.businessData=res.data.business_list.list;
+                this.businessShowData = this.businessData
+              }
+          )
+        }
+        else {
+          selectBusiness(this.currentPage,this.pagesize,this.input,this.businessType).then(
+              res=>
+              {
+                this.selectBusinessData=res.data.business_list.list;
+                this.businessShowData = this.selectBusinessData
+              }
+          )
+        }
+      },
+    async getTableData(){
+      try {
+        const { data } = await businessList();
+          this.businessData = data.business_list;
+        } catch (error) {
+          console.error(error);
+        }
+      },
+      gotolink1()
+      {
+        this.businessType=0;
+        businessList(this.currentPage,this.pagesize,this.businessType).then(
+          res=>
+          {
+            this.businessData=res.data.business_list.list;
+            this.businessShowData = this.businessData
+            var j = parseInt(res.data.business_list.total)
+            this.totalSize = j
+            this.showSize = this.totalSize
+  
+          }
+      )
+      },
+      gotolink2()
+      {
+        this.businessType=1;
+        businessList(this.currentPage,this.pagesize,this.businessType).then(
+          res=>
+          {
+            this.businessData=res.data.business_list.list;
+            this.businessShowData = this.businessData
+            var j = parseInt(res.data.business_list.total)
+            this.totalSize = j
+            this.showSize = this.totalSize
+  
+          }
+      )
+      },
+      gotolink3()
+      {
+        this.businessType=2;
+        businessList(this.currentPage,this.pagesize,this.businessType).then(
+          res=>
+          {
+            this.businessData=res.data.business_list.list;
+            this.businessShowData = this.businessData
+            var j = parseInt(res.data.business_list.total)
+            this.totalSize = j
+            this.showSize = this.totalSize
+  
+          })
+      },
+    tables:function () { //在你的数据表格中定义tabels
+      const input = this.input
+      if (input) {
+        // console.log("input输入的搜索内容:" + this.input)
+        return this.cooperatorData.filter(data => {
+          console.log("object:" + Object.keys(data))
+          return Object.keys(data).some(key => {
+            return String(data[key]).indexOf(input) > -1
+          })
+        })
+      }
+      return this.cooperatorData
+    },
+    onButtonClick (row){
+      this.$router.push({
+        path: '/businessInfoToDo',
+        query: {
+          businessNum : row.businessNum,
+          headInfId:row.headInfId
+        }
+      })
+    },
+
+    filterTable(){
+
+      if (this.input.trim() === '') {
+          businessList(this.currentPage,this.pagesize,this.businessType).then(
+              res=>
+              {
+                this.businessData=res.data.business_list.list;
+                this.businessShowData = this.businessData
+              }
+          )
+          this.showSize = this.totalSize
+        // 如果输入框为空,显示所有数据
+      } else {
+        // 否则,只显示与输入文本匹配的数据
+        selectBusiness(this.currentPage,this.pagesize,this.input,this.businessType).then(
+              res=>
+              {
+                this.selectBusinessData=res.data.business_list.list;
+                this.businessShowData = this.selectBusinessData
+                var j = parseInt(res.data.business_list.total)
+                this.totalSize = j
+                this.showSize = this.totalSize
+  
+              }
+          )
+
+      }
+    },
+
+
+
+
+    },
+
+}
+</script>
+
+<style scoped>
+/* 竖线 */
+.line{
+  float:right;
+  width: 100%;
+  height: 1px;
+  margin-top: -0.5em;
+  position: relative;
+  background:#f3f3f3;
+}
+
+.button {
+    background-color: white;
+    border: none;
+    color: black;
+    padding: 15px 32px;
+    text-align: center;
+    text-decoration: none;
+    display: inline-block;
+    font-size: 16px;
+    width:180px;
+    height:50px;
+    font-weight: normal
+}
+
+.buttonselected {
+    background-color: white;
+    border: none;
+    color: black;
+    padding: 15px 32px;
+    text-align: center;
+    text-decoration: none;
+    display: inline-block;
+    font-size: 18px;
+    width:180px;
+    height:50px;
+    font-weight: 900
+}
+.line-between-divs {
+    border-bottom: 1px solid #ccc; /* 设置横线的样式,颜色可以根据需要调整 */
+  }
+.filter-container{
+  position: relative;
+  height: 14%;
+}
+/deep/ .el-table th {
+  /* 样式设置 */
+  background: #f2f2f2;
+  color: #333;
+}
+.el-menu-vertical-demo{
+  font-weight: bold;
+}
+/*.filter-container{*/
+/*  position: relative;*/
+/*  height: 14%;*/
+/*}*/
+.line-between-divs {
+  border-bottom: 1px solid #ccc; /* 设置横线的样式,颜色可以根据需要调整 */
+}
+.toggle-button{
+  /*background: rgb(0,0,0);*/
+  /*font-size: 10px;*/
+  /*Tine-height: 24px;*/
+  color: black;
+  text-align: center;
+letter-spacing: 0.2rem;
+cursor: pointer;
+}
+.el-icon-s-fold
+{
+  background: rgb(255,255,255);
+  /*font-size: 10px;*/
+  /*Tine-height: 24px;*/
+  color: black;
+  border: none;
+  text-align: center;
+  letter-spacing: 0.2rem;
+  cursor: pointer;
+}
+/*.toggle-button:hover {*/
+/*  background: rgb(76,127,152);*/
+/*}*/
+.el-divider--vertical {
+  height: 47em;
+  margin-left: 20px;
+}
+.container {  }
+</style>

+ 0 - 0
src/views/system/temp.vue