Browse Source

no message

linwenxin 3 months ago
parent
commit
bdf63dc809

+ 42 - 0
src/api/difficultyExpenseApproval.js

@@ -0,0 +1,42 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取师傅列表
+export function workerApplyList(data) {
+  return request({
+    url: `/workerApply/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function workerApplyListExport(data, name) {
+  return postBlob({
+    url: '/workerApply/list/export',
+    data,
+    name
+  })
+}
+
+export function workerApplyDetail(params) {
+  return request({
+    url: '/workerApply/detail',
+    method: 'post',
+    params: params
+  })
+}
+
+export function workerApplyWebsitAppeal(data) {
+  return request({
+    url: '/workerApply/websitAppeal',
+    method: 'post',
+    data: data
+  })
+}
+
+export function workerApplyAppeal(data) {
+  return request({
+    url: '/workerApply/appeal',
+    method: 'post',
+    data: data
+  })
+}

+ 72 - 0
src/views/setting/difficultyFee/difficultyExpenseApproval/InsuranceContractForm.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <zj-form-container ref="formRef" :formData="formData" :formRules="formRules">
+      <zj-form-module title="基础信息" label-width="110px" :formData="formData" :formItems="formItems" :column="3">
+      </zj-form-module>
+    </zj-form-container>
+    <div v-if="type === 0 || type === 1" style="text-align: right">
+      <!-- <el-button size="mini" @click="submit">确定</el-button>
+      <el-button size="mini" @click="reset">重置</el-button> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import { workerApplyDetail } from '@/api/difficultyExpenseApproval.js'
+import { dateFormat } from '@/utils/util'
+import pagingTransfer from '@/components/paging-transfer.vue'
+import { EventBus } from '@/utils/eventBus'
+import { required } from '@/components/template/rules_verify.js'
+import { getWebsit } from '@/api/customerManagement.js'
+export default {
+  props: {
+    type: {
+      type: Number,
+      default: null
+    },
+    item: {
+      type: Object,
+      default: null
+    }
+  },
+  data() {
+    return {
+      disabled: this.type === 2,
+      formData: {},
+      formRules: {}
+    }
+  },
+  computed: {
+    formItems() {
+      return []
+    }
+  },
+
+  created() {
+    // 获取详情
+    if (this.type !== 0) {
+      workerApplyDetail({
+        id: this.item.id
+      }).then(res => {
+        this.formData = { ...res.data }
+      })
+    }
+  },
+  methods: {
+    submit() {
+      this.$refs['formRef'].validate(valid => {
+        if (valid) {
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    reset() {
+      Object.assign(this.$data, this.$options.data())
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 117 - 0
src/views/setting/difficultyFee/difficultyExpenseApproval/index.vue

@@ -0,0 +1,117 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :columnParsing="columnParsing"
+    :optionsEvensGroup="optionsEvensGroup"
+    :morePlan="morePlan"
+    :operationColumnWidth="200"
+    :operation="operation()"
+  >
+    <Popu v-if="visible">
+      <el-page-header slot="head" content="" @back="handleClose" />
+      <InsuranceContractForm
+        :item="item"
+        :type="showType"
+        @success="
+          () => {
+            handleClose()
+            $refs.pageRef.refreshList()
+          }
+        "
+      />
+    </Popu>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import InsuranceContractForm from './InsuranceContractForm.vue'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import { workerApplyList, workerApplyListExport } from '@/api/difficultyExpenseApproval.js'
+export default {
+  components: { TemplatePage, Popu, InsuranceContractForm },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      morePlan: [],
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.item = null
+                this.showType = 0
+                this.visible = true
+              }
+            })
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+      visible: false,
+      item: null,
+      showType: null
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: workerApplyList,
+    // 导出
+    exportList: workerApplyListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return this.operationBtn({
+        edit: {
+          conditions: ({ row, index, column }) => {
+            return true
+          },
+          click: ({ row, index, column }) => {
+            this.item = row
+            this.visible = true
+            this.showType = 1
+          }
+        },
+        detail: {
+          conditions: ({ row, index, column }) => {
+            return true
+          },
+          click: ({ row, index, column }) => {
+            this.item = row
+            this.visible = true
+            this.showType = 2
+          }
+        }
+      })
+    },
+    // 关闭新增弹窗
+    handleClose() {
+      this.visible = false
+      this.item = null
+      this.showType = null
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/views/setting/difficultyFee/difficultyFeeAuditorSet/InsuranceContractForm.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <zj-form-container ref="formRef" :formData="formData" :formRules="formRules">
-      <zj-form-module title="保险基础信息" label-width="110px" :formData="formData" :formItems="formItems" :column="3">
+      <zj-form-module title="基础信息" label-width="110px" :formData="formData" :formItems="formItems" :column="3">
       </zj-form-module>
       <zj-form-module title="网点信息" label-width="0px" :formData="formData" :formItems="items2"> </zj-form-module>
     </zj-form-container>