123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 |
- <template>
- <div style="padding-bottom:20px;">
- <el-row :gutter="5">
- <el-col :span="8">
- <el-card class="box-card">
- <div slot="header" class="clearfix">
- <el-row :gutter="10" style="font-size:20px;font-weight:bold">
- <el-col :span="8">
- <span style="float:right">客户名称:</span>
- </el-col>
- <el-col :span="16">
- <span>{{customerCard.customerName}}</span>
- </el-col>
- </el-row>
-
- </div>
- <div>
-
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">所属集团:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.groupName}}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">客户状态:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.customeStatusName}}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">客户等级:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.customeLevelName}}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">社会信用代码:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.scode}}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">客户区域:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.rangeName }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">客户省份:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.province }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">客户地址:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.address }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">负责人:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.directorName }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">创建人:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.createrName }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">创建日期:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.createtime }}</span>
- </el-col>
- </el-row>
- <el-row :gutter="10" class="cust-card-row">
- <el-col :span="8">
- <span class="cust-card-tt">备注:</span>
- </el-col>
- <el-col :span="16">
- <span class="cust-card-ct">{{customerCard.remark }}</span>
- </el-col>
- </el-row>
-
- </div>
- <!-- <div v-for="o in 4" :key="o" class="text item">
- {{'列表内容 ' + o }}
- </div> -->
- </el-card>
-
- </el-col>
- <el-col :span="16">
- <div class="search">
-
- <el-select v-model="tableObj.getdataListParm.parammaps.businessName" placeholder="业务" class="filter-item" style="width: 120px;" clearable filterable>
- <el-option v-for="(item,index) in businessNameList" :key="index" :label="item.name" :value="item.id" />
- </el-select>
- <el-date-picker v-model="tableObj.getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" />
- <el-input v-model="tableObj.getdataListParm.parammaps.directorName" placeholder="负责人" style="width: 180px;" class="filter-item" clearable />
- <el-select v-model="tableObj.getdataListParm.parammaps.customeStatus" placeholder="客户状态" class="filter-item" style="width: 120px;" clearable>
- <el-option v-for="(item,index) in customeStatusList" :key="index" :label="item.name" :value="item.id" />
- </el-select>
- <el-input v-model="tableObj.getdataListParm.parammaps.beginMoney" placeholder="金额" style="width:80px"></el-input>
- -
- <el-input v-model="tableObj.getdataListParm.parammaps.endMoney" placeholder="金额" style="width:80px"></el-input>
- <el-button class="successBorder" @click="form_search">查询</el-button>
- <el-button class="successBorder" @click="form_clear">重置</el-button>
- </div>
- <div>
- <el-divider></el-divider>
-
- <div class="block" style="height:320px;overflow:auto">
- <el-timeline>
- <el-timeline-item type="success" color="#409EFF" size="large" :timestamp="item.date" placement="top" v-for="item in customerResumeList" class = "cust-line-bx">
- <div style="position: absolute;top:0px;right:0px;">
- <span>负责人:</span>
- <span>{{item.directorName}}</span>
- </div>
- <el-card>
-
- <div class = "cust-ex-item">
- <span class = "cust-ex-tt">业务:</span>
- <span class = "cust-ex-ct">{{item.businessName}}</span>
- </div>
- <div class = "cust-ex-item">
- <span class = "cust-ex-tt">状态:</span>
- <span class = "cust-ex-ct">{{item.customeStatus}}</span>
- </div>
- <!-- <div class = "cust-ex-item">
- <span class = "cust-ex-tt">详情:</span>
- <span class = "cust-ex-ct">{{item.businessName}}</span>
- </div> -->
- <div class = "cust-ex-item">
- <span class = "cust-ex-tt">待付金额(元):</span>
- <span class = "cust-ex-ct">{{item.paidPrice}}</span>
- </div>
- <div class = "cust-ex-item">
- <span class = "cust-ex-tt">支付状态:</span>
- <span class = "cust-ex-ct">{{item.payStatus}}</span>
- </div>
-
-
- </el-card>
- </el-timeline-item>
- </el-timeline>
- </div>
- <el-divider></el-divider>
- <div>
- <div class = "cust-rest">
- <span>待付总金额(元):</span>
- <span>{{sunPrice.planPaySumMoney}}</span>
- </div>
- <div class = "cust-rest">
- <span>已付金额(元):</span>
- <span>{{sunPrice.payMoney}}</span>
- </div>
- <div class = "cust-rest">
- <span>未付金额(元):</span>
- <span>{{sunPrice.planPayMoney}}</span>
- </div>
- </div>
-
- </div>
-
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
-
- import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons, calculativeWidth } from '@/api/common'
- import Cookies from 'js-cookie'
- import { parseTime } from '@/utils/index.js'
- import Pagination from '@/components/Pagination'
- import { MessageBox } from 'element-ui'
- import { getToken } from '@/utils/auth'
- export default {
- name: 'CustomerDetail',
- props: {
- customerData: {
- type: Object,
- required: true
- }
- },
- data() {
- return {
- customerCard: {
- // "address":"1","createrId":"3072707379235128328","createrName":"管理员","createtime":"2022-05-11","customeLevelName":"2级","customeStatusName":"欠款客户","customerName":"测试12","directorId":24,"directorName":"康亮","enable":1,"groupId":207,"groupName":"星连星牧业","id":1425,"province":"1","rangeName":"西北区域","remark":"","scode":"123456789012345678"
- },
-
-
- //列表请求
- tableObj: {
- getdataListParm: {
- name: 'getResumeByCustomerId',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- id:"",
- customerId: '',
- businessName: '',
- inputDatetime: '',
- beginDate: '',
- endDate: '',
- directorName: '',
- customeStatus: '已完成',
- beginMoney: '',
- endMoney: '',
- }
- },
- tableKey: 0,
- total: 0
- },
- businessNameList: [
- {id:"客户拜访", name:"客户拜访"},
- {id:"电话回访", name:"电话回访"},
- {id:"快递接送", name:"快递接送"},
- {id:"备货", name:"备货"},
- {id:"发货", name:"发货"},
- {id:"现场服务", name:"现场服务"},
- {id:"远程服务", name:"远程服务"},
- {id:"投诉", name:"投诉"},
- ],
- customeStatusList: [
- {id:"已完成", name:"已完成"},
- {id:"未完成", name:"未完成"},
- ],
- customerResumeList:[
- // {id:1, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-01"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- // {id:2, businessName: '合同款项', customeStatus: '已完成', paidPrice: '100.00', payStatus: '无需支付', director:'epans', date:"2022-12-02"},
- ],
- sunPrice:{
- // payMoney: '200',
- // planPayMoney: '50',
- // planPaySumMoney: '300'
- }
-
- }
- },
- watch: {
- customerData: {
- deep: true,
- handler: function (item) {
- console.log("父组件:", item)
- this.form_clear()
-
- this.get_card_list()
- this.get_resume_list()
- this.get_sum_money()
- }
- },
-
- },
- mounted() {
-
- },
- created() {
- this.get_card_list()
- this.get_resume_list()
- this.get_sum_money()
- },
- beforeDestroy() {
-
- },
- methods: {
-
- //AJAX事件 - 获取卡片
- get_card_list() {
- var send_data = {
- name: 'getCustomerById',
- parammaps: {
- id:this.customerData.id,
- }
- }
- GetDataByName(send_data).then(response => {
- console.log('卡片数据', response )
- if (response.data.list !== null) {
- this.customerCard = response.data.list[0]
- } else {
- this.customerCard = {}
- }
- })
- },
- //监听 - 表单查询
- form_search() {
- console.log('点击了查询 - 客户详情列表',this.tableObj.getdataListParm.parammaps)
- if (this.tableObj.getdataListParm.parammaps.inputDatetime !== '' && this.tableObj.getdataListParm.parammaps.inputDatetime !== null) {
- this.tableObj.getdataListParm.parammaps.beginDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
- this.tableObj.getdataListParm.parammaps.endDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
- } else {
- this.tableObj.getdataListParm.parammaps.inputDatetime = ''
- this.tableObj.getdataListParm.parammaps.beginDate = ''
- this.tableObj.getdataListParm.parammaps.endDate = ''
- }
- this.tableObj.getdataListParm.parammaps.id = this.customerData.id
- this.tableObj.getdataListParm.offset = 1
- this.get_resume_list()
- this.get_sum_money()
- },
- //事件 - 清空所有表单信息
- form_clear() {
- console.log('点击了重置')
- this.tableObj.getdataListParm.parammaps.id = ''
- this.tableObj.getdataListParm.parammaps.customerId = ''
- this.tableObj.getdataListParm.parammaps.businessName = ''
- this.tableObj.getdataListParm.parammaps.inputDatetime = ''
- this.tableObj.getdataListParm.parammaps.beginDate = ''
- this.tableObj.getdataListParm.parammaps.endDate = ''
- this.tableObj.getdataListParm.parammaps.directorName = ''
- this.tableObj.getdataListParm.parammaps.customeStatus = ''
- this.tableObj.getdataListParm.parammaps.beginMoney = ''
- this.tableObj.getdataListParm.parammaps.endMoney = ''
- this.tableObj.getdataListParm.offset = 1
- this.get_resume_list()
- this.get_sum_money()
- },
- //AJAX事件 - 获取卡片列表
- get_resume_list() {
-
- this.tableObj.getdataListParm.parammaps.customerId = this.customerData.id
- var send_data2 = {
- name: 'getResumeByCustomerId',
- parammaps: this.tableObj.getdataListParm.parammaps
- }
- GetDataByName(send_data2).then(response => {
- console.log('卡片列表数据', response )
- if (response.data.list !== null) {
- this.customerResumeList = response.data.list
- } else {
- this.customerResumeList = []
- }
- })
- },
- //AJAX事件 - 获取金额总价
- get_sum_money() {
- var send_data3 = {
- name: 'getResumeMoney',
- parammaps: this.tableObj.getdataListParm.parammaps
- }
- GetDataByName(send_data3).then(response => {
- console.log('卡片总金额', response )
- this.sunPrice = response.data.list[0]
-
- })
- },
-
- }
- }
- </script>
|