فهرست منبع

跟进动态调整

qymljy 1 سال پیش
والد
کامیت
a309e84a25

+ 159 - 0
src/components/normal-basic-layout/details/modules/followTable/index.vue

@@ -0,0 +1,159 @@
+<template>
+  <div>
+    <el-input  style="width:200px;" :placeholder="$t('搜索')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="clearSearchValue" size="small" class="input-with-select inline-16 layout_search__panel mt-10" clearable>
+    </el-input>
+    <el-table
+        ref="table"
+        :row-class-name="tableClassName"
+        :data="tableData"
+        highlight-current-row
+        size="mini"
+        :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+        :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+        border
+    >
+      <el-table-column
+          prop="createby"
+          label="跟进人"
+          width="89">
+      </el-table-column>
+      <el-table-column
+          prop="createdate"
+          label="跟进时间"
+          width="150">
+      </el-table-column>
+      <el-table-column
+          prop="type"
+          label="跟进类型"
+          width="180">
+      </el-table-column>
+      <el-table-column
+          prop="contacts"
+          label="跟进对象"
+          width="180">
+        <template slot-scope="scope">
+          <div v-for="item in scope.row.contacts" :key="item.index">
+            <span v-if="item.rowindex === scope.row.contacts.length" class="span-style">
+              {{item.name}}
+            </span>
+            <span v-else class="span-style">
+              {{item.name + ','}}
+            </span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="content"
+          label="跟进内容"
+          >
+      </el-table-column>
+      <el-table-column
+          prop="attcount"
+          label="附件数"
+          width="89">
+      </el-table-column>
+      <el-table-column
+          prop="salesfeesamount"
+          label="营销费用"
+          width="100">
+      </el-table-column>
+      <el-table-column
+          label="操作"
+          width="180">
+        <template slot-scope="scope">
+          <el-button type="text">评论</el-button>
+          <el-button type="text">编辑</el-button>
+          <el-button type="text">删除</el-button>
+          <marketingExpenses  v-if="($route.path === '/projectChangeDetail' || $route.path === '/customerDetail' || $route.path === '/PublicCustomerDetail') && !disabled"
+                              class="inline-16" ownertable="sa_customers" :ownerid="scope.row.sys_datafollowupid" :dataTime="scope.row.createdate" :userid="scope.row.createuserid"
+                              @onSuccess="listData"></marketingExpenses>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div  class="container normal-panel" style="text-align:right">
+      <el-pagination
+          background
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[20, 50, 100, 200]"
+          :page-size="100"
+          layout="total,sizes, prev, pager, next, jumper"
+          :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import marketingExpenses from '@/components/marketingExpenses/index'
+export default {
+  name: "index",
+  props:['ownertable','disabled'],
+  components:{marketingExpenses},
+  data() {
+    return {
+      tableData:[],
+      currentPage:0,
+      total:0,
+      param:{
+        "id": 20220930121501,
+        "content": {
+          "ownertable":'',
+          "ownerid":'',
+          "pageNumber": 1,
+          "pageSize": 50,
+          "where":{
+            "condition":''
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      this.param.content.ownerid = this.$route.query.id
+      this.param.content.ownertable = this.ownertable
+      const res = await this.$api.requested(this.param)
+      this.tableData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    tableClassName({ row, rowIndex }) {
+      row.index = rowIndex;
+    },
+    clearSearchValue () {
+      this.$store.dispatch('clearSearchValue')
+      this.listData(this.param.content.pageNumber = 1)
+    },
+    scrollToBottom() {
+      this.$nextTick(() => {
+        if (this.$refs.table) {
+          const scrollHeight = this.$refs.table.scrollHeight;
+          this.$refs.table.scrollTop = scrollHeight; // 将滚动条移动到底部
+        }
+      });
+    },
+  },
+  mounted() {
+    this.listData()
+  }
+}
+</script>
+
+<style scoped>
+  .table-style{
+    width: 100%;
+    height: calc(100vh - 390px);
+  }
+</style>

+ 5 - 1
src/components/normal-basic-layout/details/modules/followUp/followUp.vue

@@ -3,7 +3,7 @@
     <div class="container flex-align-center flex-between" style="padding: 10px 10px 0 10px !important;">
       <div>
         <slot name="collapse"></slot>
-        <p class="inline-16">{{$t(`跟进动态`)}}</p>
+        <p class="inline-16">{{$t(`跟进动态`)}}{{'('+ total +')'}}</p>
       </div>
       <div style="display: flex;justify-content: space-between">
 <!--        <fullScreen class="inline-16" domId="containerFull" @onFull="onFull" @backFull="backFull"></fullScreen>-->
@@ -230,6 +230,7 @@ export default {
       sys_datacommentid:'',
       isContentShow:false,
       replyContent:'',
+      total:0
     }
   },
   methods:{
@@ -239,12 +240,15 @@ export default {
         "content": {
             "ownertable":this.ownertable,
             "ownerid":this.$route.query.id,
+            "pageNumber": 1,
+            "pageSize": 9999,
             "where":{
               "condition":this.search
             }
         }
       })
       this.logList = res.data
+      this.total = res.total
     },
     async queryLogsNew(ownertable,ownerid) {
       this.owneridNew = ownerid

+ 4 - 2
src/components/normal-basic-layout/details/modules/tabs/tab.vue

@@ -13,7 +13,7 @@
       <slot v-if="'tab'+index === activeName"  :name="'slot' + index"></slot>
     </div>
     <div v-show="activeName === 'follow'">
-      跟进共同
+      <followTable :ownertable="ownertable" :disabled="disabled"></followTable>
     </div>
     <div v-show="activeName === 'file'">
       <attachmentList v-if="activeName === 'file'" :disabled="disabled" :status="status" :attachmentDisabled="attachmentDisabled"  :attinfos="attinfo_attachment" @onSuccess="queryAttments" @cancelEdit="queryAttments">
@@ -32,13 +32,15 @@
 import attachmentList from '@/components/attachment_list/index.vue'
 import upload from '@/components/upload/hw_obs_upload.vue'
 import datalog from '../datalog/index.vue'
+import followTable from '../followTable/index'
 
 export default {
   props:['tabs','editData','ownertable','idname','status','attachmentDisabled','disabled','isFollow'],
   components:{
     attachmentList,
     upload,
-    datalog
+    datalog,
+    followTable
   },
   data () {
     return {