linwenxin пре 5 месеци
родитељ
комит
da0f257826

+ 57 - 0
src/api/enterpriseCaCertification.js

@@ -0,0 +1,57 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function companyCaAuthList(data) {
+  return request({
+    url: `/company/ca/auth/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function companyCaAuthListExport(data, name) {
+  return postBlob({
+    url: '/company/ca/auth/list/export',
+    data,
+    name
+  })
+}
+
+export function companyCaAuthAdd(data) {
+  return request({
+    url: '/company/ca/auth/add',
+    method: 'post',
+    data: data
+  })
+}
+
+export function companyCaAuthUpdate(data) {
+  return request({
+    url: '/company/ca/auth/update',
+    method: 'post',
+    data: data
+  })
+}
+
+export function companyCaAuthDetail(params) {
+  return request({
+    url: '/company/ca/auth/detail',
+    method: 'post',
+    params: params
+  })
+}
+
+export function companyCaAuthDel(params) {
+  return request({
+    url: '/company/ca/auth/del',
+    method: 'post',
+    params: params
+  })
+}
+
+export function companyCaAuthGetAuth(params) {
+  return request({
+    url: '/company/ca/auth/get/auth',
+    method: 'post',
+    params: params
+  })
+}

+ 416 - 0
src/views/setting/networkSigning/contractManagement/enterpriseCaCertification/index.vue

@@ -0,0 +1,416 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :exportList="exportList"
+    :columnParsing="columnParsing"
+    :optionsEvensGroup="optionsEvensGroup"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+    :operation="operation()"
+  >
+    <div class="cartographer_big">
+      <el-dialog title="配置" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
+        <zj-page-container v-if="formBool">
+          <zj-page-fill class="neibuview">
+            <zj-form-container
+              ref="formRef"
+              :form-data="formData"
+              :form-rules="formRules"
+              :form-attributes="{ size: 'mini' }"
+            >
+              <zj-form-module title="基础信息" label-width="110px" :form-data="formData" :form-items="items" />
+            </zj-form-container>
+          </zj-page-fill>
+          <!-- 操作按钮 -->
+          <div style="box-sizing: border-box; padding: 10px; text-align: right">
+            <el-button size="mini" @click="handleClose">取 消</el-button>
+            <el-button v-if="~[0, 1].indexOf(formType)" size="mini" @click="formConfirm" type="primary"
+              >确 定</el-button
+            >
+          </div>
+        </zj-page-container>
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import pagingTransfer from '@/components/paging-transfer.vue'
+import {
+  companyCaAuthList,
+  companyCaAuthListExport,
+  companyCaAuthAdd,
+  companyCaAuthUpdate,
+  companyCaAuthDetail,
+  companyCaAuthDel,
+  companyCaAuthGetAuth
+} from '@/api/enterpriseCaCertification'
+import { commonTemplateDownload } from '@/api/common.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import { required, requiredValueMin } from '@/components/template/rules_verify.js'
+import { getWebsit } from '@/api/customerManagement.js'
+import { EventBus } from '@/utils/eventBus'
+import ImageUpload from '@/components/file-upload'
+
+import { lbsAmapRegion } from '@/api/common.js'
+import geographicalPosi from '@/components/geographicalPosi/index.vue'
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+      formBool: false,
+      formType: 0,
+      formData: {
+        businessLicenseUrl: [],
+        companyAddress: '',
+        companyCaAuthId: '',
+        companyName: '',
+        companyWechatId: '',
+        companyWechatName: '',
+        createBy: '',
+        createTime: '',
+        fadadaAuditFailReason: '',
+        fadadaAuthAutoContractId: '',
+        fadadaAuthAutoDownloadUrl: '',
+        fadadaAuthAutoId: '',
+        fadadaAuthAutoStatus: '',
+        fadadaAuthAutoUrl: '',
+        fadadaAuthAutoViewpdfUrl: '',
+        fadadaAuthUrl: '',
+        fadadaCustomerId: '',
+        fadadaIsAuth: '',
+        fadadaStatus: '',
+        fadadaTransactionNo: '',
+        legalIdCard: '',
+        legalMobile: '',
+        legalName: '',
+        taxNo: '',
+        updateBy: '',
+        updateTime: '',
+        websitId: '',
+        websitName: '',
+        lng: '',
+        lat: ''
+      },
+      formRules: {},
+      websitList: []
+    }
+  },
+  computed: {
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.openWindow(() => {
+                  this.formType = 0
+                  this.formBool = true
+                })
+              }
+            })
+          ]
+        ]
+      ]
+    },
+
+    items() {
+      return [
+        {
+          name: 'el-select',
+          md: 12,
+          options: this.websitList.map(item => ({ label: item.name, value: item.websitId })),
+          attributes: {
+            clearable: true,
+            filterable: true,
+            disabled: false,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '网点名称',
+            prop: 'websitId',
+            rules: [...required]
+          },
+          events: {
+            change: val => {
+              var data = this.websitList.find(item => item.websitId === val)
+              this.formData.websitName = data?.name || ''
+            }
+          }
+        },
+        {
+          name: 'el-input',
+          md: 9,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '网点地址',
+            prop: 'companyAddress',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 3,
+          formItemAttributes: {
+            'label-width': '0px',
+            prop: ''
+          },
+          render: (h, { props }) => {
+            return (
+              <geographicalPosi
+                formData={{
+                  lng: this.formData?.lng || '',
+                  lat: this.formData?.lat || '',
+                  address: this.formData?.companyAddress || ''
+                }}
+                onSelectPosi={data => {
+                  this.formData.lng = data.center[0]
+                  this.formData.lat = data.center[1]
+                  this.formData.companyAddress = data.name
+                }}
+              />
+            )
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '统一社会信用代码',
+            prop: 'taxNo',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '法人代表',
+            prop: 'legalName',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '法人联系方式',
+            prop: 'legalMobile',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '法人身份证',
+            prop: 'legalIdCard',
+            rules: [...required]
+          }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '营业执照',
+            prop: 'businessLicenseUrl',
+            rules: [...required]
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                <ImageUpload fileList={this.formData.businessLicenseUrl} limit={1} fileType={['image']} />
+                <h4 style="color:#ffa700">上传图片</h4>
+              </div>
+            )
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '创建人',
+            prop: 'createBy'
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '创建时间',
+            prop: 'createTime'
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '修改人',
+            prop: 'updateBy'
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '修改时间',
+            prop: 'updateTime'
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: companyCaAuthList,
+    exportList: companyCaAuthListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 获取勾选框数据
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    handleClose() {
+      this.$refs?.pageRef?.refreshList()
+      this.$data.formData = this.$options.data().formData
+      this.formType = 0
+      this.formBool = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          ;(this.formType ? companyCaAuthUpdate : companyCaAuthAdd)({
+            ...this.formData,
+            businessLicenseUrl: this.formData?.businessLicenseUrl?.[0]?.url || ''
+          }).then(res => {
+            this.$message({ type: 'success', message: '配置成功!' })
+            this.$refs.pageRef.refreshList()
+            this.handleClose()
+          })
+        }
+      })
+    },
+    operation() {
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
+            this.openWindow(() => {
+              companyCaAuthDetail({
+                companyCaAuthId: row.companyCaAuthId
+              }).then(res => {
+                this.formData = {
+                  ...res.data,
+                  businessLicenseUrl: res.data?.businessLicenseUrl?.[0]?.url
+                    ? [{ url: res.data?.businessLicenseUrl?.[0]?.url }]
+                    : []
+                }
+                this.$nextTick(() => {
+                  this.formType = 1
+                  this.formBool = true
+                })
+              })
+            })
+          }
+        },
+        del: {
+          prompt: '此操作将永久删除数据, 是否继续?',
+          click: ({ row, index, column }) => {
+            companyCaAuthDel({
+              companyCaAuthId: row.companyCaAuthId
+            }).then(res => {
+              this.$message({
+                message: '删除成功',
+                type: 'success'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        },
+        authentication: {
+          prompt: '是否确定认证?',
+          conditions: ({ row, index, column }) => {
+            return row.fadadaIsAuth === 'ON'
+          },
+          click: ({ row, index, column }) => {
+            companyCaAuthGetAuth({
+              companyCaAuthId: row.companyCaAuthId
+            }).then(res => {
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        }
+      })
+    },
+    openWindow(cb) {
+      Promise.all([getWebsit({ type: 'C', status: true, queryPartsWebsit: true, level: 1 })]).then(([res1]) => {
+        this.websitList = res1.data
+        this.$nextTick(() => {
+          cb?.()
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+  ::v-deep & > .zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    & > div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>

+ 4 - 2
src/views/setting/networkSigning/contractManagement/fddContractTemplate/index.vue

@@ -395,7 +395,7 @@ export default {
         if (valid) {
           ;(this.formType ? contractTemplateUpdate : contractTemplateAdd)({
             ...this.formData,
-            contractTemplatePdf: this.formData?.[0]?.url || ''
+            contractTemplatePdf: this.formData?.contractTemplatePdf?.[0]?.url || ''
           }).then(res => {
             this.$message({ type: 'success', message: '配置成功!' })
             this.$refs.pageRef.refreshList()
@@ -414,7 +414,9 @@ export default {
               }).then(res => {
                 this.formData = {
                   ...res.data,
-                  contractTemplatePdf: res.data?.[0]?.url ? [{ url: res.data?.[0]?.url }] : []
+                  contractTemplatePdf: res.data?.contractTemplatePdf?.[0]?.url
+                    ? [{ url: res.data?.contractTemplatePdf?.[0]?.url }]
+                    : []
                 }
                 this.itemsList = this.formData.items.map(item => ({ ...item }))
                 this.$nextTick(() => {