Jelajahi Sumber

兴光评估前端功能开发

user5 3 tahun lalu
induk
melakukan
57702db918
26 mengubah file dengan 4119 tambahan dan 0 penghapusan
  1. 58 0
      src/api/reimbursementSys/assess/reimbursementBusinessService.js
  2. 58 0
      src/api/reimbursementSys/assess/reimbursementBusinessTwoService.js
  3. 151 0
      src/api/reimbursementSys/assess/reimbursementIsNoTicketService.js
  4. 109 0
      src/api/reimbursementSys/assess/reimbursementSysService.js
  5. 73 0
      src/api/reimbursementSys/assess/user/reimbursementUserService.js
  6. 3 0
      src/views/modules/reimbursementSys/accountant/reimbursementList.vue
  7. 2 0
      src/views/modules/reimbursementSys/accountant/user/reimbursementUserList.vue
  8. 325 0
      src/views/modules/reimbursementSys/assess/reimbursementBusinessForm.vue
  9. 117 0
      src/views/modules/reimbursementSys/assess/reimbursementBusinessList.vue
  10. 128 0
      src/views/modules/reimbursementSys/assess/reimbursementForm.vue
  11. 92 0
      src/views/modules/reimbursementSys/assess/reimbursementGatheringTimeForm.vue
  12. 184 0
      src/views/modules/reimbursementSys/assess/reimbursementInvoiceForm.vue
  13. 185 0
      src/views/modules/reimbursementSys/assess/reimbursementInvoiceModify.vue
  14. 311 0
      src/views/modules/reimbursementSys/assess/reimbursementIsNoTicketForm.vue
  15. 331 0
      src/views/modules/reimbursementSys/assess/reimbursementIsNoTicketList.vue
  16. 471 0
      src/views/modules/reimbursementSys/assess/reimbursementList.vue
  17. 129 0
      src/views/modules/reimbursementSys/assess/reimbursementRatioForm.vue
  18. 383 0
      src/views/modules/reimbursementSys/assess/reimbursementSelectDialog.vue
  19. 291 0
      src/views/modules/reimbursementSys/assess/treeReimbursementBuinessUserSelect.vue
  20. 248 0
      src/views/modules/reimbursementSys/assess/user/reimbursementUserBusinessList.vue
  21. 198 0
      src/views/modules/reimbursementSys/assess/user/reimbursementUserForm.vue
  22. 262 0
      src/views/modules/reimbursementSys/assess/user/reimbursementUserList.vue
  23. 3 0
      src/views/modules/reimbursementSys/project/reimbursementList.vue
  24. 2 0
      src/views/modules/reimbursementSys/project/user/reimbursementUserList.vue
  25. 3 0
      src/views/modules/reimbursementSys/reimbursementList.vue
  26. 2 0
      src/views/modules/reimbursementSys/user/reimbursementUserList.vue

+ 58 - 0
src/api/reimbursementSys/assess/reimbursementBusinessService.js

@@ -0,0 +1,58 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementSys {
+  findList (params) {
+    return request({
+      url: '/assess/reimbursementBusiness/findList',
+      method: 'get',
+      params: params
+    })
+  }
+
+  findListByBusinessCodeId (id) {
+    return request({
+      url: '/assess/reimbursementBusiness/findListByBusinessCodeId',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  save (inputForm) {
+    return request({
+      url: `/assess/reimbursementBusiness/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/assess/reimbursementUser/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryById (id) {
+    return request({
+      url: `/assess/reimbursementUser/queryById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  getBusinessById (id) {
+    return request({
+      url: `/assess/reimbursementBusiness/getBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  yearList (params) {
+    return request({
+      url: '/assess/reimbursementBusiness/getYearList',
+      method: 'get',
+      params: params
+    })
+  }
+}

+ 58 - 0
src/api/reimbursementSys/assess/reimbursementBusinessTwoService.js

@@ -0,0 +1,58 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementBusinessTwoService {
+  findList (params) {
+    return request({
+      url: '/assess/reimbursementBusiness/findList',
+      method: 'get',
+      params: params
+    })
+  }
+
+  findListByBusinessCodeId (id) {
+    return request({
+      url: '/assess/reimbursementBusiness/findListByBusinessCodeId',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  save (inputForm) {
+    return request({
+      url: `/assess/reimbursementBusinessTwo/addData`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/assess/reimbursementUser/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryById (id) {
+    return request({
+      url: `/assess/reimbursementUser/queryById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  getBusinessById (id) {
+    return request({
+      url: `/assess/reimbursementBusiness/getBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  yearList (params) {
+    return request({
+      url: '/assess/reimbursementBusiness/getYearList',
+      method: 'get',
+      params: params
+    })
+  }
+}

+ 151 - 0
src/api/reimbursementSys/assess/reimbursementIsNoTicketService.js

@@ -0,0 +1,151 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementIsNoTicketService {
+  findList (params) {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/findListPage',
+      method: 'get',
+      params: params
+    })
+  }
+
+  saveBusiness (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveBusiness`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  saveGatheringTime (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveGatheringTime`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  getBusinessById (id) {
+    return request({
+      url: `/assess/reimbursementBusiness/getBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  queryById (id) {
+    return request({
+      url: `/assess/reimbursementUser/queryById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  updateReimbursementRatio (inputForm) {
+    return request({
+      url: `/assess/reimbursement/updateReimbursementRatio`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  saveInvoice (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveInvoice`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  modifyInvoice (inputForm) {
+    return request({
+      url: `/assess/reimbursement/modifyInvoice`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  deleteBusiness (ids) {
+    return request({
+      url: '/assess/reimbursement/deleteBusiness',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  deleteInvoice (ids) {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/delById/' + ids,
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/assess/reimbursement/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryBusinessById (id) {
+    return request({
+      url: `/assess/reimbursement/queryBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  queryBusinessByInvoiceId (id) {
+    return request({
+      url: `/assess/reimbursement/queryBusinessByInvoiceId`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  queryInvoiceById (id) {
+    return request({
+      url: `/assess/reimbursement/queryInvoiceById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  addBatchReimbursement (invoiceNumbers) {
+    return request({
+      url: '/assess/reimbursement/addBatchReimbursement',
+      method: 'put',
+      params: {
+        invoiceNumbers: invoiceNumbers
+      }
+    })
+  }
+
+  findSelectList () {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/findSelectList',
+      method: 'post'
+    })
+  }
+
+  modifyBindCode (params) {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/modifyBindCode',
+      method: 'post',
+      params: params
+    })
+  }
+
+  findSelectYearList () {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/findSelectYearList',
+      method: 'post'
+    })
+  }
+
+  findSelectCodeListByYear (year) {
+    return request({
+      url: '/assess/reimbursementBusinessTwo/findSelectCodeListByYear/' + year,
+      method: 'post'
+    })
+  }
+}

+ 109 - 0
src/api/reimbursementSys/assess/reimbursementSysService.js

@@ -0,0 +1,109 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementSys {
+  treeData (params) {
+    return request({
+      url: '/assess/reimbursement/treeData',
+      method: 'get',
+      params: params
+    })
+  }
+
+  saveBusiness (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveBusiness`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  saveGatheringTime (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveGatheringTime`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  updateReimbursementRatio (inputForm) {
+    return request({
+      url: `/assess/reimbursement/updateReimbursementRatio`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  saveInvoice (inputForm) {
+    return request({
+      url: `/assess/reimbursement/saveInvoice`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  modifyInvoice (inputForm) {
+    return request({
+      url: `/assess/reimbursement/modifyInvoice`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  deleteBusiness (ids) {
+    return request({
+      url: '/assess/reimbursement/deleteBusiness',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  deleteInvoice (ids) {
+    return request({
+      url: '/assess/reimbursement/deleteInvoice',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/assess/reimbursement/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryBusinessById (id) {
+    return request({
+      url: `/assess/reimbursement/queryBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  queryBusinessByInvoiceId (id) {
+    return request({
+      url: `/assess/reimbursement/queryBusinessByInvoiceId`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  queryInvoiceById (id) {
+    return request({
+      url: `/assess/reimbursement/queryInvoiceById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  addBatchReimbursement (invoiceNumbers) {
+    return request({
+      url: '/assess/reimbursement/addBatchReimbursement',
+      method: 'put',
+      params: {
+        invoiceNumbers: invoiceNumbers
+      }
+    })
+  }
+}

+ 73 - 0
src/api/reimbursementSys/assess/user/reimbursementUserService.js

@@ -0,0 +1,73 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementSys {
+  findList (params) {
+    return request({
+      url: '/assess/reimbursementUser/findList',
+      method: 'get',
+      params: params
+    })
+  }
+
+  save (inputForm) {
+    return request({
+      url: `/assess/reimbursementUser/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+
+  delete (ids) {
+    return request({
+      url: '/assess/reimbursementUser/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+
+  queryById (id) {
+    return request({
+      url: `/assess/reimbursementUser/queryById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+
+  getReimbursementQuotaDay () {
+    return request({
+      url: `/assess/reimbursementUser/getReimbursementQuotaDay`,
+      method: 'get'
+    })
+  }
+
+  findListByUserId (params) {
+    return request({
+      url: `/assess/reimbursementUser/findListByUserId`,
+      method: 'get',
+      params: params
+    })
+  }
+
+  exportTemplate () {
+    return request({
+      url: '/assess/reimbursementUser/import/template',
+      method: 'get',
+      responseType: 'blob'
+    })
+  }
+
+  importExcel (data) {
+    return request({
+      url: '/assess/reimbursementUser/import',
+      method: 'post',
+      data: data
+    })
+  }
+
+  initialize () {
+    return request({
+      url: '/assess/reimbursementUser/initialize',
+      method: 'post'
+    })
+  }
+}

+ 3 - 0
src/views/modules/reimbursementSys/accountant/reimbursementList.vue

@@ -406,6 +406,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -428,6 +429,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -450,6 +452,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     selectBatchReimbursement (invoices) {

+ 2 - 0
src/views/modules/reimbursementSys/accountant/user/reimbursementUserList.vue

@@ -233,6 +233,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 初始化按钮
@@ -252,6 +253,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     }
   }

+ 325 - 0
src/views/modules/reimbursementSys/assess/reimbursementBusinessForm.vue

@@ -0,0 +1,325 @@
+<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="120px" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'" @submit.native.prevent>
+
+      <el-row :gutter="15">
+        <el-col :span="12">
+          <el-form-item prop="userId" :rules=" [{required: true, message: '人员不能为空', trigger: 'blur'}]" label="人员">
+            <SelectUserTree
+              ref="companyTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光评估`"
+              :value="inputForm.userId"
+              :clearable="true"
+              :accordion="true"
+              :disabled="method==='edit'"
+              @getValue="(value) => {inputForm.userId=value}"/>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年份" prop="year" :rules="[{required: true, message: '年份不能为空', trigger: 'blur'}]">
+            <el-select v-model="inputForm.year" @change="selectYear(inputForm.year)" style="width:100%" placeholder="请选择">
+              <el-option
+                v-for="year in yearList"
+                :key="year.id"
+                :label="year.year"
+                :value="year.year">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12"  v-if="method !== 'read'">
+          <el-form-item label="报销类型" prop="reimbursementType"
+                        :rules="[
+                  {required: true, message:'报销类型不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.reimbursementType">
+              <el-radio v-for="item in $dictUtils.getDictList('reimbursement_type')" @change="selectReimbursementType(inputForm.reimbursementType)" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="报销天数" prop="reimbursementDay" :rules="[{required: true, max: 10, message:'报销天数不能为空且只可为整数', trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementDay" class="bg-grey" size="small" placeholder="报销天数" style="width: 100%;" @keyup.native="inputForm.reimbursementDay = checkInputs(inputForm.reimbursementDay)"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="剩余报销天数" prop="surplusReimbursementDay" :rules="[{ max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.surplusReimbursementDay" class="bg-grey" size="small" placeholder="剩余报销天数" style="width: 100%;" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销金额" prop="reimbursementAmount":rules="[{required: true, max: 10, message:'报销金额不可为空', max: 10,trigger:'blur'}]">
+            <el-input id="reimbursementAmount" v-model="inputForm.reimbursementAmount" class="bg-grey" size="small" placeholder="报销金额" style="width: 100%;" v-bind:disabled="this.show" @keyup.native="inputForm.reimbursementAmount = checkReimbursementAmount(inputForm.reimbursementAmount)">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="日报销额度" prop="reimbursementQuotaDay":rules="[{max: 10,trigger:'blur'}]">
+            <el-input  v-model="inputForm.reimbursementQuotaDay" class="bg-grey" size="small" placeholder="日报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年报销额度" prop="reimbursementQuota":rules="[{max: 10,trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementQuota" class="bg-grey" size="small" placeholder="年报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="剩余可报额度" prop="remainReimbursementAmount" :rules="[{max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.remainReimbursementAmount" class="bg-grey" size="small" placeholder="剩余可报额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="业务可报额度" prop="canReimbursementAmount" :rules="[{max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.canReimbursementAmount" class="bg-grey" size="small" placeholder="业务可报额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="业务剩余可报额度" prop="surplusReimbursementAmount" :rules="[{max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.surplusReimbursementAmount" class="bg-grey" size="small" placeholder="业务剩余可报额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks" :rules="[{max: 255, trigger:'blur'}]">
+            <el-input type="textarea" v-model="inputForm.remarks" oninput="if(value.length>255)value=value.slice(0,254)" 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" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import SelectUserTree from './treeReimbursementBuinessUserSelect'
+  import ReimbursementBusiness from '@/api/reimbursementSys/assess/reimbursementBusinessService'
+  export default {
+    data () {
+      return {
+        show: false,
+        visible: false,
+        loading: false,
+        title: '',
+        method: '',
+        yearList: [],
+        inputForm: {
+          id: '',
+          userId: '', // 人员id
+          year: '', // 年份
+          reimbursementType: '', // 报销类型
+          reimbursementQuota: '', // 年报销额度
+          reimbursementAmount: '', // 报销金额
+          reimbursementQuotaDay: '', // 日报销额度
+          canReimbursementAmount: '', // 业务可报销额度
+          surplusReimbursementAmount: '', // 业务剩余可报销额度
+          reimbursementDay: '', // 报销天数
+          surplusReimbursementDay: '', // 剩余报销天数
+          oldSurplusReimbursementDay: '', // 剩余报销天数(比较数据)
+          remarks: '' // 备注
+
+        }
+      }
+    },
+    ReimbursementBusiness: null,
+    created () {
+      this.reimbursementBusiness = new ReimbursementBusiness()
+    },
+    mounted () {
+    },
+    components: {
+      SelectUserTree
+    },
+    provide () {
+      return {
+        say: this.say
+      }
+    },
+    methods: {
+      checkInputs: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^]+/g, '') // 保留数字
+        // 获取日报销额度
+        let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+        if (reimbursementQuotaDayNumber) {
+          var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+          this.inputForm.reimbursementAmount = (str * reimbursementQuotaDayNumber).toString()
+          this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - str).toString()
+        }
+        return str
+      },
+      checkReimbursementAmount: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      say (userId) {
+        // 根据用户id查询年份信息
+        this.reimbursementBusiness.yearList({userId: userId, current: 1, size: -1}).then(({data}) => {
+          this.yearList = data.records
+          if (this.yearList.length > 0) {
+            this.inputForm.year = this.yearList[0].year
+            this.inputForm.reimbursementQuotaDay = this.yearList[0].reimbursementQuotaDay
+            this.inputForm.reimbursementQuota = this.yearList[0].reimbursementQuota
+            this.inputForm.remainReimbursementAmount = this.yearList[0].remainReimbursementAmount
+            this.inputForm.surplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+            this.inputForm.oldSurplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+              this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - reimbursementDayNumber).toString()
+            }
+          } else {
+            this.inputForm.year = ''
+            this.inputForm.reimbursementQuotaDay = ''
+            this.inputForm.reimbursementQuota = ''
+            this.inputForm.remainReimbursementAmount = ''
+            this.inputForm.surplusReimbursementDay = ''
+            this.inputForm.oldSurplusReimbursementDay = ''
+          }
+        })
+      },
+      selectReimbursementType (reimbursementType) {
+        if (reimbursementType === '1') {
+          // reimbursementAmount.isdisabled = true
+          this.show = true
+        } else {
+          this.show = false
+        }
+      },
+      selectYear (year) {
+        for (var yearKey in this.yearList) {
+          if (this.yearList[yearKey].year === year) {
+            this.inputForm.reimbursementQuotaDay = this.yearList[yearKey].reimbursementQuotaDay
+            this.inputForm.reimbursementQuota = this.yearList[yearKey].reimbursementQuota
+            this.inputForm.remainReimbursementAmount = this.yearList[yearKey].remainReimbursementAmount
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+            }
+          }
+        }
+      },
+      init (method, obj) {
+        this.method = method
+        this.inputForm.businessCodeId = obj.businessCodeId
+        this.inputForm.businessCode = obj.businessCode
+        if (method === 'addBusinessInfo') {
+          this.title = `新建报销信息`
+        } else if (method === 'edit') {
+          this.title = '修改人员信息'
+        } else if (method === 'view') {
+          this.title = '查看人员信息'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.inputForm.id = obj.id
+          this.$refs['inputForm'].resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.inputForm.id = obj
+            this.loading = true
+            this.reimbursementBusiness.queryById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+          if (method === 'addBusinessInfo') { // 修改或者查看
+            this.inputForm.businessCodeId = obj.businessCodeId
+            this.loading = true
+            this.reimbursementBusiness.getBusinessById(this.inputForm.businessCodeId).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+        })
+      },
+
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementBusiness.save(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.visible = false
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 117 - 0
src/views/modules/reimbursementSys/assess/reimbursementBusinessList.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="el-scrollbar__wrap wrap-white padding-20">
+    <div class="el-scrollbar__view">
+      <el-row :gutter="20" v-loading="loading">
+        <el-col :span="12">
+          <el-form size="small" :model="inputForm" ref="inputForm" v-loading="loading" label-width="150px">
+          </el-form>
+        </el-col>
+        <el-col :span="24">
+          <el-col :span="12"><h3>业务报销详情</h3>
+            <div style="margin-bottom: 5px;">
+              <span class="color: red">可报销额度:{{columnForm.reimbursementQuota}}</span>
+              <span class="color: red">;  已报销额度:{{columnForm.alreadyReimbursementAmount}}</span>
+              <span class="color: red">;  剩余报销额度:{{columnForm.surplusReimbursementAmount}}</span>
+            </div>
+          </el-col>
+          <el-col :span="12" style="text-align:right">
+            <el-button type="info" size="small" @click="goBack">返回</el-button>
+          </el-col>
+          <el-table
+            :data="columnForm.columnList"
+            style="width: 100%">
+            <el-table-column
+              prop="userName"
+              label="报销人"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="year"
+              label="报销年份"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementType"
+              label="报销类型"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementDay"
+              label="报销天数"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementAmount"
+              label="报销额度"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="createDate"
+              label="报销时间"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="remarks"
+              label="备注"
+              width="200px"
+            >
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import ReimbursementBusiness from '@/api/reimbursementSys/assess/reimbursementBusinessService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        previewVisible: false,
+        isIndeterminate: false,
+        inputForm: {
+          id: '',
+          dataSource: {
+            id: ''
+          },
+          name: '',
+          sqlCmd: ''
+        },
+        columnForm: {
+          reimbursementQuota: '',  // 报销额度
+          alreadyReimbursementAmount: '',  // 已报销额度
+          surplusReimbursementAmount: '',  // 剩余报销额度
+          remarks: '',  // 备注
+          columnList: []
+        }
+      }
+    },
+    reimbursementBusiness: null,
+    created () {
+      this.reimbursementBusiness = new ReimbursementBusiness()
+    },
+    activated () {
+      this.$refs['inputForm'].resetFields()
+      this.columnForm.columnList = []
+      this.inputForm.id = this.$route.query.id
+      if (this.inputForm.id) {
+        this.reimbursementBusiness.findListByBusinessCodeId(this.inputForm.id).then(({data}) => {
+          this.columnForm.columnList = data.list
+          this.columnForm.reimbursementQuota = data.reimbursementQuota
+          this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
+          this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
+        })
+      }
+    },
+    methods: {
+      goBack () {
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        this.$router.push('/reimbursementSys/assess/reimbursementList')
+      }
+    }
+  }
+</script>

+ 128 - 0
src/views/modules/reimbursementSys/assess/reimbursementForm.vue

@@ -0,0 +1,128 @@
+<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="120px" 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="randomType">
+            <el-radio-group v-model="inputForm.randomType" @change="changeRadio(inputForm.randomType)">
+              <el-radio label="1">是</el-radio>
+              <el-radio label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.isShow">
+          <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/assess/reimbursementSysService'
+  export default {
+    data () {
+      return {
+        isShow: false,
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          name: '',
+          randomType: '',
+          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)
+              if (this.inputForm.randomType === '1') {
+                this.isShow = false
+              } else {
+                this.isShow = true
+              }
+              this.loading = false
+            })
+          }
+          if (method === 'editInvoiceBusiness') { // 修改或者查看
+            this.loading = true
+            this.reimbursementSys.queryBusinessByInvoiceId(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              if (this.inputForm.randomType === '1') {
+                this.isShow = false
+              } else {
+                this.isShow = true
+              }
+              this.loading = false
+            })
+          }
+        })
+      },
+      changeRadio (randomType) {
+        if (randomType === '1') {
+          this.isShow = false
+        } else {
+          this.isShow = true
+        }
+      },
+      // 表单提交
+      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>

+ 92 - 0
src/views/modules/reimbursementSys/assess/reimbursementGatheringTimeForm.vue

@@ -0,0 +1,92 @@
+<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="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 != 'view'" type="primary" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ReimbursementSys from '@/api/reimbursementSys/assess/reimbursementSysService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          name: '',
+          parent: {
+            id: ''
+          },
+          gatheringTime: '' // 业务编码
+        }
+      }
+    },
+    reimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    methods: {
+      init (method, obj) {
+        this.method = method
+        if (method === 'edit') {
+          this.title = '修改收款日期'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.$refs['inputForm'].resetFields()
+          this.inputForm.id = obj.id
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementSys.saveGatheringTime(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/assess/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="[
+                  {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/assess/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>

+ 185 - 0
src/views/modules/reimbursementSys/assess/reimbursementInvoiceModify.vue

@@ -0,0 +1,185 @@
+<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="[
+                  {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, required: true, message:'项目经理不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.proposer" placeholder="项目经理" ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="部门" prop="partner" :rules="[{max: 50, required: true, message:'部门不能为空', trigger: 'blur'}]">
+            <el-input v-model="inputForm.partner" placeholder="部门" ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="收款日期" prop="gatheringTime"
+                        :rules="[
+                  {trigger:'blur'}
+                 ]">
+            <el-date-picker
+              style="width: 100%;"
+              v-model="inputForm.gatheringTime"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :disabled="true"
+              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/assess/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 === 'modifyInvoice') {
+          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 === 'modifyInvoice' || 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.modifyInvoice(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>

+ 311 - 0
src/views/modules/reimbursementSys/assess/reimbursementIsNoTicketForm.vue

@@ -0,0 +1,311 @@
+<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="120px" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'" @submit.native.prevent>
+
+      <el-row :gutter="15">
+        <el-col :span="12">
+          <el-form-item prop="userId" :rules=" [{required: true, message: '人员不能为空', trigger: 'blur'}]" label="人员">
+            <SelectUserTree
+              ref="companyTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光评估`"
+              :value="inputForm.userId"
+              :clearable="true"
+              :accordion="true"
+              :disabled="method==='edit'"
+              @getValue="(value) => {inputForm.userId=value}"/>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年份" prop="year" :rules="[{required: true, message: '年份不能为空', trigger: 'blur'}]">
+            <el-select v-model="inputForm.year" @change="selectYear(inputForm.year)" style="width:100%" placeholder="请选择">
+              <el-option
+                v-for="year in yearList"
+                :key="year.id"
+                :label="year.year"
+                :value="year.year">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12"  v-if="method !== 'read'">
+          <el-form-item label="报销类型" prop="reimbursementType"
+                        :rules="[
+                  {required: true, message:'报销类型不能为空', trigger:'blur'}
+                 ]">
+            <el-radio-group v-model="inputForm.reimbursementType">
+              <el-radio v-for="item in $dictUtils.getDictList('reimbursement_type')" @change="selectReimbursementType(inputForm.reimbursementType)" :label="item.value" :key="item.id">{{item.label}}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="报销天数" prop="reimbursementDay" :rules="[{required: true, max: 10, message:'报销天数不能为空且只可为整数', trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementDay" class="bg-grey" size="small" placeholder="报销天数" style="width: 100%;" @keyup.native="inputForm.reimbursementDay = checkInputs(inputForm.reimbursementDay)"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="剩余报销天数" prop="surplusReimbursementDay" :rules="[{ max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.surplusReimbursementDay" class="bg-grey" size="small" placeholder="剩余报销天数" style="width: 100%;" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销金额" prop="reimbursementAmount":rules="[{required: true, max: 10, message:'报销金额不可为空', max: 10,trigger:'blur'}]">
+            <el-input id="reimbursementAmount" v-model="inputForm.reimbursementAmount" class="bg-grey" size="small" placeholder="报销金额" style="width: 100%;" v-bind:disabled="this.show" @keyup.native="inputForm.reimbursementAmount = checkReimbursementAmount(inputForm.reimbursementAmount)">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="日报销额度" prop="reimbursementQuotaDay":rules="[{max: 10,trigger:'blur'}]">
+            <el-input  v-model="inputForm.reimbursementQuotaDay" class="bg-grey" size="small" placeholder="日报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年报销额度" prop="reimbursementQuota":rules="[{max: 10,trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementQuota" class="bg-grey" size="small" placeholder="年报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="剩余可报额度" prop="remainReimbursementAmount" :rules="[{max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.remainReimbursementAmount" class="bg-grey" size="small" placeholder="剩余可报额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks" :rules="[{max: 255, trigger:'blur'}]">
+            <el-input type="textarea" v-model="inputForm.remarks" oninput="if(value.length>255)value=value.slice(0,254)" 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" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import SelectUserTree from './treeReimbursementBuinessUserSelect'
+  import ReimbursementBusiness from '@/api/reimbursementSys/assess/reimbursementBusinessTwoService'
+  export default {
+    data () {
+      return {
+        show: false,
+        visible: false,
+        loading: false,
+        title: '',
+        method: '',
+        yearList: [],
+        inputForm: {
+          id: '',
+          userId: '', // 人员id
+          year: '', // 年份
+          reimbursementType: '', // 报销类型
+          reimbursementQuota: '', // 年报销额度
+          reimbursementAmount: '', // 报销金额
+          reimbursementQuotaDay: '', // 日报销额度
+          canReimbursementAmount: '', // 业务可报销额度
+          surplusReimbursementAmount: '', // 业务剩余可报销额度
+          reimbursementDay: '', // 报销天数
+          surplusReimbursementDay: '', // 剩余报销天数
+          oldSurplusReimbursementDay: '', // 剩余报销天数(比较数据)
+          remarks: '' // 备注
+
+        }
+      }
+    },
+    ReimbursementBusiness: null,
+    created () {
+      this.reimbursementBusiness = new ReimbursementBusiness()
+    },
+    mounted () {
+    },
+    components: {
+      SelectUserTree
+    },
+    provide () {
+      return {
+        say: this.say
+      }
+    },
+    methods: {
+      checkInputs: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^]+/g, '') // 保留数字
+        // 获取日报销额度
+        let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+        if (reimbursementQuotaDayNumber) {
+          var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+          this.inputForm.reimbursementAmount = (str * reimbursementQuotaDayNumber).toString()
+          this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - str).toString()
+        }
+        return str
+      },
+      checkReimbursementAmount: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      say (userId) {
+        // 根据用户id查询年份信息
+        this.reimbursementBusiness.yearList({userId: userId, current: 1, size: -1}).then(({data}) => {
+          this.yearList = data.records
+          if (this.yearList.length > 0) {
+            this.inputForm.year = this.yearList[0].year
+            this.inputForm.reimbursementQuotaDay = this.yearList[0].reimbursementQuotaDay
+            this.inputForm.reimbursementQuota = this.yearList[0].reimbursementQuota
+            this.inputForm.remainReimbursementAmount = this.yearList[0].remainReimbursementAmount
+            this.inputForm.surplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+            this.inputForm.oldSurplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+              this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - reimbursementDayNumber).toString()
+            }
+          } else {
+            this.inputForm.year = ''
+            this.inputForm.reimbursementQuotaDay = ''
+            this.inputForm.reimbursementQuota = ''
+            this.inputForm.remainReimbursementAmount = ''
+            this.inputForm.surplusReimbursementDay = ''
+            this.inputForm.oldSurplusReimbursementDay = ''
+          }
+        })
+      },
+      selectReimbursementType (reimbursementType) {
+        if (reimbursementType === '1') {
+          // reimbursementAmount.isdisabled = true
+          this.show = true
+        } else {
+          this.show = false
+        }
+      },
+      selectYear (year) {
+        for (var yearKey in this.yearList) {
+          if (this.yearList[yearKey].year === year) {
+            this.inputForm.reimbursementQuotaDay = this.yearList[yearKey].reimbursementQuotaDay
+            this.inputForm.reimbursementQuota = this.yearList[yearKey].reimbursementQuota
+            this.inputForm.remainReimbursementAmount = this.yearList[yearKey].remainReimbursementAmount
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+            }
+          }
+        }
+      },
+      init (method, obj) {
+        this.method = method
+        this.inputForm.businessCodeId = obj.businessCodeId
+        this.inputForm.businessCode = obj.businessCode
+        if (method === 'addBusinessInfo') {
+          this.title = `新建报销信息`
+        } else if (method === 'edit') {
+          this.title = '修改人员信息'
+        } else if (method === 'view') {
+          this.title = '查看人员信息'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.inputForm.id = obj.id
+          this.$refs['inputForm'].resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.inputForm.id = obj
+            this.loading = true
+            this.reimbursementBusiness.queryById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+          if (method === 'addBusinessInfo') { // 修改或者查看
+            this.inputForm.businessCodeId = obj.businessCodeId
+            this.loading = true
+            this.reimbursementBusiness.getBusinessById(this.inputForm.businessCodeId).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+        })
+      },
+
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementBusiness.save(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.visible = false
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 331 - 0
src/views/modules/reimbursementSys/assess/reimbursementIsNoTicketList.vue

@@ -0,0 +1,331 @@
+<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="userId" :rules=" [{trigger: 'blur'}]" label="人员">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光评估`"
+          :value="searchForm.userId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.userId=value}"/>
+      </el-form-item>
+
+      <el-form-item label="年份" prop="year" :rules="[{trigger:'blur'}]">
+        <el-date-picker
+          v-model="searchForm.year"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择年份">
+        </el-date-picker>
+      </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 resizable custom>
+        <template #buttons>
+          <el-row>
+            <el-button v-if="hasPermission('accountant:reimbursementBusinessTwo:add')" type="primary" size="small" icon="el-icon-plus"
+                       @click="addBusinessInfo()">新增
+            </el-button>
+            <el-button v-if="hasPermission('accountant:reimbursementBusinessTwo:binding')" type="warning" size="small" icon="el-icon-edit"
+                       @click="openDialog($refs.reimbursementUserTable.getCheckboxRecords())"
+                       :disabled="$refs.reimbursementUserTable && $refs.reimbursementUserTable.getCheckboxRecords().length === 0"
+                       plain>批量绑定
+            </el-button>
+            <el-button v-if="hasPermission('accountant:reimbursementBusinessTwo:del')" type="danger" size="small" icon="el-icon-delete"
+                       @click="delInvoice()"
+                       :disabled="$refs.reimbursementUserTable && $refs.reimbursementUserTable.getCheckboxRecords().length === 0"
+                       plain>删除
+            </el-button>
+          </el-row>
+        </template>
+      </vxe-toolbar>
+
+      <div style="height: calc(100% - 80px);">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="reimbursementUserTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :export-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column width="172px" title="报销人" field="userName" align="center" visible></vxe-column>
+          <vxe-column width="172px" title="报销年份" field="year" align="center"></vxe-column>
+          <vxe-column width="172px" title="报销类型" field="reimbursementType" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.reimbursementType === '1'"> 正常报销</el-tag>
+              <el-tag v-if="scope.row.reimbursementType === '2'"> 补差</el-tag>
+            </template>
+          </vxe-column>
+          <vxe-column width="172px" title="报销天数" field="reimbursementDay" align="center"></vxe-column>
+          <vxe-column width="172px" title="报销额度" field="reimbursementAmount" align="center"></vxe-column>
+          <vxe-column title="操作" width="300px" fixed="right" align="center">
+            <template slot-scope="scope">
+              <el-button v-if="hasPermission('accountant:reimbursementBusinessTwo:binding') && scope.row.parentId !== '0'" type="text"
+                         icon="el-icon-plus" size="small" @click="openDialog(scope.row)">绑定业务编号
+              </el-button>
+              <el-button v-if="hasPermission('accountant:reimbursementBusinessTwo:del') && 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>
+    <reimbursementGatheringTimeForm ref="reimbursementGatheringTimeForm"
+                                    @refreshDataList="refreshList"></reimbursementGatheringTimeForm>
+    <reimbursementRatioForm ref="reimbursementRatioForm" @refreshDataList="refreshList"></reimbursementRatioForm>
+    <reimbursementBusinessForm ref="reimbursementBusinessForm"
+                               @refreshDataList="refreshList"></reimbursementBusinessForm>
+    <reimbursementInvoiceForm ref="reimbursementInvoiceForm" @refreshDataList="refreshList"></reimbursementInvoiceForm>
+
+
+    <el-dialog
+      title="选择绑定业务编号"
+      :visible.sync="dialogVisible"
+      width="60%">
+      <el-col :span="12">
+        <label-wrap>请选择年份:</label-wrap>
+        <el-select v-model="selectedYear" filterable placeholder="请选择年份" @change="findSelectCodeListByYear">
+          <el-option
+            v-for="item in selectYear"
+            :key="item"
+            :label="item"
+            :value="item">
+          </el-option>
+        </el-select>
+      </el-col>
+
+      <el-col :span="12">
+        <label-wrap>请选择业务编号:</label-wrap>
+        <el-select v-model="selectedCode" filterable clearable placeholder="请选择业务编号" @change="determination($event)">
+          <el-option
+            v-for="item in selectCode"
+            :key="item.id"
+            :label="item.businessCode"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-col>
+
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="closeDialog">取 消</el-button>
+    <el-button type="primary" @click="bindBusinessCode">确 定</el-button>
+  </span>
+    </el-dialog>
+
+  </div>
+
+
+</template>
+<script>
+  import ReimbursementSys from '@/api/reimbursementSys/assess/reimbursementIsNoTicketService'
+  import SelectUserTree from '@/views/modules/reimbursementSys/utils/treeReimbursementBuinessUserSelect.vue'
+  import reimbursementForm from './reimbursementForm'
+  import reimbursementGatheringTimeForm from './reimbursementGatheringTimeForm'
+  import reimbursementRatioForm from './reimbursementRatioForm'
+  import reimbursementInvoiceForm from './reimbursementInvoiceForm'
+  import reimbursementBusinessForm from './reimbursementIsNoTicketForm'
+  import reimbursementSelect from './reimbursementSelectDialog'
+
+  export default {
+    data () {
+      return {
+        dataList: [],
+        searchForm: {
+          year: '',
+          userId: ''
+        },
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: [{column: 'a.create_date', asc: false}]
+        },
+        loading: false,
+        dialogVisible: false,
+        bindObj: [],
+        selectCode: [],
+        selectedCode: '',
+        selectYear: [],
+        selectedYear: '',
+        reimbursementAmount: 0,
+        canReimbursementAmount: 0
+      }
+    },
+    components: {
+      reimbursementForm,
+      reimbursementGatheringTimeForm,
+      reimbursementRatioForm,
+      reimbursementInvoiceForm,
+      reimbursementBusinessForm,
+      reimbursementSelect,
+      SelectUserTree
+    },
+    ReimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementSys.findList({
+          '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()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.$nextTick(() => {
+          this.refreshList()
+        })
+      },
+      // 修改发票信息
+      modifyInvoice (id) {
+        this.$refs.reimbursementInvoiceModify.init('modifyInvoice', {id: id, parent: {id: '', name: ''}})
+      },
+      // 删除
+      delInvoice (id) {
+        let ids = id || this.$refs.reimbursementUserTable.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()
+          })
+        })
+      },
+      addBusinessInfo (id, businessCode) {
+        this.$refs.reimbursementBusinessForm.init('addBusinessInfo', {
+          id: '',
+          businessCodeId: '',
+          businessCode: '',
+          parent: {id: '', name: ''}
+        })
+      },
+      bindBusinessCode () {
+        if (this.selectedCode === '') {
+          this.$message.error('请选择业务编号')
+          return
+        }
+        this.reimbursementSys.modifyBindCode({
+          'ids': this.bindObj,
+          'businessCode': this.selectedCode,
+          'money': this.reimbursementAmount
+        }).then(({data}) => {
+          if (!data) {
+            this.$message.error('可报销额度不足')
+          } else {
+            this.closeDialog()
+          }
+        })
+      },
+      openDialog (obj) {
+        // eslint-disable-next-line eqeqeq
+        this.bindObj = obj.id || obj.map(item => {
+          return item.id
+        }).join(',')
+        this.dialogVisible = true
+        if (obj.length > 1) {
+          obj.map(item => {
+            this.reimbursementAmount += parseInt(item.reimbursementAmount)
+          })
+        } else {
+          this.reimbursementAmount = obj.reimbursementAmount
+        }
+        this.reimbursementSys.findSelectYearList().then(({data}) => {
+          this.selectYear = data
+          this.selectedYear = this.selectYear[0]
+          this.findSelectCodeListByYear()
+        })
+      },
+      closeDialog () {
+        this.dialogVisible = false
+        this.selectedCode = ''
+        this.refreshList()
+        this.bindObj = []
+        this.reimbursementAmount = 0
+      },
+      findSelectCodeListByYear () {
+        this.selectedCode = ''
+        this.reimbursementSys.findSelectCodeListByYear(this.selectedYear).then(({data}) => {
+          this.selectCode = data
+          this.selectedCode = ''
+        })
+      },
+      determination (e) {
+        for (let i = 0; i < this.selectCode.length; i++) {
+          if (this.selectCode[i].id === e) {
+            if (parseInt(this.selectCode[i].canReimbursementAmount) < parseInt(this.reimbursementAmount)) {
+              this.$message.error('可报销额度不足,可报销额度为' + this.selectCode[i].canReimbursementAmount)
+            }
+          }
+        }
+      }
+    }
+
+  }
+</script>

+ 471 - 0
src/views/modules/reimbursementSys/assess/reimbursementList.vue

@@ -0,0 +1,471 @@
+<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 prop="firmName">
+        <el-input size="small"  v-model="searchForm.firmName"   placeholder="购方企业名称"   clearable></el-input>
+      </el-form-item>
+
+      <el-form-item prop="proposer">
+        <el-input size="small"  v-model="searchForm.proposer"   placeholder="项目经理"   clearable></el-input>
+      </el-form-item>
+      <el-form-item prop="partner">
+        <el-input size="small"  v-model="searchForm.partner"   placeholder="部门"   clearable></el-input>
+      </el-form-item>
+
+      <el-form-item
+        label="收入"
+        class="priceFormItem"
+        prop="income"
+      >
+        <el-input
+          v-model="searchForm.beginIncome"
+          onkeyup="value=value.replace(/[^\d]/g,'')"
+          class="priceInput"
+          style="width: 130px; margin-right: 10px"
+        />-<el-input
+        v-model="searchForm.endIncome"
+        class="priceInput"
+        onkeyup="value=value.replace(/[^\d]/g,'')"
+        style="width: 130px; margin-left: 10px"
+      />
+      </el-form-item>
+
+      <el-form-item label="开票日期" prop="makeTime">
+        <el-date-picker
+          v-model="searchDates"
+          type="daterange"
+          size="small"
+          align="right"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
+        </el-date-picker>
+      </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}/assess/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('assess:reimbursement:del')" :disabled="$refs.xTree && $refs.xTree.getCheckboxRecords().length === 0" type="danger" size="small" icon="el-icon-delete" @click="del()" plain>删除</el-button>
+
+            <el-button style="margin-left: 10px" v-if="hasPermission('assess:reimbursement:addBatchReimbursement')" :disabled="$refs.xTree && $refs.xTree.getCheckboxRecords().length === 0" type="primary" size="small" icon="el-icon-edit" @click="editInvoiceGatheringTime()" plain>批量收款</el-button>
+
+            <el-button v-if="hasPermission('sys:role:assign')" type="primary" size="small" icon="el-icon-plus" @click="add()">批量报销</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="year" align="center" visible></vxe-column>
+          <vxe-column  width="100px" title="发票代码" field="invoiceCode" align="center" visible></vxe-column>
+          <vxe-column  width="100px" title="发票号码" field="invoiceNumber" align="center">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('assess:reimbursement:view') && scope.row.parentId !== '0'" @click="viewInvoice(scope.row.id)">{{scope.row.invoiceNumber}}</el-link>
+              <span v-else></span>
+            </template>
+          </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="reimbursementRatio" align="center"></vxe-column>
+          <vxe-column  width="100px"  title="状态" field="reimbursementStatus">
+            <template slot-scope="scope">
+              <el-tag type="success" v-if="scope.row.reimbursementStatus === '1'"> 已完成</el-tag>
+            </template>
+          </vxe-column>
+          <vxe-column  width="100px" title="可报金额" field="canReimbursementAmount" align="center">
+            <template slot-scope="scope">
+              <span style="font-weight: bold">{{scope.row.canReimbursementAmount}}</span>
+            </template>
+          </vxe-column>
+          <vxe-column  width="100px" title="已报金额" field="allAlreadyReimbursementQuota" align="center">
+            <template slot-scope="scope">
+              <span style="font-weight: bold">{{scope.row.allAlreadyReimbursementQuota}}</span>
+            </template>
+          </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="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="hasPermission('assess:reimbursement:edit')  && scope.row.businessFlag === '1'" type="text" icon="el-icon-edit" size="small" @click="editInvoiceBusiness(scope.row.id)">新增业务编码</el-button>
+              <el-button v-if="hasPermission('assess:reimbursement:edit') && scope.row.businessCode!=='' && scope.row.parentId === '0' && scope.row.randomType === '1' " type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">编辑业务编码</el-button>
+              <el-button v-if="hasPermission('assess:reimbursement:edit') && (scope.row.businessCode==='' && scope.row.parentId === '0' && scope.row.businessFlag === '0')" type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">新增业务编码</el-button>
+              <el-button v-if="hasPermission('assess:reimbursement:edit') && scope.row.businessCode !== '' && !scope.row.reimbursementRatio && scope.row.parentId === '0'" type="text" icon="el-icon-edit" size="small" @click="editBusinessRatio(scope.row.id)">报销比例</el-button>
+              <el-button v-if="hasPermission('assess:reimbursementBusiness:add') && scope.row.businessCode !== '' && scope.row.reimbursementRatio && scope.row.parentId === '0' && scope.row.reimbursementStatus === '0'" type="text" icon="el-icon-plus" size="small" @click="addBusinessInfo(scope.row.id, scope.row.businessCode)">业务报销</el-button>
+              <el-button v-if="hasPermission('assess:reimbursementBusiness:view') && scope.row.businessCode !== '' && scope.row.reimbursementRatio && scope.row.parentId === '0'" type="text" icon="el-icon-view" size="small" @click="viewBusinessInfo(scope.row.id)">业务报销详情</el-button>
+
+              <el-button v-if="hasPermission('assess:reimbursement:edit') && 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="hasPermission('assess:reimbursement:edit') && scope.row.parentId !== '0'" type="text" icon="el-icon-edit" size="small" @click="modifyInvoice(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('assess:reimbursement:del') && scope.row.parentId === '0'" type="text" icon="el-icon-delete" size="small" @click="delBusiness(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('assess:reimbursement:del') && 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>
+        <reimbursement-select ref="reimbursementSelect" @doSubmit="selectBatchReimbursement"></reimbursement-select>
+      </div>
+    </div>
+    <!-- 弹窗, 新增 / 修改 -->
+    <reimbursementForm ref="reimbursementForm" @refreshDataList="refreshList"></reimbursementForm>
+    <reimbursementGatheringTimeForm ref="reimbursementGatheringTimeForm" @refreshDataList="refreshList"></reimbursementGatheringTimeForm>
+    <reimbursementRatioForm ref="reimbursementRatioForm" @refreshDataList="refreshList"></reimbursementRatioForm>
+    <reimbursementBusinessForm ref="reimbursementBusinessForm" @refreshDataList="refreshList"></reimbursementBusinessForm>
+    <reimbursementBusinessList ref="reimbursementBusinessList" @refreshDataList="refreshList"></reimbursementBusinessList>
+    <reimbursementInvoiceForm ref="reimbursementInvoiceForm" @refreshDataList="refreshList"></reimbursementInvoiceForm>
+    <reimbursementInvoiceModify ref="reimbursementInvoiceModify" @refreshDataList="refreshList"></reimbursementInvoiceModify>
+  </div>
+
+
+</template>
+<script>
+import ReimbursementSys from '@/api/reimbursementSys/assess/reimbursementSysService'
+import XEUtils from 'xe-utils'
+import reimbursementForm from './reimbursementForm'
+import reimbursementGatheringTimeForm from './reimbursementGatheringTimeForm'
+import reimbursementRatioForm from './reimbursementRatioForm'
+import reimbursementInvoiceForm from './reimbursementInvoiceForm'
+import reimbursementInvoiceModify from './reimbursementInvoiceModify'
+import reimbursementBusinessForm from './reimbursementBusinessForm'
+import reimbursementSelect from './reimbursementSelectDialog'
+export default {
+  data () {
+    return {
+      dataList: [],
+      searchDates: '',
+      searchForm: {
+        businessFlag: '',
+        businessCode: '',
+        invoiceNumber: '',
+        proposer: '',
+        partner: '',
+        reimbursementRatio: '',
+        randomType: '',
+        firmName: '',
+        beginDate: '',
+        endDate: '',
+        beginIncome: '',
+        endIncome: ''
+      },
+      tablePage: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+        orders: [{column: 'a.create_date', asc: false}]
+      },
+      loading: false,
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近一个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+            picker.$emit('pick', [start, end])
+          }
+        }, {
+          text: '最近三个月',
+          onClick (picker) {
+            const end = new Date()
+            const start = new Date()
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+            picker.$emit('pick', [start, end])
+          }
+        }]
+      }
+    }
+  },
+  watch: {
+    searchDates () {
+      if (this.searchDates) {
+        this.searchForm.beginDate = this.searchDates[0]
+        this.searchForm.endDate = this.searchDates[1]
+      } else {
+        this.searchForm.beginDate = ''
+        this.searchForm.endDate = ''
+      }
+    }
+  },
+  components: {
+    reimbursementForm,
+    reimbursementGatheringTimeForm,
+    reimbursementRatioForm,
+    reimbursementInvoiceForm,
+    reimbursementInvoiceModify,
+    reimbursementBusinessForm,
+    reimbursementSelect
+  },
+  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()
+    },
+    // 新增
+    add () {
+      this.$refs.reimbursementSelect.init()
+    },
+    // 修改
+    editBusiness (id) {
+      this.$refs.reimbursementForm.init('editBusiness', {id: id, parent: {id: '', name: ''}})
+    },
+    editInvoiceBusiness (id) {
+      this.$refs.reimbursementForm.init('editInvoiceBusiness', {id: id, parent: {id: '', name: ''}})
+    },
+    // 修改
+    editBusinessRatio (id) {
+      this.$refs.reimbursementRatioForm.init('editBusinessRatio', {id: id, parent: {id: '', name: ''}})
+    },
+    // 修改
+    addBusinessInfo (id, businessCode) {
+      this.$refs.reimbursementBusinessForm.init('addBusinessInfo', {id: '', businessCodeId: id, businessCode: businessCode, parent: {id: '', name: ''}})
+    },
+    // 查看业务报销详情
+    viewBusinessInfo (id) {
+      this.$router.push({path: `/reimbursementSys/assess/reimbursementBusinessList`, query: {id: id, title: '业务报销详情'}})
+    },
+    // 修改发票收款日期
+    editInvoiceGatheringTime (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$refs.reimbursementGatheringTimeForm.init('edit', {id: ids, parent: {id: '', name: ''}})
+    },
+    // 修改发票信息
+    editInvoice (id) {
+      this.$refs.reimbursementInvoiceForm.init('editInvoice', {id: id, parent: {id: '', name: ''}})
+    },
+    // 修改发票信息
+    modifyInvoice (id) {
+      this.$refs.reimbursementInvoiceModify.init('modifyInvoice', {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()
+        })
+        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()
+        })
+        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()
+        })
+        this.refreshList()
+      })
+    },
+    selectBatchReimbursement (invoices) {
+      let invoiceNumbers = invoices.map(invoice => { return invoice.id }).join(',')
+      this.loading = true
+      this.reimbursementSys.addBatchReimbursement(invoiceNumbers).then(({data}) => {
+        this.loading = false
+        this.$message.success({dangerouslyUseHTMLString: true,
+          message: data})
+        this.refreshList()
+      })
+    }
+  }
+
+}
+</script>

+ 129 - 0
src/views/modules/reimbursementSys/assess/reimbursementRatioForm.vue

@@ -0,0 +1,129 @@
+<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="业务编码" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销比例(%)" prop="reimbursementRatio":rules="[{required: true, max: 10, message:'报销比例不能为空', trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementRatio" class="bg-grey" size="small" placeholder="报销比例(%)" style="width: 100%;" @keyup.native="inputForm.reimbursementRatio = checkInputs(inputForm.reimbursementRatio)">
+                </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/assess/reimbursementSysService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          id: '',
+          name: '',
+          parent: {
+            id: ''
+          },
+          businessCode: '', // 业务编码
+          reimbursementRatio: '' // 报销比例
+        }
+      }
+    },
+    reimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    methods: {
+      checkInputs (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      init (method, obj) {
+        this.method = method
+        if (method === 'editBusinessRatio') {
+          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 === 'editBusinessRatio' || 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.updateReimbursementRatio(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>

+ 383 - 0
src/views/modules/reimbursementSys/assess/reimbursementSelectDialog.vue

@@ -0,0 +1,383 @@
+<template>
+  <div>
+    <el-dialog
+    title="选择"
+    width="1100px"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+     v-dialogDrag
+     class="userDialog"
+    :visible.sync="visible">
+    <el-container style="height: 500px">
+    <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>
+            <el-form-item prop="invoiceNumber">
+              <el-input size="small" v-model="searchForm.invoiceNumber" placeholder="发票号码" clearable></el-input>
+            </el-form-item>
+            <el-form-item prop="proposer">
+              <el-input size="small" v-model="searchForm.proposer" placeholder="项目经理" clearable></el-input>
+            </el-form-item>
+            <el-form-item prop="partner">
+              <el-input size="small" v-model="searchForm.partner" 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>
+      </el-header>
+
+      <el-main>
+        <el-table
+          :data="dataList"
+          v-loading="loading"
+          size="small"
+          border
+          ref="userTable"
+          @selection-change="selectionChangeHandle"
+          @sort-change="sortChangeHandle"
+          height="calc(100% - 40px)"
+          style="width: 100%;">
+          <el-table-column
+            header-align="center"
+            align="center"
+            v-if="limit <= 1"
+            width="50">
+              <template slot-scope="scope">
+                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>
+              </template>
+          </el-table-column>
+          <el-table-column
+            type="selection"
+            header-align="center"
+            v-if="limit > 1"
+            align="center"
+            width="50">
+          </el-table-column>
+
+          <el-table-column
+            prop="invoiceNumber"
+            header-align="center"
+            align="center"
+            min-width="90"
+            label="发票号码">
+          </el-table-column>
+          <el-table-column
+            prop="money"
+            header-align="center"
+            align="center"
+            min-width="90"
+            label="金额">
+          </el-table-column>
+          <el-table-column
+            prop="tax"
+            header-align="center"
+            align="center"
+            min-width="110"
+            label="税额">
+          </el-table-column>
+          <el-table-column
+            prop="income"
+            header-align="center"
+            align="center"
+            min-width="110"
+            label="收入">
+          </el-table-column>
+          <el-table-column
+            prop="proposer"
+            header-align="center"
+            align="center"
+            min-width="110"
+            label="项目经理">
+          </el-table-column>
+          <el-table-column
+            prop="partner"
+            header-align="center"
+            align="center"
+            min-width="110"
+            label="部门">
+          </el-table-column>
+
+        </el-table>
+        <el-pagination
+          @size-change="sizeChangeHandle"
+          @current-change="currentChangeHandle"
+          :current-page="pageNo"
+          :page-sizes="[5, 10, 50, 100]"
+          :page-size="pageSize"
+          :total="total"
+          layout="total, sizes, prev, pager, next, jumper">
+        </el-pagination>
+      </el-main>
+    </el-container>
+
+    <el-aside width="200px">
+      <el-tag
+        :key="tag.id"
+        v-for="tag in dataListAllSelections"
+        closable
+        :disable-transitions="false"
+        @close="del(tag)">
+        {{tag.invoiceNumber}}
+      </el-tag>
+  </el-aside>
+</el-container>
+     <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+    </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        searchForm: {
+          invoiceNumber: '',
+          proposer: '',
+          partner: ''
+        },
+        filterText: '',
+        dataListAllSelections: [],   // 所有选中的数据包含跨页数据
+        dataListSelections: [],
+        idKey: 'id', // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+        dataList: [],
+        dynamicTags: [],
+        officeTreeData: [],
+        pageNo: 1,
+        pageSize: 10,
+        total: 0,
+        orders: [],
+        loading: false,
+        visible: false
+      }
+    },
+    props: {
+      selectData: {
+        type: Array,
+        default: () => { return [] }
+      },
+      limit: {
+        type: Number,
+        default: 999999
+      }
+    },
+    watch: {
+      filterText (val) {
+        this.$refs.officeTree.filter(val)
+      }
+    },
+    methods: {
+      init () {
+        this.visible = true
+        this.$nextTick(() => {
+          this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData))
+          this.refreshTree()
+          this.resetSearch()
+        })
+      },
+      renderContent (h, { node, data, store }) {
+        return (
+              <span class="custom-tree-node">
+                {
+                  data.type === '1' ? <i class="fa fa-sitemap"></i> : <i class="fa fa-users"></i>
+                }
+                <span class="text">{node.label}</span>
+              </span>
+        )
+      },
+      getTemplateRow (index, row) {                                 // 获取选中数据
+        this.dataListSelections = [row]
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+           // 设置选中的方法
+      setSelectRow () {
+        if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+          this.$refs.userTable.clearSelection()
+          return
+        }
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        this.$refs.userTable.clearSelection()
+        for (var i = 0; i < this.dataList.length; i++) {
+          if (selectAllIds.indexOf(this.dataList[i][idKey]) >= 0) {
+                        // 设置选中,记住table组件需要使用ref="table"
+            this.$refs.userTable.toggleRowSelection(this.dataList[i], true)
+          }
+        }
+      },
+            // 记忆选择核心方法
+      changePageCoreRecordData () {
+                // 标识当前行的唯一键的名称
+        let idKey = this.idKey
+        let that = this
+              // 如果总记忆中还没有选择的数据,那么就直接取当前页选中的数据,不需要后面一系列计算
+        if (this.dataListAllSelections.length <= 0) {
+          this.dataListSelections.forEach(row => {
+            that.dataListAllSelections.push(row)
+          })
+          return
+        }
+                // 总选择里面的key集合
+        let selectAllIds = []
+        this.dataListAllSelections.forEach(row => {
+          selectAllIds.push(row[idKey])
+        })
+        let selectIds = []
+                // 获取当前页选中的id
+        this.dataListSelections.forEach(row => {
+          selectIds.push(row[idKey])
+                  // 如果总选择里面不包含当前页选中的数据,那么就加入到总选择集合里
+          if (selectAllIds.indexOf(row[idKey]) < 0) {
+            that.dataListAllSelections.push(row)
+          }
+        })
+        let noSelectIds = []
+              // 得到当前页没有选中的id
+        this.dataList.forEach(row => {
+          if (selectIds.indexOf(row[idKey]) < 0) {
+            noSelectIds.push(row[idKey])
+          }
+        })
+        noSelectIds.forEach(id => {
+          if (selectAllIds.indexOf(id) >= 0) {
+            for (let i = 0; i < that.dataListAllSelections.length; i++) {
+              if (that.dataListAllSelections[i][idKey] === id) {
+                                // 如果总选择中有未被选中的,那么就删除这条
+                that.dataListAllSelections.splice(i, 1)
+                break
+              }
+            }
+          }
+        })
+      },
+     // 得到选中的所有数据
+      getAllSelectionData () {
+         // 再执行一次记忆勾选数据匹配,目的是为了在当前页操作勾选后直接获取选中数据
+        this.changePageCoreRecordData()
+      },
+      filterNode (value, data) {
+        if (!value) return true
+        return data.name.indexOf(value) !== -1
+      },
+      del (tag) {
+        this.dataListAllSelections.splice(this.dataListAllSelections.indexOf(tag), 1)
+        this.$nextTick(() => {
+          this.setSelectRow()
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.$http({
+          url: '/assess/reimbursement/list',
+          method: 'get',
+          params: {
+            'current': this.pageNo,
+            'size': this.pageSize,
+            'orders': this.orders,
+            ...this.searchForm
+          }
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.total = data.total
+          this.pageNo = data.current
+          this.loading = false
+          this.$nextTick(() => {
+            this.setSelectRow()
+          })
+        })
+      },
+      refreshTree () {
+        this.$http({
+          url: `/sys/office/treeData`,
+          method: 'get'
+        }).then(({data}) => {
+          this.officeTreeData = data
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageNo = 1
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageNo = val
+        this.refreshList()
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+        this.$nextTick(() => {
+          this.changePageCoreRecordData()
+        })
+      },
+       // 排序
+      sortChangeHandle (column) {
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      doSubmit () {
+        if (this.limit < this.dataListAllSelections.length) {
+          this.$message.error(`你最多只能选择${this.limit}个发票信息`)
+          return
+        }
+        this.visible = false
+        this.$emit('doSubmit', this.dataListAllSelections)
+      }
+    }
+  }
+</script>
+<style lang="scss">
+.org {
+  height: 100%;
+  .el-card__header {
+    padding: 10px;
+  }
+  .el-card__body {
+    padding: 10px;
+    max-height: 520px;
+    overflow: auto;
+  }
+}
+.userDialog{
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+  .el-main {
+    padding: 20px 20px 5px 20px;
+    .el-pagination{
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 291 - 0
src/views/modules/reimbursementSys/assess/treeReimbursementBuinessUserSelect.vue

@@ -0,0 +1,291 @@
+<template>
+  <el-select :value="valueTitle" :size="size"  :disabled="disabled" :clearable="clearable" :placeholder="placeholderText" @clear="clearHandle">
+    <el-option :value="valueTitle"  :label="valueTitle" class="options">
+      <el-tree  id="tree-option"
+        ref="selectTree"
+        :accordion="accordion"
+        :data="optionData"
+        :show-checkbox="showCheckbox"
+        :props="props"
+        highlight-current
+        :node-key="props.value"
+        :default-expanded-keys="defaultExpandedKey"
+        @check-change="handleCheckChange"
+        @node-click="handleNodeClick">
+      </el-tree>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+export default {
+  inject: ['say'],
+  name: 'el-tree-select',
+  props: {
+    /* 配置项 */
+    props: {
+      type: Object,
+      default: () => {
+        return {
+          value: 'id',             // ID字段名
+          label: 'label',         // 显示名称
+          children: 'children'    // 子级字段名
+        }
+      }
+    },
+    /* 选项列表数据(树形结构的对象数组) */
+    data: {
+      type: Array,
+      default: () => { return [] }
+    },
+     /* 选项列表数据(树形结构的对象数组) */
+    list: {
+      type: Array,
+      default: () => { return null }
+    },
+    /* 初始值 */
+    value: {
+      type: String,
+      default: () => { return null }
+    },
+        /* 初始值 */
+    url: {
+      type: String,
+      default: () => { return null }
+    },
+    disabled: {
+      type: Boolean,
+      dafault: () => { return false }
+    },
+    showCheckbox: {
+      type: Boolean,
+      dafault: () => { return false }
+    },
+    /* 初始值 */
+    label: {
+      type: String,
+      default: () => { return null }
+    },
+    /* 可清空选项 */
+    clearable: {
+      type: Boolean,
+      default: () => { return true }
+    },
+    /* 自动收起 */
+    accordion: {
+      type: Boolean,
+      default: () => { return false }
+    },
+    size: {
+      type: String,
+      default: () => { return 'small' }
+    },
+    placeholder: {
+      type: String,
+      default: () => { return '请选择' }
+    },
+    isOnlySelectLeaf: {
+      type: Boolean,
+      default: () => {
+        return false
+      }
+    }
+  },
+  data () {
+    return {
+      valueId: this.value,    // 初始值
+      valueTitle: this.label,
+      defaultExpandedKey: [],
+      placeholderText: this.placeholder,
+      treeList: [],
+      valueData: this.data
+    }
+  },
+  created () {
+    if (this.url !== null) {
+      this.placeholderText = '加载数据中...'
+      let interval = setInterval(() => {
+        this.placeholderText = this.placeholderText + '.'
+      }, 500)
+      this.$http({
+        url: this.url,
+        method: 'get'
+      }).then(({data}) => {
+        this.valueData = data
+        this.setTreeList(this.valueData)
+        this.$nextTick(() => {
+          this.initHandle()
+          this.placeholderText = this.placeholder
+          clearInterval(interval)
+        })
+      })
+    } else {
+      this.valueData = this.data
+      this.setTreeList(this.valueData)
+    }
+  },
+  methods: {
+    setTreeList (datas) { // 遍历树  获取id数组
+      for (var i in datas) {
+        this.treeList.push(datas[i])
+        if (datas[i].children) {
+          this.setTreeList(datas[i].children)
+        }
+      }
+    },
+    // 初始化值
+    initHandle () {
+      if (this.valueId) {
+        if (this.showCheckbox) {
+          let ids = this.valueId.split(',')
+          this.$refs.selectTree.setCheckedKeys(ids)
+          let titles = []
+          ids.forEach((id) => {
+            this.treeList.forEach((d) => {
+              if (id === d[this.props.value]) {
+                titles.push(d[this.props.label])
+              }
+            })
+          })
+
+          this.valueTitle = titles.join(',')
+        } else if (this.$refs.selectTree.getNode(this.valueId)) {
+          this.valueTitle = this.$refs.selectTree.getNode(this.valueId).data[this.props.label]     // 初始化显示
+          this.$refs.selectTree.setCurrentKey(this.valueId)       // 设置默认选中
+          this.defaultExpandedKey = [this.valueId]      // 设置默认展开
+        }
+      }
+      this.initScroll()
+    },
+    getNode (id) {
+      return this.$refs.selectTree.getNode(id)
+    },
+    // 初始化滚动条
+    initScroll () {
+      this.$nextTick(() => {
+        let scrollWrap = document.querySelectorAll('.el-scrollbar .el-select-dropdown__wrap')[0]
+        let scrollBar = document.querySelectorAll('.el-scrollbar .el-scrollbar__bar')
+        if (scrollWrap) { scrollWrap.style.cssText = 'margin: 0px; max-height: none; overflow: hidden;' }
+        if (scrollBar) {
+          scrollBar.forEach(ele => {
+          // eslint-disable-next-line no-return-assign
+            return ele.style.width = 0
+          })
+        }
+      })
+    },
+    // 切换选项
+    handleNodeClick (node) {
+      if (this.showCheckbox) {
+        return
+      }
+      if (node['disabled'] || node['typeFlag']) {
+        // this.$message.warning('节点(' + node[this.props.label] + ')被禁止选择,请重新选择。')
+        return
+      }
+      if (this.isOnlySelectLeaf && node.children.length > 0) {
+        // this.$message.warning('不能选择根节点(' + node[this.props.label] + ')请重新选择。')
+        return
+      }
+      this.valueTitle = node[this.props.label]
+      this.valueId = node[this.props.value]
+      this.$emit('getValue', this.valueId, this.valueTitle, node)
+      // 调用主页面的方法
+      this.say(this.valueId)
+    },
+    handleCheckChange (data, checked, indeterminate) {
+      let nodes = this.$refs.selectTree.getCheckedNodes()
+      this.valueTitle = nodes.map((node) => {
+        return node[this.props.label]
+      }).join(',')
+      this.valueId = nodes.map((node) => {
+        return node[this.props.value]
+      }).join(',')
+      this.$emit('getValue', this.valueId, this.valueTitle)
+    },
+    // 清除选中
+    clearHandle () {
+      this.valueTitle = ''
+      this.valueId = null
+      this.defaultExpandedKey = []
+      this.clearSelected()
+      this.$emit('getValue', null, null, null)
+    },
+    /* 清空选中样式 */
+    clearSelected () {
+      let allNode = document.querySelectorAll('#tree-option .el-tree-node')
+      allNode.forEach((element) => element.classList.remove('is-current'))
+    }
+  },
+  watch: {
+    value () {
+      this.valueId = this.value
+      if (this.value === '' || this.value === null || this.value === undefined) {
+        this.clearHandle()
+      } else {
+        this.initHandle()
+      }
+    },
+    data () {
+      this.valueData = this.data
+    }
+  },
+  computed: {
+    optionData () {
+      if (this.list) {
+        let cloneData = JSON.parse(JSON.stringify(this.list))      // 对源数据深度克隆
+        return cloneData.filter(father => {                      // 循环所有项,并添加children属性
+          let branchArr = cloneData.filter(child => father.id === child.parentId)       // 返回每一项的子级数组
+            // eslint-disable-next-line no-unused-expressions
+          branchArr.length > 0 ? father.children = branchArr : ''   // 给父级添加一个children属性,并赋值
+          return father.parentId === '0'      // 返回第一层
+        })
+      } else {
+        return this.valueData
+      }
+    }
+  }
+}
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+  .el-select{
+    width: 100%;
+  }
+  .el-scrollbar .el-scrollbar__view .el-select-dropdown__item{
+    height: auto;
+    max-height: 274px;
+    padding: 0;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+  .el-select-dropdown__item.selected{
+    font-weight: normal;
+  }
+  ul li >>>.el-tree .el-tree-node__content{
+    height:auto;
+    padding: 0 20px;
+  }
+  .el-tree-node__label{
+    font-weight: normal;
+  }
+  .el-tree >>>.is-current .el-tree-node__label{
+    color: #409EFF;
+    font-weight: 700;
+  }
+  .el-tree >>>.is-current .el-tree-node__children .el-tree-node__label{
+    color:#606266;
+    font-weight: normal;
+  }
+  /* 开发禁用 */
+  /* .el-tree-node:focus>.el-tree-node__content{
+    background-color:transparent;
+    background-color: #f5f7fa;
+    color: #c0c4cc;
+    cursor: not-allowed;
+  }
+  .el-tree-node__content:hover{
+    background-color: #f5f7fa;
+  } */
+</style>

+ 248 - 0
src/views/modules/reimbursementSys/assess/user/reimbursementUserBusinessList.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="el-scrollbar__wrap wrap-white padding-20">
+
+    <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm"  @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form-item
+        label="报销额度"
+        class="priceFormItem"
+        prop="income"
+      >
+        <el-input
+          v-model="searchForm.beginReimbursementQuota"
+          onkeyup="value=value.replace(/[^\d]/g,'')"
+          class="priceInput"
+          placeholder="起始金额"
+          style="width: 130px; margin-right: 10px"
+        />-<el-input
+        v-model="searchForm.endReimbursementQuota"
+        class="priceInput"
+        placeholder="结束金额"
+        onkeyup="value=value.replace(/[^\d]/g,'')"
+        style="width: 130px; margin-left: 10px"
+      />
+      </el-form-item>
+      <el-form-item label="报销时间" prop="makeTime">
+        <el-date-picker
+          v-model="searchDates"
+          type="daterange"
+          size="small"
+          align="right"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
+        </el-date-picker>
+      </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-button type="info" size="small" @click="goBack">返回</el-button>
+      </el-form-item>
+    </el-form>
+
+    <div class="el-scrollbar__view">
+      <el-row :gutter="20" v-loading="loading">
+        <el-col :span="12">
+          <el-form size="small" :model="inputForm" ref="inputForm" v-loading="loading" label-width="150px">
+          </el-form>
+        </el-col>
+        <el-col :span="24">
+          <el-col :span="18"><h3>人员报销详情</h3>
+            <div style="margin-bottom: 5px;">
+              <span class="color: red">日报销额度:{{columnForm.reimbursementQuotaDay}}</span>
+              <span class="color: red">;  可报销额度:{{columnForm.reimbursementQuota}}</span>
+              <span class="color: red">;  已报销额度:{{columnForm.alreadyReimbursementAmount}}</span>
+              <span class="color: red">;  剩余报销额度:{{columnForm.surplusReimbursementAmount}}</span>
+            </div>
+            <div style="margin-bottom: 5px;">
+              <span class="color: red">可报销天数:{{columnForm.reimbursementDay}}</span>
+              <span class="color: red">;  已报销天数:{{columnForm.alreadyReimbursementDay}}</span>
+              <span class="color: red">;  剩余报销天数:{{columnForm.surplusReimbursementDay}}</span>
+            </div>
+          </el-col>
+          <el-table
+            :data="columnForm.columnList"
+            style="width: 100%">
+            <el-table-column
+              prop="businessCode"
+              label="业务编号"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="year"
+              label="报销年份"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementType"
+              label="报销类型"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementDay"
+              label="报销天数"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="reimbursementAmount"
+              label="报销额度"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="createDate"
+              label="报销时间"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="remarks"
+              label="备注"
+              width="200px"
+            >
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import ReimbursementUser from '@/api/reimbursementSys/assess/user/reimbursementUserService'
+  export default {
+    data () {
+      return {
+        searchDates: '',
+        searchForm: {
+          year: '',
+          beginDate: '',
+          endDate: '',
+          beginReimbursementQuota: '',
+          endReimbursementQuota: '',
+          userId: ''
+        },
+        title: '',
+        method: '',
+        count: '10',
+        loading: false,
+        previewVisible: false,
+        isIndeterminate: false,
+        inputForm: {
+          id: '',
+          name: '',
+          userId: ''
+        },
+        columnForm: {
+          reimbursementQuotaDay: '',  // 日报销额度
+          reimbursementDay: '',  // 报销天数
+          alreadyReimbursementDay: '',  // 已报销天数
+          surplusReimbursementDay: '',  // 剩余报销天数
+          reimbursementQuota: '',  // 报销额度
+          alreadyReimbursementAmount: '',  // 已报销额度
+          surplusReimbursementAmount: '',  // 剩余报销额度
+          remarks: '',  // 备注
+          columnList: []
+        },
+
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近一个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近三个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }]
+        }
+      }
+    },
+    watch: {
+      searchDates () {
+        if (this.searchDates) {
+          this.searchForm.beginDate = this.searchDates[0]
+          this.searchForm.endDate = this.searchDates[1]
+        } else {
+          this.searchForm.beginDate = ''
+          this.searchForm.endDate = ''
+        }
+      }
+    },
+    reimbursementUser: null,
+    created () {
+      this.reimbursementUser = new ReimbursementUser()
+    },
+    activated () {
+      this.$refs['inputForm'].resetFields()
+      this.columnForm.columnList = []
+      this.searchForm.userId = this.$route.query.userId
+      console.log(this.searchForm.userId)
+      if (this.searchForm.userId) {
+        this.reimbursementUser.findListByUserId(this.searchForm).then(({data}) => {
+          this.columnForm.columnList = data.list
+          this.columnForm.reimbursementDay = data.reimbursementDay
+          this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
+          this.columnForm.surplusReimbursementDay = data.surplusReimbursementDay
+          this.columnForm.reimbursementQuota = data.reimbursementQuota
+          this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
+          this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
+          this.columnForm.reimbursementQuotaDay = data.reimbursementQuotaDay
+        })
+      }
+    },
+    components: {
+      editor: require('vue2-ace-editor')
+    },
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementUser.findListByUserId({
+          ...this.searchForm
+        }).then(({data}) => {
+          this.columnForm.columnList = data.list
+          this.columnForm.reimbursementDay = data.reimbursementDay
+          this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
+          this.columnForm.surplusReimbursementDay = data.surplusReimbursementDay
+          this.columnForm.reimbursementQuota = data.reimbursementQuota
+          this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
+          this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
+          this.columnForm.reimbursementQuotaDay = data.reimbursementQuotaDay
+          this.loading = false
+        })
+      },
+      resetSearch () {
+        this.$refs.inputForm.resetFields()
+        // eslint-disable-next-line no-unused-expressions
+        this.searchForm.beginReimbursementQuota = ''
+        this.searchForm.endReimbursementQuota = ''
+        this.searchDates = ''
+        this.$nextTick(() => {
+          this.refreshList()
+        })
+      },
+      goBack () {
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        this.$router.push('/reimbursementSys/assess/user/reimbursementUserList')
+      }
+    }
+  }
+</script>

+ 198 - 0
src/views/modules/reimbursementSys/assess/user/reimbursementUserForm.vue

@@ -0,0 +1,198 @@
+<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="120px" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'" @submit.native.prevent>
+
+      <el-row :gutter="15">
+        <el-col :span="12">
+          <el-form-item prop="userId" :rules=" [{required: true, message: '人员不能为空', trigger: 'blur'}]" label="人员">
+            <SelectUserTree
+              ref="companyTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光评估`"
+              :value="inputForm.userId"
+              :clearable="true"
+              :accordion="true"
+              :disabled="method==='edit'"
+              @getValue="(value) => {inputForm.userId=value}"/>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年份" id="year" prop="year"
+                        :rules="[
+                  {required: true, message:'年份不能为空', trigger:'blur'}
+                 ]">
+            <el-date-picker
+              v-model="inputForm.year"
+              type="year"
+              value-format="yyyy"
+              style="width: 100%;"
+              placeholder="选择年份">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="日报销额度"  id="reimbursementQuotaDay" prop="reimbursementQuotaDay":rules="[{required: true, max: 10, message:'日报销额度不能为空', trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementQuotaDay" @input="calculateReimbursementQuota(inputForm.reimbursementQuotaDay,inputForm.reimbursementAllDay)" class="bg-grey" size="small" placeholder="日报销额度" style="width: 100%;" @keyup.native="inputForm.reimbursementQuotaDay = checkInputs(inputForm.reimbursementQuotaDay)">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="可报销天数" prop="reimbursementAllDay" :rules="[
+                  {required: true, message:'可报销天数不能为空', trigger:'blur'},
+                  {validator: validator.isNumber, trigger:'blur'}
+                 ]">
+            <el-input-number v-model="inputForm.reimbursementAllDay" placeholder="可报销天数" @input="calculateReimbursementQuota(inputForm.reimbursementQuotaDay,inputForm.reimbursementAllDay)" :step="1"  :min="1" :max="366" style="width: 100%;"  ></el-input-number>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年报销额度" prop="reimbursementQuota":rules="[{required: true, max: 10, message:'年报销额度不能为空', trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementQuota" class="bg-grey" size="small" placeholder="年报销额度" style="width: 100%;" disabled>
+                </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" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import SelectUserTree from '@/views/modules/reimbursementSys/utils/treeReimbursementBuinessUserSelect.vue'
+  import ReimbursementUser from '@/api/reimbursementSys/assess/user/reimbursementUserService'
+  export default {
+    data () {
+      return {
+        visible: false,
+        loading: false,
+        title: '',
+        method: '',
+        roleList: [],
+        postList: [],
+        inputForm: {
+          id: '',
+          userId: '', // 人员id
+          year: '', // 年份
+          reimbursementQuota: '', // 年报销额度
+          reimbursementQuotaDay: '', // 日报销额度
+          reimbursementAllDay: '' // 报销总天数
+
+        }
+      }
+    },
+    reimbursementUser: null,
+    created () {
+      this.reimbursementUser = new ReimbursementUser()
+    },
+    mounted () {
+    },
+    components: {
+      SelectUserTree
+    },
+    methods: {
+      checkInputs: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      calculateReimbursementQuota (reimbursementQuotaDay, reimbursementAllDay) {
+        if (reimbursementQuotaDay && reimbursementAllDay) {
+          if (!isNaN(reimbursementQuotaDay) && !isNaN(reimbursementAllDay)) {
+            this.inputForm.reimbursementQuota = (reimbursementQuotaDay * reimbursementAllDay).toString()
+          } else {
+            this.inputForm.reimbursementQuota = ''
+          }
+        } else {
+          this.inputForm.reimbursementQuota = ''
+        }
+      },
+      init (method, obj) {
+        this.method = method
+        this.inputForm.id = obj
+        if (method === 'add') {
+          this.inputForm.id = obj.id
+          this.title = `新建人员信息`
+        } else if (method === 'edit') {
+          this.title = '修改人员信息'
+        } else if (method === 'view') {
+          this.title = '查看人员信息'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.inputForm.id = obj.id
+          this.$refs['inputForm'].resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.inputForm.id = obj
+            this.loading = true
+            this.reimbursementUser.queryById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.loading = false
+            })
+          } else if (method === 'add') {
+            // 获取字典表中每日报销额度
+            this.reimbursementUser.getReimbursementQuotaDay().then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.loading = false
+            })
+          }
+        })
+      },
+
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementUser.save(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.visible = false
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 262 - 0
src/views/modules/reimbursementSys/assess/user/reimbursementUserList.vue

@@ -0,0 +1,262 @@
+<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="userId" :rules=" [{trigger: 'blur'}]" label="人员">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光评估`"
+          :value="searchForm.userId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.userId=value}"/>
+      </el-form-item>
+
+      <el-form-item label="年份" prop="year":rules="[{trigger:'blur'}]">
+        <el-date-picker
+          v-model="searchForm.year"
+          type="year"
+          value-format="yyyy"
+          placeholder="选择年份">
+        </el-date-picker>
+      </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}" import export  print resizable custom>
+        <template #buttons>
+          <el-row>
+            <el-button v-if="hasPermission('assess:reimbursementUser:add')" type="primary" icon="el-icon-plus" size="small" @click="add()">新增</el-button>
+            <el-button v-if="hasPermission('assess:reimbursementUser:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.reimbursementUserTable && $refs.reimbursementUserTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+            <el-button v-if="hasPermission('assess:reimbursementUser:import')"  type="default" @click="downloadTpl()" size="small">下载模板</el-button>
+            <el-button v-if="hasPermission('assess:reimbursementUser:add')" type="success" icon="el-icon-success" size="small" @click="initialize()">初始化</el-button>
+          </el-row>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 80px);">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="reimbursementUserTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :import-config="{
+                    importMethod: importMethod,
+                    types: ['xls', 'xlsx'],
+                    remote: true}"
+          :export-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="checkbox" width="40px"> </vxe-column>
+          <vxe-column  title="人员" field="user.name">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('assess:reimbursementUser:edit')" @click="view(scope.row.id)">{{scope.row.user.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('assess:reimbursementUser:view')"  @click="view(scope.row.id,)">{{scope.row.user.name}}</el-link>
+              <span v-else>{{scope.row.user.name}}</span>
+            </template>
+          </vxe-column>
+
+          <vxe-column  title="部门" field="officeName"></vxe-column>
+          <vxe-column  title="报销年份" field="year"></vxe-column>
+          <vxe-column  title="日报销额度" field="reimbursementQuotaDay"></vxe-column>
+          <vxe-column  title="年报销额度" field="reimbursementQuota"></vxe-column>
+
+          <vxe-column  title="已报额度" field="alreadyReimbursementAmount"></vxe-column>
+          <vxe-column  title="剩余额度" field="remainReimbursementAmount"></vxe-column>
+          <vxe-column  title="已报天数" field="alreadyReimbursementDay"></vxe-column>
+          <vxe-column  title="剩余天数" field="surplusReimbursementDay"></vxe-column>
+          <vxe-column title="操作" width="300px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('assess:reimbursementUser:view')" type="text" icon="el-icon-view" size="small" @click="viewBusinessInfo(scope.row.id)">报销详情</el-button>
+              <el-button v-if="hasPermission('assess:reimbursementUser:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('assess:reimbursementUser:del')" type="text"  icon="el-icon-delete" size="small" @click="del(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>
+    <!-- 弹窗, 新增 / 修改 -->
+    <reimbursementUserForm ref="reimbursementUserForm" @refreshDataList="refreshList"></reimbursementUserForm>
+  </div>
+
+
+</template>
+<script>
+import SelectUserTree from '@/views/modules/reimbursementSys/utils/treeReimbursementBuinessUserSelect.vue'
+import ReimbursementUser from '@/api/reimbursementSys/assess/user/reimbursementUserService'
+import reimbursementUserForm from './reimbursementUserForm'
+export default {
+  data () {
+    return {
+      dataList: [],
+      searchForm: {
+        year: '',
+        userId: ''
+      },
+      tablePage: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+        orders: [{column: 'a.create_date', asc: false}]
+      },
+      loading: false
+    }
+  },
+  components: {
+    SelectUserTree,
+    reimbursementUserForm
+  },
+  ReimbursementUser: null,
+  created () {
+    this.reimbursementUser = new ReimbursementUser()
+  },
+  activated () {
+    this.refreshList()
+  },
+  methods: {
+    // 获取数据列表
+    refreshList () {
+      this.loading = true
+      this.reimbursementUser.findList({
+        '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()
+    },
+    resetSearch () {
+      this.$refs.searchForm.resetFields()
+      this.$nextTick(() => {
+        this.refreshList()
+      })
+    },
+    // 排序
+    sortChangeHandle (column) {
+      this.tablePage.orders = []
+      if (column.order != null) {
+        this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+      }
+      this.refreshList()
+    },
+    // 自定义服务端导入
+    importMethod ({ file }) {
+      // 处理表单
+      const formBody = new FormData()
+      formBody.append('file', file)
+      this.reimbursementUser.importExcel(formBody).then(result => {
+        this.$message.success(result.data)
+        this.refreshList()
+      })
+    },
+    // 下载模板
+    downloadTpl () {
+      this.reimbursementUser.exportTemplate().then((res) => {
+        // 将二进制流文件写入excel表,以下为重要步骤
+        this.$utils.downloadExcel(res.data, '报销人员导入模板')
+      }).catch(function (err) {
+        if (err.response) {
+          console.log(err.response)
+        }
+      })
+    },
+    // 新增
+    add () {
+      this.$refs.reimbursementUserForm.init('add', {id: '', parent: {id: '', name: ''}})
+    },
+    // 修改
+    edit (id) {
+      this.$refs.reimbursementUserForm.init('edit', id)
+    },
+    // 查看
+    view (id) {
+      this.$refs.reimbursementUserForm.init('view', id)
+    },
+    // 查看业务报销详情
+    viewBusinessInfo (id) {
+      this.$router.push({path: `/reimbursementSys/assess/user/reimbursementUserBusinessList`, query: {userId: id, title: '报销详情'}})
+    },
+    // 删除
+    del (id) {
+      let ids = id || this.$refs.reimbursementUserTable.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementUser.delete(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+        this.refreshList()
+      })
+    },
+    // 初始化按钮
+    initialize () {
+      this.$confirm(`确定初始化人员信息吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementUser.initialize().then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+        this.refreshList()
+      })
+    }
+  }
+
+}
+</script>

+ 3 - 0
src/views/modules/reimbursementSys/project/reimbursementList.vue

@@ -406,6 +406,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -428,6 +429,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -450,6 +452,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     selectBatchReimbursement (invoices) {

+ 2 - 0
src/views/modules/reimbursementSys/project/user/reimbursementUserList.vue

@@ -233,6 +233,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 初始化按钮
@@ -252,6 +253,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     }
   }

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

@@ -390,6 +390,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -412,6 +413,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 删除
@@ -434,6 +436,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     }
   }

+ 2 - 0
src/views/modules/reimbursementSys/user/reimbursementUserList.vue

@@ -255,6 +255,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     },
     // 初始化按钮
@@ -274,6 +275,7 @@ export default {
           })
           this.refreshList()
         })
+        this.refreshList()
       })
     }
   }