Pārlūkot izejas kodu

签发类型管理、项目登记-签发调整

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
1a72dd305c

+ 39 - 0
src/api/program/ProgramServiceTypeService.js

@@ -0,0 +1,39 @@
+import request from '@/utils/httpRequest'
+
+export default class ProgramServiceTypeService {
+  list (params) {
+    return request({
+      url: '/program/service_type/list',
+      method: 'get',
+      params: params
+    })
+  }
+  queryById (id) {
+    return request({
+      url: '/program/service_type/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  save (inputForm) {
+    return request({
+      url: `/program/service_type/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  delete (ids) {
+    return request({
+      url: '/program/service_type/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+  getList () {
+    return request({
+      url: '/program/service_type/getList',
+      method: 'get',
+      params: {}
+    })
+  }
+}

+ 7 - 0
src/views/modules/cw/projectBusinessType/CwProjectBusinessTypeForm.vue

@@ -106,6 +106,13 @@
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true
+            let numReg = /^[0-9]*$/
+            let numRe = new RegExp(numReg)
+            if (!numRe.test(this.inputForm.sort)) {
+              this.loading = false
+              this.$message.error('排序请输入数字')
+              return
+            }
             this.cwProjectBusinessTypeService.save(this.inputForm).then(({data}) => {
               this.close()
               this.$message.success(data)

+ 1 - 1
src/views/modules/program/registered/ProjectForm.vue

@@ -1125,6 +1125,7 @@
         this.inputForm.contactList = []
         this.inputForm.members = []
         this.$refs.uploadComponent.clearUpload()
+        this.$refs.proofreadIssuedForm.closeThis()
         this.$refs.inputForm.resetFields()
         this.activeName = 'programDetail'
         this.visible = false
@@ -1208,7 +1209,6 @@
         return footerData
       },
       tabHandleClick (event) {
-        console.log(event)
         if (event.name === 'firstAudit') {
           if (this.commonJS.isNotEmpty(this.auditIdfirst)) {
             this.$refs.projectThreeAuditForm.init('view', this.auditIdfirst, '一级校审')

+ 1 - 0
src/views/modules/program/registered/ProofreadBrowseForm.vue

@@ -35,6 +35,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadBrowseFormComponent.vue

@@ -33,6 +33,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadForm.vue

@@ -35,6 +35,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 1 - 0
src/views/modules/program/registered/ProofreadFormComponent.vue

@@ -33,6 +33,7 @@
           <el-col :span="12">
             <el-form-item label="审核日期" prop="processDate">
               <el-date-picker
+                placement="bottom-start"
                 v-model="inputForm.processDate"
                 type="date"
                 :disabled="true"

+ 97 - 76
src/views/modules/program/registered/ProofreadIssuedForm.vue

@@ -6,7 +6,7 @@
       </el-row>
       <el-divider content-position="left"><i class="el-icon-document"></i> 报告签发单</el-divider>
     </div>
-    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+    <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'|| isDisabled === 'view'"
              label-width="150px" @submit.native.prevent>
       <el-row  :gutter="15">
         <el-col :span="24">
@@ -53,65 +53,29 @@
 
        </el-row>
 
-      <el-divider>业务类型</el-divider>
-      <el-divider content-position="left">A类</el-divider>
-      <el-row>
+      <el-divider content-position="left"><span style="font-size: 17px;margin-left: 0px"><b>业务类型</b></span></el-divider>
+      <el-row v-for="(item, index) in typeList">
+      <el-divider content-position="left"><span style="font-size: 17px;margin-left: 10px">{{item.name}}</span></el-divider>
         <vxe-table
-          border
+          border="inner"
           show-overflow
-          ref="details"
+          ref="table"
           class="vxe-table-element"
-          :data="AList"
+          :data="item.childrenList"
           style="margin-left: 5em"
           @cell-click=""
           @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
+          :show-header="false"
+          :row-config="{isHover: true,keyField: 'id'}"
+          @radio-change="radioChangeEvent($event, index)"
+          :radio-config="{trigger: 'row',labelField: 'name'}"
         >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
+          <vxe-column type="radio" align="left"></vxe-column>
+<!--          <vxe-column align="left" field="name"></vxe-column>-->
         </vxe-table>
       </el-row>
 
-      <el-divider content-position="left">B类</el-divider>
-      <el-row>
-        <vxe-table
-          border
-          show-overflow
-          ref="details"
-          class="vxe-table-element"
-          :data="BList"
-          style="margin-left: 5em"
-          @cell-click=""
-          @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
-        >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
-        </vxe-table>
-      </el-row>
-
-      <el-divider content-position="left">C类</el-divider>
-      <el-row>
-        <vxe-table
-          border
-          show-overflow
-          ref="details"
-          class="vxe-table-element"
-          :data="CList"
-          style="margin-left: 5em"
-          @cell-click=""
-          @edit-closed=""
-          highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
-        >
-          <vxe-table-column field="name" title="名称" :edit-render="{}">
-          </vxe-table-column>
-        </vxe-table>
-      </el-row>
-
-      <el-row :gutter="15" style="margin-top: 20px">
+      <el-row :gutter="15" style="margin-top: 40px">
 
         <el-col :span="12">
           <el-form-item label="是否已完善项目信息" prop="isTxtz" :rules="[{required: true, message:'请选择是否已完善项目信息', trigger:'blur'}]">
@@ -198,6 +162,7 @@
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import ProofreadIssuedService from '@/api/sys/ProofreadIssuedService'
   import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
+  import ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
   export default {
     props: {
       businessId: {
@@ -207,6 +172,10 @@
       formReadOnly: {
         type: Boolean,
         default: false
+      },
+      status: {
+        type: String,
+        default: ''
       }
     },
     data () {
@@ -235,47 +204,32 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         },
         keyWatch: '',
         yesOrNo: [
           {value: 0, label: '否'},
           {value: 1, label: '是'}
         ],
-        AList: [
-          {name: '经济行为涉及上市公司及其子公司的资产组合、无形资产、企业价值(包括业务及资产组)评估业务'},
-          {name: '上市公司及其合并报表范围内的下属公司财务报告目的的评估及咨询业务'},
-          {name: '经济行为涉及上市公司及其合并报表范围内的下属公司的除本条第(一)款规定之外的评估业务'},
-          {name: '经济行为涉及非上市证券公司、非上市期货公司、非上市公众公司、拟上市公司及其合并报表范围内的下属公司的评估业务'},
-          {name: '其中:非国有企业改制设立股份公司评估业务'}
-        ],
-        BList: [
-          {name: '除A类业务以外的无形资产评估业务'},
-          {name: '除A类业务以外的资产组合评估业务'},
-          {name: '除A类业务以外的企业价值评估业务'},
-          {name: '除A类业务以外的报务报告目的评估业务'},
-          {name: '除A类业务以外的抵押担保目的评估业务'},
-          {name: '除A类以外的,涉及上市公司、证券公司、期货公司、非上市公众公司、拟上市公司及其下属公司不用于市场交易的复核评估、追溯评估和咨询评估业务'},
-          {name: '除A类以外的涉及国有企业与非国有企业之间的交易行为的评估业务及相关的复核评估、追溯评估和咨询评估业务'},
-          {name: '金融企业(包括银行、保险公司、信托投资公司、基金管理公司、租赁公司等)的评估业务'},
-          {name: '评估经验较少的新领域评估业务'}
-        ],
-        CList: [
-          {name: '除A、B类业务以外的经济行为涉及单项资产的评估业务'},
-          {name: '除A、B类业务以外的不用于市场交易的复核评估、追溯评估和咨询评估业务'}
-        ],
-        tabName: ''
+        typeList: [],
+        tabName: '',
+        chooseTableIndex: '',
+        isDisabled: ''
       }
     },
     proofreadIssuedService: null,
     programProjectListInfoService: null,
+    programServiceTypeService: null,
     created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
       this.proofreadIssuedService = new ProofreadIssuedService()
       this.programProjectListInfoService = new ProgramProjectListInfoService()
       this.proofreadIssuedService.findProjectInfoById(this.businessId).then(({data}) => {
         this.inputForm = this.recover(this.inputForm, data)
         this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
       })
+      this.getTypeList() // 获取业务类型数据
     },
     computed: {
       bus: {
@@ -312,6 +266,9 @@
       init (method, id, tabName) {
         this.tabName = tabName
         this.method = method
+        if (method === 'view') {
+          this.isDisabled = 'view'
+        }
         this.inputForm = {
           id: '',
           projectId: '',
@@ -332,11 +289,13 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         }
         this.inputForm.projectId = id
         this.visible = true
         this.loading = false
+        this.getTypeList()  // 获取业务类型数据
         this.$nextTick(() => {
           this.loading = true
           this.proofreadIssuedService.findById(this.inputForm.projectId).then(({data}) => {
@@ -344,17 +303,25 @@
               this.$refs.inputForm.resetFields()
               this.inputForm = this.recover(this.inputForm, data)
               this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+              this.chooseRow() // 选中行
               this.loading = false
             } else {
               this.proofreadIssuedService.findProjectInfoById(this.inputForm.projectId).then(({data}) => {
                 this.inputForm = this.recover(this.inputForm, data)
                 this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+                this.chooseRow() // 选中行
                 this.loading = false
               })
             }
           })
         })
       },
+      // 获取业务类型数据
+      getTypeList () {
+        this.programServiceTypeService.getList().then(({data}) => {
+          this.typeList = data
+        })
+      },
       reapplyForm (callback) {
         this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
@@ -497,8 +464,11 @@
           status: '',
           agreeTime: '',
           agreeUserId: '',
-          reportType: ''
+          reportType: '',
+          serviceType: ''
         }
+        this.chooseTableIndex = ''
+        this.typeList = []
         this.$refs.inputForm.resetFields()
         this.visible = false
       },
@@ -516,6 +486,57 @@
             console.log(err.response)
           }
         })
+      },
+      // 业务类别表格值改变事件
+      radioChangeEvent (event, tableIndex) {
+        if (this.status === 'audit' || this.status === 'taskFormDetail' || this.isDisabled === 'view') {  // 数据审核页面或详情页面  不允许修改数据时
+          if (this.commonJS.isNotEmpty(this.chooseTableIndex)) { // chooseTableIndex有值,说明数据有默认值
+            if (tableIndex === this.chooseTableIndex) { // 选中行是默认数据所属的表,不允许切换
+              this.$refs.table[tableIndex].setRadioRow(event.oldValue) // 将表中的选择重新赋值上一个选择,达到未切换的目的
+            } else {  // 选中行不是默认数据所属的表,不允许切换
+              this.$refs.table[tableIndex].clearRadioRow() // 清空表中的选项,达到未切换数据的目的
+            }
+          } else {  // chooseTableIndex没有值,说明数据没有默认值,清空表中的选项
+            this.$refs.table[tableIndex].clearRadioRow()
+          }
+        } else {  // 允许修改数据时
+          // 清除其他表格的选择
+          this.typeList.forEach((item, index) => {
+            if (index !== tableIndex) {
+              this.$refs.table[index].clearRadioRow()
+            }
+          })
+          // 绑定表格的选择
+          this.inputForm.serviceType = event.row.id
+        }
+      },
+      // 单选框是否禁用
+      // tableCheckMethod () {
+      //   console.log('禁用')
+      //   if (this.status === 'audit' || this.status === 'taskFormDetail') {
+      //     return false
+      //   }
+      //   return true
+      // },
+      chooseRow () {
+        if (this.commonJS.isNotEmpty(this.inputForm.serviceType)) {
+          if (this.commonJS.isNotEmpty(this.typeList)) {
+            this.typeList.forEach((item, index) => {   // 遍历出表格(A类、B类等表格)
+              if (this.commonJS.isNotEmpty(item.childrenList)) {  // 每个表格中的数据遍历出来(A类表格中的数据、B类表格中的数据等等...)
+                item.childrenList.forEach((child) => {
+                  if (child.id === this.inputForm.serviceType) { // 如果表格中的数据等于查询到的业务类型,说明要将这条数据选中
+                    this.$refs.table[index].setRadioRow(child) // 将数据改为选中状态
+                    this.chooseTableIndex = index // 获取选中数据属于哪个表格
+                  }
+                })
+              }
+            })
+          }
+        }
+      },
+      // 关闭父页面时调用此方法
+      closeThis () {
+        this.close()
       }
     }
   }

+ 133 - 0
src/views/modules/program/serviceType/ProgramServiceTypeForm.vue

@@ -0,0 +1,133 @@
+<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="120px" @submit.native.prevent>
+        <el-row  :gutter="15">
+          <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="sort"
+                          :rules="[
+                          {required: true, message:'排序不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.sort" placeholder="请填写排序"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
+            <el-form-item label="备注" prop="remarks"
+                          :rules="[
+                 ]">
+              <el-input type="textarea" maxlength="200" v-model="inputForm.remarks" placeholder="请填写备注"  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 ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+          type: '',
+          sort: '',
+          remarks: '',
+          parentId: ''
+        }
+      }
+    },
+    programServiceTypeService: null,
+    created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
+    },
+    methods: {
+      init (method, id) {
+        this.method = method
+        this.inputForm = {
+          name: '',
+          sort: '',
+          remarks: '',
+          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.programServiceTypeService.queryById(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
+            let numReg = /^[0-9]*$/
+            let numRe = new RegExp(numReg)
+            if (!numRe.test(this.inputForm.sort)) {
+              this.loading = false
+              this.$message.error('排序请输入数字')
+              return
+            }
+            this.programServiceTypeService.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>

+ 159 - 0
src/views/modules/program/serviceType/ProgramServiceTypeList.vue

@@ -0,0 +1,159 @@
+<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="name">
+        <el-input size="small" v-model="searchForm.name" 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_service_type:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('program_service_type:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.serviceTypeTable && $refs.serviceTypeTable.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="serviceTypeTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column min-width="350" title="业务类型" field="name" align="left" tree-node></vxe-column>
+          <vxe-column min-width="50" align="center" title="序号" field="sort"></vxe-column>
+          <vxe-column min-width="50" align="center" title="级别" field="level"></vxe-column>
+          <vxe-column min-width="50" align="center" title="备注" field="remarks"></vxe-column>
+          <vxe-column title="操作" width="230px" fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('program_service_type:edit')&&scope.row.level === 1" type="text"  size="small" @click="addChild(scope.row.id)">新建子类型</el-button>
+              <el-button v-if="hasPermission('program_service_type:edit')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('program_service_type:del')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+      </div>
+    </div>
+    <ProgramServiceTypeForm  ref="programServiceTypeForm" @refreshDataList="refreshList"></ProgramServiceTypeForm>
+  </div>
+</template>
+
+<script>
+  import ProgramServiceTypeService from '@/api/program/ProgramServiceTypeService'
+  import ProgramServiceTypeForm from './ProgramServiceTypeForm'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          name: '',
+          sort: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    programServiceTypeService: null,
+    created () {
+      this.programServiceTypeService = new ProgramServiceTypeService()
+    },
+    components: {
+      ProgramServiceTypeForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.programServiceTypeForm.init('add', '')
+      },
+      addChild (id) {
+        this.$refs.programServiceTypeForm.init('addChild', id)
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.serviceTypeTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.programServiceTypeForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.programServiceTypeForm.init('view', id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.programServiceTypeService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      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()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.serviceTypeTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.programServiceTypeService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>