logList.vue 4.19 KB
Newer Older
我在何方's avatar
我在何方 committed
1 2 3
<template>
  <div class="app-container">
        <el-card>
我在何方's avatar
我在何方 committed
4
            <div slot="header" class="card-title">{{$t('跟进记录列表')}}</div>
我在何方's avatar
我在何方 committed
5 6
          <!-- 列表 -->
          <div class="offer-header">
我在何方's avatar
我在何方 committed
7
              <span style="font-size: 15px;">{{$t('报价单号')}}{{number}}</span>
我在何方's avatar
我在何方 committed
8
              <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
我在何方's avatar
我在何方 committed
9
              >{{$t('新增')}}</el-button>
我在何方's avatar
我在何方 committed
10 11 12
          </div>

          <el-table v-loading="loading" :data="list">
我在何方's avatar
我在何方 committed
13
            <el-table-column :label="$t('序号')" align="center" prop="id" type="index">
我在何方's avatar
我在何方 committed
14 15 16 17
              <template slot-scope="scope">
                  <span>{{scope.$index + 1}}</span>
                </template>
              </el-table-column>
我在何方's avatar
我在何方 committed
18
            <el-table-column :label="$t('跟进类型')" align="center" prop="type" >
我在何方's avatar
我在何方 committed
19
              <template slot-scope="scope">
我在何方's avatar
我在何方 committed
20
                  <dict-tag :type="DICT_TYPE.ECW_OFFER_TYPE" :value="scope.row.type"></dict-tag>
我在何方's avatar
我在何方 committed
21 22
                </template>
              </el-table-column>
我在何方's avatar
我在何方 committed
23
            <el-table-column :label="$t('联系人')" align="center" prop="contactName" />
我在何方's avatar
我在何方 committed
24

我在何方's avatar
我在何方 committed
25
            <el-table-column :label="$t('跟进方式')" align="center" prop="followUpMethod">
我在何方's avatar
我在何方 committed
26
           <template slot-scope="scope">
我在何方's avatar
我在何方 committed
27
                <dict-tag :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD" :value="scope.row.followUpMethod"></dict-tag>
我在何方's avatar
我在何方 committed
28 29
              </template>
            </el-table-column>
我在何方's avatar
我在何方 committed
30
            <el-table-column :label="$t('跟进时间')" align="center" prop="followUpTime" width="180">
我在何方's avatar
我在何方 committed
31 32 33 34
           <template slot-scope="scope">
                <span>{{ scope.row.followUpTime}}</span>
              </template>
            </el-table-column>
我在何方's avatar
我在何方 committed
35 36
            <el-table-column :label="$t('客户反馈')" align="center" prop="customerFeedback" />
            <el-table-column :label="$t('处理结果')" align="center" prop="processingResults" />
我在何方's avatar
我在何方 committed
37 38 39 40 41
            <el-table-column :label="$t('客户经理')" align="center" prop="followUpSalesmanName">
              <template slot-scope="scope">
                <span>{{getCustomerService(scope.row.followUpSalesmanId)}}</span>
              </template>
             </el-table-column>
我在何方's avatar
我在何方 committed
42 43 44 45 46 47 48 49 50 51
          </el-table>
              <pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
                          @pagination="getList"/>
        </el-card>
  </div>
</template>

<script>
import {getOfferLogPage} from "@/api/ecw/offerLog";
import {DICT_TYPE} from  '@/utils/dict'
52
import {getOffer} from '@/api/ecw/offer'
我在何方's avatar
我在何方 committed
53
  import { userList } from "@/api/system/user"
我在何方's avatar
我在何方 committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
export default {
  name: "OfferLog",
  components: {

  },
  data() {
    return {
      // 遮罩层
      loading: true,
      list: [],
      total:0,
      params:{
        page:1,
        rows:20,
        offerId:0,
        type:2
      },
我在何方's avatar
我在何方 committed
71
      number:'',
我在何方's avatar
我在何方 committed
72 73
      relationId:0,
      creatorName:'test',
我在何方's avatar
我在何方 committed
74
      creatorData:[]
我在何方's avatar
我在何方 committed
75 76 77 78 79 80
    };
  },
  created() {
    if(this.$route.query.offerId){
      this.params.offerId = this.$route.query.offerId
      this.getList();
81
      this.getRelationID()
我在何方's avatar
我在何方 committed
82
    }
我在何方's avatar
我在何方 committed
83
    userList('customer service').then(res =>this.creatorData = res.data)
我在何方's avatar
我在何方 committed
84 85 86 87 88 89 90 91 92 93 94 95
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
      let params = {...this.params};
      // 执行查询
      getOfferLogPage(params).then(response => {
        this.list = response.data.list;
        this.total = response.data.total;
        this.loading = false;
      });
96 97

    },
我在何方's avatar
我在何方 committed
98 99 100 101 102
    getCustomerService(id){
       var user = this.creatorData.find(item=>item.id==id)
       if(user) return user.nickname
       return ''
    },
103 104 105
    getRelationID(){
      getOffer(this.params.offerId).then(response => {
        this.relationId = response.data.consignorId;
我在何方's avatar
我在何方 committed
106
        this.number = response.data.number;
107
        })
我在何方's avatar
我在何方 committed
108 109 110 111 112 113 114
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.$router.push({
        path: "/offer/createLog",
        query:{
          offerId:this.params.offerId,
我在何方's avatar
我在何方 committed
115
          number:this.number
我在何方's avatar
我在何方 committed
116 117 118 119 120 121
        }
      });
    },
  }
};
</script>
我在何方's avatar
我在何方 committed
122
<style scoped>
我在何方's avatar
我在何方 committed
123 124 125 126 127 128 129 130 131 132 133
  .card-title{
      font-size: 18px;
      font-weight: bold;
  }
  .offer-header{
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
</style>