huangfuli před 3 roky
rodič
revize
6854c21ff2
1 změnil soubory, kde provedl 206 přidání a 38 odebrání
  1. 206 38
      src/views/platformaudit/grainpulseenterprisereview.vue

+ 206 - 38
src/views/platformaudit/grainpulseenterprisereview.vue

@@ -128,7 +128,7 @@
       </el-pagination>
       <!--查看-->
       <el-dialog
-        width="30%"
+        width="40%"
         title="查看企业信息"
         :visible.sync="dialogFormVisible1"
         :append-to-body="true"
@@ -157,10 +157,12 @@
           <el-form-item label="详细地址" :label-width="formLabelWidth">
             {{ companyList.detailedAddress }}
           </el-form-item>
-          <h4>封面图片</h4>
-          <img width="50%" :src="companyList.attachmentAddress" alt />
-          <h4>营业执照</h4>
-          <img width="50%" :src="companyList.licenseAddress" alt />
+          <el-form-item label="封面图片" :label-width="formLabelWidth">
+            <img width="50%" :src="companyList.attachmentAddress" alt />
+          </el-form-item>
+          <el-form-item label="营业执照" :label-width="formLabelWidth">
+            <img width="50%" :src="companyList.licenseAddress" alt />
+          </el-form-item>
           <h3 style="margin-left: 30px">附加信息</h3>
           <el-form-item label="企业概况" :label-width="formLabelWidth">
             {{ companyList.companyContant }}
@@ -168,8 +170,9 @@
           <el-form-item label="标签" :label-width="formLabelWidth">
             {{ companyList.label }}
           </el-form-item>
-          <h4>场地图片</h4>
-          <img width="50%" :src="companyList.sitePhotoAddress" alt />
+          <el-form-item label="场地图片" :label-width="formLabelWidth">
+            <img width="50%" :src="companyList.sitePhotoAddress" alt />
+          </el-form-item>
           <h3 style="margin-left: 30px">联系方式</h3>
           <el-form-item label="联系人" :label-width="formLabelWidth">
             {{ companyList.contacts }}
@@ -192,7 +195,7 @@
       </el-dialog>
       <!--编辑-->
       <el-dialog
-        width="30%"
+        width="40%"
         title="编辑企业信息"
         :visible.sync="dialogFormVisible2"
         :append-to-body="true"
@@ -223,43 +226,44 @@
             <span>经度:{{ companyList1.longitude }}</span>
             <span>纬度:{{ companyList1.latitude }}</span>
           </el-form-item>
-          <el-form-item label="所在区域" :label-width="formLabelWidth" prop="adress">
-            <el-input v-model="companyList1.adress" placeholder="请输入所在区域"></el-input>
+          <el-form-item label="所在区域" :label-width="formLabelWidth" >
+            <!-- <el-input v-model="companyList1.adress" placeholder="请输入所在区域"></el-input> -->
+            {{ companyList1.province }}{{ companyList1.city }}{{ companyList1.area }}
           </el-form-item>
           <el-form-item label="详细地址" :label-width="formLabelWidth" prop="detailedAddress">
             <el-input v-model="companyList1.detailedAddress" placeholder="请输入详细地址"></el-input>
           </el-form-item>
-          <h4>上传封面图片</h4>
+          <el-form-item label="上传封面图片" :label-width="formLabelWidth" prop="attachmentAddress">
           <el-upload
             action="https://www.zthymaoyi.com/upload/admin"
             list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
+            :on-preview="handlePictureCardPreview1"
             :on-remove="handleRemove"
           >
             <i class="el-icon-plus"></i>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible">
-            <img width="100%" :src="dialogImageUrl" alt="" />
+          <el-dialog :visible.sync="dialogVisible1">
+            <img width="100%" :src="companyList1.attachmentAddress" alt="" />
           </el-dialog>
-
-          <h4>营业执照</h4>
+          </el-form-item>
+          <el-form-item label="营业执照" :label-width="formLabelWidth" prop="licenseAddress">
           <el-upload
             action="https://www.zthymaoyi.com/upload/admin"
             list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
+            :on-preview="handlePictureCardPreview2"
             :on-remove="handleRemove"
           >
             <i class="el-icon-plus"></i>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible">
-            <img width="100%" :src="dialogImageUrl" alt="" />
+          <el-dialog :visible.sync="dialogVisible2">
+            <img width="100%" :src="companyList1.licenseAddress" alt="" />
           </el-dialog>
-
+          </el-form-item>
           <h3 style="margin-left: 30px">附加信息(选填)</h3>
           <el-form-item label="企业概况" :label-width="formLabelWidth" prop="companyContant">
             <el-input type="textarea" v-model="companyList1.companyContant" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300字"></el-input>
           </el-form-item>
-          <el-form-item label="标签(标签应突出企业特色,最多6个)" prop="label">
+          <el-form-item label="标签(标签应突出企业特色,最多6个)" prop="label" >
             <el-tag
               :key="tag"
               v-for="tag in dynamicTags"
@@ -272,9 +276,10 @@
             <el-input
               class="input-new-tag"
               v-if="inputVisible"
-              v-model="companyList1.label"
+              v-model="label"
               ref="saveTagInput"
               size="small"
+              maxlength="6"
               placeholder="请输入标签内容,不超过6个字符"
               @keyup.enter.native="handleInputConfirm"
               @blur="handleInputConfirm"
@@ -288,19 +293,19 @@
               >添加</el-button
             >
           </el-form-item>
-          <h4>场地图片(图片清晰,最多9张)</h4>
+          <el-form-item label="场地图片(图片清晰,最多9张)" :label-width="formLabelWidth" prop="sitePhotoAddress">
           <el-upload
             action="https://www.zthymaoyi.com/upload/admin"
             list-type="picture-card"
-            :on-preview="handlePictureCardPreview"
+            :on-preview="handlePictureCardPreview3"
             :on-remove="handleRemove"
           >
             <i class="el-icon-plus"></i>
           </el-upload>
-          <el-dialog :visible.sync="dialogVisible">
-            <img width="100%" :src="dialogImageUrl" alt="" />
+          <el-dialog :visible.sync="dialogVisible3">
+            <img width="100%" :src="companyList1.sitePhotoAddress" alt="" />
           </el-dialog>
-
+          </el-form-item>
           <h3 style="margin-left: 30px">联系方式</h3>
           <div :key="index" v-for="(item, index) in freightspace">
             <el-form-item label="联系人" :label-width="formLabelWidth" prop="contacts">
@@ -367,7 +372,9 @@ export default {
       // inputValue: '',
       //图片
       dialogImageUrl: '',
-      dialogVisible: false,
+      dialogVisible1: false,
+      dialogVisible2: false,
+      dialogVisible3: false,
       //弹窗
       dialogFormVisible1: false,
       dialogFormVisible2: false,
@@ -387,9 +394,11 @@ export default {
       address:'',
       searchType: 1,
       formLabelWidth: '120px',
-      form: {},
+      form: {
+        
+      },
       form1: {
-        type: [],
+        Type: [],
         textarea: '',
 
       },
@@ -407,6 +416,9 @@ export default {
       companyList1: {
         id:'',
         label:'',
+        attachmentAddress: '',
+        licenseAddress: '',
+        sitePhotoAddress: '',
       },
       settledCompanyInfo: {
         id: '',
@@ -429,9 +441,17 @@ export default {
     handleRemove(file, fileList) {
       console.log(file, fileList)
     },
-    handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url
-      this.dialogVisible = true
+    handlePictureCardPreview1(e) {
+      this.companyList1.attachmentAddress = e.url+ ','
+      this.dialogVisible1 = true
+    },
+    handlePictureCardPreview2(file) {
+      this.companyList1.licenseAddress = file.url
+      this.dialogVisible2 = true
+    },
+    handlePictureCardPreview3(file) {
+      this.companyList1.sitePhotoAddress = file.url
+      this.dialogVisible3 = true
     },
     close(index) {
       this.addressUrls.splice(index, 1)
@@ -445,11 +465,6 @@ export default {
         this.freightspace.splice(index, 1)
       }
     },
-    // 上传附件
-    uploadSuccessHandle(e) {
-      this.deptBudgetList.addressUrl += e.url + ','
-      this.addressUrls.push(e.url)
-    },
     //列表
     getList() {
       settledList({
@@ -511,6 +526,156 @@ export default {
         })
     },
     submit(id){
+      if (!this.companyList1.compName) {
+        this.$message({
+          message: '公司名称不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.compName.length > 25 ||
+        this.companyList1.compName.length < 2
+      ) {
+        this.$message({
+          message: '公司名称输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.companyList1.mainBusinessType) {
+        this.$message({
+          message: '至少选择一个主营类型',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.companyList1.title) {
+        this.$message({
+          message: '标题不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.title.length > 16 ||
+        this.companyList1.title.length < 2
+      ) {
+        this.$message({
+          message: '标题长度2-16个字',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.companyList1.companyProfile) {
+        this.$message({
+          message: '简介不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.companyProfile.length > 60 ||
+        this.companyList1.companyProfile.length < 10
+      ) {
+        this.$message({
+          message: '简介长度10-60个字',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.companyList1.detailedAddress) {
+        this.$message({
+          message: '详细地址不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.detailedAddress.length > 12 ||
+        this.companyList1.detailedAddress.length < 2
+      ) {
+        this.$message({
+          message: '详细地址2-12个字',
+          type: 'warning',
+        })
+        return
+      }
+      // if (!this.companyList1.attachmentAddress) {
+      //   this.$message({
+      //     message: '封面照片不能为空!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (this.companyList1.attachmentAddress != 1) {
+      //   this.$message({
+      //     message: '封面照片只能一张!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (!this.companyList1.licenseAddress) {
+      //   this.$message({
+      //     message: '营业执照不能为空!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      // if (this.companyList1.licenseAddress.length != 1) {
+      //   this.$message({
+      //     message: '营业执照只能一张!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      if (
+        this.companyList1.companyContant.length > 300 ||
+        this.companyList1.companyContant.length < 0
+      ) {
+        this.$message({
+          message: '企业概况0-300字',
+          type: 'warning',
+        })
+        return
+      }
+      // if (this.companyList1.sitePhotoAddress.length > 9) {
+      //   this.$message({
+      //     message: '场地图片最多9张!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      if (
+        this.companyList1.contacts > 10 ||
+        this.companyList1.contacts < 2
+      ) {
+        this.$message({
+          message: '联系人姓名2-10个字',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.createPhone.length > 15 ||
+        this.companyList1.createPhone.length < 7
+      ) {
+        this.$message({
+          message: '联系人电话7-15位数字',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.companyList1.fax.length > 20 ||
+        this.companyList1.fax.length < 6
+      ) {
+        this.$message({
+          message: '传真输入错误',
+          type: 'warning',
+        })
+        return
+      }
       this.companyList1.id = id
       this.$confirm(`确定提交企业信息?`, {
         cancelButtonText: '取消',
@@ -819,4 +984,7 @@ export default {
 /deep/.typeselect .el-input__inner {
   color: #8890b1;
 }
+.add{
+  margin-left: 10%;
+}
 </style>