Prechádzať zdrojové kódy

兴光会计报销代码

user5 3 rokov pred
rodič
commit
ac44451ec7
17 zmenil súbory, kde vykonal 2968 pridanie a 2 odobranie
  1. 58 0
      src/api/reimbursementSys/accountant/reimbursementBusinessService.js
  2. 109 0
      src/api/reimbursementSys/accountant/reimbursementSysService.js
  3. 66 0
      src/api/reimbursementSys/accountant/user/reimbursementUserService.js
  4. 304 0
      src/views/modules/reimbursementSys/accountant/reimbursementBusinessForm.vue
  5. 110 0
      src/views/modules/reimbursementSys/accountant/reimbursementBusinessList.vue
  6. 101 0
      src/views/modules/reimbursementSys/accountant/reimbursementForm.vue
  7. 92 0
      src/views/modules/reimbursementSys/accountant/reimbursementGatheringTimeForm.vue
  8. 184 0
      src/views/modules/reimbursementSys/accountant/reimbursementInvoiceForm.vue
  9. 185 0
      src/views/modules/reimbursementSys/accountant/reimbursementInvoiceModify.vue
  10. 383 0
      src/views/modules/reimbursementSys/accountant/reimbursementList.vue
  11. 129 0
      src/views/modules/reimbursementSys/accountant/reimbursementRatioForm.vue
  12. 383 0
      src/views/modules/reimbursementSys/accountant/reimbursementSelectDialog.vue
  13. 291 0
      src/views/modules/reimbursementSys/accountant/treeReimbursementBuinessUserSelect.vue
  14. 128 0
      src/views/modules/reimbursementSys/accountant/user/reimbursementUserBusinessList.vue
  15. 197 0
      src/views/modules/reimbursementSys/accountant/user/reimbursementUserForm.vue
  16. 238 0
      src/views/modules/reimbursementSys/accountant/user/reimbursementUserList.vue
  17. 10 2
      src/views/modules/reimbursementSys/reimbursementList.vue

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

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

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

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

+ 66 - 0
src/api/reimbursementSys/accountant/user/reimbursementUserService.js

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

+ 304 - 0
src/views/modules/reimbursementSys/accountant/reimbursementBusinessForm.vue

@@ -0,0 +1,304 @@
+<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/treeUserData?type=2`"
+              :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">
+          <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-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/accountant/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: '' // 报销天数
+
+        }
+      }
+    },
+    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) {
+          this.inputForm.reimbursementAmount = (str * reimbursementQuotaDayNumber).toString()
+        }
+        return str
+      },
+      checkReimbursementAmount: function (num) {
+        console.log(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
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+            }
+          } else {
+            this.inputForm.year = ''
+            this.inputForm.reimbursementQuotaDay = ''
+            this.inputForm.reimbursementQuota = ''
+            this.inputForm.remainReimbursementAmount = ''
+          }
+        })
+      },
+      selectReimbursementType (reimbursementType) {
+        console.log(11111)
+        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>

+ 110 - 0
src/views/modules/reimbursementSys/accountant/reimbursementBusinessList.vue

@@ -0,0 +1,110 @@
+<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>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import ReimbursementBusiness from '@/api/reimbursementSys/accountant/reimbursementBusinessService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        loading: false,
+        previewVisible: false,
+        isIndeterminate: false,
+        inputForm: {
+          id: '',
+          dataSource: {
+            id: ''
+          },
+          name: '',
+          sqlCmd: ''
+        },
+        columnForm: {
+          reimbursementQuota: '',  // 报销额度
+          alreadyReimbursementAmount: '',  // 已报销额度
+          surplusReimbursementAmount: '',  // 剩余报销额度
+          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/accountant/reimbursementList')
+      }
+    }
+  }
+</script>

+ 101 - 0
src/views/modules/reimbursementSys/accountant/reimbursementForm.vue

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

+ 92 - 0
src/views/modules/reimbursementSys/accountant/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/accountant/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/accountant/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/accountant/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/accountant/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/accountant/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>

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

@@ -0,0 +1,383 @@
+<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="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>
+    <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}/accountant/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('accountant: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('accountant: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="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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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('accountant: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/accountant/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: [],
+      searchForm: {
+        businessFlag: '',
+        businessCode: '',
+        invoiceNumber: '',
+        proposer: '',
+        partner: '',
+        reimbursementRatio: ''
+      },
+      tablePage: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+        orders: [{column: 'a.create_date', asc: false}]
+      },
+      loading: false
+    }
+  },
+  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/accountant/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()
+        })
+      })
+    },
+    // 删除
+    delInvoice (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementSys.deleteInvoice(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+      })
+    },
+    // 删除
+    del (id) {
+      let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
+        return item.id
+      }).join(',')
+      this.$confirm(`确定删除该记录吗?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true
+        this.reimbursementSys.delete(ids).then(({data}) => {
+          this.loading = false
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.refreshList()
+        })
+      })
+    },
+    selectBatchReimbursement (invoices) {
+      console.log(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/accountant/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/accountant/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/accountant/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: '/accountant/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/accountant/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>

+ 128 - 0
src/views/modules/reimbursementSys/accountant/user/reimbursementUserBusinessList.vue

@@ -0,0 +1,128 @@
+<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="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-col :span="6" 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="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>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import ReimbursementUser from '@/api/reimbursementSys/accountant/user/reimbursementUserService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        count: '10',
+        loading: false,
+        previewVisible: false,
+        isIndeterminate: false,
+        inputForm: {
+          id: '',
+          dataSource: {
+            id: ''
+          },
+          name: '',
+          sqlCmd: ''
+        },
+        columnForm: {
+          reimbursementQuotaDay: '',  // 日报销额度
+          reimbursementDay: '',  // 报销天数
+          alreadyReimbursementDay: '',  // 已报销天数
+          surplusReimbursementDay: '',  // 剩余报销天数
+          reimbursementQuota: '',  // 报销额度
+          alreadyReimbursementAmount: '',  // 已报销额度
+          surplusReimbursementAmount: '',  // 剩余报销额度
+          columnList: []
+        }
+      }
+    },
+    reimbursementUser: null,
+    created () {
+      this.reimbursementUser = new ReimbursementUser()
+    },
+    activated () {
+      this.$refs['inputForm'].resetFields()
+      this.columnForm.columnList = []
+      this.inputForm.id = this.$route.query.id
+      if (this.inputForm.id) {
+        this.reimbursementUser.findListByUserId(this.inputForm.id).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: {
+      goBack () {
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        this.$router.push('/reimbursementSys/accountant/user/reimbursementUserList')
+      }
+    }
+  }
+</script>

+ 197 - 0
src/views/modules/reimbursementSys/accountant/user/reimbursementUserForm.vue

@@ -0,0 +1,197 @@
+<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/treeUserData?type=2`"
+              :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"
+              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 '@/components/treeSelect/treeUserSelect.vue'
+  import ReimbursementUser from '@/api/reimbursementSys/accountant/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>

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

@@ -0,0 +1,238 @@
+<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/treeUserData?type=2`"
+          :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('accountant:reimbursementUser:add')" type="primary" icon="el-icon-plus" size="small" @click="add()">新增</el-button>
+            <el-button v-if="hasPermission('accountant: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('sys:user:import')"  type="default" @click="downloadTpl()" size="small">下载模板</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('accountant:reimbursementUser:edit')" @click="view(scope.row.id)">{{scope.row.user.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('accountant: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="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('accountant:reimbursementUser:view')" type="text" icon="el-icon-view" size="small" @click="viewBusinessInfo(scope.row.id)">报销详情</el-button>
+              <el-button v-if="hasPermission('accountant:reimbursementUser:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('accountant: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 '@/components/treeSelect/treeUserSelect.vue'
+import ReimbursementUser from '@/api/reimbursementSys/accountant/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)
+      })
+    },
+    // 下载模板
+    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/accountant/user/reimbursementUserBusinessList`, query: {id: 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()
+      })
+    }
+  }
+
+}
+</script>

+ 10 - 2
src/views/modules/reimbursementSys/reimbursementList.vue

@@ -86,8 +86,16 @@
               <el-tag type="success" v-if="scope.row.reimbursementStatus === '1'"> 已完成</el-tag>
             </template>
           </vxe-column>
-          <vxe-column  width="100px" title="可报金额" field="canReimbursementAmount" align="center"></vxe-column>
-          <vxe-column  width="100px" title="已报金额" field="allAlreadyReimbursementQuota" align="center"></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>