Parcourir la source

中审报销list页面数据信息获取

user5 il y a 3 ans
Parent
commit
7156511252

Fichier diff supprimé car celui-ci est trop grand
+ 19080 - 22
package-lock.json


+ 2 - 2
public/index.html

@@ -5,7 +5,7 @@
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
-  <title>Jeeplus vue快速开发平台</title>
+  <title>中审报销系统</title>
   <meta name="renderer" content="webkit">
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
   <link rel="icon" href="/static/img/favicon.ico">
@@ -259,4 +259,4 @@
   </div>
 </body>
 </html>
-<script src="iconfont.js"></script>
+<script src="iconfont.js"></script>

+ 58 - 2
src/api/reimbursementSys/reimbursementSysService.js

@@ -1,11 +1,67 @@
 import request from '@/utils/httpRequest'
 
 export default class reimbursementSys {
-  qqq (params) {
+  treeData (params) {
     return request({
-      url: '/ReimbursementSysController/ReimbursementTreeStructure',
+      url: '/reimbursement/treeData',
       method: 'get',
       params: params
     })
   }
+
+  saveBusiness (inputForm) {
+    return request({
+      url: `/reimbursement/saveBusiness`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  saveInvoice (inputForm) {
+    return request({
+      url: `/reimbursement/saveInvoice`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  deleteBusiness (ids) {
+    return request({
+      url: '/reimbursement/deleteBusiness',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  deleteInvoice (ids) {
+    return request({
+      url: '/reimbursement/deleteInvoice',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/reimbursement/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryBusinessById (id) {
+    return request({
+      url: `/reimbursement/queryBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  queryInvoiceById (id) {
+    return request({
+      url: `/reimbursement/queryInvoiceById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
 }

+ 5 - 5
src/components/userSelect/UserSelectDialog.vue

@@ -37,7 +37,7 @@
           </el-tree>
         </el-card>
       </el-aside>
-  
+
     <el-container>
       <el-header style="text-align: left; font-size: 12px;height:30px">
         <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
@@ -51,7 +51,7 @@
             </el-form-item>
           </el-form>
       </el-header>
-      
+
       <el-main>
         <el-table
           :data="dataList"
@@ -143,7 +143,7 @@
         </el-pagination>
       </el-main>
     </el-container>
-    
+
     <el-aside width="200px">
       <el-tag
         :key="tag.id"
@@ -160,7 +160,7 @@
       <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
     </span>
     </el-dialog>
-  
+
   </div>
 </template>
 
@@ -435,4 +435,4 @@
     }
   }
 }
-</style>
+</style>

+ 26 - 26
src/views/layout/_common_top.vue

@@ -17,54 +17,54 @@
       </h1>
     </div>
     <div class="jp-navbar__body clearfix" style="overflow:hidden">
-      
+
       <el-menu
         class="jp-navbar__menu"
         mode="horizontal">
         <el-menu-item class="jp-navbar__switch"  @click="sidebarFold = !sidebarFold">
-             <i  :class="sidebarFold ? 'fa fa-indent':'fa fa-outdent'"></i>
+          <i  :class="sidebarFold ? 'fa fa-indent':'fa fa-outdent'"></i>
         </el-menu-item>
       </el-menu>
-    
+
       <el-menu class="jp-navbar__menu " :default-active="topMenuActiveIndex" ref="topMenu"  mode="horizontal">
         <el-menu-item  class="el_menu_item" v-for="menu in topMenuList"
-          :index="menu.id"
-          :key="menu.id"
-          @click="showLeftMenu(menu)"
-          :ref="menu.id"
-          :menu="menu">
-           <i :class="`${menu.icon} jp-sidebar__menu-icon`" style="display: inline-block!important;"></i>
+                       :index="menu.id"
+                       :key="menu.id"
+                       @click="showLeftMenu(menu)"
+                       :ref="menu.id"
+                       :menu="menu">
+          <i :class="`${menu.icon} jp-sidebar__menu-icon`" style="display: inline-block!important;"></i>
           {{menu.name}}
-          </el-menu-item>
+        </el-menu-item>
 
         <el-submenu index="2" v-if="topHideMenuList.length != 0">
           <template slot="title">更多</template>
           <el-menu-item  v-for="menu in topHideMenuList"
-          :index="menu.id"
-          :key="menu.id"
-          :ref="menu.id"
-          @click="showLeftMenu(menu)"
-          :menu="menu">
-           <i :class="`${menu.icon} jp-sidebar__menu-icon`" style="display: inline-block!important;"></i>
-          {{menu.name}}
+                         :index="menu.id"
+                         :key="menu.id"
+                         :ref="menu.id"
+                         @click="showLeftMenu(menu)"
+                         :menu="menu">
+            <i :class="`${menu.icon} jp-sidebar__menu-icon`" style="display: inline-block!important;"></i>
+            {{menu.name}}
           </el-menu-item>
         </el-submenu>
-        </el-menu>
-      
+      </el-menu>
+
       <el-menu
         class="jp-navbar__menu jp-navbar__menu--right"
         mode="horizontal">
-         <el-menu-item class="hide-sm">
+        <el-menu-item class="hide-sm">
           <template slot="title">
-                <color-picker></color-picker>
+            <color-picker></color-picker>
           </template>
         </el-menu-item>
         <el-menu-item class="hide-sm">
           <template slot="title">
-                <notice-icon
-                    class="action notice"
-                    :tabs="noticeTabs" >
-              </notice-icon>
+            <notice-icon
+              class="action notice"
+              :tabs="noticeTabs" >
+            </notice-icon>
           </template>
         </el-menu-item>
         <el-menu-item class="jp-navbar__avatar">
@@ -80,7 +80,7 @@
         </el-menu-item>
         <el-menu-item class="hide-sm"  @click="showRight">
           <template slot="title">
-               <i class="el-icon-more rotate-90" @click="showRight"></i>
+            <i class="el-icon-more rotate-90" @click="showRight"></i>
           </template>
         </el-menu-item>
       </el-menu>

+ 18 - 18
src/views/modules/form/GenerateList.vue

@@ -6,13 +6,13 @@
            return field.isSearch})"
           :key="index"
           :prop="option.model">
-            <user-select 
+            <user-select
                 v-if="option.type === 'user'"
                 size="small"
                 v-model="params[`${option.model}`]"
                 @getValue='(value, label) => {params[`${option.model}`]= value}'>
             </user-select>
-            <SelectTree 
+            <SelectTree
              v-else-if="option.type === 'office'"
              size="small"
              v-model="params[`${option.model}`]"
@@ -21,12 +21,12 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-               
+
               :url="`/sys/office/treeData`"
-              :clearable="true" 
+              :clearable="true"
               :accordion="true"
               @getValue="(value) => {params[`${option.model}`]= value}"/>
-            <SelectTree 
+            <SelectTree
                  v-else-if="option.type === 'area'"
                  size="small"
                  v-model="params[`${option.model}`]"
@@ -36,7 +36,7 @@
                     children: 'children'    // 子级字段名
                   }"
                 :url="`/sys/area/treeData`"
-                :clearable="true" 
+                :clearable="true"
                 :accordion="true"
                 @getValue="(value) => {params[`${option.model}`]= value}"/>
 
@@ -52,12 +52,12 @@
         v-else-if="option.type === 'rate'"
         v-model="params[`${option.model}`]"
       ></el-rate> -->
-      <!-- <el-color-picker 
+      <!-- <el-color-picker
         v-else-if="option.type === 'color'"
         size="small"
         v-model="params[`${option.model}`]"
       ></el-color-picker> -->
- 
+
       <!-- <el-select
         v-else-if="option.type === 'select'"
         v-model="params[`${option.model}`]"
@@ -71,12 +71,12 @@
         v-model="params[`${option.model}`]"
       >
       </el-switch> -->
-        <!-- <el-slider 
+        <!-- <el-slider
           v-else-if="option.type === 'slider'"
           size="small"
           v-model="params[`${option.model}`]"
         ></el-slider> -->
-          <el-time-picker 
+          <el-time-picker
             v-else-if="option.type === 'time'"
             size="small"
             :placeholder="option.name"
@@ -156,7 +156,7 @@
             :checkbox-config="{}">
             <vxe-column type="seq" width="40"></vxe-column>
             <vxe-column type="checkbox"  width="40px"></vxe-column>
-       <vxe-column 
+       <vxe-column
         v-for="(option, index) in dataBindFields.filter((item)=>{
           return item.isShow
           })"
@@ -185,7 +185,7 @@
                   {{$dictUtils.getDictLabel(`${option.options.dictType}`, scope.row[`${option.model}`])}}
           </div>
           <div v-else-if="option.type === 'selectTree'">
-                  <TreeSelectText 
+                  <TreeSelectText
              size="small"
              v-model="scope.row[`${option.model}`]"
               :props="{
@@ -193,22 +193,22 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-               
+
               :url="option.options.dataUrl"
-              :clearable="true" 
+              :clearable="true"
               :accordion="true"
              />
           </div>
            <div v-else-if="option.type === 'checkbox' && option.options.remote === 3">
-                 
+
                     <span :key="index" v-for="(item, index) in JSON.parse(scope.row[`${option.model}`] || '[]')">
-                      {{$dictUtils.getDictLabel(`${option.options.dictType}`, item)}} 
+                      {{$dictUtils.getDictLabel(`${option.options.dictType}`, item)}}
                       <span v-if="index+1 !==  JSON.parse(scope.row[`${option.model}`] || '[]').length">
                         |
                       </span>
                     </span>
           </div>
-          
+
            <div v-else-if="option.type === 'select' && option.options.remote === 3 && option.options.multiple">
                     <span :key="index" v-for="(item, index) in JSON.parse(scope.row[`${option.model}`] || '[]')">
                         {{$dictUtils.getDictLabel(`${option.options.dictType}`, item)}}
@@ -514,4 +514,4 @@
        }
      }
 }
-</script>
+</script>

+ 94 - 0
src/views/modules/reimbursementSys/reimbursementForm.vue

@@ -0,0 +1,94 @@
+<template>
+  <el-dialog
+    :title="title"
+    :close-on-click-modal="false"
+     v-dialogDrag
+    :visible.sync="visible">
+    <el-form size="small" :model="inputForm" ref="inputForm" @keyup.enter.native="doSubmit()"
+             label-width="80px" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'" @submit.native.prevent>
+      <el-row :gutter="15">
+
+        <el-col :span="12">
+          <el-form-item label="业务编码" prop="businessCode" :rules=" [{required: true,max: 50, message: '业务编号不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.businessCode" placeholder="业务编码"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" v-if="method != 'view'" type="primary" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ReimbursementSys from '@/api/reimbursementSys/reimbursementSysService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          name: '',
+          parent: {
+            id: ''
+          },
+          businessCode: '' // 业务编码
+        }
+      }
+    },
+    reimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    methods: {
+      init (method, obj) {
+        this.method = method
+        if (method === 'editBusiness') {
+          this.title = '修改业务编码'
+        } else if (method === 'view') {
+          this.title = '查看业务编码'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs['inputForm'].resetFields()
+          this.inputForm.id = obj.id
+          this.inputForm.parent.id = obj.parent.id
+          this.inputForm.parent.name = obj.parent.name
+          if (method === 'editBusiness' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.reimbursementSys.queryBusinessById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementSys.saveBusiness(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500
+              })
+              this.visible = false
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 184 - 0
src/views/modules/reimbursementSys/reimbursementInvoiceForm.vue

@@ -0,0 +1,184 @@
+<template>
+  <el-dialog
+    :title="title"
+    :close-on-click-modal="false"
+     v-dialogDrag
+    :visible.sync="visible">
+    <el-form size="small" :model="inputForm" ref="inputForm" @keyup.enter.native="doSubmit()"
+             label-width="80px" v-loading="loading" :class="method==='viewInvoice'?'readonly':''" :disabled="method==='viewInvoice'" @submit.native.prevent>
+      <el-row :gutter="15">
+        <el-col :span="12">
+          <el-form-item label="业务编号" prop="businessCode" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.businessCode" placeholder="业务编号" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="业务类型" prop="businessType" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.businessType" placeholder="业务类型" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发票代码" prop="invoiceCode" :rules=" [{required: true, message: '发票代码不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.invoiceCode" placeholder="发票代码" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发票号码" prop="invoiceNumber" :rules=" [{required: true, message: '发票号码不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.invoiceNumber" placeholder="发票号码" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="购方企业名称" prop="firmName" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.firmName" placeholder="购方企业名称" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="开票日期" prop="makeTime"
+                        :rules="[
+                  {required: true, message:'收款日期不能为空', trigger:'blur'}
+                 ]">
+            <el-date-picker
+              style="width: 100%;"
+              v-model="inputForm.makeTime"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :disabled="true"
+              placeholder="选择日期时间">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="商品名称" prop="name" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.name" placeholder="商品名称" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="金额" prop="money" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.money" placeholder="金额" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="税额" prop="tax" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.tax" placeholder="税额" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="收入" prop="income" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.income" placeholder="收入" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="申请人" prop="proposer" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.proposer" placeholder="申请人" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合伙人" prop="partner" :rules="[{max: 50, message: '最大长度不能超过50个字符', trigger: 'blur'}]">
+            <el-input v-model="inputForm.partner" placeholder="合伙人" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="收款日期" prop="gatheringTime"
+                        :rules="[
+                  {required: true, message:'收款日期不能为空', trigger:'blur'}
+                 ]">
+            <el-date-picker
+              style="width: 100%;"
+              v-model="inputForm.gatheringTime"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="选择日期时间">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" v-if="method != 'viewInvoice'" type="primary" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ReimbursementSys from '@/api/reimbursementSys/reimbursementSysService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          parent: {
+            id: ''
+          },
+          businessCode: '', // 业务编号
+          invoiceCode: '', // 发票代码
+          invoiceNumber: '', // 发票号码
+          firmName: '', // 购方企业名称
+          makeTime: '', // 开票日期
+          name: '', // 商品名称
+          money: '', // 金额
+          tax: '', // 税额
+          income: '', // 收入
+          proposer: '', // 申请人
+          partner: '', // 合伙人
+          businessType: '', // 业务类型
+          gatheringTime: '' // 收款日期
+        }
+      }
+    },
+    reimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    methods: {
+      init (method, obj) {
+        this.method = method
+        if (method === 'editInvoice') {
+          this.title = '修改发票信息'
+        } else if (method === 'viewInvoice') {
+          this.title = '查看发票信息'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs['inputForm'].resetFields()
+          this.inputForm.id = obj.id
+          this.inputForm.parent.id = obj.parent.id
+          this.inputForm.parent.name = obj.parent.name
+          if (method === 'editInvoice' || method === 'viewInvoice') { // 修改或者查看
+            this.loading = true
+            this.reimbursementSys.queryInvoiceById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementSys.saveInvoice(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500
+              })
+              this.visible = false
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 287 - 0
src/views/modules/reimbursementSys/reimbursementList.vue

@@ -0,0 +1,287 @@
+<template>
+
+  <div class="page">
+    <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm"  @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form-item prop="businessCode">
+        <el-input size="small"  v-model="searchForm.businessCode"   placeholder="业务编号"   clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="invoiceNumber">
+        <el-input size="small"  v-model="searchForm.invoiceNumber"   placeholder="发票号码"   clearable></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top">
+      <vxe-toolbar :refresh="{query: refreshList}" export print custom>
+        <template #buttons>
+          <el-row>
+            <el-upload style="float: left"
+                       class="upload-demo"
+                       :on-success="uploadSuccess"
+                       :show-file-list="false"
+                       :before-upload="beforeUpload"
+                       :action="`${$http.BASE_URL}/reimbursement/uploadFile`"
+                       multiple
+                       list-type="picture">
+              <el-button size="small"
+                         icon="el-icon-upload"
+                         type="primary">点击上传</el-button>
+            </el-upload>
+
+
+            <el-button style="margin-left: 10px" v-if="hasPermission('sys:office:del')" :disabled="$refs.xTree && $refs.xTree.getCheckboxRecords().length === 0" type="danger" size="small" icon="el-icon-delete" @click="del()" plain>删除</el-button>
+
+          </el-row>
+
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 80px);">
+        <vxe-table
+          ref="xTree"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          row-id="id"
+          size="small"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :print-config="{}"
+          :export-config="{}"
+          :tree-config="{expandAll: true}"
+          :loading="loading"
+          :checkbox-config="{labelField: ''}"
+          :data="dataList">
+          <vxe-column type="checkbox" width="40px"> </vxe-column>
+          <vxe-column  width="140px" title="业务编号"  field="businessCode"  align="left" tree-node >
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="scope.row.parentId == '0'" @click="view(scope.row.id)">{{scope.row.businessCode}}</el-link>
+              <span v-else></span>
+            </template>
+          </vxe-column>
+          <vxe-column  width="100px" title="发票代码" field="invoiceCode" align="center" ></vxe-column>
+          <vxe-column  width="100px" title="发票号码" field="invoiceNumber" align="center"></vxe-column>
+          <vxe-column  width="200px" title="购方企业名称" field="firmName" align="center"></vxe-column>
+          <vxe-column  width="100px" title="开票日期" field="makeTime" align="center"></vxe-column>
+          <vxe-column  width="150px" title="商品名称" field="name" align="center"></vxe-column>
+          <vxe-column  width="100px" title="金额" field="money" align="center"></vxe-column>
+          <vxe-column  width="100px" title="税额" field="tax" align="center"></vxe-column>
+          <vxe-column  width="100px" title="收入" field="income" align="center"></vxe-column>
+          <vxe-column  width="100px" title="申请人" field="proposer" align="center"></vxe-column>
+          <vxe-column  width="100px" title="合伙人" field="partner" align="center"></vxe-column>
+          <vxe-column  width="100px" title="业务类型" field="businessType" align="center"></vxe-column>
+          <vxe-column  width="100px" title="收款日期" field="gatheringTime" align="center"></vxe-column>
+
+
+
+          <vxe-column title="操作" width="300px" fixed="right" align="center">
+            <template slot-scope="scope">
+              <el-button v-if="scope.row.businessCode==='' && scope.row.parentId === '0'" type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">修改业务编码</el-button>
+              <el-button v-if="scope.row.parentId !== '0'" type="text" icon="el-icon-view" size="small" @click="viewInvoice(scope.row.id)">查看发票详情</el-button>
+              <el-button v-if="scope.row.parentId !== '0' && !scope.row.gatheringTime" type="text" icon="el-icon-edit" size="small" @click="editInvoice(scope.row.id)">发票收款</el-button>
+              <el-button v-if="scope.row.parentId === '0'" type="text" icon="el-icon-delete" size="small" @click="delBusiness(scope.row.id)">删除</el-button>
+              <el-button v-if="scope.row.parentId !== '0'" type="text" icon="el-icon-delete" size="small" @click="delInvoice(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+    <!-- 弹窗, 新增 / 修改 -->
+    <reimbursementForm ref="reimbursementForm" @refreshDataList="refreshList"></reimbursementForm>
+    <reimbursementInvoiceForm ref="reimbursementInvoiceForm" @refreshDataList="refreshList"></reimbursementInvoiceForm>
+  </div>
+
+
+</template>
+<script>
+import ReimbursementSys from '@/api/reimbursementSys/reimbursementSysService'
+import XEUtils from 'xe-utils'
+import reimbursementForm from './reimbursementForm'
+import reimbursementInvoiceForm from './reimbursementInvoiceForm'
+export default {
+  data () {
+    return {
+      dataList: [],
+      searchForm: {
+        businessCode: '',
+        invoiceNumber: ''
+      },
+      tablePage: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+        orders: [{column: 'a.create_date', asc: false}]
+      },
+      loading: false
+    }
+  },
+  components: {
+    reimbursementForm,
+    reimbursementInvoiceForm
+  },
+  ReimbursementSys: null,
+  created () {
+    this.reimbursementSys = new ReimbursementSys()
+  },
+  activated () {
+    this.refreshList()
+  },
+  methods: {
+    // 获取数据列表
+    refreshList () {
+      this.loading = true
+      this.reimbursementSys.treeData({
+        'current': this.tablePage.currentPage,
+        'size': this.tablePage.pageSize,
+        'orders': this.tablePage.orders,
+        ...this.searchForm
+      }).then(({data}) => {
+        this.dataList = data
+        this.tablePage.total = data.total
+        this.handleSearch()
+        this.loading = false
+      })
+    },
+    beforeUpload (file) {
+      const isExcel = file.name.indexOf('.xls') >= 0 || file.name.indexOf('.xlsx') >= 0
+      const isLt2M = file.size / 1024 / 1024 < 1
+      if (!isExcel) {
+        this.$message.error('只能上传xls、xlsx文件!')
+        return false
+      }
+      if (!isLt2M) {
+        this.$message.error('上传文件大小不能超过 10MB!')
+        return false
+      }
+      this.loading = true
+      return true
+    },
+    handleSearch () {
+      let name = XEUtils.toValueString(this.searchForm.businessCode).trim()
+      let options = { children: 'children' }
+      let searchProps = ['name']
+      this.dataList = XEUtils.searchTree(
+        this.dataList.records, item => searchProps.some(key => XEUtils.toValueString(item[key]).indexOf(name) >= -1), options)
+      this.$nextTick(() => {
+        this.$refs.xTree.setAllTreeExpand(true)
+      })
+    },
+    resetSearch () {
+      this.$refs.searchForm.resetFields()
+      this.refreshList()
+    },
+    uploadSuccess (res, file) {
+      if (res.success) {
+        this.$message.success({dangerouslyUseHTMLString: true,
+          message: res.message})
+        this.refreshList()
+      } else {
+        this.$message.error(res.message)
+        this.refreshList()
+      }
+    },
+    // 当前页
+    currentChangeHandle ({ currentPage, pageSize }) {
+      this.tablePage.currentPage = currentPage
+      this.tablePage.pageSize = pageSize
+      this.refreshList()
+    },
+    // 修改
+    editBusiness (id) {
+      this.$refs.reimbursementForm.init('editBusiness', {id: id, parent: {id: '', name: ''}})
+    },
+    // 修改发票信息
+    editInvoice (id) {
+      this.$refs.reimbursementInvoiceForm.init('editInvoice', {id: id, parent: {id: '', name: ''}})
+    },
+    // 查看
+    view (id) {
+      this.$refs.reimbursementForm.init('view', {id: id, parent: {id: '', name: ''}})
+    },
+    // 查看发票信息
+    viewInvoice (id) {
+      this.$refs.reimbursementInvoiceForm.init('viewInvoice', {id: id, parent: {id: '', name: ''}})
+    },
+    // 删除
+    delBusiness (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementSys.deleteBusiness(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+      })
+    },
+    // 删除
+    delInvoice (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementSys.deleteInvoice(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+      })
+    },
+    // 删除
+    del (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementSys.delete(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+      })
+    }
+  }
+
+}
+</script>

+ 0 - 111
src/views/modules/reimbursementSys/reimbursementSys.vue

@@ -1,111 +0,0 @@
-<template>
-  <el-table
-    :data="dataList"
-    border
-    row-key="invoicennumber"
-    default-expand-all
-    :tree-props="{children: 'child'}"
-    style="width: 100%">
-    <el-table-column
-      prop="invoiceCode"
-      label="发票代码"
-      width="140">
-    </el-table-column>
-    <el-table-column
-      prop="invoicennumber"
-      label="发票号码"
-      width="100">
-    </el-table-column>
-    <el-table-column
-      prop="firmName"
-      label="购方企业名称"
-      width="180">
-    </el-table-column>
-    <el-table-column
-      prop="makeTime"
-      label="开票日期"
-      >
-    </el-table-column>
-    <el-table-column
-      prop="productName"
-      label="商品名称"
-      width="140">
-    </el-table-column>
-    <el-table-column
-      prop="money"
-      label="金额"
-      >
-    </el-table-column>
-     <el-table-column
-      prop="tax"
-      label="税额"
-      >
-    </el-table-column>
-     <el-table-column
-      prop="income"
-      label="收入"
-     >
-    </el-table-column>
-    <el-table-column
-      prop="proposer"
-      label="申请人"
-      width="65">
-    </el-table-column>
-      <el-table-column
-      prop="partner"
-      label="合伙人"
-      width="65">
-    </el-table-column>
-     <el-table-column
-      prop="businessType"
-      label="业务类型">
-    </el-table-column>
-     <el-table-column
-      prop="businessCode"
-      label="业务编号"
-       width="100">
-    </el-table-column>
-      <el-table-column
-      prop="gatheringTime"
-      label="收款日期"
-       width="100">
-    </el-table-column>
-      <el-table-column label="操作">
-      <template slot-scope="scope">
-        <el-button
-          size="mini"
-          @click="handleEdit(scope.$index, scope.row)">修改编号</el-button>
-        
-      </template>
-    </el-table-column>
-  </el-table>
-</template>
-<script>
-import ReimbursementSys from '@/api/reimbursementSys/reimbursementSysService'
-export default {
-  data () {
-    return {
-      dataList: [],
-      loading: false
-    }
-  },
-  ReimbursementSys: null,
-  created () {
-    this.ReimbursementSys = new ReimbursementSys()
-  },
-  activated () {
-    this.refreshList()
-  },
-  methods: {
-      // 获取数据列表
-    refreshList () {
-      this.loading = true
-      this.ReimbursementSys.qqq().then(({data}) => {
-        this.dataList = data
-        console.log(this.dataList)
-      })
-    }
-  }
-
-}
-</script>

+ 9 - 9
src/views/modules/sys/user/UserForm.vue

@@ -34,7 +34,7 @@
      <el-divider content-position="left"><i class="el-icon-user"></i> 身份信息</el-divider>
          <el-row :gutter="15">
         <!-- <el-col :span="24"> -->
-          <!-- <el-form-item prop="photo" label="头像"> 
+          <!-- <el-form-item prop="photo" label="头像">
             <el-upload
               class="avatar-uploader"
               :action="`${this.$http.BASE_URL}/sys/file/webupload/upload?uploadPath=photo`"
@@ -71,8 +71,8 @@
     <el-divider content-position="left"><i class="el-icon-postcard"></i> 岗位信息</el-divider>
         <el-row :gutter="15">
         <el-col :span="12">
-          <el-form-item prop="companyDTO.id" :rules=" [{required: true, message: '公司不能为空', trigger: 'blur'}]" label="公司"> 
-            <SelectTree 
+          <el-form-item prop="companyDTO.id" :rules=" [{required: true, message: '公司不能为空', trigger: 'blur'}]" label="公司">
+            <SelectTree
               ref="companyTree"
               :props="{
                   value: 'id',             // ID字段名
@@ -81,29 +81,29 @@
                 }"
               :url="`/sys/office/treeData?type=1`"
               :value="inputForm.companyDTO.id"
-              :clearable="true" 
+              :clearable="true"
               :accordion="true"
               @getValue="(value) => {inputForm.companyDTO.id=value}"/>
           </el-form-item>
         </el-col>
         <el-col :span="12">
            <el-form-item prop="officeDTO.id" :rules="[{required: true, message: '部门不能为空', trigger: 'blur'}]" label="部门">
-            <SelectTree 
+            <SelectTree
               ref="officeTree"
               :props="{
                   value: 'id',             // ID字段名
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-               
+
               :url="`/sys/office/treeData?type=2`"
               :value="inputForm.officeDTO.id"
-              :clearable="true" 
+              :clearable="true"
               :accordion="true"
               @getValue="(value) => {inputForm.officeDTO.id=value}"/>
           </el-form-item>
         </el-col>
-        
+
         <el-col :span="12">
             <el-form-item label="工号" prop="no" :rules="[{required: true, message:'工号不能为空', trigger:'blur'}]">
               <el-input v-model="inputForm.no" maxlength="50" placeholder=""></el-input>
@@ -287,4 +287,4 @@ export default {
     font-weight: bold;
     font-size: 16px;
 }
-</style>
+</style>

+ 313 - 313
src/views/modules/wps/DocTemplateList.vue

@@ -1,37 +1,37 @@
 <template>
-    <div class="jp-common-layout page">
-      <div class="jp-common-layout-left">
-        <div class="jp-common-title"> 
-          <el-row :gutter="5">
-            <el-col :span="20">
-              <el-input
-                placeholder="输入关键字进行过滤"
-                size="small"
-                v-model="filterText">
-              </el-input>
-            </el-col>
-            <el-col :span="4">
-                <el-button type="primary" @click="addTreeNode" size="small" icon="el-icon-plus" circle></el-button>
-            </el-col>
-          </el-row>
-        </div>
-        <div class="jp-common-el-tree-scrollbar el-scrollbar">
+  <div class="jp-common-layout page">
+    <div class="jp-common-layout-left">
+      <div class="jp-common-title">
+        <el-row :gutter="5">
+          <el-col :span="20">
+            <el-input
+              placeholder="输入关键字进行过滤"
+              size="small"
+              v-model="filterText">
+            </el-input>
+          </el-col>
+          <el-col :span="4">
+            <el-button type="primary" @click="addTreeNode" size="small" icon="el-icon-plus" circle></el-button>
+          </el-col>
+        </el-row>
+      </div>
+      <div class="jp-common-el-tree-scrollbar el-scrollbar">
         <div class="el-scrollbar__wrap">
           <div class="el-scrollbar__view">
-          <el-tree
-            class="filter-tree"
-            :data="docCategoryTreeData"
-            :props="{
+            <el-tree
+              class="filter-tree"
+              :data="docCategoryTreeData"
+              :props="{
               value: 'id', // ID字段名
               label: 'name', // 显示名称
               children: 'children' // 子级字段名
             }"
-            default-expand-all
-            :filter-node-method="filterNode"
-            :expand-on-click-node="false"
-            @node-click="handleNodeClick"
-            ref="docCategoryTree"
-          >
+              default-expand-all
+              :filter-node-method="filterNode"
+              :expand-on-click-node="false"
+              @node-click="handleNodeClick"
+              ref="docCategoryTree"
+            >
             <span class="custom-tree-node" slot-scope="{ node, data }">
               <span>{{ node.label }}</span>
               <span>
@@ -53,327 +53,327 @@
                 </el-button>
               </span>
             </span>
-          </el-tree>
-         </div>
+            </el-tree>
+          </div>
         </div>
       </div>
     </div>
     <div class="jp-common-layout-center jp-flex-main">
       <el-form :inline="true" size="small" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-            <!-- 搜索框-->
-            <el-form-item prop="docCategoryDTO.id">
-              <SelectTree
-                ref="category"
-                :props="{
+        <!-- 搜索框-->
+        <el-form-item prop="docCategoryDTO.id">
+          <SelectTree
+            ref="category"
+            :props="{
                   value: 'id', // ID字段名
                   label: 'name', // 显示名称
                   children: 'children' // 子级字段名
                 }"
-                size="small"
-                url="/wps/docCategory/treeData"
-                :value="searchForm.docCategoryDTO.id"
-                :clearable="true"
-                :accordion="true"
-                @getValue="
+            size="small"
+            url="/wps/docCategory/treeData"
+            :value="searchForm.docCategoryDTO.id"
+            :clearable="true"
+            :accordion="true"
+            @getValue="
                   value => {
                     searchForm.docCategoryDTO.id = value
                   }
                 "
-              />
-            </el-form-item>
-            <el-form-item>
-              <el-button type="primary" @click="refreshList()" size="small">查询</el-button>
-              <el-button @click="resetSearch()" size="small">重置</el-button>
-            </el-form-item>
-          </el-form>
-        <div class="bg-white top">
-          <vxe-toolbar :refresh="{query: refreshList}" export print custom>
-              <template #buttons>
-                <el-dropdown trigger="click" @command="createFile">
-                  <el-button size="small" type="primary" icon="el-icon-plus" class="e-b">新建</el-button>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item command="w"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-word1"/></svg><span style="text-align: center">文字文档</span></el-dropdown-item>
-                    <el-dropdown-item command="s"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-excel1"/></svg><span style="text-align: center">表格文档</span></el-dropdown-item>
-                    <el-dropdown-item command="p"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-ppt4"/></svg><span style="text-align: center">演示文档</span></el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-                <el-button v-if="hasPermission('wps:docTemplate:add')" type="primary" size="small" plain icon="el-icon-upload" @click="add()">上传</el-button>
-                <el-button v-if="hasPermission('wps:docTemplate:edit')" type="warning" size="small" icon="el-icon-edit-outline"  @click="edit()"
-                  :disabled="$refs.docTemplateTable && $refs.docTemplateTable.getCheckboxRecords().length !== 1" plain>修改</el-button>
-                <el-button v-if="hasPermission('wps:docTemplate:del')" type="danger" size="small" icon="el-icon-delete" @click="del()"
-                  :disabled="$refs.docTemplateTable && $refs.docTemplateTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refreshList()" size="small">查询</el-button>
+          <el-button @click="resetSearch()" size="small">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="bg-white top">
+        <vxe-toolbar :refresh="{query: refreshList}" export print custom>
+          <template #buttons>
+            <el-dropdown trigger="click" @command="createFile">
+              <el-button size="small" type="primary" icon="el-icon-plus" class="e-b">新建</el-button>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="w"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-word1"/></svg><span style="text-align: center">文字文档</span></el-dropdown-item>
+                <el-dropdown-item command="s"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-excel1"/></svg><span style="text-align: center">表格文档</span></el-dropdown-item>
+                <el-dropdown-item command="p"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-ppt4"/></svg><span style="text-align: center">演示文档</span></el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+            <el-button v-if="hasPermission('wps:docTemplate:add')" type="primary" size="small" plain icon="el-icon-upload" @click="add()">上传</el-button>
+            <el-button v-if="hasPermission('wps:docTemplate:edit')" type="warning" size="small" icon="el-icon-edit-outline"  @click="edit()"
+                       :disabled="$refs.docTemplateTable && $refs.docTemplateTable.getCheckboxRecords().length !== 1" plain>修改</el-button>
+            <el-button v-if="hasPermission('wps:docTemplate:del')" type="danger" size="small" icon="el-icon-delete" @click="del()"
+                       :disabled="$refs.docTemplateTable && $refs.docTemplateTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+          </template>
+        </vxe-toolbar>
+        <div style="height: calc(100% - 80px);">
+          <vxe-table
+            border="inner"
+            auto-resize
+            resizable
+            height="auto"
+            :loading="loading"
+            size="small"
+            ref="docTemplateTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :import-config="{}"
+            :export-config="{}"
+            @sort-change="sortChangeHandle"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :checkbox-config="{}">
+            <vxe-column type="seq" width="40"></vxe-column>
+            <vxe-column type="checkbox"  width="40px"></vxe-column>
+            <vxe-column  title="名称" field="name" sortable>
+              <template slot-scope="scope">
+                <el-link type="primary" :underline="false" v-if="hasPermission('wps:docTemplate:edit')"  @click="edit(scope.row.id)">
+                  {{ scope.row.name }}
+                </el-link>
+                <el-link type="primary" :underline="false" v-else-if="hasPermission('wps:docTemplate:view')" @click="view(scope.row.id)">
+                  {{ scope.row.name }}
+                </el-link>
+                <span v-else>{{ scope.row.name }}</span>
               </template>
-          </vxe-toolbar>
-          <div style="height: calc(100% - 80px);">
-              <vxe-table
-                  border="inner"
-                  auto-resize
-                  resizable
-                  height="auto"
-                  :loading="loading"
-                  size="small"
-                  ref="docTemplateTable"
-                  show-header-overflow
-                  show-overflow
-                  highlight-hover-row
-                  :menu-config="{}"
-                  :print-config="{}"
-                  :import-config="{}"
-                  :export-config="{}"
-                  @sort-change="sortChangeHandle"
-                  :sort-config="{remote:true}"
-                  :data="dataList"
-                  :checkbox-config="{}">
-                <vxe-column type="seq" width="40"></vxe-column>
-                <vxe-column type="checkbox"  width="40px"></vxe-column>
-                <vxe-column  title="名称" field="name" sortable>
-                  <template slot-scope="scope">
-                    <el-link type="primary" :underline="false" v-if="hasPermission('wps:docTemplate:edit')"  @click="edit(scope.row.id)">
-                      {{ scope.row.name }}
-                    </el-link>
-                    <el-link type="primary" :underline="false" v-else-if="hasPermission('wps:docTemplate:view')" @click="view(scope.row.id)">
-                      {{ scope.row.name }}
-                    </el-link>
-                    <span v-else>{{ scope.row.name }}</span>
-                  </template>
-                </vxe-column>
-              
-                <vxe-column  title="文件" field="path" sortable>
-                   <template slot-scope="scope" v-if="scope.row.path">
-                      <el-link type="primary" :underline="false" v-if="hasPermission('wps:docTemplate:edit')" @click="design(scope.row)">
-                        {{ decodeURIComponent(scope.row.path.substring(scope.row.path.lastIndexOf('/') + 1)) }}
-                      </el-link>
-                    </template>
-                </vxe-column>
-                <vxe-column  title="类型" field="docCategoryDTO.name" sortable></vxe-column>
-                <vxe-column  title="备注信息" field="remarks" sortable></vxe-column>
-                <vxe-column title="操作" width="270px" fixed="right" align="center">
-                    <template slot-scope="scope">
-                      <el-button v-if="hasPermission('wps:docTemplate:view')" type="text" icon="el-icon-download" size="small" @click="download(scope.row.path)">
-                        下载
-                      </el-button>
-                      <el-button v-if="hasPermission('wps:docTemplate:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">
-                        修改
-                      </el-button>
-                      <el-button v-if="hasPermission('wps:docTemplate:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">
-                        删除
-                      </el-button>
-                      <el-button v-if="hasPermission('wps:docTemplate:edit')" type="text" icon="el-icon-edit" size="small" @click="design(scope.row)">
-                        编辑内容
-                      </el-button>
-                    </template>
-                </vxe-column>
-              </vxe-table>
-              <vxe-pager
-                background
-                size="small"
-                :current-page="tablePage.currentPage"
-                :page-size="tablePage.pageSize"
-                :total="tablePage.total"
-                :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
-                :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
-                @page-change="currentChangeHandle">
-              </vxe-pager>
-          </div>
-    </div>
-    <!-- 弹窗, 新增 / 修改 -->
-    <DocTemplateForm ref="docTemplateForm" @refreshDataList="refreshList"></DocTemplateForm>
-    <DocCategoryForm ref="docCategoryForm" @refreshTree="refreshTree"></DocCategoryForm>
-    <el-dialog
-      title="编辑文档"
-      :close-on-click-modal="true"
-      v-dialogDrag
-      fullscreen
-      class="word"
-      style="padding:0px"
-      :visible.sync="visible"
-    >
-      <iframe v-if="visible" :src="wpsUrl" frameborder="0" scrolling="auto" height="1000px" width="100%"></iframe>
-    </el-dialog>
+            </vxe-column>
+
+            <vxe-column  title="文件" field="path" sortable>
+              <template slot-scope="scope" v-if="scope.row.path">
+                <el-link type="primary" :underline="false" v-if="hasPermission('wps:docTemplate:edit')" @click="design(scope.row)">
+                  {{ decodeURIComponent(scope.row.path.substring(scope.row.path.lastIndexOf('/') + 1)) }}
+                </el-link>
+              </template>
+            </vxe-column>
+            <vxe-column  title="类型" field="docCategoryDTO.name" sortable></vxe-column>
+            <vxe-column  title="备注信息" field="remarks" sortable></vxe-column>
+            <vxe-column title="操作" width="270px" fixed="right" align="center">
+              <template slot-scope="scope">
+                <el-button v-if="hasPermission('wps:docTemplate:view')" type="text" icon="el-icon-download" size="small" @click="download(scope.row.path)">
+                  下载
+                </el-button>
+                <el-button v-if="hasPermission('wps:docTemplate:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">
+                  修改
+                </el-button>
+                <el-button v-if="hasPermission('wps:docTemplate:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">
+                  删除
+                </el-button>
+                <el-button v-if="hasPermission('wps:docTemplate:edit')" type="text" icon="el-icon-edit" size="small" @click="design(scope.row)">
+                  编辑内容
+                </el-button>
+              </template>
+            </vxe-column>
+          </vxe-table>
+          <vxe-pager
+            background
+            size="small"
+            :current-page="tablePage.currentPage"
+            :page-size="tablePage.pageSize"
+            :total="tablePage.total"
+            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+            @page-change="currentChangeHandle">
+          </vxe-pager>
+        </div>
       </div>
+      <!-- 弹窗, 新增 / 修改 -->
+      <DocTemplateForm ref="docTemplateForm" @refreshDataList="refreshList"></DocTemplateForm>
+      <DocCategoryForm ref="docCategoryForm" @refreshTree="refreshTree"></DocCategoryForm>
+      <el-dialog
+        title="编辑文档"
+        :close-on-click-modal="true"
+        v-dialogDrag
+        fullscreen
+        class="word"
+        style="padding:0px"
+        :visible.sync="visible"
+      >
+        <iframe v-if="visible" :src="wpsUrl" frameborder="0" scrolling="auto" height="1000px" width="100%"></iframe>
+      </el-dialog>
     </div>
+  </div>
 </template>
 
 <script>
-import DocTemplateForm from './DocTemplateForm'
-import DocCategoryForm from './DocCategoryForm'
-import SelectTree from '@/components/treeSelect/treeSelect.vue'
-import DocCategoryService from '@/api/wps/DocCategoryService'
-import DocTemplateService from '@/api/wps/DocTemplateService'
-export default {
-  data () {
-    return {
-      searchForm: {
-        docCategoryDTO: {
-          id: ''
-        }
-      },
-      filterText: '',
-      visible: false,
-      docCategoryTreeData: [],
-      dataList: [],
-      tablePage: {
-        total: 0,
-        currentPage: 1,
-        pageSize: 10,
-        orders: []
-      },
-      loading: false
-    }
-  },
-  components: {
-    SelectTree,
-    DocTemplateForm,
-    DocCategoryForm
-  },
-  docCategoryService: null,
-  docTemplateService: null,
-  created () {
-    this.docTemplateService = new DocTemplateService()
-    this.docCategoryService = new DocCategoryService()
-  },
-  activated () {
-    this.refreshTree()
-    this.refreshList()
-  },
-  computed: {
-    contentViewHeight () {
-      let height = this.$store.state.common.documentClientHeight - 122
-      return { minHeight: height + 'px' }
-    }
-  },
-  watch: {
-    filterText (val) {
-      this.$refs.docCategoryTree.filter(val)
-    }
-  },
-  methods: {
-    filterNode (value, data) {
-      if (!value) return true
-      return data.name.indexOf(value) !== -1
+  import DocTemplateForm from './DocTemplateForm'
+  import DocCategoryForm from './DocCategoryForm'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import DocCategoryService from '@/api/wps/DocCategoryService'
+  import DocTemplateService from '@/api/wps/DocTemplateService'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          docCategoryDTO: {
+            id: ''
+          }
+        },
+        filterText: '',
+        visible: false,
+        docCategoryTreeData: [],
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
     },
-    refreshTree () {
-      this.docCategoryService.treeData().then(({ data }) => {
-        this.docCategoryTreeData = data
-      })
+    components: {
+      SelectTree,
+      DocTemplateForm,
+      DocCategoryForm
     },
-    handleNodeClick (data) {
-      this.searchForm.docCategoryDTO.id = data.id
-      this.refreshList()
+    docCategoryService: null,
+    docTemplateService: null,
+    created () {
+      this.docTemplateService = new DocTemplateService()
+      this.docCategoryService = new DocCategoryService()
     },
-    handleNodeClose () {
-      this.searchForm.docCategoryDTO.id = ''
+    activated () {
+      this.refreshTree()
       this.refreshList()
     },
-    addChildTreeNode (node) {
-      this.$refs.docCategoryForm.init('addChild', { id: '', parent: { id: node.id, name: node.name } })
-    },
-    // 新增
-    addTreeNode () {
-      this.$refs.docCategoryForm.init('add', { id: '', parent: { id: '', name: '' } })
-    },
-    design (row) {
-      this.wpsUrl = `${process.env.VUE_APP_SERVER_URL}/weboffice/index?filename=${row.path}&fileid=${new Date().getTime()}`
-      this.visible = true
+    computed: {
+      contentViewHeight () {
+        let height = this.$store.state.common.documentClientHeight - 122
+        return { minHeight: height + 'px' }
+      }
     },
-    // 修改
-    editTreeNode (data) {
-      this.$refs.docCategoryForm.init('edit', { id: data.id, parent: { id: '', name: '' } })
+    watch: {
+      filterText (val) {
+        this.$refs.docCategoryTree.filter(val)
+      }
     },
-    delTreeNode (data) {
-      this.$confirm(`确定删除所选项吗?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
+    methods: {
+      filterNode (value, data) {
+        if (!value) return true
+        return data.name.indexOf(value) !== -1
+      },
+      refreshTree () {
+        this.docCategoryService.treeData().then(({ data }) => {
+          this.docCategoryTreeData = data
+        })
+      },
+      handleNodeClick (data) {
+        this.searchForm.docCategoryDTO.id = data.id
+        this.refreshList()
+      },
+      handleNodeClose () {
+        this.searchForm.docCategoryDTO.id = ''
+        this.refreshList()
+      },
+      addChildTreeNode (node) {
+        this.$refs.docCategoryForm.init('addChild', { id: '', parent: { id: node.id, name: node.name } })
+      },
+      // 新增
+      addTreeNode () {
+        this.$refs.docCategoryForm.init('add', { id: '', parent: { id: '', name: '' } })
+      },
+      design (row) {
+        this.wpsUrl = `${process.env.VUE_APP_SERVER_URL}/weboffice/index?filename=${row.path}&fileid=${new Date().getTime()}`
+        this.visible = true
+      },
+      // 修改
+      editTreeNode (data) {
+        this.$refs.docCategoryForm.init('edit', { id: data.id, parent: { id: '', name: '' } })
+      },
+      delTreeNode (data) {
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.docCategoryService.delete(data.id).then(({ data }) => {
+            this.$message.success(data)
+            this.loading = false
+            this.refreshTree()
+            this.refreshList()
+          })
+        })
+      },
+      // 获取数据列表
+      refreshList () {
         this.loading = true
-        this.docCategoryService.delete(data.id).then(({ data }) => {
-          this.$message.success(data)
+        this.docTemplateService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
           this.loading = false
-          this.refreshTree()
-          this.refreshList()
         })
-      })
-    },
-    // 获取数据列表
-    refreshList () {
-      this.loading = true
-      this.docTemplateService.list({
-        'current': this.tablePage.currentPage,
-        'size': this.tablePage.pageSize,
-        'orders': this.tablePage.orders,
-        ...this.searchForm
-      }).then(({data}) => {
-        this.dataList = data.records
-        this.tablePage.total = data.total
-        this.loading = false
-      })
-    },
+      },
       // 当前页
-    currentChangeHandle ({ currentPage, pageSize }) {
-      this.tablePage.currentPage = currentPage
-      this.tablePage.pageSize = pageSize
-      this.refreshList()
-    },
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
       // 排序
-    sortChangeHandle (column) {
-      this.tablePage.orders = []
-      if (column.order != null) {
-        if (column.property === 'docCategoryDTO.name') {
-          column.property = 'b.name'
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          if (column.property === 'docCategoryDTO.name') {
+            column.property = 'b.name'
+          }
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
         }
-        this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
-      }
-      this.refreshList()
-    },
-    // 新增
-    add () {
-      this.$refs.docTemplateForm.init('add', '')
-    },
-    // 修改
-    edit (id) {
-      id = id || this.$refs.docTemplateTable.getCheckboxRecords().map(item => {
-        return item.id
-      })[0]
-      this.$refs.docTemplateForm.init('edit', id)
-    },
-    // 查看
-    view (id) {
-      this.$refs.docTemplateForm.init('view', id)
-    },
-    // 删除
-    del (id) {
-      let ids = id || this.$refs.docTemplateTable.getCheckboxRecords().map(item => {
-        return item.id
-      }).join(',')
-      this.$confirm(`确定删除所选项吗?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.loading = true
-        this.docTemplateService.delete(ids).then(({ data }) => {
-          this.loading = false
-          this.$message.success(data)
-          this.refreshList()
+        this.refreshList()
+      },
+      // 新增
+      add () {
+        this.$refs.docTemplateForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.docTemplateTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.docTemplateForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.docTemplateForm.init('view', id)
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.docTemplateTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.docTemplateService.delete(ids).then(({ data }) => {
+            this.loading = false
+            this.$message.success(data)
+            this.refreshList()
+          })
         })
-      })
-    },
-    createFile (type) {
-      this.docTemplateService.createFile(type).then(({ data }) => {
-        window.open(data, '_blank')
-      })
-    },
-    // 下载文件
-    download (path) {
-      window.open(path, '_blank')
-    },
-    resetSearch () {
-      this.$refs.searchForm.resetFields()
-      this.refreshList()
+      },
+      createFile (type) {
+        this.docTemplateService.createFile(type).then(({ data }) => {
+          window.open(data, '_blank')
+        })
+      },
+      // 下载文件
+      download (path) {
+        window.open(path, '_blank')
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
     }
   }
-}
 </script>
 
 <style lang="scss">