Commit a974398c authored by dcy's avatar dcy

客户详情基本信心

parent 00e6234b
......@@ -166,7 +166,7 @@ export function getBrankByCustomer(data){
//
export function levelLogPage(params){
return request({
url:'/customer/level-log/page',
url:'/customer/detail/infoList/levelLogPage',
method:'get',
params
})
......@@ -174,7 +174,31 @@ export function levelLogPage(params){
//获取信用等级日志列表
export function customerCreditLogPage(params){
return request({
url:'/customer/credit-log/page',
url:'/customer/detail/infoList/creditLogPage',
method:'get',
params
})
}
//客户详情订单分页
export function infoListOrderPage(params){
return request({
url:'/customer/detail/infoList/orderPage',
method:'get',
params
})
}
//客户详情 --- 报价
export function infoListOfferPage(params){
return request({
url:'/customer/detail/infoList/offerPage',
method:'get',
params
})
}
//客户数据
export function orderStatistics(params){
return request({
url:'/customer/detail/infoList/orderStatistics',
method:'get',
params
})
......
......@@ -36,11 +36,11 @@ export function getUser(id) {
}
// 获得用户分页
export function getUserPage(query) {
export function getUserPage(params) {
return request({
url: '/member/user/page',
method: 'get',
params: query
params: params
})
}
......@@ -104,8 +104,8 @@ export function memberUserAuditIdCard(query) {
export function memberUserAuditEnterprise(query) {
return request({
url: '/member/user/audit-enterprise',
method: 'get',
params: query,
method: 'put',
data: query,
})
}
......@@ -143,3 +143,11 @@ export function userCreateAuditEnterprise(data){
data:data,
})
}
//新增用户
export function createAuditIdCard(data){
return request({
url:'/member/user/create-audit-idcard',
method:'put',
data
})
}
......@@ -109,7 +109,7 @@
<el-form-item label="报关方式:">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customsType"
v-model="queryParams.customerType"
/>
</el-form-item>
<el-form-item label="控货">
......@@ -119,7 +119,8 @@
/>
</el-form-item>
<el-form-item label="入仓时间:">
<el-date-picker v-model="queryParams.rucangtime"
<el-date-picker v-model="rucangtime"
@change="changeDate"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
......@@ -172,55 +173,58 @@
</template>
</el-table-column>
</el-table>
<pagination @pagination="creditLogPage" :page.sync="queryParams.page" :limit.sync="queryParams.row" :total="orderTotal" ></pagination>
<pagination @pagination="getorderList" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="orderTotal" ></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane label="报价">
<el-table
:data="[]"
:data="infoListOfferList"
style="width: 100%"
>
<el-table-column
prop=""
type="index"
label="序号"
>
</el-table-column>
<el-table-column
prop=""
prop="number"
label="报价单号"
>
</el-table-column>
<el-table-column
prop=""
prop="orderNo"
label="订单号"
>
</el-table-column>
<el-table-column
prop=""
prop="consignorName"
label="客户名称"
>
</el-table-column>
<el-table-column
prop=""
prop="objectiveName"
label="目的地"
>
</el-table-column>
<el-table-column
prop=""
label="销售阶段"
>
<template v-slot="{row}">
{{STATUS[row.status]}}
</template>
</el-table-column>
<el-table-column
prop=""
prop="stopTime"
label="预计结束时间"
>
</el-table-column>
<el-table-column
prop=""
prop="businessManagerName"
label="负责人"
>
</el-table-column>
</el-table>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-tab-pane>
<el-tab-pane label="跟进">
<customer-follow ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
......@@ -247,13 +251,13 @@
</el-tab-pane>
<el-tab-pane label="数据">
<el-descriptions :column="2">
<el-descriptions-item label="海空联运/海运拼柜/海运整柜/专线空运"></el-descriptions-item>
<el-descriptions-item label="最后交易日期"></el-descriptions-item>
<el-descriptions-item label="全部订单/控货订单"></el-descriptions-item>
<el-descriptions-item label="最后交易单号"></el-descriptions-item>
<el-descriptions-item label="报价/下单/入仓"></el-descriptions-item>
<el-descriptions-item label="储存量"></el-descriptions-item>
<el-descriptions-item label="已出货订单"></el-descriptions-item>
<el-descriptions-item label="海空联运/海运拼柜/海运整柜/专线空运">{{orderStatisticsObj.hklyTotal || 0}}/{{orderStatisticsObj.hypgTotal || 0 }}/{{orderStatisticsObj.hyzgTotal || 0}}/{{orderStatisticsObj.zxkyTotal || 0}}</el-descriptions-item>
<el-descriptions-item label="最后交易日期">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item>
<el-descriptions-item label="全部订单/控货订单">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item>
<el-descriptions-item label="最后交易单号">{{orderStatisticsObj.lastBusinessOrderNo}}</el-descriptions-item>
<el-descriptions-item label="报价/下单/入仓">{{orderStatisticsObj.offerOrderTotal || 0}}/{{orderStatisticsObj.pickOrderTotal || 0}}/{{orderStatisticsObj.wareHousingTotal || 0}}</el-descriptions-item>
<el-descriptions-item label="储存量">{{orderStatisticsObj.stock || 0}}</el-descriptions-item>
<el-descriptions-item label="已出货订单">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="品牌授权">
......@@ -306,15 +310,23 @@
<el-tab-pane label="信用日志">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div style="width:300px;height: 300px;margin: auto">
</div>
<el-button style="float: right;" type="primary" @click="dialogVisible = true" >添加信用日志</el-button>
<el-descriptions :column="5" border>
<el-descriptions-item label="信用分"></el-descriptions-item>
<el-descriptions-item label="身份认证"></el-descriptions-item>
<el-descriptions-item label="贷款"></el-descriptions-item>
<el-descriptions-item label="提货率"></el-descriptions-item>
<el-descriptions-item label="发货"></el-descriptions-item>
</el-descriptions>
</div>
<el-table :data="customerCreditLogList">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column prop="name" label="规则名称"></el-table-column>
<el-table-column prop="type" label="规则分类"></el-table-column>
<el-table-column prop="type" label="规则分类">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column prop="score" label="规则得分"></el-table-column>
<el-table-column prop="remark" label="备注"></el-table-column>
<el-table-column label="添加人"></el-table-column>
......@@ -323,16 +335,19 @@
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="操作"></el-table-column>
</el-table>
<pagination @pagination="creditLogPage" :page.sync="customerCreditLogFrom.page" :limit.sync="customerCreditLogFrom.row" :total="customerCreditLogFrom.total" ></pagination>
<pagination @pagination="creditLogPage" :page.sync="customerCreditLogFrom.pageNo" :limit.sync="customerCreditLogFrom.pageSize" :total="customerCreditLogFrom.total" ></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane label="等级日志">
<el-table style="width: 100%" :data="getCustomerGradeList">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="规则名称" prop="name"></el-table-column>
<el-table-column label="规则分类" prop="type"></el-table-column>
<el-table-column label="规则分类" prop="type">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column label="规则得分" prop="score"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="时间">
......@@ -340,9 +355,8 @@
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="操作"></el-table-column>
</el-table>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.page" :limit.sync="getCustomerGradeFrom.row" :total="getCustomerGradeFrom.total" ></pagination>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo" :limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total" ></pagination>
</el-tab-pane>
</el-tabs>
</el-col>
......@@ -378,7 +392,7 @@ import {
getCustomerSelect,
getBrankByCustomer,
levelLogPage,
customerCreditLogPage
customerCreditLogPage, infoListOrderPage, infoListOfferPage, orderStatistics
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -389,6 +403,7 @@ import CustomerComplaint from '@/views/ecw/customerComplaint'
import { listServiceUser } from '@/api/system/user'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import {getOrderPage} from "@/api/ecw/order";
import Template from "@/views/cms/template";
export default {
name: 'query',
......@@ -396,6 +411,7 @@ export default {
customerId: String
},
components: {
Template,
CustomerFollow,
CustomerComplaint
},
......@@ -424,9 +440,20 @@ export default {
this.getCustomerGrade()
this.creditLogPage()
this.getorderList()
this.getInfoListOfferPage()
this.getOrderStatistics()
},
data() {
return {
STATUS:{
0:'取消报价',
1:'特价审批中',
2:'需求确认',
3:'跟进中',
4:'赢单',
5:'输单',
6:'报价完成'
},
dialogVisible:false,
DICT_TYPE,
getDictDataLabel,
......@@ -480,23 +507,31 @@ export default {
brandAuthorizationList:[],
brandAuthorizationTotal:0,
getCustomerGradeFrom:{
page:1,
rows:10,
pageNo:1,
pageSize:10,
total:0
},
getCustomerGradeList:[],
customerCreditLogFrom:{
page:1,
rows:10,
total: 0,
pageNo:1,
pageSize:10,
total:0
},
customerCreditLogList:[],
rucangtime:[],
queryParams:{
rows:10,
page:1
pageSize:10,
pageNo:1
},
orderList:[],
orderTotal:0
orderTotal:0,
infoListOfferFrom:{
pageNo:1,
pageSize:10,
},
infoListOfferTotal:0,
infoListOfferList:[],
orderStatisticsObj:{}
}
},
computed: {
......@@ -519,34 +554,66 @@ export default {
}
},
methods:{
changeDate(val){
if(val){
this.queryParams.houseStartDate = val[0];
this.queryParams.houseEndDate = val[1];
}else {
this.queryParams.houseStartDate = undefined;
this.queryParams.houseEndDate = undefined;
}
},
//品牌授权
getBrankByCustomerList(){
getBrankByCustomer({...this.brandAuthorizationFrom,customerId:this.id}).then(r => {this.brandAuthorizationList = r.data.list; this.brandAuthorizationTotal = r.data.total})
},
getCustomerGrade(){
levelLogPage({...this.getCustomerGradeFrom,customerId:this.id}).then(r => {
console.log(r)
levelLogPage({...this.getCustomerGradeFrom,customerId:this.id,total:undefined}).then(r => {
console.log(r,'客户等级');
if(r.code === 0){
this.getCustomerGradeList = r.data.list;
this.getCustomerGradeFrom.total = r.data.total;
}
})
},
// 获取信用等级日志列表
creditLogPage(){
customerCreditLogPage({...this.customerCreditLogFrom,customerId:this.id}).then(r => {
if(r.code === 0){
console.log(r,'r');
this.customerCreditLogList = r.data.list;
this.customerCreditLogFrom.total = r.data.total;
}
})
},
//订单
getorderList(){
getOrderPage({consignorId:this.id,...this.queryParams}).then(r => {
infoListOrderPage({customerId:this.id,...this.queryParams}).then(r => {
console.log(r)
if(r.code === 0){
this.orderList = r.data.list
this.orderTotal = r.data.total
}
})
},
// 客户报价
getInfoListOfferPage(){
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id}).then(r => {
console.log(r,'报价')
this.infoListOfferList = r.data.list;
this.infoListOfferTotal = r.data.total;
}).catch(r => {
console.log(r,'报价')
})
},
// 数据
getOrderStatistics(){
orderStatistics({customerId:this.id}).then(r => {
console.log(r,'数据')
if(r.code === 0){
this.orderStatisticsObj = r.data
}
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment