1
0

2 Ревизии a97f19f3f5 ... 47d88d06da

Автор SHA1 Съобщение Дата
  chenyuesheng 47d88d06da Merge remote-tracking branch 'origin/master' преди 2 години
  chenyuesheng e4503cf411 无票报销 преди 2 години

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

@@ -0,0 +1,58 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementBusinessTwoService {
+  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/reimbursementBusinessTwo/addData`,
+      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
+    })
+  }
+}

+ 137 - 0
src/api/reimbursementSys/accountant/reimbursementIsNoTicketService.js

@@ -0,0 +1,137 @@
+import request from '@/utils/httpRequest'
+
+export default class reimbursementIsNoTicketService {
+  findList (params) {
+    return request({
+      url: '/accountant/reimbursementBusinessTwo/findListPage',
+      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
+    })
+  }
+  getBusinessById (id) {
+    return request({
+      url: `/accountant/reimbursementBusiness/getBusinessById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  queryById (id) {
+    return request({
+      url: `/accountant/reimbursementUser/queryById`,
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  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/reimbursementBusinessTwo/delById/' + ids,
+      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
+      }
+    })
+  }
+
+  findSelectList () {
+    return request({
+      url: '/accountant/reimbursementBusinessTwo/findSelectList',
+      method: 'post'
+    })
+  }
+
+  modifyBindCode (params) {
+    return request({
+      url: '/accountant/reimbursementBusinessTwo/modifyBindCode',
+      method: 'post',
+      params: params
+    })
+  }
+}

+ 312 - 0
src/views/modules/reimbursementSys/accountant/reimbursementIsNoTicketForm.vue

@@ -0,0 +1,312 @@
+<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" v-if="this.show">
+          <el-form-item label="剩余报销天数" prop="surplusReimbursementDay" :rules="[{ max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.surplusReimbursementDay" class="bg-grey" size="small" placeholder="剩余报销天数" style="width: 100%;" :disabled="true"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="报销金额" prop="reimbursementAmount":rules="[{required: true, max: 10, message:'报销金额不可为空', max: 10,trigger:'blur'}]">
+            <el-input id="reimbursementAmount" v-model="inputForm.reimbursementAmount" class="bg-grey" size="small" placeholder="报销金额" style="width: 100%;" v-bind:disabled="this.show" @keyup.native="inputForm.reimbursementAmount = checkReimbursementAmount(inputForm.reimbursementAmount)">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12" v-if="this.show">
+          <el-form-item label="日报销额度" prop="reimbursementQuotaDay":rules="[{max: 10,trigger:'blur'}]">
+            <el-input  v-model="inputForm.reimbursementQuotaDay" class="bg-grey" size="small" placeholder="日报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="年报销额度" prop="reimbursementQuota":rules="[{max: 10,trigger:'blur'}]">
+            <el-input v-model="inputForm.reimbursementQuota" class="bg-grey" size="small" placeholder="年报销额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="剩余可报额度" prop="remainReimbursementAmount" :rules="[{max: 10, trigger:'blur'}]">
+            <el-input v-model="inputForm.remainReimbursementAmount" class="bg-grey" size="small" placeholder="剩余可报额度" style="width: 100%;" :disabled="true">
+                </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks" :rules="[{max: 255, trigger:'blur'}]">
+            <el-input type="textarea" v-model="inputForm.remarks" oninput="if(value.length>255)value=value.slice(0,254)" placeholder="备注" > </el-input>
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import SelectUserTree from './treeReimbursementBuinessUserSelect'
+  import ReimbursementBusiness from '@/api/reimbursementSys/accountant/reimbursementBusinessTwoService'
+  export default {
+    data () {
+      return {
+        show: false,
+        visible: false,
+        loading: false,
+        title: '',
+        method: '',
+        yearList: [],
+        inputForm: {
+          id: '',
+          userId: '', // 人员id
+          year: '', // 年份
+          reimbursementType: '', // 报销类型
+          reimbursementQuota: '', // 年报销额度
+          reimbursementAmount: '', // 报销金额
+          reimbursementQuotaDay: '', // 日报销额度
+          canReimbursementAmount: '', // 业务可报销额度
+          surplusReimbursementAmount: '', // 业务剩余可报销额度
+          reimbursementDay: '', // 报销天数
+          surplusReimbursementDay: '', // 剩余报销天数
+          oldSurplusReimbursementDay: '', // 剩余报销天数(比较数据)
+          remarks: '' // 备注
+
+        }
+      }
+    },
+    ReimbursementBusiness: null,
+    created () {
+      this.reimbursementBusiness = new ReimbursementBusiness()
+    },
+    mounted () {
+    },
+    components: {
+      SelectUserTree
+    },
+    provide () {
+      return {
+        say: this.say
+      }
+    },
+    methods: {
+      checkInputs: function (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^]+/g, '') // 保留数字
+        // 获取日报销额度
+        let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+        if (reimbursementQuotaDayNumber) {
+          var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+          this.inputForm.reimbursementAmount = (str * reimbursementQuotaDayNumber).toString()
+          this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - str).toString()
+        }
+        return str
+      },
+      checkReimbursementAmount: function (num) {
+        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
+            this.inputForm.surplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+            this.inputForm.oldSurplusReimbursementDay = this.yearList[0].surplusReimbursementDay
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              var oldSurplusReimbursementDay = this.inputForm.oldSurplusReimbursementDay
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+              this.inputForm.surplusReimbursementDay = (oldSurplusReimbursementDay - reimbursementDayNumber).toString()
+            }
+          } else {
+            this.inputForm.year = ''
+            this.inputForm.reimbursementQuotaDay = ''
+            this.inputForm.reimbursementQuota = ''
+            this.inputForm.remainReimbursementAmount = ''
+            this.inputForm.surplusReimbursementDay = ''
+            this.inputForm.oldSurplusReimbursementDay = ''
+          }
+        })
+      },
+      selectReimbursementType (reimbursementType) {
+        if (reimbursementType === '1') {
+          // reimbursementAmount.isdisabled = true
+          this.show = true
+        } else {
+          this.show = false
+        }
+      },
+      selectYear (year) {
+        for (var yearKey in this.yearList) {
+          if (this.yearList[yearKey].year === year) {
+            this.inputForm.reimbursementQuotaDay = this.yearList[yearKey].reimbursementQuotaDay
+            this.inputForm.reimbursementQuota = this.yearList[yearKey].reimbursementQuota
+            this.inputForm.remainReimbursementAmount = this.yearList[yearKey].remainReimbursementAmount
+
+            // 获取日报销额度
+            let reimbursementQuotaDayNumber = this.inputForm.reimbursementQuotaDay
+            let reimbursementDayNumber = this.inputForm.reimbursementDay
+            if (reimbursementQuotaDayNumber && reimbursementDayNumber) {
+              this.inputForm.reimbursementAmount = (reimbursementDayNumber * reimbursementQuotaDayNumber).toString()
+            }
+          }
+        }
+      },
+      init (method, obj) {
+        this.method = method
+        this.inputForm.businessCodeId = obj.businessCodeId
+        this.inputForm.businessCode = obj.businessCode
+        if (method === 'addBusinessInfo') {
+          this.title = `新建报销信息`
+        } else if (method === 'edit') {
+          this.title = '修改人员信息'
+        } else if (method === 'view') {
+          this.title = '查看人员信息'
+        }
+        this.visible = true
+        this.$nextTick(() => {
+          this.inputForm.id = obj.id
+          this.$refs['inputForm'].resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.inputForm.id = obj
+            this.loading = true
+            this.reimbursementBusiness.queryById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+          if (method === 'addBusinessInfo') { // 修改或者查看
+            this.inputForm.businessCodeId = obj.businessCodeId
+            this.loading = true
+            this.reimbursementBusiness.getBusinessById(this.inputForm.businessCodeId).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.selectReimbursementType(this.inputForm.reimbursementType)
+              this.loading = false
+            })
+          }
+        })
+      },
+
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementBusiness.save(this.inputForm).then(({data}) => {
+              this.loading = false
+              this.visible = false
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      }
+    }
+  }
+</script>

+ 273 - 0
src/views/modules/reimbursementSys/accountant/reimbursementIsNoTicketList.vue

@@ -0,0 +1,273 @@
+<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('sys:role:assign')" type="primary" size="small" icon="el-icon-plus"
+                       @click="addBusinessInfo()">新增
+            </el-button>
+            <el-button v-if="hasPermission('reimbursementUser:del')" type="danger" size="small" icon="el-icon-delete"
+                       @click="openDialog($refs.reimbursementUserTable.getCheckboxRecords())"
+                       :disabled="$refs.reimbursementUserTable && $refs.reimbursementUserTable.getCheckboxRecords().length === 0"
+                       plain>批量绑定
+            </el-button>
+          </el-row>
+        </template>
+      </vxe-toolbar>
+
+      <div style="height: calc(100% - 80px);">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="reimbursementUserTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :export-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column width="172px" title="报销人" field="userName" align="center" visible></vxe-column>
+          <vxe-column width="172px" title="报销年份" field="year" align="center"></vxe-column>
+          <vxe-column width="172px" title="报销类型" field="reimbursementType" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.reimbursementType === '1'"> 正常报销</el-tag>
+              <el-tag v-if="scope.row.reimbursementType === '2'"> 补差</el-tag>
+            </template>
+          </vxe-column>
+          <vxe-column width="172px" title="报销天数" field="reimbursementDay" align="center"></vxe-column>
+          <vxe-column width="172px" title="报销额度" field="reimbursementAmount" align="center"></vxe-column>
+          <vxe-column title="操作" width="300px" fixed="right" align="center">
+            <template slot-scope="scope">
+              <el-button v-if="hasPermission('accountant:reimbursement:edit') && scope.row.parentId !== '0'" type="text"
+                         icon="el-icon-plus" size="small" @click="openDialog(scope.row)">绑定业务编号
+              </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>
+      </div>
+    </div>
+    <!-- 弹窗, 新增 / 修改 -->
+    <reimbursementForm ref="reimbursementForm" @refreshDataList="refreshList"></reimbursementForm>
+    <reimbursementGatheringTimeForm ref="reimbursementGatheringTimeForm"
+                                    @refreshDataList="refreshList"></reimbursementGatheringTimeForm>
+    <reimbursementRatioForm ref="reimbursementRatioForm" @refreshDataList="refreshList"></reimbursementRatioForm>
+    <reimbursementBusinessForm ref="reimbursementBusinessForm"
+                               @refreshDataList="refreshList"></reimbursementBusinessForm>
+    <reimbursementInvoiceForm ref="reimbursementInvoiceForm" @refreshDataList="refreshList"></reimbursementInvoiceForm>
+
+
+    <el-dialog
+      title="选择绑定业务编号"
+      :visible.sync="dialogVisible"
+      width="30%">
+      <el-select v-model="selectedCode" placeholder="请选择">
+        <el-option
+          v-for="item in selectCode"
+          :key="item.id"
+          :label="item.businessCode"
+          :value="item.id">
+        </el-option>
+      </el-select>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="closeDialog">取 消</el-button>
+    <el-button type="primary" @click="bindBusinessCode">确 定</el-button>
+  </span>
+    </el-dialog>
+
+  </div>
+
+
+</template>
+<script>
+  import ReimbursementSys from '@/api/reimbursementSys/accountant/reimbursementIsNoTicketService'
+  import SelectUserTree from '@/components/treeSelect/treeUserSelect.vue'
+  import reimbursementForm from './reimbursementForm'
+  import reimbursementGatheringTimeForm from './reimbursementGatheringTimeForm'
+  import reimbursementRatioForm from './reimbursementRatioForm'
+  import reimbursementInvoiceForm from './reimbursementInvoiceForm'
+  import reimbursementBusinessForm from './reimbursementIsNoTicketForm'
+  import reimbursementSelect from './reimbursementSelectDialog'
+
+  export default {
+    data () {
+      return {
+        dataList: [],
+        searchForm: {
+          year: '',
+          userId: ''
+        },
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: [{column: 'a.create_date', asc: false}]
+        },
+        loading: false,
+        dialogVisible: false,
+        bindObj: [],
+        selectCode: [],
+        selectedCode: ''
+      }
+    },
+    components: {
+      reimbursementForm,
+      reimbursementGatheringTimeForm,
+      reimbursementRatioForm,
+      reimbursementInvoiceForm,
+      reimbursementBusinessForm,
+      reimbursementSelect,
+      SelectUserTree
+    },
+    ReimbursementSys: null,
+    created () {
+      this.reimbursementSys = new ReimbursementSys()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementSys.findList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.$nextTick(() => {
+          this.refreshList()
+        })
+      },
+      // 修改发票信息
+      modifyInvoice (id) {
+        this.$refs.reimbursementInvoiceModify.init('modifyInvoice', {id: id, parent: {id: '', name: ''}})
+      },
+      // 删除
+      delInvoice (id) {
+        let ids = id || this.$refs.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()
+          })
+        })
+      },
+      addBusinessInfo (id, businessCode) {
+        this.$refs.reimbursementBusinessForm.init('addBusinessInfo', {
+          id: '',
+          businessCodeId: '',
+          businessCode: '',
+          parent: {id: '', name: ''}
+        })
+      },
+      bindBusinessCode () {
+        if (this.selectedCode === '') {
+          this.$message('请选择绑定编号')
+          return
+        }
+        this.reimbursementSys.modifyBindCode({'ids': this.bindObj, 'businessCode': this.selectedCode}).then(({data}) => {
+          this.closeDialog()
+        })
+      },
+      openDialog (obj) {
+        // eslint-disable-next-line eqeqeq
+        this.bindObj = obj.id || obj.map(item => {
+          return item.id
+        }).join(',')
+        this.dialogVisible = true
+        this.reimbursementSys.findSelectList().then(({data}) => {
+          this.selectCode = data
+        })
+      },
+      closeDialog () {
+        this.dialogVisible = false
+        this.selectedCode = ''
+        this.refreshList()
+        this.bindObj = []
+      }
+    }
+
+  }
+</script>