浏览代码

修改bug

qukaidi 3 年之前
父节点
当前提交
070a5d2123
共有 2 个文件被更改,包括 25 次插入5 次删除
  1. 16 3
      src/views/basicData/customerInformation/detailsPageEdit.vue
  2. 9 2
      src/views/saleLeads/detail.vue

+ 16 - 3
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -56,8 +56,8 @@
                 </el-select>
                 <crop-select v-else-if="item.prop === 'belongtocompany'" v-model="form[item.prop]"
                   @getCorpData="getCorpName" corpType="GS"></crop-select>
-                <el-input type="text" v-else-if="item.prop === 'initials'" v-model="form[item.prop]" size="small" autocomplete="off"
-                  :disabled="item.disabled" show-word-limit maxlength="1"></el-input>
+                <el-input type="text" v-else-if="item.prop === 'initials'" v-model="form[item.prop]" size="small"
+                  autocomplete="off" :disabled="item.disabled" show-word-limit maxlength="1"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"
                   :disabled="item.disabled"></el-input>
               </el-form-item>
@@ -730,7 +730,7 @@ export default {
             label: "代理商编码",
             prop: "agentCode",
             span: 8
-          },{
+          }, {
             label: "首字母",
             prop: "initials",
             span: 8
@@ -867,6 +867,19 @@ export default {
       });
     } else if (this.detailData.treeDeptId) {
       this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
+      if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+        this.$router.push({
+          query: {}
+        });
+      }
+    } else {
+      if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+        this.$router.push({
+          query: {}
+        });
+      }
     }
     gainUser().then(res => {
       this.userList = res.data.data;

+ 9 - 2
src/views/saleLeads/detail.vue

@@ -381,7 +381,12 @@ export default {
       this.checkScheduleDialog = false
     },
     khEdit() {
-      this.$router.push('/basicData/customerInformation/index')
+      this.$router.push({
+        path: '/basicData/customerInformation/index', query: {
+          corpId: this.form.corpId,
+          corpName: this.form.corpName
+        }
+      })
     },
     // 查询
     queryData(id) {
@@ -459,11 +464,13 @@ export default {
         this.$message.success('提交成功')
         // this.$message({ type: "success", message: this.form.id ? "修改成功!" : "新增成功!" });
         // this.queryData(res.data.data);
-        data.corpId=res.data.data
+        this.$router.$avueRouter.closeTag("/saleLeads/index");
+        data.corpId = res.data.data
         this.$router.push({
           path: '/workManagement/main-items/list',
           query: { data: data }
         });
+
       }).finally(() => {
         this.btnLoading = false;
       })