Sfoglia il codice sorgente

Merge branch 'dev' into 'purchaseDev'

Dev

See merge request new-business/drp-web!370
黄梓星 1 anno fa
parent
commit
0edb568227

+ 1 - 2
src/views/business/spd/bo/basic/process.vue

@@ -1416,9 +1416,8 @@
       </el-tab-pane>
       <el-tab-pane label="跟进记录" name="tA" style="height: 200px; overflow-y: scroll" v-if="tabsName.A">
         <BehaviorList
-          :source="'Bo'"
+          :source="'BO'"
           :bo="form"
-          :query="behaviorParame"
           :boAuthority="boAuthority"
           v-if="activeName == 'tA'"
         />

+ 27 - 27
src/views/business/spd/bo/behavior/behaviorList.vue

@@ -1,13 +1,12 @@
 <template>
   <div class="app-container">
-    <div class="btn_grooup" v-if="bo.winningState == 0 ? true : false">
+    <div class="btn_grooup" v-if="source == 'BO' && bo.winningState == 0 && boAuthority.boAuthority.behaviorAdd">
       <el-button
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-if="boAuthority.boAuthority.behaviorAdd"
         >新增</el-button>
     </div>
     <el-table v-loading="loading" :data="behaviorList">
@@ -226,22 +225,22 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="创建人">
-                <el-input v-model="form.createByName" size="small" readonly></el-input>
+                <el-input v-model="form.createByName" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="创建时间">
-                <el-input v-model="form.createTime" size="small" readonly></el-input>
+                <el-input v-model="form.createTime" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="修改人">
-                <el-input v-model="form.updateByName" size="small" readonly></el-input>
+                <el-input v-model="form.updateByName" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="修改时间">
-                <el-input v-model="form.updateTime" size="small" readonly></el-input>
+                <el-input v-model="form.updateTime" readonly></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -262,7 +261,7 @@ import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
 
 export default {
   name: "BehaviorList",
-  props:["source","bo","query","boAuthority"],
+  props:["source","bo","boAuthority","task"],
   dicts: ['mk_bo_behavior_res','mk_bo_behavior_type','sys_yes_no','mk_bo_behavior_goal'],
   components: {ContactRef,SaleaeaRef},
   data() {
@@ -274,14 +273,6 @@ export default {
       fileList: [],
       // 遮罩层
       loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
       // 总条数
       total: 0,
       // 行动表格数据
@@ -342,16 +333,17 @@ export default {
     };
   },
   created() {
-    console.log("this.bo",this.bo);
-    if(this.source == "Task"){
-      this.queryParams.task = this.query.id;
+    //组件创建时初始化查询参数
+    if(this.source == "TASK"){
+      this.queryParams.task = this.task.id;
     }
-    if(this.source == "Bo"){
-      this.queryParams.bo = this.query.id;
-      this.queryParams.boStage = this.query.boStage;
+    if(this.source == "BO"){
+      this.queryParams.bo = this.bo.id;
+      this.queryParams.boStage = this.bo.boStage;
       let params = {"post":this.boAuthority.post};
       this.queryParams.params = params;
     }
+    //查询
     this.getList();
   },
   methods: {
@@ -444,12 +436,20 @@ export default {
       this.reset();
       this.operatingState = "Insert";
       //新增行动设置默认值
-      this.queryParams.bo = this.bo.id;
-      this.form.bo = this.bo.id;
-      this.form.boName = this.bo.boName;
-      this.form.boStage = this.bo.boStage;
-      this.form.customer = this.bo.customer;
-      this.form.customerName = this.bo.customerName;
+      if(this.source == "TASK"){
+        this.form.bo = this.task.id;
+        this.form.boName = this.task.boName;
+        this.form.boStage = this.task.boStage;
+        this.form.customer = this.task.customer;
+        this.form.customerName = this.task.customerName;
+      }
+      if(this.source == "BO"){
+        this.form.bo = this.bo.id;
+        this.form.boName = this.bo.boName;
+        this.form.boStage = this.bo.boStage;
+        this.form.customer = this.bo.customer;
+        this.form.customerName = this.bo.customerName;
+      }
       this.form.type = '0';
       this.form.staff = this.$store.state.user.id;
       this.form.staffName = this.$store.state.user.nickName;

+ 4 - 4
src/views/business/spd/bo/behavior/index.vue

@@ -266,22 +266,22 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="创建人">
-                <el-input v-model="form.createByName" size="small" readonly></el-input>
+                <el-input v-model="form.createByName" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="创建时间">
-                <el-input v-model="form.createTime" size="small" readonly></el-input>
+                <el-input v-model="form.createTime" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="修改人">
-                <el-input v-model="form.updateByName" size="small" readonly></el-input>
+                <el-input v-model="form.updateByName" readonly></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="修改时间">
-                <el-input v-model="form.updateTime" size="small" readonly></el-input>
+                <el-input v-model="form.updateTime" readonly></el-input>
               </el-form-item>
             </el-col>
           </el-row>

+ 3 - 13
src/views/business/spd/bo/task/index.vue

@@ -134,7 +134,7 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="联系人" align="center" prop="linkmanName" />
+      <el-table-column show-overflow-tooltip label="联系人" align="center" prop="linkmanName" />
       <el-table-column
         show-overflow-tooltip
         label="销售组织名称"
@@ -424,9 +424,8 @@
 
       <BehaviorList
           :key="timer"
-          :source="'Task'"
-          :query="form"
-          :boAuthority="boAuthority"
+          :source="'TASK'"
+          :task="form"
           v-if="operatingState == 'Browse'"
         />
         
@@ -537,10 +536,6 @@ export default {
       timer: '',
       // 操作撞他
       operatingState:'',
-      // 所选商机
-      curBo:{},
-      // 权限
-      boAuthority:{},
     };
   },
   created() {
@@ -620,11 +615,6 @@ export default {
         this.operatingState = "Browse";
         this.title = "基础信息";
         this.timer = new Date().getTime();
-        // //加载权限数据
-        // getPsnPost(this.form.bo).then((response) => {
-        //   this.boAuthority = response.data;
-          
-        // });
       });
     },
     /** 新增按钮操作 */

+ 2 - 4
src/views/business/spd/bo/task/taskList.vue

@@ -7,7 +7,6 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-if="boAuthority.boAuthority.taskAdd"
           >新增</el-button>
     </div>
     <el-table
@@ -306,9 +305,8 @@
 
       <BehaviorList
           :key="timer"
-          :source="'Task'"
-          :query="form"
-          :boAuthority="boAuthority"
+          :source="'TASK'"
+          :task="form"
           v-if="operatingState == 'Browse'"
         />