zh 2 年之前
父節點
當前提交
da7aefd402

+ 4 - 4
src/views/commercialEngineering/components/base.vue

@@ -545,10 +545,10 @@ export default {
           this.formData.homeProjectNameNumber = ''
         }
 
-        await this.getCallbackPosition(0, this.formData.provinceId, 'province', 'id')
-        await this.getCallbackPosition(this.formData.provinceId, this.formData.cityId, 'city', 'id')
-        await this.getCallbackPosition(this.formData.cityId, this.formData.areaId, 'area', 'id')
-        await this.getCallbackPosition(this.formData.areaId, this.formData.streetId, 'street', 'id')
+        await this.getCallbackPosition(null, this.formData.provinceId, 'province', 'lbsId')
+        await this.getCallbackPosition(this.formData.provinceId, this.formData.cityId, 'city', 'lbsId')
+        await this.getCallbackPosition(this.formData.cityId, this.formData.areaId, 'area', 'lbsId')
+        await this.getCallbackPosition(this.formData.areaId, this.formData.streetId, 'street', 'lbsId')
       }
     }
   },

+ 2 - 3
src/views/commercialEngineering/components/examine.vue

@@ -186,9 +186,8 @@ export default {
   },
   watch: {
     async 'formData.id'(newValue, oldValue) {
-      if (newValue) {
-        this.getData()
-      }
+      console.log(3333)
+       this.getData()
     }
   },
   methods: {

+ 1 - 0
src/views/commercialEngineering/mixin/index.js

@@ -199,6 +199,7 @@ export default {
     getCommercialEngineeringDetail() {
       getCommercialEngineeringDetail({ id: this.detailId }).then(res => {
         this.formData = {
+          ...this.formData,
           ...res.data,
           fileList: []
         }

+ 23 - 21
src/views/secondaryMerchant/components/subMerchantForm.vue

@@ -20,6 +20,7 @@
                   placeholder="请选择"
                   clearable
                   style="width: 100%"
+                  :disabled="moduleType == 3"
                   @change="handleChange"
                 >
                   <el-option v-for="item in customerList" :key="item.id" :label="item.number" :value="item.id" />
@@ -36,6 +37,7 @@
                   clearable
                   filterable
                   style="width: 100%"
+                  :disabled="moduleType == 3"
                   @change="handleChange"
                 >
                   <el-option v-for="item in customerList" :key="item.id" :label="item.name" :value="item.id" />
@@ -51,28 +53,28 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="商户名称" prop="name">
-                <el-input v-model="formData.name" placeholder="请输入客户信息" />
+                <el-input v-model="formData.name" placeholder="请输入客户信息"  :disabled="moduleType == 3"/>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="负责人" prop="chargeName">
-                <el-input v-model="formData.chargeName" placeholder="请输入负责人姓名" />
+                <el-input v-model="formData.chargeName" placeholder="请输入负责人姓名" :disabled="moduleType == 3"/>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="联系电话" prop="mobile">
-                <el-input v-model="formData.mobile" placeholder="请输入联系电话" />
+                <el-input v-model="formData.mobile" placeholder="请输入联系电话" :disabled="moduleType == 3"/>
               </el-form-item>
             </el-col>
           </el-row>
           <el-col :span="12">
             <el-form-item label="地址" prop="invoiceAddress">
-              <el-input v-model="formData.invoiceAddress" placeholder="请输入地址" />
+              <el-input v-model="formData.invoiceAddress" placeholder="请输入地址" :disabled="moduleType == 3" />
             </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="类型" prop="jiaxianType">
-              <el-radio-group v-model="formData.jiaxianType">
+              <el-radio-group v-model="formData.jiaxianType" :disabled="moduleType == 3">
                 <el-radio
                   v-for="item in [
                     { label: '嘉贤经销商', value: 'JIAXIAN' },
@@ -88,19 +90,17 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="营业执照" prop="jiaxianType">
-              <ImageUpload :file-list="formData.files" />
-              <!-- <template v-else>
+              <ImageUpload v-if="moduleType != 3" :file-list="formData.files" />
+              <template v-else>
                 <div
-                  v-for="item in formData.files"
-                  :key="item.fileUrl"
                   style="display: flex; width: 120px; height: 120px; align-items: center; justify-content: center"
                 >
                   <el-image
-                    v-if="checkFileType(item.fileUrl) == 'image'"
+                    v-if="checkFileType(formData.url) == 'image'"
                     ref="img"
-                    :src="$imageUrl + item.fileUrl"
+                    :src="$imageUrl + formData.url"
                     fit="cover"
-                    :preview-src-list="[$imageUrl + item.fileUrl]"
+                    :preview-src-list="[$imageUrl + formData.url]"
                     class="elImageClose"
                   />
                   <div
@@ -112,22 +112,22 @@
                     justify-content: center;
                     cursor: pointer;
                   "
-                    @click="openPdf(item)"
+                    @click="openPdf(formData)"
                   >
-                    <img v-if="checkFileType(item.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
-                    <img v-if="checkFileType(item.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png">
-                    <img v-if="checkFileType(item.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png">
+                    <img v-if="checkFileType(formData.url) == 'word'" class="file" src="@/assets/common/word.png">
+                    <img v-if="checkFileType(formData.url) == 'excel'" class="file" src="@/assets/common/excel.png">
+                    <img v-if="checkFileType(formData.url) == 'ppt'" class="file" src="@/assets/common/ppt.png">
                     <img
-                      v-if="checkFileType(item.fileUrl) == 'pdf'"
+                      v-if="checkFileType(formData.url) == 'pdf'"
                       class="file"
                       style="cursor: pointer"
                       src="@/assets/common/pdf.png"
                     >
 
-                    <img v-if="checkFileType(item.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg">
+                    <img v-if="checkFileType(formData.url) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg">
                   </div>
                 </div>
-              </template> -->
+              </template>
             </el-form-item>
           </el-col>
         </el-row>
@@ -344,6 +344,9 @@ export default {
       this.$emit('close')
     },
     handleExamine(status = 'OK') {
+      if (this.formData.files.length) {
+        this.formData.url = this.formData.files[0].url
+      }
       examineStagecustomer({
         id: this.formData.id,
         examineStatus: status,
@@ -392,10 +395,9 @@ export default {
       }
     },
     openPdf(item) {
-      console.log(item, 999)
       const link = document.createElement('a')
       link.style.display = 'none'
-      link.href = this.$imageUrl + item.fileUrl
+      link.href = this.$imageUrl + item.url
       link.download = item.fileName
       document.body.appendChild(link)
       link.click()