Commit f1d2f60e authored by zhengyi's avatar zhengyi

客户跳转报价创建页面携带客户信息bug修复

parent 406a0403
......@@ -3,51 +3,85 @@
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<div style="display: flex;justify-content: space-between;align-items: flex-end;">
<h2>{{$t('查看')}}</h2>
<h2>{{ $t('查看') }}</h2>
<div>
<el-button type="primary" size="small" v-has-permi="['ecw:customer:query-edit']" @click="$router.push('/customer/add-edit/' + id)">{{$t('编辑')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-quoted-price']" @click="quote" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small" @click="customerFollowFn('follow')">{{$t('跟进')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small" @click="customerFollowFn('complain')">{{$t('客诉')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button>
<el-button type="primary" size="small" v-has-permi="['ecw:customer:query-edit']"
@click="$router.push('/customer/add-edit/' + id)">{{ $t('编辑') }}
</el-button>
<el-button v-has-permi="['ecw:customer:query-quoted-price']" @click="quote" type="primary" size="small">
{{ $t('报价') }}
</el-button>
<el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small"
@click="customerFollowFn('follow')">{{ $t('跟进') }}
</el-button>
<el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small"
@click="customerFollowFn('complain')">{{ $t('客诉') }}
</el-button>
<el-button v-has-permi="['ecw:customer:query-delete']" type="danger" size="small"
@click="deleteCustomerFn()">{{ $t('删除') }}
</el-button>
</div>
</div>
<el-card style="margin-top: 15px;">
<el-descriptions :title="$t('基本')" :column="3" border>
<template slot="extra">
<el-button type="primary" size="small" @click="showMore = !showMore">{{showMore ? $t('隐藏') : $t('更多')}}</el-button>
<el-button type="primary" size="small" @click="showMore = !showMore">
{{ showMore ? $t('隐藏') : $t('更多') }}
</el-button>
</template>
<el-descriptions-item :label="$t('客户编号')">{{ customer.number }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户名称')"><span style="white-space: pre-wrap;">{{ customer.name}}</span></el-descriptions-item>
<el-descriptions-item :label="$t('国籍')">{{$l(customer,'countryName')}}</el-descriptions-item>
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户名称')"><span
style="white-space: pre-wrap;">{{ customer.name }}</span></el-descriptions-item>
<el-descriptions-item :label="$t('国籍')">{{ $l(customer, 'countryName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户来源')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户状态')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{ customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('询盘信息')">{{ customer.inquiry }}</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('图片')">
<image-display :picture-urls="customer.picture ? customer.picture.split(',') : []" >
<el-button type="text" > 查看图片</el-button>
<image-display :picture-urls="customer.picture ? customer.picture.split(',') : []">
<el-button type="text"> 查看图片</el-button>
</image-display>
</el-descriptions-item>
<template v-if="showMore">
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{
parseTime(customer.birthday, '{y}-{m}-{d}')
}}
</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{
customer.isNew ? $t('新客户') : $t('老客户')
}}
</el-descriptions-item>
<el-descriptions-item :label="$t('资源类型')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户英文名称')">{{customer.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户英文名称')">{{ customer.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('首次成交时间')">{{ customer.firstDealTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('掉入公海时间')">{{ customer.estimateEnterOpenSeaTime || customer.enterOpenSeaTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('获取方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_GET_METHOD, customer.getMethod) }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建入口')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_FROM, customer.createFrom) }}</el-descriptions-item>
<el-descriptions-item :label="$t('掉入公海时间')">
{{ customer.estimateEnterOpenSeaTime || customer.enterOpenSeaTime }}
</el-descriptions-item>
<el-descriptions-item :label="$t('获取方式')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_GET_METHOD, customer.getMethod) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('创建入口')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_FROM, customer.createFrom) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('捞取时间')">{{ customer.catchTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('归属时间')">{{ customer.customerServiceConfirmedTime }}</el-descriptions-item>
<el-descriptions-item :label="$t('归属时间')">{{
customer.customerServiceConfirmedTime
}}
</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{ customer.founderName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item :label="$t('最后更新人')">{{ customer.updaterName }}</el-descriptions-item>
......@@ -89,7 +123,7 @@
:label="$t('联系方式')"
>
<template v-slot="{row}">
+{{ row.areaCode}} {{row.phoneNew}}
+{{ row.areaCode }} {{ row.phoneNew }}
</template>
</el-table-column>
<el-table-column
......@@ -121,7 +155,8 @@
<div slot="header" class="clearfix">
<el-form :inline="true" size="small">
<el-form-item :label="$t('运输方式:')">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId"
formatter="number"/>
</el-form-item>
<el-form-item :label="$t('订单状态:')">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"/>
......@@ -146,7 +181,7 @@
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')"/>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
......@@ -199,42 +234,57 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getorderList">{{$t('搜索')}}</el-button>
<el-button type="primary" @click="handleOrderReset">{{$t('重置')}}</el-button>
<el-button type="primary" @click="getorderList">{{ $t('搜索') }}</el-button>
<el-button type="primary" @click="handleOrderReset">{{ $t('重置') }}</el-button>
</el-form-item>
</el-form>
</div>
<el-descriptions :column="2">
<el-descriptions-item :label="$t('海空联运/海运拼柜/海运整柜/专线空运')">{{orderStatisticsObj.hklyTotal || 0}}/{{orderStatisticsObj.hypgTotal || 0 }}/{{orderStatisticsObj.hyzgTotal || 0}}/{{orderStatisticsObj.zxkyTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易日期')">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('全部订单/控货订单')">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易单号')">{{orderStatisticsObj.lastBusinessOrderNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('报价/下单/入仓')">{{orderStatisticsObj.offerOrderTotal || 0}}/{{orderStatisticsObj.pickOrderTotal || 0}}/{{orderStatisticsObj.wareHousingTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('储存量')">{{orderStatisticsObj.stock || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('已出货订单')">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('海空联运/海运拼柜/海运整柜/专线空运')">
{{ orderStatisticsObj.hklyTotal || 0 }}/{{
orderStatisticsObj.hypgTotal || 0
}}/{{ orderStatisticsObj.hyzgTotal || 0 }}/{{ orderStatisticsObj.zxkyTotal || 0 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易日期')">{{ orderStatisticsObj.lastBusinessDate }}
</el-descriptions-item>
<el-descriptions-item :label="$t('全部订单/控货订单')">
{{ orderStatisticsObj.allOrderTotal || 0 }}/{{ orderStatisticsObj.controlOrderTotal || 0 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易单号')">{{ orderStatisticsObj.lastBusinessOrderNo }}
</el-descriptions-item>
<el-descriptions-item :label="$t('报价/下单/入仓')">
{{ orderStatisticsObj.offerOrderTotal || 0 }}/{{ orderStatisticsObj.pickOrderTotal || 0 }}/{{ orderStatisticsObj.wareHousingTotal || 0 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('储存量')">{{ orderStatisticsObj.stock || 0 }}</el-descriptions-item>
<el-descriptions-item :label="$t('已出货订单')">{{ orderStatisticsObj.shipmentTotal || 0 }}
</el-descriptions-item>
</el-descriptions>
<el-table :data="orderList">
<el-table-column :label="$t('订单编号')" width="120px" align="center">
<template slot-scope="{row}">
<el-link type="primary" @click.native="$router.push('/order/detail?orderId=' + row.orderId)">{{row.orderNo}}</el-link>
<el-link type="primary" @click.native="$router.push('/order/detail?orderId=' + row.orderId)">
{{ row.orderNo }}
</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('报价单号')" align="center" width="120px">
<template slot-scope="{row}">
<el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">{{row.offerNo}}</el-link>
<el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">
{{ row.offerNo }}
</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('唛头')" align="center" prop="marks"/>
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}
{{ row.totalNum }}{{ $t('') }}/{{ row.sumNum }}{{ $t('') }}
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}">
<!--入仓前是填单数据,入仓后是入仓数据-->
<!-- <template v-if="row.inWarehouseState <= 1">{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</template>-->
<!-- <template v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template>-->
<!-- <template v-if="row.inWarehouseState <= 1">{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</template>-->
<!-- <template v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template>-->
<component
:is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
......@@ -244,49 +294,51 @@
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
<div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
<div v-else>{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</div>
<div v-if="row.sumNum > 0">{{ row.sumVolume }}m³ /{{ row.sumWeight }}Kg</div>
<div v-else>{{ row.costVO.totalVolume }}m³ /{{ row.costVO.totalWeight }}Kg</div>
</component>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
<template slot-scope="{row}">
{{row.startWarehouseName}}
<span style="color:red" v-if="row.isExternalWarehouse">({{$t('外部仓')}})</span>
{{ row.startWarehouseName }}
<span style="color:red" v-if="row.isExternalWarehouse">({{ $t('外部仓') }})</span>
</template>
</el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.objectiveName}}
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId"/>
/ {{ row.objectiveName }}
</template>
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl"/>
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="center" prop="statusMsg">
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />-->
<!-- </template>-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />-->
<!-- </template>-->
</el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" />
<el-table-column :label="$t('创建时间')" align="center" prop="createTime"/>
<el-table-column :label="$t('入仓时间')">
<template v-slot="{row}">
{{parseTime(row.rucangTime)}}
{{ parseTime(row.rucangTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('装柜/出仓时间')" align="center" prop="loadTime" />
<el-table-column :label="$t('卸柜/到仓时间')" align="center" prop="unloadTime" />
<el-table-column :label="$t('装柜/出仓时间')" align="center" prop="loadTime"/>
<el-table-column :label="$t('卸柜/到仓时间')" align="center" prop="unloadTime"/>
<el-table-column :label="$t('提货率')" align="center">
<template v-slot="{row}">
{{row.pickNum | deliveryRate(row.sumNum)}}
{{ row.pickNum | deliveryRate(row.sumNum) }}
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName" />
<el-table-column :label="$t('业绩归属客户方')" align="center" prop="customerName" />
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"/>
<el-table-column :label="$t('业绩归属客户方')" align="center" prop="customerName"/>
</el-table>
<pagination @pagination="getorderList" :page.sync="queryParams.page" :limit.sync="queryParams.rows" :total="orderTotal" ></pagination>
<pagination @pagination="getorderList" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
:total="orderTotal"></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane name="quote" :label="$t('报价')">
......@@ -344,8 +396,8 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getInfoListOfferPage">{{$t('搜索')}}</el-button>
<el-button type="primary" @click="handleOfferReset">{{$t('重置')}}</el-button>
<el-button type="primary" @click="getInfoListOfferPage">{{ $t('搜索') }}</el-button>
<el-button type="primary" @click="handleOfferReset">{{ $t('重置') }}</el-button>
</el-form-item>
</el-form>
</div>
......@@ -363,7 +415,9 @@
width="160px"
>
<template slot-scope="{row}">
<el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">{{row.number}}</el-link>
<el-link type="primary" @click.native="$router.push('/offer/detail?offerId=' + row.offerId)">
{{ row.number }}
</el-link>
</template>
</el-table-column>
<el-table-column
......@@ -397,21 +451,22 @@
:label="$t('始发仓')"
>
<template v-slot="{row}">
{{getWarehouse(row.startWarehouseId)}}
{{ getWarehouse(row.startWarehouseId) }}
</template>
</el-table-column>
<el-table-column
:label="$t('运输方式/目的地')"
>
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType" /> / {{row.objectiveName}}
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType"/>
/ {{ row.objectiveName }}
</template>
</el-table-column>
<el-table-column
:label="$t('销售阶段')"
>
<template v-slot="{row}">
{{STATUS[row.status]}}
{{ STATUS[row.status] }}
</template>
</el-table-column>
<el-table-column
......@@ -419,8 +474,8 @@
>
<template slot-scope="{row}" v-if="row.estCostVO">
<div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex">
<dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" />
{{item.amount}} {{currencyMap[item.currencyId]}}
<dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType"/>
{{ item.amount }} {{ currencyMap[item.currencyId] }}
</div>
</template>
</el-table-column>
......@@ -457,7 +512,8 @@
:label="$t('创建时间')"
>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<el-table-column :label="$t('操作')" align="center" fixed="right"
class-name="small-padding fixed-width">
<template slot-scope="scope">
<!--
0 取消 恢复
......@@ -472,20 +528,44 @@
<el-dropdown>
<el-button icon="el-icon-plus" circle type="primary"></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('/offer/detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{$t('详情')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/edit?id=' + scope.row.offerId)" v-if="[1,2,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/logList?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{$t('跟进')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/offer/result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{$t('结果')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount','ecw:offer:commission']">{{$t('特价')}}</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1,3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{$t('取消')}}</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{$t('恢复')}}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/detail?offerId=' + scope.row.offerId)"
v-hasPermi="['ecw:offer:show']">{{ $t('详情') }}
</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/edit?id=' + scope.row.offerId)"
v-if="[1,2,3,7].indexOf(scope.row.status) > -1"
v-hasPermi="['ecw:offer:update']">{{ $t('编辑') }}
</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/logList?offerId=' + scope.row.offerId)"
v-if="[1,3,7].indexOf(scope.row.status) > -1"
v-hasPermi="['ecw:offer:loglist']">{{ $t('跟进') }}
</el-dropdown-item>
<el-dropdown-item
@click.native="$router.push(`/offer/result?offerId=${scope.row.offerId}&number=${scope.row.number}`)"
v-if="[3,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t('结果') }}
</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)"
v-if="[1,3,7].indexOf(scope.row.status) > -1"
v-hasPermi="['ecw:offer:discount','ecw:offer:commission']">{{ $t('特价') }}
</el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)"
v-if="[1,3,7].indexOf(scope.row.status) > -1"
v-hasPermi="['ecw:offer:cancel']">{{ $t('取消') }}
</el-dropdown-item>
<el-dropdown-item @click.native="recovery(scope.row.offerId)"
v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">
{{ $t('恢复') }}
</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)"
v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1"
v-hasPermi="['ecw:offer:delete']">{{ $t('删除') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo"
:limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal"></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')">
......@@ -493,19 +573,25 @@
<div slot="header" class="clearfix">
<el-form size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('跟进类型')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE" v-model="followForm.followType" @change="handleQuery"></dict-selector>
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE" v-model="followForm.followType"
@change="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('跟进方式')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD" v-model="followForm.followMethod" @change="handleQuery"></dict-selector>
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD"
v-model="followForm.followMethod" @change="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('跟进结果')">
<el-select clearable v-model="followForm.resultType" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
<el-select clearable v-model="followForm.resultType" :placeholder="$t('请选择')" size="small"
@change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)" :key="dict.value"
:label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('跟进状态')">
<el-select clearable v-model="followForm.status" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
<el-select clearable v-model="followForm.status" :placeholder="$t('请选择')" size="small"
@change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value"
:label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<!--
......@@ -519,32 +605,43 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{
$t("搜索")
}}</el-button>
}}
</el-button>
<el-button type="primary" @click="()=>{
followForm = { pageNo:1,pageSize:10}; getCustomerFollowList();
}">{{$t('重置')}}</el-button>
<el-button type="success" @click="customerFollowFn('follow')" v-hasPermi="['ecw:customer:follow-create']">{{$t('新增')}}</el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">{{$t('导出')}}</el-button>
}">{{ $t('重置') }}
</el-button>
<el-button type="success" @click="customerFollowFn('follow')"
v-hasPermi="['ecw:customer:follow-create']">{{ $t('新增') }}
</el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t('导出') }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="customerFollowList" style="width: 100%">
<el-table-column prop="number" :label="$t('编号')" width="120">
<template slot-scope="scope">
<a href="javascript:void(0)" @click="handleCustomerFollowLink(scope.row)" class="link-type">{{scope.row.number}}</a>
<a href="javascript:void(0)" @click="handleCustomerFollowLink(scope.row)"
class="link-type">{{ scope.row.number }}</a>
</template>
</el-table-column>
<el-table-column prop="followType" :label="$t('跟进类型')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"></el-table-column>
<el-table-column prop="followType" :label="$t('跟进类型')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"></el-table-column>
<el-table-column prop="offerNumber" :label="$t('报价单号')"></el-table-column>
<el-table-column prop="followTime" :label="$t('跟进时间')" :formatter="(row, column, cellValue) => parseTime(cellValue)"></el-table-column>
<el-table-column prop="followTime" :label="$t('跟进时间')"
:formatter="(row, column, cellValue) => parseTime(cellValue)"></el-table-column>
<el-table-column prop="customerNumber" :label="$t('客户编号')"></el-table-column>
<el-table-column prop="contactName" :label="$t('联系人')"></el-table-column>
<el-table-column prop="contactPhone" :label="$t('联系方式')"></el-table-column>
<el-table-column prop="followUserName" :label="$t('客户经理')"></el-table-column>
<el-table-column prop="followMethod" :label="$t('跟进方式')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD, cellValue)"></el-table-column>
<el-table-column prop="followMethod" :label="$t('跟进方式')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD, cellValue)"></el-table-column>
<el-table-column prop="purpose" :label="$t('目的')"></el-table-column>
<el-table-column prop="feedback" :label="$t('跟进情况')"></el-table-column>
<el-table-column prop="resultType" :label="$t('跟进结果')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE, cellValue)"></el-table-column>
<el-table-column prop="resultType" :label="$t('跟进结果')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE, cellValue)"></el-table-column>
<el-table-column :label="$t('下次跟进时间')" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.nextTime) }}
......@@ -569,18 +666,27 @@
{{ parseTime(scope.row.updateTime) }}
</template>
</el-table-column>
<el-table-column width="150px" :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<el-table-column width="150px" :label="$t('操作')" align="center" fixed="right"
class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCustomerFollow(scope.row, scope.row.status === 0)" v-hasPermi="['ecw:customer:follow-update']">{{ $t("编辑") }}</el-button>
<el-button size="mini" type="text" icon="el-icon-collection" @click="handleCustomerFollow(scope.row, true)" v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleCustomerFollow(scope.row, scope.row.status === 0)"
v-hasPermi="['ecw:customer:follow-update']">{{ $t("编辑") }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-collection"
@click="handleCustomerFollow(scope.row, true)"
v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }}
</el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" />
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize"
@pagination="getCustomerFollowList"/>
</el-card>
</el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id"
hidden-search></customer-complaint>
</el-tab-pane>
<el-tab-pane name="bill" :label="$t('账单')">
<el-table style="width: 100%" :data="infoListReceiptList">
......@@ -588,16 +694,16 @@
<el-table-column :label="$t('账单')" prop="receiptNo"></el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo"></el-table-column>
<el-table-column :label="$t('箱数')" prop="num"></el-table-column>
<el-table-column :label="$t('方数')" prop="volume" ></el-table-column>
<el-table-column :label="$t('重量')" prop="weight" ></el-table-column>
<el-table-column :label="$t('方数')" prop="volume"></el-table-column>
<el-table-column :label="$t('重量')" prop="weight"></el-table-column>
<el-table-column :label="$t('类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType" />
<dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType"/>
</template>
</el-table-column>
<el-table-column :label="$t('费用类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" />
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType"/>
</template>
</el-table-column>
<el-table-column :label="$t('金额')" prop="totalAmount">
......@@ -605,39 +711,40 @@
<el-table-column :label="$t('已核销比例')" prop="writeOffScale"></el-table-column>
<el-table-column :label="$t('实收日期')">
<template v-slot="{row}">
{{parseTime(row.writeOffAt)}}
{{ parseTime(row.writeOffAt) }}
</template>
</el-table-column>
<el-table-column :label="$t('业务员')" prop="salesmanName"></el-table-column>
</el-table>
<pagination v-show="infoListReceiptList.length" :total="infoListReceiptTotal" :page.sync="infoListReceiptFrom.pageNo" :limit.sync="infoListReceiptFrom.pageSize"
<pagination v-show="infoListReceiptList.length" :total="infoListReceiptTotal"
:page.sync="infoListReceiptFrom.pageNo" :limit.sync="infoListReceiptFrom.pageSize"
@pagination="infoListReceiptFn"/>
</el-tab-pane>
<el-tab-pane name="empower" :label="$t('品牌授权')">
<el-table border style="width:100%" :data="brandAuthorizationList">
<el-table-column type="index" :prop="$t('序号')"></el-table-column>
<el-table-column :label="$t('中文标题')" prop="titleZh" ></el-table-column>
<el-table-column :label="$t('中文标题')" prop="titleZh"></el-table-column>
<el-table-column prop="titleEn" :label="$t('英文标题')"></el-table-column>
<el-table-column :label="$t('有无备案')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.BRAND_REG_TYPE" :value="row.filing" />
<dict-tag :type="DICT_TYPE.BRAND_REG_TYPE" :value="row.filing"/>
</template>
</el-table-column>
<el-table-column :label="$t('授权开始')">
<template v-slot="{row}">
{{parseTime(row.startTime)}}
{{ parseTime(row.startTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('授权结束')">
<template v-slot="{row}">
{{parseTime(row.endTime)}}
{{ parseTime(row.endTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('授权证明')">
<template v-slot="{row}">
<div v-if="!!row.fileUrl && row.fileUrl.length > 0">
<span v-for="(item, index) in (row.fileUrl||'').split(',')">
<a :href="item" target="_blank">{{$t('附件')}}{{ index + 1 }}</a>,
<a :href="item" target="_blank">{{ $t('附件') }}{{ index + 1 }}</a>,
</span>
</div>
</template>
......@@ -653,30 +760,36 @@
</el-table-column>
<el-table-column :label="$t('创建时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
</el-table>
<pagination v-show="brandAuthorizationTotal.length" :total="brandAuthorizationTotal" :page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize"
<pagination v-show="brandAuthorizationTotal.length" :total="brandAuthorizationTotal"
:page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize"
@pagination="getBrankByCustomerList"/>
</el-tab-pane>
<el-tab-pane name="deliver" :label="$t('发货评估')">
<el-descriptions :column="2">
<el-descriptions-item :label="$t('客户类别')">
{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type || '').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ') }}
</el-descriptions-item>
<el-descriptions-item :label="$t('角色')">
{{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (customer.roles||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
{{ getDictDatas2(DICT_TYPE.CUSTOMER_ROLE, (customer.roles || '').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ') }}
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{ getDictDatas2(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE, (customer.transportType||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ') }}
{{
getDictDatas2(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE, (customer.transportType || '').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')
}}
<!-- <dict-tag v-if="customer.transportType" v-for="item in (customer.transportType || '').split(',')" :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" :value="item"></dict-tag>-->
</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{ $l(customer,'pickupPointName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{
$l(customer, 'pickupPointName')
}}
</el-descriptions-item>
<el-descriptions-item :label="$t('业务国家')">
{{ isChinese ? customer.busiCountryNameZh : customer.busiCountryNameEn}}
{{ isChinese ? customer.busiCountryNameZh : customer.busiCountryNameEn }}
</el-descriptions-item>
<el-descriptions-item :label="$t('主营类别')">{{ $l(customer,'productTypeName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('主营类别')">{{ $l(customer, 'productTypeName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('年度发货量')">{{ customer.weightYearly }}</el-descriptions-item>
<el-descriptions-item :label="$t('主要竞争对手')">{{ customer.competitorNames }}</el-descriptions-item>
<el-descriptions-item :label="$t('年度发货次数')">{{ customer.numYearly }}</el-descriptions-item>
......@@ -684,18 +797,24 @@
</el-tab-pane>
<el-tab-pane name="financial" :label="$t('财务资料')">
<el-card class="box-card">
<div slot="header">{{$t('公司信息')}}</div>
<div slot="header">{{ $t('公司信息') }}</div>
<el-descriptions :column="2">
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{ customer.companyEn }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证号码')">{{ customer.carNo }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证姓名')">{{ customer.carName }}</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证号码')">
{{ customer.carNo }}
</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证姓名')">
{{ customer.carName }}
</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('付款人姓名')">{{ customer.payerName }}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="box-card" style="margin-top: 15px;">
<div slot="header">{{$t('开票信息')}}</div>
<div slot="header">{{ $t('开票信息') }}</div>
<el-descriptions :column="2">
<el-descriptions-item :label="$t('发票抬头')">{{ customer.invoiceTitle }}</el-descriptions-item>
<el-descriptions-item :label="$t('纳税人识别号')">{{ customer.licenseNumber }}</el-descriptions-item>
......@@ -708,13 +827,13 @@
</el-descriptions>
</el-card>
<el-card style="margin-top: 15px;">
<div slot="header">{{$t('银行账户')}}</div>
<div slot="header">{{ $t('银行账户') }}</div>
<el-table :data="customer.customerBankBackVOList" border>
<el-table-column :label="$t('编号')" type="index"></el-table-column>
<el-table-column :label="$t('账户名称')" prop="accountName"></el-table-column>
<el-table-column :label="$t('币别')">
<template v-slot="{row}">
{{$l(currecyList.find(i => row.currency == i.id),'title')}}
{{ $l(currecyList.find(i => row.currency == i.id), 'title') }}
</template>
</el-table-column>
<el-table-column :label="$t('银行名称')" prop="bankName"></el-table-column>
......@@ -722,12 +841,12 @@
<el-table-column :label="$t('银行代码')" prop="bankCode"></el-table-column>
<el-table-column :label="$t('账户类型')">
<template v-slot="{row}">
{{Number(row.accountType) === 1 ? $t('公账') : $t('私账')}}
{{ Number(row.accountType) === 1 ? $t('公账') : $t('私账') }}
</template>
</el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot="{row}">
{{row.status ? $t('正常') : $t('停用')}}
{{ row.status ? $t('正常') : $t('停用') }}
</template>
</el-table-column>
<el-table-column :label="$t('银行地址')" prop="bankAddress"></el-table-column>
......@@ -738,42 +857,50 @@
<el-tab-pane name="special" :label="$t('特殊设置')">
<el-descriptions :column="2">
<el-descriptions-item :label="$t('是否显示提单价格')">
<el-switch v-model="customer.isShowTidanPrice" disabled />
<el-switch v-model="customer.isShowTidanPrice" disabled/>
</el-descriptions-item>
<el-descriptions-item :label="$t('到仓确认')">
<el-switch v-model="customer.arrivalConfirm" :active-value="1" :inactive-value="0" disabled />
<el-switch v-model="customer.arrivalConfirm" :active-value="1" :inactive-value="0" disabled/>
</el-descriptions-item>
<el-descriptions-item :label="$t('重货标准')">{{
customer.weightUnit ? `${customer.weightUnit}kg/cbm` : ''
}}
</el-descriptions-item>
<el-descriptions-item :label="$t('泡货标准')">
{{ customer.lightUnit ? `${customer.lightUnit}kg/cbm` : '' }}
</el-descriptions-item>
<el-descriptions-item :label="$t('重货标准')">{{ customer.weightUnit ? `${customer.weightUnit}kg/cbm` : '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('泡货标准')">{{ customer.lightUnit ? `${customer.lightUnit}kg/cbm` : ''}}</el-descriptions-item>
<el-descriptions-item :label="$t('控货无收货人')">
<el-switch v-model="customer.noConsignee" disabled />
<el-switch v-model="customer.noConsignee" disabled/>
</el-descriptions-item>
<el-descriptions-item :label="$t('默认付款')">
<el-switch v-model="customer.defaultPay" disabled />
<el-switch v-model="customer.defaultPay" disabled/>
</el-descriptions-item>
<el-descriptions-item :label="$t('默认开票')">
<el-switch v-model="customer.defaultBilling" disabled />
<el-switch v-model="customer.defaultBilling" disabled/>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane name="credit" :label="$t('信用日志')">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-button style="float: right;" type="primary" @click="dialogVisible = true" >{{$t('添加信用日志')}}</el-button>
<el-button style="float: right;" type="primary" @click="dialogVisible = true">{{ $t('添加信用日志') }}
</el-button>
<el-descriptions :column="5" border>
<el-descriptions-item v-for="(item,index) in creditScoreStatisticObj" :key="index" :label="creditScoreCalculation(item.type)">{{item.score}}</el-descriptions-item>
<el-descriptions-item v-for="(item,index) in creditScoreStatisticObj" :key="index"
:label="creditScoreCalculation(item.type)">{{ item.score }}
</el-descriptions-item>
</el-descriptions>
</div>
<el-table :data="customerCreditLogList">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('规则名称')">
<template v-slot="{row}">
{{ isChinese ? row.name : row.nameEn}}
{{ isChinese ? row.name : row.nameEn }}
</template>
</el-table-column>
<el-table-column prop="type" :label="$t('规则分类')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="row.type" />
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="row.type"/>
</template>
</el-table-column>
<el-table-column prop="score" :label="$t('规则得分')"></el-table-column>
......@@ -781,11 +908,13 @@
<el-table-column :label="$t('添加人')" prop="createName"></el-table-column>
<el-table-column :label="$t('时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
</el-table>
<pagination @pagination="creditLogPage" :page.sync="customerCreditLogFrom.pageNo" :limit.sync="customerCreditLogFrom.pageSize" :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 name="grade" :label="$t('等级日志')">
......@@ -794,20 +923,21 @@
<el-table-column :label="$t('规则名称')" prop="name"></el-table-column>
<el-table-column :label="$t('规则分类')" prop="type">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE" :value="row.type" />
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE" :value="row.type"/>
</template>
</el-table-column>
<el-table-column :label="$t('规则得分')" prop="score"></el-table-column>
<el-table-column :label="$t('备注')" prop="remark"></el-table-column>
<el-table-column :label="$t('时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
{{ parseTime(row.createTime) }}
</template>
</el-table-column>
</el-table>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo" :limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total" ></pagination>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo"
:limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total"></pagination>
</el-tab-pane>
<el-tab-pane name="operationLog" v-if="checkPermi(['customer:operate-log:query'])" :label="$t('操作日志')" >
<el-tab-pane name="operationLog" v-if="checkPermi(['customer:operate-log:query'])" :label="$t('操作日志')">
<customer-log :customerId="id" v-if="'operationLog' === activeName"></customer-log>
</el-tab-pane>
</el-tabs>
......@@ -819,27 +949,32 @@
width="30%"
>
<h1 slot="title">
{{$t('给客户')}}{{customer.name}}{{$t('添加信用日志')}}
{{ $t('给客户') }}{{ customer.name }}{{ $t('添加信用日志') }}
</h1>
<el-form label-width="100">
<el-form-item :label="$t('客户编号:')">{{customer.number}}</el-form-item>
<el-form-item :label="$t('客户编号:')">{{ customer.number }}</el-form-item>
<el-form-item :label="$t('信用类别')">
<el-select v-model="creditFrom.ruleId">
<el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id" :label="isChinese ? item.name : item.nameEn"></el-option>
<el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id"
:label="isChinese ? item.name : item.nameEn"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="creditTypeList.length > 0" :label="$t('信用分')">{{(creditTypeList.find(r=>creditFrom.ruleId === r.id) || {}).score }}{{$t('')}}</el-form-item>
<el-form-item v-if="creditTypeList.length > 0" :label="$t('信用分')">
{{ (creditTypeList.find(r => creditFrom.ruleId === r.id) || {}).score }}{{ $t('') }}
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="creditFrom.remark"> </el-input>
<el-input type="textarea" v-model="creditFrom.remark"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="submit">{{$t('提交')}}</el-button>
<el-button @click="dialogVisible = false" >{{$t('取消')}}</el-button>
<el-button @click="submit">{{ $t('提交') }}</el-button>
<el-button @click="dialogVisible = false">{{ $t('取消') }}</el-button>
</div>
</el-dialog>
<customer-follow ref="customerFollow" v-if="customerFollowVisible" :id="id" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="getCustomerFollowList" />
<customer-follow ref="customerFollow" v-if="customerFollowVisible" :id="id" :customer-id="id"
:customer-service="customer.customerService" :customer-number="customer.number"
@refresh="getCustomerFollowList"/>
</div>
</template>
......@@ -856,15 +991,15 @@ import {
creditScoreStatistic,
infoListReceiptPage, memberUserList, deleteCustomer,
} from '@/api/ecw/customer'
import { getOfferPage as infoListOfferPage } from '@/api/ecw/offer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
import { getNodeList } from '@/api/ecw/node'
import {getOfferPage as infoListOfferPage} from '@/api/ecw/offer'
import {DICT_TYPE, getDictDataLabel, getDictDatas2} from '@/utils/dict'
import {getProductTypeList} from '@/api/ecw/productType'
import {getNodeList} from '@/api/ecw/node'
import CustomerFollow from "./components/customerFollow"
import { parseTime } from '@/utils/ruoyi'
import {parseTime} from '@/utils/ruoyi'
import CustomerComplaint from '@/views/ecw/customerComplaint'
import { listServiceUser, getUserProfile } from '@/api/system/user'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import {listServiceUser, getUserProfile} from '@/api/system/user'
import {getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts'
import {getOrderPage, getRegionList} from "@/api/ecw/order";
import Template from "@/views/cms/template";
import {getCreditRulePage} from "@/api/customer/creditRule";
......@@ -873,13 +1008,14 @@ import {getCurrencyList} from "@/api/ecw/currency";
import customerLog from "@/views/ecw/customer/customerLog.vue";
import {checkPermi} from "@/utils/permission";
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import { getListTree } from "@/api/ecw/region";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer";
import {getListTree} from "@/api/ecw/region";
import {getWarehouseList} from "@/api/ecw/warehouse";
import {deleteOffer, cancel, recovery} from "@/api/ecw/offer";
import {
getCustomerFollowList,
exportCustomerFollow
} from "@/api/ecw/customerFollow"
export default {
name: 'query',
components: {
......@@ -895,24 +1031,35 @@ export default {
this.currecyList = response.data;
})
//获取信用类型
getCreditRulePage({page:1,rows:999,type:2}).then(r => {
getCreditRulePage({page: 1, rows: 999, type: 2}).then(r => {
this.creditTypeList = r.data.list
})
// getNodeList().then(r => {
// this.nodeList = r.data
// })
getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data }
console.log( this.customer,'this.customer')
this.customer = {...this.customer, ...response.data}
console.log(this.customer, 'this.customer')
getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data
if (this.customerContacts.length > 0) {
this.customerContacts.forEach(contacts => {
if (contacts.isDefault === 1) {
this.customer.defaultContactName = this.isChinese ? contacts.nameZh : contacts.nameEn;
this.customer.defaultContactId = contacts.id;
this.customer.defaultContactPhone = contacts.phoneNew;
this.customer.defaultCountryCode = contacts.areaCode;
this.customer.defaultEmail = contacts.email;
}
});
let list = this.customerContacts.filter(r => r.userid)
if(list.length > 0){
memberUserList({ids:list.map(i=>i.userid).join(',')}).then(r => {
if (list.length > 0) {
memberUserList({ids: list.map(i => i.userid).join(',')}).then(r => {
this.memberList = r.data
})
}
}
})
})
......@@ -933,8 +1080,8 @@ export default {
this.getWarehouseList()
this.getUserProfile()
},
watch:{
activeName(val){
watch: {
activeName(val) {
switch (val) {
case 'order':
this.destCountryId = ''
......@@ -1044,19 +1191,19 @@ export default {
},
data() {
return {
activeName:'order',
currecyList:[],
STATUS:{
0:this.$t('取消报价'),
1:this.$t('特价审批中'),
2:this.$t('需求确认'),
3:this.$t('跟进中'),
4:this.$t('赢单'),
5:this.$t('输单'),
6:this.$t('报价完成'),
7:this.$t('跟进中')
activeName: 'order',
currecyList: [],
STATUS: {
0: this.$t('取消报价'),
1: this.$t('特价审批中'),
2: this.$t('需求确认'),
3: this.$t('跟进中'),
4: this.$t('赢单'),
5: this.$t('输单'),
6: this.$t('报价完成'),
7: this.$t('跟进中')
},
dialogVisible:false,
dialogVisible: false,
DICT_TYPE,
getDictDataLabel,
getDictDatas2,
......@@ -1104,47 +1251,47 @@ export default {
weightUnit: undefined,
createTime: undefined
},
brandAuthorizationFrom:{
pageNo:1,
pageSize:10,
brandAuthorizationFrom: {
pageNo: 1,
pageSize: 10,
},
brandAuthorizationList:[],
brandAuthorizationTotal:0,
getCustomerGradeFrom:{
pageNo:1,
pageSize:10,
total:0
brandAuthorizationList: [],
brandAuthorizationTotal: 0,
getCustomerGradeFrom: {
pageNo: 1,
pageSize: 10,
total: 0
},
getCustomerGradeList:[],
customerCreditLogFrom:{
pageNo:1,
pageSize:10,
total:0
getCustomerGradeList: [],
customerCreditLogFrom: {
pageNo: 1,
pageSize: 10,
total: 0
},
customerCreditLogList:[],
rucangtime:[],
queryParams:{
rows:10,
page:1
customerCreditLogList: [],
rucangtime: [],
queryParams: {
rows: 10,
page: 1
},
orderList:[],
orderTotal:0,
infoListOfferFrom:{
pageNo:1,
pageSize:10,
orderList: [],
orderTotal: 0,
infoListOfferFrom: {
pageNo: 1,
pageSize: 10,
},
infoListOfferTotal:0,
infoListOfferList:[],
orderStatisticsObj:{},
creditTypeList:[],
creditFrom:{},//添加信用 日志
creditScoreStatisticObj:[],
infoListReceiptList:[],
infoListReceiptFrom:{
pageNo:1,
pageSize:10,
infoListOfferTotal: 0,
infoListOfferList: [],
orderStatisticsObj: {},
creditTypeList: [],
creditFrom: {},//添加信用 日志
creditScoreStatisticObj: [],
infoListReceiptList: [],
infoListReceiptFrom: {
pageNo: 1,
pageSize: 10,
},
infoListReceiptTotal:0,
infoListReceiptTotal: 0,
country: '',
showMore: true,
AddressCity: [],
......@@ -1167,16 +1314,16 @@ export default {
}
},
computed: {
permissions(){
permissions() {
return this.$store.state.user.permissions
},
customerId(){
customerId() {
return this.$route.params.customerId;
},
isChinese(){
isChinese() {
return this.$i18n.locale === 'zh_CN'
},
pickupPoint(){
pickupPoint() {
const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint))
return pickupPoint ? pickupPoint.titleZh : ''
},
......@@ -1187,17 +1334,17 @@ export default {
id() {
return parseInt(this.$route.params.customerId)
},
creditScoreCalculation(){
return (val)=>{
if(val === 'all'){
creditScoreCalculation() {
return (val) => {
if (val === 'all') {
return this.$t('信用分')
}else{
if(this.isChinese) return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
else return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).labelEn
} else {
if (this.isChinese) return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val) || {}).label
else return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val) || {}).labelEn
}
}
},
currencyMap(){
currencyMap() {
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
......@@ -1215,16 +1362,16 @@ export default {
return null
}
},
methods:{
methods: {
getUserProfile() {
getUserProfile().then((res) => {
this.userId = res.data.id;
})
},
customerFollowFn(val){
customerFollowFn(val) {
this.activeName = val
this.$nextTick(()=>{
if(val === 'follow'){
this.$nextTick(() => {
if (val === 'follow') {
this.customerFollowVisible = true
this.$nextTick(_ => {
this.$refs['customerFollow'].handleAdd()
......@@ -1234,13 +1381,13 @@ export default {
}
})
},
quote(){
quote() {
const row = this.customer
if (row.customerService != this.userId) {
this.$message.error(this.$t("此客户属于其他客户经理名下的客户。"));
return;
}
this.$router.push({ path: "/offer/create", query: { customer: row, type: 1 } })
this.$router.push({path: "/offer/create", query: {customer: row, type: 1}})
},
handleCustomerFollow(row, flag) {
this.customerFollowVisible = true
......@@ -1255,7 +1402,7 @@ export default {
})
},
checkPermi,
userIdFormatter(row, column, cellValue){
userIdFormatter(row, column, cellValue) {
const member = this.memberList.find(e => e.id === cellValue)
if (member) {
return member.nickname + '(' + member.mobile + ')'
......@@ -1263,39 +1410,42 @@ export default {
return ''
}
},
changeDate(val){
if(val){
changeDate(val) {
if (val) {
this.queryParams.beginRucangTime = val[0];
this.queryParams. endRucangTime = val[1];
}else {
this.queryParams.endRucangTime = val[1];
} else {
this.queryParams.beginRucangTime = undefined;
this.queryParams.endRucangTime = undefined;
}
},
//品牌授权
getBrankByCustomerList(){
getBrankByCustomer({...this.brandAuthorizationFrom,customerId:this.id}).then(r => {this.brandAuthorizationList = r.data.list; this.brandAuthorizationTotal = r.data.total})
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,total:undefined}).then(r => {
if(r.code === 0){
getCustomerGrade() {
levelLogPage({...this.getCustomerGradeFrom, customerId: this.id, total: undefined}).then(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){
creditLogPage() {
customerCreditLogPage({...this.customerCreditLogFrom, customerId: this.id}).then(r => {
if (r.code === 0) {
this.customerCreditLogList = r.data.list;
this.customerCreditLogFrom.total = r.data.total;
}
})
},
//订单
getorderList(){
getorderList() {
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
......@@ -1309,8 +1459,8 @@ export default {
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
}
infoListOrderPage({customerDetailId:this.id,...this.queryParams,...queryParams}).then(r => {
if(r.code === 0){
infoListOrderPage({customerDetailId: this.id, ...this.queryParams, ...queryParams}).then(r => {
if (r.code === 0) {
this.orderList = r.data.list
this.orderTotal = r.data.total
}
......@@ -1320,12 +1470,12 @@ export default {
this.destCountryId = null
this.objectiveId = null
this.destWarehouseId = null
this.queryParams = { rows:10,page:1};
this.queryParams = {rows: 10, page: 1};
this.getorderList()
this.rucangtime = [];
},
// 客户报价
getInfoListOfferPage(){
getInfoListOfferPage() {
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
......@@ -1339,7 +1489,7 @@ export default {
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
}
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id,...queryParams}).then(r => {
infoListOfferPage({...this.infoListOfferFrom, customerId: this.id, ...queryParams}).then(r => {
this.infoListOfferList = r.data.list;
this.infoListOfferTotal = r.data.total;
})
......@@ -1348,7 +1498,7 @@ export default {
this.destCountryId = null
this.objectiveId = null
this.destWarehouseId = null
this.infoListOfferFrom = { pageNo:1,pageSize:10};
this.infoListOfferFrom = {pageNo: 1, pageSize: 10};
this.getInfoListOfferPage()
},
getCustomerFollowList() {
......@@ -1375,16 +1525,16 @@ export default {
})
},
// 数据
getOrderStatistics(){
orderStatistics({customerId:this.id}).then(r => {
if(r.code === 0){
getOrderStatistics() {
orderStatistics({customerId: this.id}).then(r => {
if (r.code === 0) {
this.orderStatisticsObj = r.data
}
})
},
submit(){
creditLogCreate({customerId:this.id,...this.creditFrom}).then(r => {
if(r.code === 0){
submit() {
creditLogCreate({customerId: this.id, ...this.creditFrom}).then(r => {
if (r.code === 0) {
this.creditLogPage();
this.creditFrom = {};
this.creditScoreStatisticFn()
......@@ -1393,22 +1543,22 @@ export default {
})
},
//获得信用客户统计
creditScoreStatisticFn(){
creditScoreStatistic({customerId:this.id}).then(r => {
if(r.code === 0) this.creditScoreStatisticObj = r.data
creditScoreStatisticFn() {
creditScoreStatistic({customerId: this.id}).then(r => {
if (r.code === 0) this.creditScoreStatisticObj = r.data
})
},
// 获取账单数据
infoListReceiptFn(){
infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => {
infoListReceiptFn() {
infoListReceiptPage({...this.infoListReceiptFrom, customerId: this.id}).then(r => {
if(r.code === 0){
if (r.code === 0) {
this.infoListReceiptList = r.data.list;
this.infoListReceiptTotal = r.data.total;
}
})
},
deleteCustomerFn(){
deleteCustomerFn() {
this.$confirm(`${this.$t('是否要删除当前客户')}《${this.customer.name}》?`, `${this.$t('提示')}`, {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
......@@ -1423,7 +1573,7 @@ export default {
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
if (this.destCountryId != null && this.destCountryId != "") {
getRegionList(2, this.destCountryId).then(({ data }) => {
getRegionList(2, this.destCountryId).then(({data}) => {
this.AddressCity = data;
})
}
......@@ -1431,7 +1581,7 @@ export default {
findBycityCode() {
//获取当前城市值id,获取该城市下区域
if (this.objectiveId != null && this.objectiveId != "") {
getRegionList(3, this.objectiveId).then(({ data }) => {
getRegionList(3, this.objectiveId).then(({data}) => {
this.AddressTown = data;
})
}
......@@ -1442,17 +1592,17 @@ export default {
this.getAddressTown()
},
getAddressProvince() {
getRegionList(1, 1).then(({ data }) => {
getRegionList(1, 1).then(({data}) => {
this.AddressProvince = data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
getRegionList(4, 4).then(({data}) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
})
},
......@@ -1473,24 +1623,24 @@ export default {
},
getWarehouse(id) {
let warehouseName = ''
for(const item of this.warehouseList) {
if(item.id == id){
warehouseName = this.$i18n.locale=='zh_CN'?item.titleZh:item.titleEn
for (const item of this.warehouseList) {
if (item.id == id) {
warehouseName = this.$i18n.locale == 'zh_CN' ? item.titleZh : item.titleEn
break
}
}
return warehouseName
},
cancel(id){
cancel(id) {
this.doAction(this.$t('确定要取消此报价单么?'), cancel, id);
},
recovery(id){
recovery(id) {
this.doAction(this.$t('确定要恢复此报价单么?'), recovery, id);
},
deleteOffer(id){
deleteOffer(id) {
this.doAction(this.$t('确定要删除此报价单么?'), deleteOffer, id);
},
doAction(tips, action, id){
doAction(tips, action, id) {
this.$confirm(tips).then(res => {
return action(id)
})
......
......@@ -991,9 +991,9 @@ export default {
data() {
return {
// 遮罩层
form: {
relation: 1, // CustomerLevel 的初始值
},
// form: {
// relation: 1, // CustomerLevel 的初始值
// },
type: this.$route.query.type,
contacts: null,
contactsList: [],
......@@ -1011,7 +1011,10 @@ export default {
// couponList: [],
fee: {}, // 费用
// 表单参数
form: { ...createDefaultForm() },
form: {
relation: 1,
...createDefaultForm()
},
// 表单校验
labelStyle: "width:120px",
......@@ -1059,8 +1062,18 @@ export default {
},
computed: {
computedStandard() {
if (this.$route.query.type == 1) {
if (this.$route.query.type === 1) {
// 使用计算属性动态设置 'Standard' 的值
const type = this.$route.query.customer.type
if (type){
// 客户类型不为空时
const types = type.split(',');
if (types.includes("0")) {
this.form.relation = 1
}else {
this.form.relation = 2
}
}
switch (this.form.relation) {
case 1:
if (this.$route.query.customer.defaultContactName != null) {
......@@ -1077,6 +1090,8 @@ export default {
if (this.$route.query.customer.defaultContactPhone != null) {
this.form.consignorPhone =
this.$route.query.customer.defaultContactPhone;
this.form.consigorCountryCode =
this.$route.query.customer.defaultCountryCode;
this.form.consigneePhone = "";
this.form.consigeeCountryCode = "";
}
......
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