浏览代码

代码提交:
0930项目登记

sunruiqi 2 年之前
父节点
当前提交
31f746b9f3

+ 8 - 0
src/api/program/ProgramProjectListInfoService.js

@@ -8,6 +8,14 @@ export default class ProgramProjectListInfoService {
       params: params
     })
   }
+  exportFile (params) {
+    return request({
+      url: '/program/projectList/exportFile',
+      method: 'get',
+      params: params,
+      responseType: 'blob'
+    })
+  }
   queryById (id) {
     return request({
       url: '/program/projectList/findById',

+ 32 - 0
src/api/sys/ReimbursementTypeService.js

@@ -0,0 +1,32 @@
+import request from '@/utils/httpRequest'
+
+export default class ReimbursementTypeService {
+  list (param) {
+    return request({
+      url: '/reimbursement/type/list',
+      method: 'get',
+      params: param
+    })
+  }
+  save (param) {
+    return request({
+      url: '/reimbursement/type/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: '/reimbursement/type/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  remove (id) {
+    return request({
+      url: '/reimbursement/type/deleteById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 4 - 0
src/views/modules/program/registered/ContractForm.vue

@@ -15,6 +15,9 @@
           <el-form-item label="合同名称" prop="name">
             <el-input size="small" v-model="searchForm.name" placeholder="请输入合同名称" clearable></el-input>
           </el-form-item>
+          <el-form-item label="委派人" prop="clientName">
+            <el-input size="small" v-model="searchForm.clientName" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
           <el-form-item label="创建人" prop="createBy">
             <SelectUserTree
               ref="companyTree"
@@ -58,6 +61,7 @@
 
           <vxe-column width="200px" title="合同编号" field="no"></vxe-column>
           <vxe-column  title="合同名称" field="name"></vxe-column>
+          <vxe-column width="150px" title="委派人" field="clientName"></vxe-column>
           <vxe-column width="150px" title="合同类型" field="name"></vxe-column>
           <vxe-column width="150px" title="创建时间" field="createDate"></vxe-column>
           <vxe-column width="100px" title="创建人" field="createBy"></vxe-column>

+ 55 - 9
src/views/modules/program/registered/ProjectForm.vue

@@ -78,7 +78,7 @@
                           :rules="[
                           {required: true, message:'项目名称不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -113,6 +113,14 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="立项号" prop="approvalNo"
+                          :rules="[
+                          {required: true, message:'立项号不能为空', trigger:'blur'}
+                 ]">
+              <el-input maxlength="64" max v-model="inputForm.approvalNo" placeholder="请输入立项号"clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="执业机构" prop="company"
                           :rules="[
                  ]">
@@ -134,7 +142,18 @@
                           :rules="[
                           {required: true, message:'项目所在地不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.location" placeholder="请输入项目所在地"clearable></el-input>
+              <SelectTree
+                ref="areaTree"
+                :props="{
+                      value: 'id',             // ID字段名
+                      label: 'name',         // 显示名称
+                      children: 'children'    // 子级字段名
+                    }"
+                url="/sys/area/treeData"
+                :value="inputForm.location"
+                :clearable="true"
+                :accordion="true"
+                @getValue="(value) => {inputForm.location=value}"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -218,14 +237,14 @@
             <el-form-item label="所属行业" prop="industry"
                           :rules="[
                  ]">
-              <el-input v-model="inputForm.industry" placeholder="请输入所属行业"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.industry" placeholder="请输入所属行业"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="企业类型" prop="enterpriseType"
                           :rules="[
                  ]">
-              <el-input v-model="inputForm.enterpriseType" placeholder="请输入企业类型"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.enterpriseType" placeholder="请输入企业类型"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -261,6 +280,7 @@
                 v-model="inputForm.estimate"
                 controls-position="right"
                 style="width:100%;"
+                maxlength="15"
                 :precision="2"
                 placeholder="请输入预估收入(元)"
                 :controls="false"
@@ -293,6 +313,7 @@
                 v-model="inputForm.useNum"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="0"
                 :min="0"
                 placeholder="请输入计划使用人数"
@@ -309,6 +330,7 @@
                 v-model="inputForm.appointment"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="0"
                 :min="0"
                 placeholder="请输入约定书(份)"
@@ -325,6 +347,7 @@
                 v-model="inputForm.workHours"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="1"
                 :step="0.1"
                 :min="0"
@@ -358,7 +381,7 @@
                           :rules="[
                           {required: true, message:'联系人及电话不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.linkNum" placeholder="请输入联系人及电话"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.linkNum" placeholder="请输入联系人及电话"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -421,7 +444,19 @@
                           :rules="[
                           {required: true, message:'项目开发人不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.projectDevelopment" placeholder="请输入项目开发人"clearable></el-input>
+              <SelectUserTree
+                ref="companyTree"
+                size="medium"
+                :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+                :url="`/sys/user/treeUserDataAllOffice?type=2`"
+                :value="inputForm.projectDevelopment"
+                :clearable="true"
+                :accordion="true"
+                @getValue="(value) => {inputForm.projectDevelopment=value}"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -449,7 +484,14 @@
                           :rules="[
                           {required: true, message:'评估对象不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.assessmentObject" placeholder="请输入评估对象"clearable></el-input>
+              <el-select v-model="inputForm.assessmentObject" placeholder="请输入评估对象" clearable style="width: 100%;">
+                <el-option
+                  v-for="item in $dictUtils.getDictList('project_assessment_object')"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -511,7 +553,8 @@
                           :rules="[
                           {required: true, message:'项目承做方式不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.mode" placeholder="请输入项目承做方式"clearable></el-input>
+              <el-radio v-model="inputForm.mode" v-for="item in $dictUtils.getDictList('project_commitment_mode')" :label="item.value" size="small" style="margin-right: 0px;width: 48%" border>
+                {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
 
@@ -763,6 +806,7 @@
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import XEUtils from 'xe-utils'
   export default {
     data () {
@@ -784,6 +828,7 @@
           projectMould: '', // 项目类型
           name: '', // 项目名称
           projectType: '', // 项目类型
+          approvalNo: '', // 立项号
           company: '', // 执业机构
           propertyHolder: '', // 产权持有人id
           propertyHolderName: '', // 产权持有人姓名
@@ -845,7 +890,8 @@
       SelectUserTree,
       UpLoadComponent,
       WorkClientForm,
-      ContactForm
+      ContactForm,
+      SelectTree
     },
     methods: {
       init (method, id) {

+ 46 - 14
src/views/modules/program/registered/ProjectList.vue

@@ -22,14 +22,14 @@
           :accordion="true"
           @getValue="(value) => {searchForm.createBy=value}"/>
       </el-form-item>
-      <el-form-item label="项目经理" prop="projectManager">
-        <el-input size="small" v-model="searchForm.projectManager" placeholder="请输入项目经理" clearable></el-input>
+      <el-form-item label="项目经理" prop="projectManagerName">
+        <el-input size="small" v-model="searchForm.projectManagerName" placeholder="请输入项目经理" clearable></el-input>
       </el-form-item>
       <el-form-item label="合同名称" prop="contractName">
         <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
       </el-form-item>
-      <el-form-item label="委托方" prop="client">
-        <el-input size="small" v-model="searchForm.client" placeholder="请输入委托方" clearable></el-input>
+      <el-form-item label="委托方" prop="clientName">
+        <el-input size="small" v-model="searchForm.clientName" placeholder="请输入委托方" clearable></el-input>
       </el-form-item>
       <el-form-item label="创建时间" prop="createDates">
         <el-date-picker
@@ -65,6 +65,7 @@
         <template #buttons>
           <el-button v-if="hasPermission('program:configuration:type:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
           <el-button v-if="hasPermission('program:configuration:type:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.typeDictTable && $refs.typeDictTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+          <el-button v-if="hasPermission('sys:project:exportFile')"  type="warning" plain @click="exportFile()" size="small">导出</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 50px)">
@@ -102,8 +103,8 @@
               <span v-else>{{scope.row.name}}</span>
             </template>
           </vxe-column>
-          <vxe-column width="100" title="项目经理" field="projectManager"></vxe-column>
-          <vxe-column width="180" title="委托方" field="client"></vxe-column>
+          <vxe-column width="100" title="项目经理" field="projectManagerName"></vxe-column>
+          <vxe-column width="180" title="委托方" field="clientName"></vxe-column>
           <vxe-column width="100" title="创建日期" field="createDate"></vxe-column>
           <vxe-column  width="120px" title="状态" field="status" >
             <template slot-scope="scope">
@@ -112,12 +113,14 @@
           </vxe-column>
           <vxe-column title="操作" width="230px" fixed="right" align="center">
             <template  slot-scope="scope">
-<!--              <el-button v-if="hasPermission('program:configuration:type:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>-->
-              <el-button v-if="hasPermission('program:configuration:type:del')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
-              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '1'" type="text"  icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">发起登记审批</el-button>
-              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '3'||scope.row.status === '4'" type="text"  icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">修改登记审批</el-button>
-              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '2'" type="text"  icon="el-icon-delete" size="small" @click="registeredReback(scope.row)">撤回登记审批</el-button>
-
+              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '1'" type="text"  icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">送审</el-button>
+              <el-button v-if="hasPermission('program:configuration:type:edit')&&(scope.row.status === '1' || scope.row.status === '3'||scope.row.status === '4')" type="text"  icon="el-icon-delete" size="small" @click="registeredPush(scope.row)">修改</el-button>
+              <!--管理员角色登记完成后可修改-->
+              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '5' && isAdmin" type="text"  icon="el-icon-delete" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.status === '2'" type="text"  icon="el-icon-delete" size="small" @click="registeredReback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('program:configuration:type:del')&&scope.row.status !== '2' && scope.row.status !== '5'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+              <!--管理员角色登记完成后可删除-->
+              <el-button v-if="hasPermission('program:configuration:type:del')&&scope.row.status === '5' && isAdmin" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -155,7 +158,7 @@
           createBy: '',
           projectManager: '',
           contractName: '',
-          client: '',
+          clientName: '',
           createDates: [],
           status: ''
         },
@@ -168,7 +171,8 @@
         },
         loading: false,
         processDefinitionAuditId: '',
-        procDefAuditKey: ''
+        procDefAuditKey: '',
+        isAdmin: false
       }
     },
     programProjectListInfoService: null,
@@ -188,11 +192,17 @@
       this.refreshList()
     },
     activated () {
+      this.is()
       this.refreshList()
     },
     computed: {
       userName () {
         return JSON.parse(localStorage.getItem('user')).name
+      },
+      user () {
+        this.create = JSON.parse(localStorage.getItem('user')).id
+        console.log('createId', this.create)
+        return JSON.parse(localStorage.getItem('user'))
       }
     },
     methods: {
@@ -359,6 +369,28 @@
             this.refreshList()
           })
         })
+      },
+      is () {
+        this.userService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      // 下载文档
+      exportFile () {
+        this.loading = true
+        this.programProjectListInfoService.exportFile({
+          'itemType': '1',
+          ...this.searchForm
+        }).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res.data, '项目登记列表信息')
+          this.loading = false
+        }).catch(function (err) {
+          this.loading = false
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
       }
     }
   }

+ 58 - 9
src/views/modules/program/registered/RegisItemForm.vue

@@ -70,7 +70,7 @@
                           :rules="[
                           {required: true, message:'项目名称不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入项目名称" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -105,6 +105,14 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="立项号" prop="approvalNo"
+                          :rules="[
+                          {required: true, message:'立项号不能为空', trigger:'blur'}
+                 ]">
+              <el-input maxlength="64" max v-model="inputForm.approvalNo" placeholder="请输入立项号"clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="执业机构" prop="company"
                           :rules="[
                  ]">
@@ -126,7 +134,18 @@
                           :rules="[
                           {required: true, message:'项目所在地不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.location" placeholder="请输入项目所在地"clearable></el-input>
+              <SelectTree
+                ref="areaTree"
+                :props="{
+                      value: 'id',             // ID字段名
+                      label: 'name',         // 显示名称
+                      children: 'children'    // 子级字段名
+                    }"
+                url="/sys/area/treeData"
+                :value="inputForm.location"
+                :clearable="true"
+                :accordion="true"
+                @getValue="(value) => {inputForm.location=value}"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -210,14 +229,14 @@
             <el-form-item label="所属行业" prop="industry"
                           :rules="[
                  ]">
-              <el-input v-model="inputForm.industry" placeholder="请输入所属行业"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.industry" placeholder="请输入所属行业"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="企业类型" prop="enterpriseType"
                           :rules="[
                  ]">
-              <el-input v-model="inputForm.enterpriseType" placeholder="请输入企业类型"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.enterpriseType" placeholder="请输入企业类型"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -253,6 +272,7 @@
                 v-model="inputForm.estimate"
                 controls-position="right"
                 style="width:100%;"
+                maxlength="15"
                 :precision="2"
                 placeholder="请输入预估收入(元)"
                 :controls="false"
@@ -285,6 +305,7 @@
                 v-model="inputForm.useNum"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="0"
                 :min="0"
                 placeholder="请输入计划使用人数"
@@ -301,6 +322,7 @@
                 v-model="inputForm.appointment"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="0"
                 :min="0"
                 placeholder="请输入约定书(份)"
@@ -317,6 +339,7 @@
                 v-model="inputForm.workHours"
                 controls-position="right"
                 style="width:100%"
+                maxlength="15"
                 :precision="1"
                 :step="0.1"
                 :min="0"
@@ -350,7 +373,7 @@
                           :rules="[
                           {required: true, message:'联系人及电话不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.linkNum" placeholder="请输入联系人及电话"clearable></el-input>
+              <el-input maxlength="64" v-model="inputForm.linkNum" placeholder="请输入联系人及电话"clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -413,7 +436,19 @@
                           :rules="[
                           {required: true, message:'项目开发人不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.projectDevelopment" placeholder="请输入项目开发人"clearable></el-input>
+              <SelectUserTree
+                ref="companyTree"
+                size="medium"
+                :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+                :url="`/sys/user/treeUserDataAllOffice?type=2`"
+                :value="inputForm.projectDevelopment"
+                :clearable="true"
+                :accordion="true"
+                @getValue="(value) => {inputForm.projectDevelopment=value}"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -441,7 +476,14 @@
                           :rules="[
                           {required: true, message:'评估对象不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.assessmentObject" placeholder="请输入评估对象"clearable></el-input>
+              <el-select v-model="inputForm.assessmentObject" placeholder="请输入评估对象" clearable style="width: 100%;">
+                <el-option
+                  v-for="item in $dictUtils.getDictList('project_assessment_object')"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -503,7 +545,8 @@
                           :rules="[
                           {required: true, message:'项目承做方式不能为空', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.mode" placeholder="请输入项目承做方式"clearable></el-input>
+              <el-radio v-model="inputForm.mode" v-for="item in $dictUtils.getDictList('project_commitment_mode')" :label="item.value" size="small" style="margin-right: 0px;width: 48%" border>
+                {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
 
@@ -750,6 +793,7 @@
   import UpLoadComponent from '@/views/common/UpLoadComponent'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import XEUtils from 'xe-utils'
   export default {
     props: {
@@ -780,6 +824,7 @@
           projectMould: '', // 项目类型
           name: '', // 项目名称
           projectType: '', // 项目类型
+          approvalNo: '', // 立项号
           company: '', // 执业机构
           propertyHolder: '', // 产权持有人id
           propertyHolderName: '', // 产权持有人姓名
@@ -788,6 +833,7 @@
           yearNum: '', // 承做年数
           checkYear: '', // 评估费用核算年度
           projectManager: '', // 项目经理
+          projectManagerName: '', // 项目经理名称
           reportType: '', // 报告类型
           industry: '', // 所属行业
           enterpriseType: '', // 企业类型
@@ -860,7 +906,8 @@
       SelectUserTree,
       UpLoadComponent,
       WorkClientForm,
-      ContactForm
+      ContactForm,
+      SelectTree
     },
     methods: {
       init (method, id) {
@@ -887,6 +934,7 @@
           yearNum: '', // 承做年数
           checkYear: '', // 评估费用核算年度
           projectManager: '', // 项目经理
+          projectManagerName: '', // 项目经理名称
           reportType: '', // 报告类型
           industry: '', // 所属行业
           enterpriseType: '', // 企业类型
@@ -1179,6 +1227,7 @@
           yearNum: '', // 承做年数
           checkYear: '', // 评估费用核算年度
           projectManager: '', // 项目经理
+          projectManagerName: '', // 项目经理名称
           reportType: '', // 报告类型
           industry: '', // 所属行业
           enterpriseType: '', // 企业类型

+ 119 - 0
src/views/modules/reimbursement/type/TypeForm.vue

@@ -0,0 +1,119 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="500px"
+      @close="close"
+      @keyup.enter.native="doSubmit"
+      :visible.sync="visible">
+      <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
+               label-width="100px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <el-col :span="21">
+            <el-form-item label="上级节点" prop="parentId">
+              <el-input v-model="inputForm.parentId" placeholder="请选择上级节点"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="报销内容名称" prop="name"
+                          :rules="[
+                          {required: true, message:'报销内容名称不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.name" placeholder="请填写报销内容名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="序号" prop="no">
+              <el-input v-model="inputForm.no" :disabled="true" show-word-limit></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" 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>
+  </div>
+</template>
+
+<script>
+  import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          name: '',
+          no: '',
+          parentId: ''
+        }
+      }
+    },
+    reimbursementTypeService: null,
+    created () {
+      this.reimbursementTypeService = new ReimbursementTypeService()
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          name: '',
+          no: '',
+          parentId: ''
+        }
+        if (method === 'add') {
+          this.title = `新建内容信息`
+          this.inputForm.parentId = '0'
+        } else if (method === 'edit') {
+          this.inputForm.id = id
+          this.title = '修改内容信息'
+        } else if (method === 'view') {
+          this.inputForm.id = id
+          this.title = '查看项目类型'
+        } else if (method === 'addChild') {
+          this.title = '添加下级结构'
+          this.inputForm.parentId = id
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          if (method === 'edit' || method === 'view') { // 修改或者查看
+            this.loading = true
+            this.reimbursementTypeService.findById(this.inputForm.id).then(({data}) => {
+              this.inputForm = this.recover(this.inputForm, data)
+              this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.loading = false
+            })
+          }
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.reimbursementTypeService.save(this.inputForm).then(({data}) => {
+              this.close()
+              this.$message.success(data)
+              this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 143 - 0
src/views/modules/reimbursement/type/TypeList.vue

@@ -0,0 +1,143 @@
+<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 label="报销内容名称" prop="name">
+        <el-input size="small" v-model="searchForm.name" placeholder="请输入报销内容名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="序号" prop="no">
+        <el-input size="small" v-model="searchForm.no" 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" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('program:configuration:type:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('program:configuration:type:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.typeTable && $refs.typeTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 50px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="typeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="40"></vxe-column>
+          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column title="报销内容名称" field="name" align="left" tree-node></vxe-column>
+          <vxe-column width="100" title="序号" field="no"></vxe-column>
+
+          <vxe-column title="操作" width="230px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('reimbursement:type:edit')&&(scope.row.level === '1' || scope.row.level === '2')" type="text" icon="el-icon-plus" size="small" @click="addChild(scope.row.id)">添加下级结构</el-button>
+              <el-button v-if="hasPermission('reimbursement:type:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('reimbursement:type:remove')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+
+      </div>
+    </div>
+    <TypeForm  ref="typeForm" @refreshDataList="refreshList"></TypeForm>
+  </div>
+</template>
+
+<script>
+  import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
+  import TypeForm from './TypeForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          no: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    reimbursementTypeService: null,
+    created () {
+      this.reimbursementTypeService = new ReimbursementTypeService()
+    },
+    components: {
+      TypeForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.typeForm.init('add', '')
+      },
+      addChild (id) {
+        this.$refs.typeForm.init('addChild', id)
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.typeForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.typeForm.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementTypeService.list({...this.searchForm}).then(({data}) => {
+          this.dataList = data
+          this.loading = false
+        })
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.typeTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.reimbursementTypeService.remove(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>