详情
This commit is contained in:
		@@ -1,12 +1,17 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <section class="Add">
 | 
			
		||||
    <ai-detail class="add">
 | 
			
		||||
    <ai-detail class="add" v-if="isEdit == true || !id">
 | 
			
		||||
      <template #title>
 | 
			
		||||
        <ai-title :title="params.id ? '编辑' : '新增行政许可信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
 | 
			
		||||
        <ai-title :title="params.id ? '编辑行政许可信息' : '新增行政许可信息'" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="cancel(false)" />
 | 
			
		||||
      </template>
 | 
			
		||||
      <template #right>
 | 
			
		||||
        <!-- <span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="forms=data,isEdit=true">修改</span> -->
 | 
			
		||||
        <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="isEdit==false">取消</span>
 | 
			
		||||
        <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="confirm(id)">保存</span>
 | 
			
		||||
      </template>
 | 
			
		||||
      <template #content>
 | 
			
		||||
        <div class="add-form">
 | 
			
		||||
          <ai-bar title="新增许可信息"></ai-bar>
 | 
			
		||||
          <ai-bar :title="params.id ? '编辑行政许可信息' : '新增行政许可信息'"></ai-bar>
 | 
			
		||||
          <el-form ref="forms" :model="forms" :rules="formRules" size="small"  label-width="150px">
 | 
			
		||||
            <el-form-item label="许可文书名称" prop="licenseName">
 | 
			
		||||
              <el-input v-model="forms.licenseName" placeholder="请输入"></el-input>
 | 
			
		||||
@@ -61,7 +66,35 @@
 | 
			
		||||
      </template>
 | 
			
		||||
      <template slot="footer" class="footer">
 | 
			
		||||
        <el-button class="delete-btn footer-btn" @click="cancel(false)">取消</el-button>
 | 
			
		||||
        <el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
 | 
			
		||||
      <el-button class="footer-btn" type="primary" @click="confirm()">保存</el-button>
 | 
			
		||||
    </template>
 | 
			
		||||
    </ai-detail>
 | 
			
		||||
    <ai-detail class="add" v-if="id && !isEdit">
 | 
			
		||||
      <template slot="title">
 | 
			
		||||
        <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
 | 
			
		||||
      </template>
 | 
			
		||||
      <template slot="content">
 | 
			
		||||
        <ai-card title="基本信息">
 | 
			
		||||
          <template #right>
 | 
			
		||||
            <span style="color:#2266FF;cursor: pointer;font-size: 12px;" class="iconfont iconEdit" v-if="isEdit==false" @click="forms=data,isEdit=true">修改</span>
 | 
			
		||||
            <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="isEdit==false">取消</span>
 | 
			
		||||
            <span style="color:#2266FF;margin-left: 16px;cursor: pointer;font-size: 12px;" v-if="isEdit==true" @click="confirm(id)">保存</span>
 | 
			
		||||
          </template>
 | 
			
		||||
          <template #content v-if="isEdit == false">
 | 
			
		||||
            <ai-wrapper>
 | 
			
		||||
              <!-- dict.getLabel('fpRiskType', info.riskType) -->
 | 
			
		||||
              <ai-info-item label="许可文书名称" :value="data.licenseName"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可文书号" :value="data.licenseName"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可决定日期" :value="data.decisionDate"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可有效期自" :value="data.startDate"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可有效期至" :value="data.endDate"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可机关" isLine :value="data.licenseOrganization"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="经营主体" isLine :value="data.enterpriseName"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="统一信用代码" isLine :value="data.unifiedCode"></ai-info-item>
 | 
			
		||||
              <ai-info-item label="许可内容" isLine :value="data.licenseContent"></ai-info-item>
 | 
			
		||||
            </ai-wrapper>
 | 
			
		||||
          </template>
 | 
			
		||||
        </ai-card>
 | 
			
		||||
      </template>
 | 
			
		||||
    </ai-detail>
 | 
			
		||||
  </section>
 | 
			
		||||
@@ -103,10 +136,18 @@ export default {
 | 
			
		||||
        enterpriseName: '',
 | 
			
		||||
        unifiedCode: '',
 | 
			
		||||
        licenseContent: '',
 | 
			
		||||
      }
 | 
			
		||||
      },
 | 
			
		||||
      isEdit: false,
 | 
			
		||||
      data: {},
 | 
			
		||||
      id: '',
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    if (this.params && this.params.id) {
 | 
			
		||||
      this.id = this.params.id
 | 
			
		||||
      this.getDetail(this.params.id)
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    cancel(isRefresh) {
 | 
			
		||||
      this.$emit('change', {
 | 
			
		||||
@@ -114,13 +155,19 @@ export default {
 | 
			
		||||
        isRefresh: !!isRefresh,
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    confirm () {
 | 
			
		||||
    getDetail(id) {
 | 
			
		||||
      this.instance.post(`/appcreditadminstrativelicense/queryDetailById?id=${id}`).then(res => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          this.data = res.data
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    confirm (id) {
 | 
			
		||||
      this.$refs.forms.validate((valid) => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          this.instance.post(`/appcreditadminstrativelicense/addOrUpdate`, {
 | 
			
		||||
            ...this.forms,
 | 
			
		||||
            id: this.params.id || '',
 | 
			
		||||
            // picture: this.form.picture.length ? this.form.picture[0].url : ''
 | 
			
		||||
          }).then(res => {
 | 
			
		||||
            if (res.code == 0) {
 | 
			
		||||
              this.$message.success('提交成功')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user