Commit 865f5cda authored by dcy's avatar dcy

全部客户,客户查看,客户修改页面国际化

parent 6c456cef
...@@ -6,47 +6,47 @@ ...@@ -6,47 +6,47 @@
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户名称" prop="name"> <el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="form.name" placeholder="请输入客户名称" /> <el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="国家" prop="country"> <el-form-item :label="$t('国家')" prop="country">
<el-select v-model="form.country" placeholder="请选择国家"> <el-select v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户等级" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" placeholder="请选择客户等级" disabled> <el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系地址" prop="address"> <el-form-item :label="$t('联系地址')" prop="address">
<el-input v-model="form.address" placeholder="请输入联系地址" /> <el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户类别" prop="type"> <el-form-item :label="$t('客户类别')" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector> <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="常用提货网点" prop="pickupPoint"> <el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" placeholder="请输入常用提货网点"> <el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
<el-option v-for="node in nodeList" <el-option v-for="node in nodeList"
:key="node.id" :label="node.titleZh" :value="node.id" /> :key="node.id" :label="node.titleZh" :value="node.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13" v-show="form.type && form.type.indexOf('3') !== -1"> <el-col :span="13" v-show="form.type && form.type.indexOf('3') !== -1">
<el-form-item label="所属代理" prop="agentId"> <el-form-item :label="$t('所属代理')" prop="agentId">
<el-select v-model="form.agentId" placeholder="请选择所属代理"> <el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
...@@ -54,31 +54,31 @@ ...@@ -54,31 +54,31 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="公司名称" prop="company"> <el-form-item :label="$t('公司名称')" prop="company">
<el-input v-model="form.company" placeholder="请输入公司名称" /> <el-input v-model="form.company" :placeholder="$t('请输入公司名称')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户生日" prop="birthday"> <el-form-item :label="$t('客户生日')" prop="birthday">
<el-date-picker <el-date-picker
v-model="form.birthday" v-model="form.birthday"
type="date" type="date"
value-format="timestamp" value-format="timestamp"
placeholder="请输入客户生日"> :placeholder="$t('请输入客户生日')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="主营类别" prop="productType"> <el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="11"> <el-col :span="11">
<el-select v-model="form.productType" placeholder="请选择产品类别" @change="form.productId = ''"> <el-select v-model="form.productType" :placeholder="$t('请选择产品类别')" @change="form.productId = ''">
<el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/> <el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-select v-model="form.productId" placeholder="请选择"> <el-select v-model="form.productId" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/> <el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/>
</el-select> </el-select>
</el-col> </el-col>
...@@ -86,46 +86,46 @@ ...@@ -86,46 +86,46 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户来源" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" placeholder="请选择客户来源"> <el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="结算方式" prop="balance"> <el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" placeholder="请选择结算方式"> <el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户经理" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理"> <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-option v-for="item in serviceUserList" <el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" /> :key="item.id" :label="item.nickname" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="图片" prop="picture"> <el-form-item :label="$t('图片')" prop="picture">
<upload v-model="form.picture" :limit="1"></upload> <upload v-model="form.picture" :limit="1"></upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户状态" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" placeholder="请选择客户状态" disabled> <el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="推介人" prop="promoter"> <el-form-item :label="$t('推介人')" prop="promoter">
<el-select v-model="form.promoter" placeholder="请输入推介人" filterable> <el-select v-model="form.promoter" :placeholder="$t('请输入推介人')" filterable>
<el-option <el-option
v-for="item in customerSelect" v-for="item in customerSelect"
:key="item.id" :key="item.id"
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="创建人" prop="founder"> <el-form-item :label="$t('创建人')" prop="founder">
<el-select v-model="form.founder" disabled> <el-select v-model="form.founder" disabled>
<el-option <el-option
v-for="item in serviceUserList" v-for="item in serviceUserList"
...@@ -148,54 +148,54 @@ ...@@ -148,54 +148,54 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="创建时间" prop="createTime"> <el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker <el-date-picker
v-model="form.createTime" v-model="form.createTime"
type="datetime" type="datetime"
value-format="timestamp" value-format="timestamp"
placeholder="选择创建时间"> :placeholder="$t('选择创建时间')">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注" prop="remarks"> <el-form-item :label="$t('备注')" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/> <el-input v-model="form.remarks" :placeholder="$t('请输入备注')"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否显示提单价格" prop="remarks"> <el-form-item :label="$t('是否显示提单价格')" prop="remarks">
<el-switch v-model="form.isShowTidanPrice"></el-switch> <el-switch v-model="form.isShowTidanPrice"></el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="到仓确认" prop="arrivalConfirm"> <el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch v-model="form.arrivalConfirm" :active-value="0" :inactive-value="1" /> <el-switch v-model="form.arrivalConfirm" :active-value="0" :inactive-value="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item label="重货标准" prop="weightUnit"> <el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong"/> <el-switch v-model="showZhong"/>
<el-input v-model="form.weightUnit" placeholder="请输入重货标准" v-show="showZhong"> <el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong">
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-show="showZhong"> <el-col :span="24" v-show="showZhong">
<el-form-item label="指定线路" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showZhong1"></el-switch> <el-switch v-model="showZhong1"></el-switch>
<customer-line-table v-show="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="0"></customer-line-table> <customer-line-table v-show="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="0"></customer-line-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item label="泡货标准" prop="weightUnit"> <el-form-item :label="$t('泡货标准')" prop="weightUnit">
<el-switch v-model="showPao"/> <el-switch v-model="showPao"/>
<el-input v-model="form.lightUnit" placeholder="请输入泡货标准" v-show="showPao"> <el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao">
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-show="showPao"> <el-col :span="24" v-show="showPao">
<el-form-item label="指定线路" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showPao1"></el-switch> <el-switch v-model="showPao1"></el-switch>
<customer-line-table v-show="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="1"></customer-line-table> <customer-line-table v-show="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="1"></customer-line-table>
</el-form-item> </el-form-item>
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>联系人</span> <span>{{$t('联系人')}}</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button> <el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button>
</div> </div>
<el-form ref="contactForm" :rules="contactRules" :model="form"> <el-form ref="contactForm" :rules="contactRules" :model="form">
...@@ -214,49 +214,49 @@ ...@@ -214,49 +214,49 @@
> >
<el-table-column <el-table-column
prop="department" prop="department"
label="部门" :label="$t('部门')"
width="" width=""
> >
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="row.department" placeholder="请输入部门" size="mini"/> <el-input v-model="row.department" :placeholder="$t('请输入部门')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="position" prop="position"
label="职位" :label="$t('职位')"
width="" width=""
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="row.position" placeholder="请输入职位" size="mini"/> <el-input v-model="row.position" :placeholder="$t('请输入职位')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="联系人" :label="$t('联系人')"
> >
<template slot="header"> <template slot="header">
联系人 <span style="color: #ff0000">*</span> {{$t('联系人')}} <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row, cellValue, $index}"> <template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label=""> <el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
<el-input v-model="row.name" placeholder="请输入联系人" size="mini"/> <el-input v-model="row.name" :placeholder="$t('请输入联系人')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="areaCode" prop="areaCode"
label="区号" :label="$t('区号')"
> >
<template slot="header"> <template slot="header">
区号 <span style="color: #ff0000">*</span> {{$t('区号')}} <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row, cellValue, $index}"> <template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label=""> <el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" placeholder="请选择区号" filterable size="mini"> <el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini">
<el-option v-for="(item, index) in countryList" <el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" /> :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select> </el-select>
...@@ -265,20 +265,20 @@ ...@@ -265,20 +265,20 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="phoneNew" prop="phoneNew"
label="联系方式" :label="$t('联系方式')"
> >
<template slot="header"> <template slot="header">
联系方式 <span style="color: #ff0000">*</span> {{$t('联系方式')}} <span style="color: #ff0000">*</span>
</template> </template>
<template v-slot="{row, cellValue, $index}"> <template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label=""> <el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
<el-input v-model="row.phoneNew" placeholder="请输入联系方式" size="mini"/> <el-input v-model="row.phoneNew" :placeholder="$t('请输入联系方式')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop=""
label="关联账号" :label="$t('关联账号')"
> >
<template v-slot = "{row}"> <template v-slot = "{row}">
<el-form-item label=""> <el-form-item label="">
...@@ -290,11 +290,11 @@ ...@@ -290,11 +290,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="social" prop="social"
label="社交软件" :label="$t('社交软件')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.social" placeholder="请选择社交软件" size="mini"> <el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" /> :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select> </el-select>
...@@ -303,31 +303,31 @@ ...@@ -303,31 +303,31 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="socialNumber" prop="socialNumber"
label="社交软件号码" :label="$t('社交软件号码')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="row.socialNumber" placeholder="请输入社交软件号码" size="mini"/> <el-input v-model="row.socialNumber" :placeholder="$t('请输入社交软件号码')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="email" prop="email"
label="邮箱" :label="$t('邮箱')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
<el-form-item label=""> <el-form-item label="">
<el-input v-model="row.email" placeholder="请输入邮箱" size="mini"/> <el-input v-model="row.email" :placeholder="$t('请输入邮箱')" size="mini"/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="isDefault" prop="isDefault"
label="设为默认" :label="$t('设为默认')"
> >
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.isDefault" placeholder="设为默认" @change="handleDefaultChange($index)" size="mini"> <el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)" <el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" /> :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select> </el-select>
...@@ -336,11 +336,11 @@ ...@@ -336,11 +336,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="操作" :label="$t('操作')"
> >
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-form-item label=""> <el-form-item label="">
<el-button type="danger" @click="handleDeleteContact($index)" size="mini">删除</el-button> <el-button type="danger" @click="handleDeleteContact($index)" size="mini">{{$t('删除')}}</el-button>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -351,49 +351,49 @@ ...@@ -351,49 +351,49 @@
<el-row :gutter="10" style="margin-top: 15px"> <el-row :gutter="10" style="margin-top: 15px">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="发票抬头" prop="invoiceTitle"> <el-form-item label="发票抬头" prop="invoiceTitle">
<el-input v-model="form.invoiceTitle" placeholder="请输入发票抬头" /> <el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="纳税人识别号" prop="licenseNumber"> <el-form-item :label="$t('纳税人识别号')" prop="licenseNumber">
<el-input v-model="form.licenseNumber" placeholder="请输入纳税人识别号" /> <el-input v-model="form.licenseNumber" :placeholder="$t('请输入纳税人识别号')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开户行" prop="bank"> <el-form-item :label="$t('开户行')" prop="bank">
<el-input v-model="form.bank" placeholder="请输入开户行" /> <el-input v-model="form.bank" :placeholder="$t('请输入开户行')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="账户" prop="bankNumber"> <el-form-item :label="$t('账户')" prop="bankNumber">
<el-input v-model="form.bankNumber" placeholder="请输入账户" /> <el-input v-model="form.bankNumber" :placeholder="$t('请输入账户')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目" prop="project"> <el-form-item :label="$t('项目')" prop="project">
<el-input v-model="form.project" placeholder="请输入项目" /> <el-input v-model="form.project" :placeholder="$t('请输入项目')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开票地址" prop="billingAddress"> <el-form-item :label="$t('开票地址')" prop="billingAddress">
<el-input v-model="form.billingAddress" placeholder="请输入开票地址" /> <el-input v-model="form.billingAddress" :placeholder="$t('请输入开票地址')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开票电话" prop="billingTell"> <el-form-item :label="$t('开票电话')" prop="billingTell">
<el-input v-model="form.billingTell" placeholder="请输入开票电话" maxlength="50" /> <el-input v-model="form.billingTell" :placeholder="$t('请输入开票电话')" maxlength="50" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="税率" prop="taxRate"> <el-form-item :label="$t('税率')" prop="taxRate">
<el-input v-model="form.taxRate" placeholder="请输入税率" /> <el-input v-model="form.taxRate" :placeholder="$t('请输入税率')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">{{$t('取 消')}}</el-button>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
}) })
}) })
} else { } else {
const obj = Object.assign({}, this.$route, { title: "自定义标题" }) const obj = Object.assign({}, this.$route, { title: this.$t('自定义标题') })
this.$tab.updatePage(obj); this.$tab.updatePage(obj);
this.$tab.updatePage({...this.$route, meta: {...this.$route.meta, name: 'abc'}}) this.$tab.updatePage({...this.$route, meta: {...this.$route.meta, name: 'abc'}})
} }
...@@ -482,21 +482,21 @@ export default { ...@@ -482,21 +482,21 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }], name: [{ required: true, message: this.$t('客户名称不能为空'), trigger: "blur" }],
country: [{ required: true, message: "国家不能为空", trigger: "blur" }], country: [{ required: true, message: this.$t('国家不能为空'), trigger: "blur" }],
level: [{ required: true, message: "客户等级不能为空", trigger: "blur" }], level: [{ required: true, message: this.$t('客户等级不能为空'), trigger: "blur" }],
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }], type: [{ required: true, message: this.$t('客户类别不能为空'), trigger: "blur" }],
createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }], createTime: [{ required: true, message: this.$t('创建时间不能为空'), trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }], source: [{ required: true, message: this.$t('客户来源不能为空'), trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }], customerService: [{ required: true, message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }], status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }], founder: [{ required: true, message: this.$t('创建人不能为空'), trigger: "blur" }],
}, },
contactRules: { contactRules: {
name: [{ required: true, message: "请输入联系人", trigger: "blur" }], name: [{ required: true, message: this.$t('请输入联系人'), trigger: "blur" }],
areaCode: [{ required: true, message: "请选择区号", trigger: "change" }], areaCode: [{ required: true, message: this.$t('请选择区号'), trigger: "change" }],
phoneNew: [{ phoneNew: [{
required: true, required: true,
trigger: "blur", trigger: "blur",
...@@ -526,7 +526,7 @@ export default { ...@@ -526,7 +526,7 @@ export default {
methods: { methods: {
phoneValidator(rule, value, callback){ phoneValidator(rule, value, callback){
if (!value) { if (!value) {
return callback(new Error('请输入联系方式')); return callback(new Error(this.$t('请输入联系方式')));
} }
validatorMobile({ validatorMobile({
code: this.form.customerContacts.find(e => e.phoneNew === value).areaCode, code: this.form.customerContacts.find(e => e.phoneNew === value).areaCode,
...@@ -535,17 +535,17 @@ export default { ...@@ -535,17 +535,17 @@ export default {
if (r.data){ if (r.data){
callback() callback()
} else { } else {
callback(new Error(r.msg || '手机号验证失败')) callback(new Error(r.msg || this.$t('手机号验证失败')))
} }
}).catch(e => { }).catch(e => {
console.error(e) console.error(e)
callback(new Error('手机号验证失败')) callback(new Error(this.$t('手机号验证失败')))
}) })
}, },
handleDefaultChange($index){ handleDefaultChange($index){
// 只有一个联系人,设置成非默认 // 只有一个联系人,设置成非默认
if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){ if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){
this.$modal.msgWarning('至少拥有一个默认联系人') this.$modal.msgWarning(this.$t('至少拥有一个默认联系人'))
this.form.customerContacts[0].isDefault = 1 this.form.customerContacts[0].isDefault = 1
return return
} }
...@@ -577,7 +577,7 @@ export default { ...@@ -577,7 +577,7 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if(this.form.customerContacts.length === 0){ if(this.form.customerContacts.length === 0){
this.$modal.alert('至少添加一位联系人') this.$modal.alert(this.$t('至少添加一位联系人'))
return return
} }
this.$refs["contactForm"].validate(valid1 => { this.$refs["contactForm"].validate(valid1 => {
...@@ -586,7 +586,7 @@ export default { ...@@ -586,7 +586,7 @@ export default {
return; return;
} }
if (this.form.customerContacts.length === 0){ if (this.form.customerContacts.length === 0){
this.$modal.msgError("至少填写一个联系人信息"); this.$modal.msgError(this.$t('至少填写一个联系人信息'));
return return
} }
...@@ -599,25 +599,25 @@ export default { ...@@ -599,25 +599,25 @@ export default {
}) })
updateCustomer(form).then(response => { updateCustomer(form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false; this.open = false;
// this.getList(); // this.getList();
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj);
}).catch(e => { }).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员') this.$modal.msgError(e.msg || this.$t('添加客户失败,请联系管理员'))
}); });
return; return;
} }
// 添加的提交 // 添加的提交
createCustomer(form).then(response => { createCustomer(form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false; this.open = false;
// this.getList(); // this.getList();
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj);
}).catch(e => { }).catch(e => {
this.$modal.msgError(e.msg || '添加客户失败,请联系管理员') this.$modal.msgError(e.msg || this.$t('添加客户失败,请联系管理员'))
}); });
}); });
}) })
...@@ -670,7 +670,7 @@ export default { ...@@ -670,7 +670,7 @@ export default {
return getCustomer(id).then(response => { return getCustomer(id).then(response => {
this.form = { ...this.form, ...response.data, id: this.customerId }; this.form = { ...this.form, ...response.data, id: this.customerId };
this.open = true; this.open = true;
this.title = "修改客户"; this.title = this.$t('修改客户');
}); });
}, },
updateCustomerLines() { updateCustomerLines() {
......
...@@ -3,60 +3,60 @@ ...@@ -3,60 +3,60 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="客户编号" prop="number"> <el-form-item :label="$t('客户编号')" prop="number">
<el-input v-model="queryParams.number" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.number" placeholder="请输入客户编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="客户名称" prop="name"> <el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> </el-form-item>
<el-form-item label="客户等级" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" placeholder="请选择客户等级" clearable size="small"> <el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="联系方式"> <el-form-item :label="$t('联系方式')">
<el-input placeholder="请输入联系方式" v-model="queryParams.defaultContactPhone"></el-input> <el-input :placeholder="$t('请输入联系方式')" v-model="queryParams.defaultContactPhone"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="客户类别" prop="level"> <el-form-item :label="$t('客户类别')" prop="level">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" multiple v-model="queryParams.type"></dict-selector> <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" multiple v-model="queryParams.type"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" placeholder="请选择客户经理" clearable size="small"> <el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-option v-for="dict in customerServiceList" <el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/> :key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户来源" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" placeholder="请选择客户来源" clearable size="small"> <el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="国家" prop="source"> <el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="form.country" placeholder="请选择国家"> <el-select clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList" <el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" /> :key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户状态" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" placeholder="请选择客户状态" clearable size="small"> <el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item label="信用等级" prop="department"> <el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="form.level" > <el-select clearable v-model="form.level" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option> <el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:customer:create']">新增</el-button> v-hasPermi="['ecw:customer:create']">{{$t('新增')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">导出</el-button> v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5" > <el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="primary" size="mini" @click="transferShow = true;" :loading="exportLoading" <el-button :disabled="selectCustomerList.length === 0" type="primary" size="mini" @click="transferShow = true;" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">批量移交</el-button> v-hasPermi="['ecw:customer:export']">{{$t('批量移交')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -83,39 +83,39 @@ ...@@ -83,39 +83,39 @@
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column label="客户编号" align="center" prop="number" /> <el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column label="客户名称" align="center" prop="name" /> <el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column label="客户等级" align="center" prop="vipLevelNameZh"> <el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" /> <dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="信用等级" prop="creditLevelNameZh"></el-table-column> <el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column label="客户状态" align="center" prop="status"> <el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="主联系人" prop="defaultContactName"></el-table-column> <el-table-column :label="$t('主联系人')" prop="defaultContactName"></el-table-column>
<el-table-column label="主联系方式" prop="defaultContactPhone"></el-table-column> <el-table-column :label="$t('主联系方式')" prop="defaultContactPhone"></el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户经理" align="center" prop="customerService" :formatter="customerServiceFn"> <el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column> </el-table-column>
<el-table-column label="国家" align="center" prop="country" :formatter="countryFormatter"></el-table-column> <el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['ecw:customer:query']">查看</el-button> v-hasPermi="['ecw:customer:query']">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:customer:update']">修改</el-button> v-hasPermi="['ecw:customer:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:customer:delete']">删除</el-button> v-hasPermi="['ecw:customer:delete']">{{$t('删除')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-collection" @click="followUp(scope.row)">跟进</el-button> <el-button size="mini" type="text" icon="el-icon-collection" @click="followUp(scope.row)">{{$t('跟进')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-user" @click="complaint(scope.row)">客诉</el-button> <el-button size="mini" type="text" icon="el-icon-user" @click="complaint(scope.row)">{{$t('客诉')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -465,8 +465,8 @@ ...@@ -465,8 +465,8 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">{{$t('取 消')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list> <customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list>
...@@ -534,15 +534,15 @@ export default { ...@@ -534,15 +534,15 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }], name: [{ required: true, message: this.$t('客户名称不能为空'), trigger: "blur" }],
country: [{ required: true, message: "国家不能为空", trigger: "blur" }], country: [{ required: true, message: this.$t('国家不能为空'), trigger: "blur" }],
level: [{ required: true, message: "客户等级不能为空", trigger: "blur" }], level: [{ required: true, message: this.$t('客户等级不能为空'), trigger: "blur" }],
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }], type: [{ required: true, message: this.$t('客户类别不能为空'), trigger: "blur" }],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }], // createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }], source: [{ required: true, message: this.$t('客户来源不能为空'), trigger: "blur" }],
customerService: [{ required: true, message: "客户经理不能为空", trigger: "blur" }], customerService: [{ required: true, message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }], status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }], founder: [{ required: true, message: this.$t('创建人不能为空'), trigger: "blur" }],
}, },
// 网点 // 网点
nodeList: [], nodeList: [],
...@@ -684,7 +684,7 @@ export default { ...@@ -684,7 +684,7 @@ export default {
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
updateCustomer(this.form).then(response => { updateCustomer(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
...@@ -692,7 +692,7 @@ export default { ...@@ -692,7 +692,7 @@ export default {
} }
// 添加的提交 // 添加的提交
createCustomer(this.form).then(response => { createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
...@@ -701,11 +701,11 @@ export default { ...@@ -701,11 +701,11 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除客户编号为"' + id + '"的数据项?').then(function() { this.$modal.confirm(this.$t('是否确认删除客户编号为"') + id + this.$t('"的数据项?')).then(function() {
return deleteCustomer(id); return deleteCustomer(id);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess(this.$t('删除成功'));
}).catch(() => {}); }).catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
...@@ -716,13 +716,13 @@ export default { ...@@ -716,13 +716,13 @@ export default {
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有客户数据项?').then(() => { this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportCustomerExcel(params); return exportCustomerExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '客户信息.xls'); this.$download.excel(response, `${this.$t('客户信息')}.xls`);
console.log(response,'response') console.log(response,'response')
this.$download.excel(response, '全部客户信息.xls'); this.$download.excel(response, `${this.$t('全部客户信息')}.xls`);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
}, },
......
...@@ -3,46 +3,46 @@ ...@@ -3,46 +3,46 @@
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center"> <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"> <el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<div style="display: flex;justify-content: space-between;align-items: flex-end;"> <div style="display: flex;justify-content: space-between;align-items: flex-end;">
<h2>查看</h2> <h2>{{$t('查看')}}</h2>
<div> <div>
<el-button type="primary" size="small">添加优惠</el-button> <el-button type="primary" size="small">{{$t('添加优惠')}}</el-button>
<el-button type="primary" size="small" @click="$router.push('/customer/edit/' + id)">编辑</el-button> <el-button type="primary" size="small" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button>
<el-button type="primary" size="small">报价</el-button> <el-button type="primary" size="small">{{$t('报价')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">跟进</el-button> <el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">客诉</el-button> <el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button>
<el-button type="danger" size="small">删除</el-button> <el-button type="danger" size="small">{{$t('删除')}}</el-button>
</div> </div>
</div> </div>
<el-card style="margin-top: 15px;"> <el-card style="margin-top: 15px;">
<el-descriptions :column="4" border> <el-descriptions :column="4" border>
<el-descriptions-item label="客户编号">{{ customer.number }}</el-descriptions-item> <el-descriptions-item :label="$t('客户编号')">{{ customer.number }}</el-descriptions-item>
<el-descriptions-item label="客户名称">{{ customer.name }}</el-descriptions-item> <el-descriptions-item :label="$t('客户名称')">{{ customer.name }}</el-descriptions-item>
<el-descriptions-item label="结算方式">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item> <el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item label="客户生日">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item> <el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item label="客户等级">{{ 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="国家">{{ getDictDataLabel(DICT_TYPE.COUNTRY, customer.country) }}</el-descriptions-item> <el-descriptions-item :label="$t('国家')">{{ getDictDataLabel(DICT_TYPE.COUNTRY, customer.country) }}</el-descriptions-item>
<!-- <el-descriptions-item label="业务员">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item label="客户来源">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item label="客户类别">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户类别')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</el-descriptions-item>
<!-- <el-descriptions-item label="联系方式">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item label="推介人">{{ promoter }}</el-descriptions-item> <el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item>
<el-descriptions-item label="客户经理">{{ customerService }}</el-descriptions-item> <el-descriptions-item :label="$t('客户经理')">{{ customerService }}</el-descriptions-item>
<el-descriptions-item label="公司名称">{{ customer.company }}</el-descriptions-item> <el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item label="联系地址">{{ customer.address }}</el-descriptions-item> <el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{ parseTime(customer.createTime) }}</el-descriptions-item> <el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item label="状态">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item> <el-descriptions-item :label="$t('状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item>
<el-descriptions-item label="主营类别">{{ productType }}</el-descriptions-item> <el-descriptions-item :label="$t('主营类别')">{{ productType }}</el-descriptions-item>
<el-descriptions-item label="常提货网点">{{ pickupPoint }}</el-descriptions-item> <el-descriptions-item :label="$t('常提货网点')">{{ pickupPoint }}</el-descriptions-item>
<el-descriptions-item label="图片"> <el-descriptions-item :label="$t('图片')">
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image> <el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="备注">{{ customer.remarks }}</el-descriptions-item> <el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<!-- <el-descriptions-item label="信用等级">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item label="信用等级">{{ customer }}</el-descriptions-item>-->
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
<h3>联系人</h3> <h3>{{$t('联系人')}}</h3>
<el-table <el-table
:data="customerContacts" :data="customerContacts"
...@@ -51,22 +51,22 @@ ...@@ -51,22 +51,22 @@
> >
<el-table-column <el-table-column
prop="department" prop="department"
label="部门" :label="$t('部门')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="position" prop="position"
label="职位" :label="$t('职位')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
label="联系人" :label="$t('联系人')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="phoneNew" prop="phoneNew"
label="联系方式" :label="$t('联系方式')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
{{ row.areaCode + row.phoneNew }} {{ row.areaCode + row.phoneNew }}
...@@ -74,64 +74,64 @@ ...@@ -74,64 +74,64 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="username" prop="username"
label="关联账号" :label="$t('关联账号')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="social" prop="social"
label="社交软件" :label="$t('社交软件')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="socialNumber" prop="socialNumber"
label="社交软件号码" :label="$t('社交软件号码')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="email" prop="email"
label="邮箱" :label="$t('邮箱')"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-tabs style="margin-top: 15px" type="border-card"> <el-tabs style="margin-top: 15px" type="border-card">
<el-tab-pane label="订单"> <el-tab-pane :label="$t('订单')">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="运输方式:"> <el-form-item :label="$t('运输方式:')">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" /> <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" />
</el-form-item> </el-form-item>
<el-form-item label="订单状态:"> <el-form-item :label="$t('订单状态:')">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"/> <dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"/>
</el-form-item> </el-form-item>
<el-form-item label="报关方式:"> <el-form-item :label="$t('报关方式:')">
<dict-selector <dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE" :type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customerType" v-model="queryParams.customerType"
/> />
</el-form-item> </el-form-item>
<el-form-item label="控货"> <el-form-item :label="$t('控货')">
<dict-selector <dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING" :type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.isCargoControl" v-model="queryParams.isCargoControl"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入仓时间:"> <el-form-item :label="$t('入仓时间:')">
<el-date-picker v-model="rucangtime" <el-date-picker v-model="rucangtime"
@change="changeDate" @change="changeDate"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" /> :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getorderList">搜索</el-button> <el-button type="primary" @click="getorderList">{{$t('搜索')}}</el-button>
<el-button type="primary" @click="()=>{ <el-button type="primary" @click="()=>{
queryParams = { rows:10,page:1}; getorderList() queryParams = { rows:10,page:1}; getorderList()
}">重置</el-button> }">{{$t('重置')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -176,38 +176,38 @@ ...@@ -176,38 +176,38 @@
<pagination @pagination="getorderList" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="orderTotal" ></pagination> <pagination @pagination="getorderList" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="orderTotal" ></pagination>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="报价"> <el-tab-pane :label="$t('报价')">
<el-table <el-table
:data="infoListOfferList" :data="infoListOfferList"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column
type="index" type="index"
label="序号" :label="$t('序号')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="number" prop="number"
label="报价单号" :label="$t('报价单号')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="orderNo" prop="orderNo"
label="订单号" :label="$t('订单号')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="consignorName" prop="consignorName"
label="客户名称" :label="$t('客户名称')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="objectiveName" prop="objectiveName"
label="目的地" :label="$t('目的地')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="销售阶段" :label="$t('销售阶段')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
{{STATUS[row.status]}} {{STATUS[row.status]}}
...@@ -215,84 +215,84 @@ ...@@ -215,84 +215,84 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="stopTime" prop="stopTime"
label="预计结束时间" :label="$t('预计结束时间')"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="businessManagerName" prop="businessManagerName"
label="负责人" :label="$t('负责人')"
> >
</el-table-column> </el-table-column>
</el-table> </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-tab-pane> </el-tab-pane>
<el-tab-pane label="跟进"> <el-tab-pane :label="$t('跟进')">
<customer-follow ref="customerFollow" :id="id" :customer-id="id"></customer-follow> <customer-follow ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="客户投诉"> <el-tab-pane :label="$t('客户投诉')">
<customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint> <customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="账单"> <el-tab-pane :label="$t('账单')">
<el-table style="width: 100%" :data="infoListReceiptList"> <el-table style="width: 100%" :data="infoListReceiptList">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column label="账单" prop="receiptNo"></el-table-column> <el-table-column :label="$t('账单')" prop="receiptNo"></el-table-column>
<el-table-column label="订单号" prop="orderNo"></el-table-column> <el-table-column :label="$t('订单号')" prop="orderNo"></el-table-column>
<el-table-column label="箱数" prop="num"></el-table-column> <el-table-column :label="$t('箱数')" prop="num"></el-table-column>
<el-table-column label="方数" prop="volume" ></el-table-column> <el-table-column :label="$t('方数')" prop="volume" ></el-table-column>
<el-table-column label="重量" prop="weight" ></el-table-column> <el-table-column :label="$t('重量')" prop="weight" ></el-table-column>
<el-table-column label="类型"> <el-table-column :label="$t('类型')">
<template v-slot="{row}"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="费用类型"> <el-table-column :label="$t('费用类型')">
<template v-slot="{row}"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" prop="totalAmount"> <el-table-column :label="$t('金额')" prop="totalAmount">
</el-table-column> </el-table-column>
<el-table-column label="已核销比例" prop="writeOffScale"></el-table-column> <el-table-column :label="$t('已核销比例')" prop="writeOffScale"></el-table-column>
<el-table-column label="实收日期" prop="writeOffAt"></el-table-column> <el-table-column :label="$t('实收日期')" prop="writeOffAt"></el-table-column>
<el-table-column label="业务员" prop="salesmanName"></el-table-column> <el-table-column :label="$t('业务员')" prop="salesmanName"></el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="数据"> <el-tab-pane :label="$t('数据')">
<el-descriptions :column="2"> <el-descriptions :column="2">
<el-descriptions-item label="海空联运/海运拼柜/海运整柜/专线空运">{{orderStatisticsObj.hklyTotal || 0}}/{{orderStatisticsObj.hypgTotal || 0 }}/{{orderStatisticsObj.hyzgTotal || 0}}/{{orderStatisticsObj.zxkyTotal || 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="最后交易日期">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item> <el-descriptions-item :label="$t('最后交易日期')">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item>
<el-descriptions-item label="全部订单/控货订单">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item> <el-descriptions-item :label="$t('全部订单/控货订单')">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item>
<el-descriptions-item label="最后交易单号">{{orderStatisticsObj.lastBusinessOrderNo}}</el-descriptions-item> <el-descriptions-item :label="$t('最后交易单号')">{{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="$t('报价/下单/入仓')">{{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="$t('储存量')">{{orderStatisticsObj.stock || 0}}</el-descriptions-item>
<el-descriptions-item label="已出货订单">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item> <el-descriptions-item :label="$t('已出货订单')">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="品牌授权"> <el-tab-pane :label="$t('品牌授权')">
<el-table border style="width:100%" :data="brandAuthorizationList"> <el-table border style="width:100%" :data="brandAuthorizationList">
<el-table-column type="index" prop="序号"></el-table-column> <el-table-column type="index" :prop="$t('序号')"></el-table-column>
<el-table-column label="中文标题" prop="titleZh" ></el-table-column> <el-table-column :label="$t('中文标题')" prop="titleZh" ></el-table-column>
<el-table-column prop="titleEn" label="英文标题"></el-table-column> <el-table-column prop="titleEn" :label="$t('英文标题')"></el-table-column>
<el-table-column label="有无备案"> <el-table-column :label="$t('有无备案')">
<template v-slot="{row}"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="授权开始"> <el-table-column :label="$t('授权开始')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.startTime)}} {{parseTime(row.startTime)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="授权结束"> <el-table-column :label="$t('授权结束')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.endTime)}} {{parseTime(row.endTime)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="授权证明"> <el-table-column :label="$t('授权证明')">
<template v-slot="{row}"> <template v-slot="{row}">
<div v-if="!!row.fileUrl && row.fileUrl.length > 0"> <div v-if="!!row.fileUrl && row.fileUrl.length > 0">
<span v-for="(item, index) in row.fileUrl.split(',')"> <span v-for="(item, index) in row.fileUrl.split(',')">
<a :href="item" target="_blank">附件{{ index + 1 }}</a>, <a :href="item" target="_blank">{{$t('附件')}}{{ index + 1 }}</a>,
</span> </span>
</div> </div>
</template> </template>
...@@ -300,13 +300,13 @@ ...@@ -300,13 +300,13 @@
<el-table-column <el-table-column
prop="feeScale" prop="feeScale"
:formatter="(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)" :formatter="(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)"
label="收费标准"> :label="$t('收费标准')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createUsername" prop="createUsername"
label="添加人"> :label="$t('添加人')">
</el-table-column> </el-table-column>
<el-table-column label="创建时间"> <el-table-column :label="$t('创建时间')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
</template> </template>
...@@ -315,26 +315,26 @@ ...@@ -315,26 +315,26 @@
<pagination v-show="brandAuthorizationTotal > 0" :total="brandAuthorizationTotal" :page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize" <pagination v-show="brandAuthorizationTotal > 0" :total="brandAuthorizationTotal" :page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize"
@pagination="getBrankByCustomerList"/> @pagination="getBrankByCustomerList"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="信用日志"> <el-tab-pane :label="$t('信用日志')">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-button style="float: right;" type="primary" @click="dialogVisible = true" >添加信用日志</el-button> <el-button style="float: right;" type="primary" @click="dialogVisible = true" >{{$t('添加信用日志')}}</el-button>
<el-descriptions :column="5" border> <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> </el-descriptions>
</div> </div>
<el-table :data="customerCreditLogList"> <el-table :data="customerCreditLogList">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column prop="name" label="规则名称"></el-table-column> <el-table-column prop="name" :label="$t('规则名称')"></el-table-column>
<el-table-column prop="type" label="规则分类"> <el-table-column prop="type" :label="$t('规则分类')">
<template v-slot="{row}"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="score" label="规则得分"></el-table-column> <el-table-column prop="score" :label="$t('规则得分')"></el-table-column>
<el-table-column prop="remark" label="备注"></el-table-column> <el-table-column prop="remark" :label="$t('备注')"></el-table-column>
<el-table-column label="添加人" prop="createName"></el-table-column> <el-table-column :label="$t('添加人')" prop="createName"></el-table-column>
<el-table-column label="时间"> <el-table-column :label="$t('时间')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
</template> </template>
...@@ -343,18 +343,18 @@ ...@@ -343,18 +343,18 @@
<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-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="等级日志"> <el-tab-pane :label="$t('等级日志')">
<el-table style="width: 100%" :data="getCustomerGradeList"> <el-table style="width: 100%" :data="getCustomerGradeList">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column label="规则名称" prop="name"></el-table-column> <el-table-column :label="$t('规则名称')" prop="name"></el-table-column>
<el-table-column label="规则分类" prop="type"> <el-table-column :label="$t('规则分类')" prop="type">
<template v-slot="{row}"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="规则得分" prop="score"></el-table-column> <el-table-column :label="$t('规则得分')" prop="score"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column :label="$t('备注')" prop="remark"></el-table-column>
<el-table-column label="时间"> <el-table-column :label="$t('时间')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
</template> </template>
...@@ -370,23 +370,23 @@ ...@@ -370,23 +370,23 @@
width="30%" width="30%"
> >
<h1 slot="title"> <h1 slot="title">
给客户【{{customer.name}}】添加信用日志 {{$t('给客户')}}{{customer.name}}{{$t('添加信用日志')}}
</h1> </h1>
<el-form label-width="100"> <el-form label-width="100">
<el-form-item label="客户编号:">{{customer.number}}</el-form-item> <el-form-item :label="$t('客户编号:')">{{customer.number}}</el-form-item>
<el-form-item label="信用类别"> <el-form-item :label="$t('信用类别')">
<el-select v-model="creditFrom.ruleId"> <el-select v-model="creditFrom.ruleId">
<el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id" :label="item.name"></el-option> <el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id" :label="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="creditTypeList.length > 0" label="信用分">{{(creditTypeList.find(r=>creditFrom.ruleId === r.id) || {}).score }}</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="备注"> <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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="submit">提交</el-button> <el-button @click="submit">{{$t('提交')}}</el-button>
<el-button @click="dialogVisible = false" >取消</el-button> <el-button @click="dialogVisible = false" >{{$t('取消')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -465,13 +465,13 @@ export default { ...@@ -465,13 +465,13 @@ export default {
data() { data() {
return { return {
STATUS:{ STATUS:{
0:'取消报价', 0:this.$t('取消报价'),
1:'特价审批中', 1:this.$t('特价审批中'),
2:'需求确认', 2:this.$t('需求确认'),
3:'跟进中', 3:this.$t('跟进中'),
4:'赢单', 4:this.$t('赢单'),
5:'输单', 5:this.$t('输单'),
6:'报价完成' 6:this.$t('报价完成')
}, },
dialogVisible:false, dialogVisible:false,
DICT_TYPE, DICT_TYPE,
...@@ -583,7 +583,7 @@ export default { ...@@ -583,7 +583,7 @@ export default {
creditScoreCalculation(){ creditScoreCalculation(){
return (val)=>{ return (val)=>{
if(val === 'all'){ if(val === 'all'){
return '信用分' return this.$t('信用分')
}else{ }else{
return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
} }
...@@ -636,11 +636,9 @@ export default { ...@@ -636,11 +636,9 @@ export default {
// 客户报价 // 客户报价
getInfoListOfferPage(){ getInfoListOfferPage(){
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id}).then(r => { infoListOfferPage({...this.infoListOfferFrom,customerId:this.id}).then(r => {
console.log(r,'报价')
this.infoListOfferList = r.data.list; this.infoListOfferList = r.data.list;
this.infoListOfferTotal = r.data.total; this.infoListOfferTotal = r.data.total;
}).catch(r => { }).catch(r => {
console.log(r,'报价')
}) })
}, },
// 数据 // 数据
......
<template> <template>
<el-dialog <el-dialog
center center
title="客服" :title="$t('客服')"
:visible.sync="show" :visible.sync="show"
width="30%"> width="30%">
<div style="width: 100%;min-height: 200px;text-align: center"> <div style="width: 100%;min-height: 200px;text-align: center">
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
</el-select> </el-select>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:show',false)" >取 消</el-button> <el-button @click="$emit('update:show',false)" >{{$t('取 消')}}</el-button>
<el-button type="primary" @click="submit">确 定</el-button> <el-button type="primary" @click="submit">{{$t('确 定')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
methods:{ methods:{
submit(){ submit(){
if(!this.service){ if(!this.service){
return this.$message.warning('请选择客户经理!'); return this.$message.warning(this.$t('请选择客户经理!'));
} }
handOverCustomer({ handOverCustomer({
customerServiceId:this.service, customerServiceId:this.service,
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
if(r.code === 0){ if(r.code === 0){
this.$emit('update:show',false) this.$emit('update:show',false)
this.$emit('update:customerIds',[]) this.$emit('update:customerIds',[])
this.$message.success('用户批量转移成功!') this.$message.success(this.$t('用户批量转移成功!'))
} }
}) })
}, },
......
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