Преглед изворни кода

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie пре 3 година
родитељ
комит
4a2c0560d7

+ 3 - 3
src/components/check/checkSchedule.vue

@@ -4,12 +4,12 @@
       <el-steps direction="vertical"
                 :active="active"
                 space="150px"
-                :finish-status="finish"
                 align-center
                 style="font-size: 12px">
         <el-step :key="index"
                  v-for="(item,index) in data"
                  :title="item.title"
+                 :status="item.status"
                  style="font-size: 14px !important;">
           <template slot="description" scope="scope">
             <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 14px">
@@ -58,7 +58,6 @@
         loading:false,
         option:option,
         active:1,
-        finish:"success",
         data:[],
         page: {
           pageSize: 10,
@@ -73,10 +72,11 @@
           if(item.auditStatus == "A"){
             this.active = index + 2
             item.title = "审批通过"
+            item.status = "success"
           }
           if(item.auditStatus == "B"){
-            this.finish = "error"
             item.title = "审批驳回"
+            item.status = "error"
           }
           if(item.auditStatus == "S" || item.auditStatus == "N"){
             item.title = "待审批"

+ 7 - 7
src/components/fee-info/main.vue

@@ -402,13 +402,13 @@ export default {
         feesType:this.selectTab
       });
     },
-    currencyChange(row) {
-      if (row.currency == "CNY") {
-        row.exchangeRate = 1;
-      }
-      if (row.currency == "USD") {
-        row.exchangeRate = 6.3843;
-      }
+    //带出汇率
+    currencyChange(row){
+      this.currencyList.forEach(item =>{
+        if(item.dictValue === row.currency){
+          this.$set(row,"exchangeRate",item.remark)
+        }
+      })
     },
     rowDel(row, index) {
       this.$confirm("确定删除数据?", {

+ 2 - 2
src/components/finance/applyPayment.vue

@@ -374,9 +374,9 @@ export default {
                     });
                   }else{
                     //关闭一下存在的列表页  跳转
-                    this.$router.$avueRouter.closeTag('/financialManagement/paymentRequest/paymentRequest');
+                    this.$router.$avueRouter.closeTag('/financialManagement/paymentRequest/index');
                     this.$router.push({
-                      path: "/financialManagement/paymentRequest/paymentRequest",
+                      path: "/financialManagement/paymentRequest/index",
                       query: {params: res.data.data.id},
                     });
                   }

+ 52 - 34
src/page/index/top/top-notice.vue

@@ -4,12 +4,9 @@
               trigger="click">
 
     <el-tabs v-model="activeName">
-      <el-tab-pane label="邮件(1)"
-                   name="first"></el-tab-pane>
-      <el-tab-pane label="消息(2)"
-                   name="second"></el-tab-pane>
-      <el-tab-pane label="通知"
-                   name="third"></el-tab-pane>
+      <el-tab-pane label="消息"
+                   name="first">
+      </el-tab-pane>
     </el-tabs>
     <el-scrollbar style="height:300px">
       <avue-notice :data="data"
@@ -17,7 +14,7 @@
                    @page-change="pageChange"></avue-notice>
     </el-scrollbar>
     <div slot="reference">
-      <el-badge is-dot>
+      <el-badge  :value="badge">
         <i class="el-icon-bell"></i>
       </el-badge>
     </div>
@@ -25,31 +22,6 @@
 </template>
 
 <script>
-let list = [{
-  img: '/img/bg/vip1.png',
-  title: '史蒂夫·乔布斯 关注了你',
-  subtitle: '05-08 15:08',
-  tag: '已经开始',
-  status: 0
-}, {
-  img: '/img/bg/vip2.png',
-  title: '斯蒂夫·沃兹尼亚克 关注了你',
-  subtitle: '05-08 15:08',
-  tag: '未开始',
-  status: 1
-}, {
-  img: '/img/bg/vip3.png',
-  title: '蒂姆·库克 关注了你',
-  subtitle: '05-08 15:08',
-  status: 3,
-  tag: '有错误'
-}, {
-  img: '/img/bg/vip4.png',
-  title: '比尔·费尔南德斯 关注了你',
-  subtitle: '05-08 15:08',
-  status: 4,
-  tag: '已完成'
-}];
 export default {
   name: "top-notice",
   data () {
@@ -64,13 +36,59 @@ export default {
           status: 'status'
         },
       },
-      data: list,
+      data: [],
+      path:"ws://192.168.1.151:8104/websocket?user=1",
+      socket:"",
+      badge:''
     }
   },
   created () {
-
+    // this.webSocket();
+  },
+  mounted() {
+     this.init();
   },
   methods: {
+    //初始化
+    init(){
+      if(typeof(WebSocket) === "undefined"){
+        alert("您的浏览器不支持socket")
+      }else{
+        // 实例化socket
+        this.socket = new WebSocket(this.path)
+        // 监听socket连接
+        this.socket.onopen = this.open
+        // 监听socket错误信息
+        this.socket.onerror = this.error
+        // 监听socket消息
+        this.socket.onmessage = this.getMessage
+      }
+    },
+    open() {
+      console.log("socket连接成功")
+      console.log()
+    },
+    error() {
+      console.log("连接错误")
+    },
+    getMessage(msg){
+      console.log(msg.data)
+
+      // let msgData =  JSON.stringify(msg.data);
+      // console.log(msgData)
+      // if(msg.data.unRead){
+      //   this.badge = msg.data.unReadNum
+      // }else{
+      //   this.badge = ''
+      // }
+    },
+    send() {
+      // this.socket.send(params)
+    },
+    close() {
+      console.log("socket已经关闭")
+    },
+
     pageChange (page, done) {
       setTimeout(() => {
         this.$message.success('页码' + page)

+ 4 - 4
src/router/views/index.js

@@ -537,18 +537,18 @@ export default [{
   },
   // 付款申请
   {
-    path: '/financialManagement/paymentRequest/paymentRequest',
+    path: '/financialManagement/paymentRequest/index',
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/financialManagement/paymentRequest/paymentRequest',
+        path: '/financialManagement/paymentRequest/index',
         name:"付款申请",
         meta: {
-          i18n: '/financialManagement/paymentRequest/paymentRequest',
+          i18n: '/financialManagement/paymentRequest/index',
           keepAlive: true,
         },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/paymentRequest/paymentRequest')
+        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/paymentRequest/index')
       }
     ]
   },

+ 1 - 1
src/views/approveData/configuration/mainList.json

@@ -14,7 +14,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 180,
+  "menuWidth": 100,
   "dialogClickModal": false,
   "searchLabelWidth": 120,
   "searchIcon": true,

+ 1 - 15
src/views/approveData/index.vue

@@ -47,21 +47,7 @@
           size="small"
           :disabled="scope.row.auditStatus != 'S'"
           @click.stop="openCheck(scope.row)"
-        >审批
-        </el-button>
-        <el-button
-          type="text"
-          size="small"
-          :disabled="scope.row.auditStatus != 'S'"
-          @click.stop="pass(scope.row, 1)"
-        >审批通过
-        </el-button>
-        <el-button
-          type="text"
-          size="small"
-          :disabled="scope.row.auditStatus != 'S'"
-          @click.stop="pass(scope.row, 2)"
-        >审批驳回
+        >审核
         </el-button>
       </template>
     </avue-crud>

+ 0 - 0
src/views/financialManagement/paymentRequest/paymentRequest.vue → src/views/financialManagement/paymentRequest/index.vue


+ 4 - 3
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -22,7 +22,6 @@
                 @click.native="paymentCheck">{{form.checkStatus == '审核中'?'审核中':'请核'}}
               </el-dropdown-item>
               <el-dropdown-item
-                :disabled="!checkDisabled"
                 :loading="buttonLoading"
                 @click.native="checkScheduleDialog = true,checkId=form.id">审核进度
               </el-dropdown-item>
@@ -57,7 +56,7 @@
           </el-button>
         </div>
         <div v-if="auditDisabled" class="upper_right_button">
-          <el-button type="success"
+          <el-button type="primary"
                      size="small"
                      class="el-button--small-yh"
                      :loading="buttonLoading"
@@ -207,6 +206,7 @@
   import _ from "lodash";
   import { approvePass } from "@/api/approveData/main"
   import checkSchedule from "../../../components/check/checkSchedule";
+  import check from "@/components/check/check";
   import { cancelCheck } from "@/api/check/check";
 
   export default {
@@ -217,7 +217,8 @@
       }
     },
     components:{
-      checkSchedule
+      checkSchedule,
+      check
     },
     data() {
       return {

+ 2 - 1
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -553,7 +553,7 @@ export default {
         this.form.id = null
         this.form.sysNo = null
         this.form.orderItemsList.forEach((item, index) => {
-
+          item.srcOrgNo = this.form.orderNo
           item.srcId = item.id
           item.contractNumber = item.orgOrderNo  //合同号
           item.orgOrderNo = this.form.orgOrderNo
@@ -751,6 +751,7 @@ export default {
         item.contractNumber = item.orgOrderNo;
         item.contractAmount = item.amount;
         item.actualQuantity = item.orderQuantity;
+        item.srcOrgNo = item.orderNo;
         getListOrgOrderNo(item.billNo,item.contractNumber,item.priceCategory).then(res => {
           this.creditList = res.data
           this.storageList = this.creditList.map(item =>{

+ 6 - 5
src/views/purchase/contract/detailsPage.vue

@@ -396,7 +396,7 @@ export default {
       takeDisabled:false, //收货状态
       viewDisabled:false,
       tableData: [],
-      billUrl:"/financialManagement/paymentRequest/paymentRequest",
+      billUrl:"/financialManagement/paymentRequest/index",
       billType:"",
       billData:{},
       contractTypeDic:[],
@@ -792,6 +792,10 @@ export default {
     //币别
     this.getWorkDicts("currency").then(res =>{
       this.currencyDic = res.data.data
+      if(!this.detailData.id){
+        this.$set(this.form,"currency","USD")
+        this.currencyChange("USD")
+      }
     })
     this.getWorkDicts("contractType").then(res =>{
       this.contractTypeDic = res.data.data
@@ -813,9 +817,6 @@ export default {
       }).finally(()=>{
         this.buttonLoading = false;
       })
-    } else{
-      this.$set(this.form,"currency","USD")
-      this.$set(this.form,"exchangeRate",6.3686)
     }
   },
   methods: {
@@ -836,7 +837,7 @@ export default {
         row.amount = _.multiply(row.billWeight, row.price).toFixed(2);
       }
     },
-    //带出人民币
+    //带出汇率
     currencyChange(value){
       this.currencyDic.forEach(item =>{
         if(item.dictValue === value){

+ 9 - 11
src/views/salesManagement/salesContract/detailsPage.vue

@@ -796,6 +796,10 @@ export default {
     //币别
     this.getWorkDicts("currency").then(res =>{
       this.currencyDic = res.data.data
+      if(!this.detailData.id){
+        this.$set(this.form,"currency","USD")
+        this.currencyChange("USD")
+      }
     })
     if(this.detailData.view){
       this.viewDisabled = true
@@ -824,8 +828,6 @@ export default {
         this.buttonLoading = false
       })
     }else{
-      this.$set(this.form,"currency","USD")
-      this.$set(this.form,"exchangeRate",6.3686)
       //采购日期默认当天
       let date = new Date();
       let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
@@ -857,17 +859,13 @@ export default {
       this.$set(this.form,"invoiceWeight", invoiceList.reduce((n,m) => n + m))
       this.$set(this.form,"billWeight", billList.reduce((n,m) => n + m))
     },
-    //汇率
+    //带出汇率
     currencyChange(value){
-      if(this.form.exchangeRate == 1 || this.form.exchangeRate == 6.368600 || this.form.exchangeRate == 7.174900){
-        if(value == "CNY"){
-          this.$set(this.form,"exchangeRate",1)
-        }else if(value == "USD"){
-          this.$set(this.form,"exchangeRate",6.368600)
-        }else if(value == "EUR"){
-          this.$set(this.form,"exchangeRate",7.174900)
+      this.currencyDic.forEach(item =>{
+        if(item.dictValue === value){
+          this.$set(this.form,"exchangeRate",item.remark)
         }
-      }
+      })
     },
     //单价
     priceChange(row) {

+ 2 - 7
src/views/workManagement/main-items/configuration/mainList.json

@@ -21,12 +21,6 @@
   "menuWidth": 120,
   "column": [
     {
-      "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
-      "hide": true
-    },
-    {
       "label": "项目名称",
       "prop": "cname",
       "search": true,
@@ -36,7 +30,8 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpNames",
+      "prop": "corpId",
+      "search": true,
       "index": 4,
       "width": 180,
       "overHidden": true

+ 40 - 28
src/views/workManagement/main-items/list.vue

@@ -11,6 +11,7 @@
       :summary-method="summaryMethod"
       @row-del="rowDel"
       @search-change="searchChange"
+      @current-change="currentChange"
       @refresh-change="refreshChange"
       @on-load="getList"
       @saveColumn="saveColumn"
@@ -21,6 +22,9 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot-scope="scope" slot="corpId">
+        {{ scope.row.corpNames }}
+      </template>
       <template slot="corpAttnSearch">
         <el-select v-model="search.corpAttn"
                    remote
@@ -43,9 +47,10 @@
                    @click="addMainItems">新 单
         </el-button>
         <el-button size="small"
+                   icon="el-icon-printer"
                    type="info"
                    @click.stop="openReport()"
-          >导出报表
+          >报表
         </el-button>
       </template>
       <template slot-scope="scope" slot="menu">
@@ -65,10 +70,6 @@
         >删除
         </el-button>
       </template>
-      <report-dialog
-        :switchDialog="switchDialog"
-        @onClose="onClose()"
-      ></report-dialog>
     </avue-crud>
   </basic-container>
   <detail-page
@@ -92,7 +93,6 @@
 export default {
   data() {
     return {
-      switchDialog:false,
       loading: false,
       data: [],
       options:[],
@@ -150,29 +150,46 @@ export default {
         this.options = res.data.data
       })
     },
-    //打印
+    //报表
     openReport() {
-      this.switchDialog =! this.switchDialog;
+      let  searchParams = Object.assign({},this.search);
+      let param = this.paramsAdjustment(searchParams)
+      getList(1, 10000,param).then(res =>{
+        const fileData = this.deepClone(res.data.data.records)
+        fileData.map(item =>{
+          item.corpId = item.corpNames
+        })
+        this.$Export.excel({
+          title: "主营项目",
+          columns: option.column,
+          data: fileData,
+        });
+      })
     },
+
     //关闭打印
     onClose(val) {
       this.switchDialog = val;
     },
-    //flag:0 判断是主营项目还是结算
-    getList(page,params = {}) {
+    paramsAdjustment(params){
+      params = Object.assign({},this.search);
+      if (params.createTime &&  params.createTime.length !=0) {  //发货
+        params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+        params.createEndDate = params.createTime[1] + " " + "23:59:59";
+        this.$delete(params,'createTime')
+      }
       params.flag = 0;
+      return params
+    },
+    //flag:0 判断是主营项目还是结算
+    getList(page,params) {
+      params = this.paramsAdjustment(params)
       this.loading = true;
-      if(params){
-        if (params.createTime &&  params.createTime.length !=0) {  //发货
-          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-          params.createEndDate = params.createTime[1] + " " + "23:59:59";
-          this.$delete(params,'createTime')
-        }
-      }
       getList(page.currentPage, page.pageSize,params).then(res =>{
         this.data = res.data.data.records
         this.page.total = res.data.data.total
-        this.loading = false
+      }).finally(()=>{
+        this.loading = false;
       })
     },
     //新单打开
@@ -195,6 +212,10 @@ export default {
       this.getList(this.page, params);
       done();
     },
+    currentChange(val) {
+      this.page.currentPage = val;
+      this.getList(this.page);
+    },
     refreshChange(params) {
       this.getList(this.page,params);
     },
@@ -261,16 +282,7 @@ export default {
     goBack() {
       this.detailData=this.$options.data().detailData
       this.show = true;
-
-      let params = Object.assign({}, this.search)
-
-      if (params.createTime &&  params.createTime.length !=0) {  //发货
-        params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-        params.createEndDate = params.createTime[1] + " " + "23:59:59";
-        this.$delete(params,'createTime')
-      }
-
-      this.getList(this.page,params)
+      this.getList(this.page, this.search)
     },
   }
 };

+ 2 - 9
src/views/workManagement/receipt/configuration/settleAccounts.json

@@ -49,18 +49,11 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpNames",
-      "overHidden": true,
-      "index": 4,
-      "width": 180
-    },
-    {
-      "label": "客户名称",
       "prop": "corpId",
-      "hide": true,
+      "overHidden": true,
       "search": true,
       "index": 4,
-      "width": 120
+      "width": 180
     },
     {
       "label": "合同金额",

+ 11 - 21
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -40,24 +40,6 @@
   ],
   "column": [
     {
-      "label": "客户名称",
-      "search": true,
-      "hide": true,
-      "prop": "cornId"
-    },
-    {
-      "label": "任务部门",
-      "search": true,
-      "hide": true,
-      "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
-      "props": {
-        "label": "title",
-        "value": "value"
-      },
-      "prop": "deptid"
-    },
-    {
       "label": "服务项目",
       "prop": "pname",
       "search": true,
@@ -128,8 +110,9 @@
     },
     {
       "label": "客户名称",
-      "prop": "cornName",
+      "search": true,
       "overHidden": true,
+      "prop": "cornId",
       "index": 2,
       "width": 180
     },
@@ -163,10 +146,17 @@
     },
     {
       "label": "任务部门",
-      "prop": "deptName",
+      "search": true,
+      "type":"tree",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
       "index": 9,
       "overHidden": true,
-      "width": 120
+      "width": 120,
+      "prop": "deptid"
     },
     {
       "label": "账户名称",

+ 35 - 21
src/views/workManagement/receipt/settleAccounts.vue

@@ -22,6 +22,9 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot-scope="scope" slot="corpId">
+        {{ scope.row.corpNames }}
+      </template>
       <template slot="corpAttnSearch">
         <el-select v-model="search.corpAttn"
                    remote
@@ -42,7 +45,7 @@
           icon="el-icon-printer"
           size="small"
           type="primary"
-          @click.stop=""
+          @click.stop="downFile"
         >报 表
         </el-button>
       </template>
@@ -122,6 +125,22 @@
       // option.height = window.innerHeight - 340 ;
     },
     methods: {
+      downFile(){
+        let  searchParams = Object.assign({},this.search);
+        let param = this.paramsAdjustment(searchParams)
+
+        getList(1, 10000,param).then(res =>{
+          const fileData = this.deepClone(res.data.data.records)
+          fileData.map(item =>{
+            item.corpId = item.corpNames
+          })
+          this.$Export.excel({
+            title: "结算",
+            columns: option.column,
+            data: fileData,
+          });
+        })
+      },
       //远程模糊
       remoteMethod(query){
         let params = {
@@ -131,19 +150,23 @@
           this.options = res.data.data
         })
       },
-      getList(page,params={}) {
-        this.loading = true;
-        params.flag = 1;
-        if(params){
-          if (params.createTime &&  params.createTime.length !=0) {  //发货
-            params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-            params.createEndDate = params.createTime[1] + " " + "23:59:59";
-            this.$delete(params,'createTime')
-          }
+      paramsAdjustment(params){
+        params = Object.assign({},this.search);
+        if (params.createTime &&  params.createTime.length !=0) {  //发货
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
         }
+        params.flag = 1;
+        return params
+      },
+      getList(page,params) {
+        params =  this.paramsAdjustment(params)
+        this.loading = true;
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.data = res.data.data.records
           this.page.total = res.data.data.total
+        }).finally(()=>{
           this.loading = false
         })
       },
@@ -165,7 +188,7 @@
       },
       currentChange(val) {
         this.page.currentPage = val;
-        this.getList();
+        this.getList(this.page);
       },
       refreshChange() {
         this.getList(this.page);
@@ -191,16 +214,7 @@
       goBack() {
         this.detailData=this.$options.data().detailData
         this.show = true;
-
-        let params = Object.assign({}, this.search)
-
-        if (params.createTime &&  params.createTime.length !=0) {  //发货
-          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-          params.createEndDate = params.createTime[1] + " " + "23:59:59";
-          this.$delete(params,'createTime')
-        }
-
-        this.getList(this.page,params)
+        this.getList(this.page,this.search)
       },
     }
   };

+ 45 - 8
src/views/workManagement/receipt/statisticalList.vue

@@ -19,7 +19,7 @@
           icon="el-icon-printer"
           size="small"
           type="primary"
-          @click.stop="openReport()"
+          @click.stop="downFile"
         >报 表
         </el-button>
       </template>
@@ -29,6 +29,12 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot-scope="scope" slot="cornId">
+        {{ scope.row.cornName }}
+      </template>
+      <template slot-scope="scope" slot="deptid">
+        {{ scope.row.deptName }}
+      </template>
       <template slot="userNameSearch">
         <el-select v-model="search.userName"
                    remote
@@ -102,6 +108,31 @@
       // option.height = window.innerHeight - 320 ;
     },
     methods: {
+      downFile(){
+        let  searchParams = Object.assign({},this.search);
+        let param = this.paramsAdjustment(searchParams)
+        getFlowList(1, 10000,param).then(res =>{
+          const fileData = this.deepClone(res.data.data.records)
+          fileData.map(item =>{
+            item.cornId = item.cornName
+            item.deptid = item.deptName
+            item.status = item.strStatus
+            if(item.projectType == 0){
+              item.projectType = "正常"
+            }else if(item.projectType == 1){
+              item.projectType = "追加"
+            }else if(item.projectType == 2){
+              item.projectType = "退款"
+            }
+          })
+
+          this.$Export.excel({
+            title: "统计列表",
+            columns: option.column,
+            data: fileData,
+          });
+        })
+      },
       rowDel() {
 
       },
@@ -150,26 +181,32 @@
       selectionChange() {
         console.log('1')
       },
-      currentChange() {
-        console.log('1')
+      currentChange(val) {
+        this.page.currentPage = val;
+        // this.onLoad(this.page,this.search)
       },
       sizeChange() {
         console.log('1')
       },
       refreshChange() {
-        console.log('1')
+        this.onLoad(this.page)
       },
-      onLoad(page, params = {}) {
-        if (params.payTime != undefined) {  //结算
+      paramsAdjustment(params){
+        params = Object.assign({},this.search);
+        if (params.payTime &&  params.payTime.length !=0) { //结算
           params.payStartTime = params.payTime[0]+ " " + "00:00:00";
           params.payEndTime = params.payTime[1] + " " + "23:59:59";
           this.$delete(params,'payTime')
         }
         if(!params.status && params.status!==0){
-            params.status = "0,1,2,3,4,5,6";
+          params.status = "0,1,2,3,4,5,6";
         }
+        return params
+      },
+      onLoad(page, params) {
+       let param = this.paramsAdjustment(params)
         this.loading = true
-        getFlowList(page.currentPage, page.pageSize,params).then(res =>{
+        getFlowList(page.currentPage, page.pageSize,param).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
         }).finally(()=>{

+ 18 - 9
src/views/workManagement/task/configuration/mainList.json

@@ -45,7 +45,7 @@
       "type": "select",
       "dicData": [
         {
-          "label": "已核",
+          "label": "已核",
           "value": "1"
         },
         {
@@ -64,19 +64,28 @@
       "type": "select",
       "overHidden": true,
       "searchOrder": 5,
-      "width": 120
-    },
-    {
-      "label": "客户名称",
-      "overHidden": true,
-      "prop": "cornName",
-      "width": 220
+      "width": 120,
+      "dicData": [
+        {
+          "label": "已审核",
+          "value": "1"
+        },
+        {
+          "label": "正在结算",
+          "value": "4"
+        },
+        {
+          "label": "结算完成",
+          "value": "5"
+        }
+      ]
     },
     {
       "label": "客户名称",
-      "hide": true,
       "search": true,
       "prop": "cornId",
+      "overHidden": true,
+      "width": 180,
       "searchOrder": 1
     },
     {

+ 39 - 14
src/views/workManagement/task/index.vue

@@ -20,12 +20,15 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot-scope="scope" slot="cornId">
+        {{ scope.row.cornName }}
+      </template>
       <template slot="menuLeft">
         <el-button
           icon="el-icon-printer"
           size="small"
           type="primary"
-          @click.stop="openReport()"
+          @click.stop="downFile"
         >报 表
         </el-button>
       </template>
@@ -75,9 +78,9 @@
         parentId:0,
         dataList: [],
         page: {
-          pageSize: 10,
-          pagerCount: 5,
+          currentPage: 1,
           total: 0,
+          pageSize: 10
         },
         query:{}
       }
@@ -89,6 +92,23 @@
       // option.height = window.innerHeight - 350 ;
     },
     methods: {
+      downFile(){
+        let searchParams = Object.assign({},this.search);
+        let param = this.paramsAdjustment(searchParams)
+        getFlowList(1, 10000,param).then(res =>{
+          const fileData = this.deepClone(res.data.data.records)
+          fileData.map(item =>{
+            item.cornId = item.cornName
+          })
+          const fileColumn = this.deepClone(option.column)
+          fileColumn.shift();
+          this.$Export.excel({
+            title: "任务",
+            columns: fileColumn,
+            data: fileData,
+          });
+        })
+      },
       //完工
       completion(row){
         this.$confirm("确认将此任务完工?", {
@@ -120,30 +140,35 @@
       selectionChange() {
         console.log('1')
       },
-      currentChange() {
-        console.log('1')
+      currentChange(val) {
+        this.page.currentPage = val
+        this.onLoad(this.page)
       },
       sizeChange() {
         console.log('1')
       },
       refreshChange() {
-        console.log('1')
+        this.onLoad(this.page)
       },
-      onLoad(page, params = {}) {
+      paramsAdjustment(params){
+        params = Object.assign({},this.search);
+        if (params.beginTime &&  params.beginTime.length !=0) {  //发货
+          params.beginStartTime = params.beginTime[0]+ " " + "00:00:00";
+          params.beginEndTime = params.beginTime[1] + " " + "23:59:59";
+          this.$delete(params,'beginTime')
+        }
         if(!params.status){
           params.status = "1,4,5";
         }
-        if(params){
-          if (params.beginTime != undefined) {  //发货
-            params.beginStartTime = params.beginTime[0]+ " " + "00:00:00";
-            params.beginEndTime = params.beginTime[1] + " " + "23:59:59";
-            this.$delete(params,'beginTime')
-          }
-        }
+        return params
+      },
+      onLoad(page, params = {}) {
+        params =  this.paramsAdjustment(params)
         this.loading = true
         getFlowList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+        }).finally(()=>{
           this.loading = false
         })
       },