|
|
@@ -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>
|