Commit 3f9f2952 authored by 我在何方's avatar 我在何方
parents d62e9b3d 9e6497ec
......@@ -21,6 +21,7 @@ export function uploadFile(data) {
return request({
url: '/infra/file/upload',
method: 'post',
timeout: 60000,
data: data
})
}
import request from '@/utils/request'
// 创建app版本管理
export function createVersion(data) {
return request({
url: '/system/version/create',
method: 'post',
data: data
})
}
// 更新app版本管理
export function updateVersion(data) {
return request({
url: '/system/version/update',
method: 'put',
data: data
})
}
// 删除app版本管理
export function deleteVersion(id) {
return request({
url: '/system/version/delete?id=' + id,
method: 'delete'
})
}
// 获得app版本管理
export function getVersion(id) {
return request({
url: '/system/version/get?id=' + id,
method: 'get'
})
}
// 获得app版本管理分页
export function getVersionPage(query) {
return request({
url: '/system/version/page',
method: 'get',
params: query
})
}
// 导出app版本管理 Excel
export function exportVersionExcel(query) {
return request({
url: '/system/version/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
<template>
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-dialog :title="$t('选择联系人')" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10 flex-center">
<div class="flex-center">关键字</div>
<div class="flex-center">{{$t('关键字')}}</div>
<el-input v-model="form.searchKey" clearable class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button>
<el-button type="primary" class="ml-10" @click="handleQuery">{{$t('搜索')}}</el-button>
</div>
<div class="list">
<div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)">
<div class="item-box">
<div class="line">
<div class="label">姓名</div>
<div class="label">{{$t('姓名')}}</div>
<div class="value">{{item.contactsName}}</div>
</div>
<div class="line">
<div class="label">电话</div>
<div class="label">{{$t('电话')}}</div>
<div class="value">+{{item.areaCode}} {{item.phoneNew}}</div>
</div>
<div class="line">
<div class="label">邮箱</div>
<div class="label">{{$t('邮箱')}}</div>
<div class="value">{{item.email}}</div>
</div>
<div class="line">
<div class="label">公司</div>
<div class="label">{{$t('公司')}}</div>
<div class="value">{{item.company}}</div>
</div>
</div>
......
<template>
<div>
<div style="display: flex;justify-content: right;margin-bottom: 15px">
<el-button type="primary" style="text-align: right" @click="customerFollow.dialogVisible = true">新增</el-button>
<el-button type="primary" style="text-align: right" @click="customerFollow.dialogVisible = true">{{$t('新增')}}</el-button>
</div>
<el-table
......@@ -10,45 +10,45 @@
>
<el-table-column
type="index"
label="序号"
:label="$t('序号')"
>
</el-table-column>
<el-table-column
prop="followType"
label="跟进类型"
:label="$t('跟进类型')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)"
>
</el-table-column>
<el-table-column
prop="contactName"
label="联系人"
:label="$t('联系人')"
>
</el-table-column>
<el-table-column
prop="followMethod"
label="跟进方式"
:label="$t('跟进方式')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)"
>
</el-table-column>
<el-table-column
prop="followTime"
label="跟进时间"
:label="$t('跟进时间')"
:formatter="(row, column, cellValue) => parseTime(cellValue)"
>
</el-table-column>
<el-table-column
prop="feedback"
label="客户反馈"
:label="$t('客户反馈')"
>
</el-table-column>
<el-table-column
prop="result"
label="处理结果"
:label="$t('处理结果')"
>
</el-table-column>
<el-table-column
prop="followUserName"
label="客户经理 "
:label="$t('客户经理')"
>
</el-table-column>
</el-table>
......@@ -56,7 +56,7 @@
@pagination="getCustomerFollowList"/>
<el-dialog
append-to-body
title="客户跟进"
:title="$t('客户跟进')"
:visible.sync="customerFollow.dialogVisible"
:close-on-click-modal="false"
:before-close="customerFollowClose"
......@@ -64,19 +64,19 @@
<el-form ref="customerFollowForm" :model="customerFollow.form" label-width="80px">
<el-row :gutter="10">
<el-col>
<el-form-item label="跟进类型" required>
<el-form-item :label="$t('跟进类型')" required>
<!-- <dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> -->
<el-radio v-model="customerFollow.form.followType" label="3">{{$t('投诉回访')}}</el-radio>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="跟进时间" required>
<el-date-picker v-model="customerFollow.form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="选择跟进时间"></el-date-picker>
<el-form-item :label="$t('跟进时间')" required>
<el-date-picker v-model="customerFollow.form.followTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('选择跟进时间')"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" required>
<el-select v-model="customerFollow.form.contactName" placeholder="请选择">
<el-form-item :label="$t('联系人')" required>
<el-select v-model="customerFollow.form.contactName" :placeholder="$t('请选择')">
<el-option
v-for="(item, index) in customerContactsList"
:key="index"
......@@ -87,8 +87,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客户经理" required>
<el-select v-model="customerFollow.form.followUserId" placeholder="请选择">
<el-form-item :label="$t('客户经理')" required>
<el-select v-model="customerFollow.form.followUserId" :placeholder="$t('请选择')">
<el-option
v-for="item in serviceUserList"
:key="item.id"
......@@ -99,25 +99,25 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="跟进方式" required>
<el-form-item :label="$t('跟进方式')" required>
<dict-selector ref="dictMethod" v-model="customerFollow.form.followMethod" :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD"></dict-selector>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="客户反馈" required>
<el-form-item :label="$t('客户反馈')" required>
<el-input type="textarea" v-model="customerFollow.form.feedback"></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="处理结果" required>
<el-form-item :label="$t('处理结果')" required>
<el-input type="textarea" v-model="customerFollow.form.result"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="customerFollowClose">取 消</el-button>
<el-button type="primary" @click="customerFollowSubmit">确 定</el-button>
<el-button @click="customerFollowClose">{{$t('取 消')}}</el-button>
<el-button type="primary" @click="customerFollowSubmit">{{$t('确 定')}}</el-button>
</span>
</el-dialog>
</div>
......@@ -187,27 +187,27 @@ export default {
return
}
if(!this.customerFollow.form.followTime){
this.$modal.msgError("请选择跟进时间");
this.$modal.msgError(this.$t('请选择跟进时间'));
return
}
if(!this.customerFollow.form.contactName){
this.$modal.msgError("请选择联系人");
this.$modal.msgError(this.$t('请选择联系人'));
return
}
if(!this.customerFollow.form.followUserId){
this.$modal.msgError("请选择跟进业务");
this.$modal.msgError(this.$t('请选择跟进业务'));
return
}
if(!this.customerFollow.form.followMethod){
this.$modal.msgError("请选择跟进方式");
this.$modal.msgError(this.$t('请选择跟进方式'));
return
}
if(!this.customerFollow.form.feedback){
this.$modal.msgError("请输入客户反馈");
this.$modal.msgError(this.$t('请输入客户反馈'));
return
}
if(!this.customerFollow.form.result){
this.$modal.msgError("请输入处理结果");
this.$modal.msgError(this.$t('请输入处理结果'));
return
}
createCustomerFollow(this.customerFollow.form).then(r => {
......
......@@ -24,16 +24,14 @@
</el-upload>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <br>
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
</div>
{{ $t('请上传') }}
<template v-if="fileSize">{{ $t('大小不超过') }}<b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <br>
<template v-if="fileType">{{ $t('格式为') }}<b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>{{ $t('的文件') }}</div>
</div>
</div>
<el-dialog
:visible.sync="dialogVisible"
title="预览"
:title="$t('预览')"
width="800"
append-to-body
>
......
......@@ -45,15 +45,15 @@
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
{{$t('请上传')}}
<template v-if="fileSize"> {{$t('大小不超过')}} <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> {{$t('格式为')}} <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
{{$t('的文件')}}
</div>
<el-dialog
:visible.sync="dialogVisible"
title="预览"
:title="$t('预览')"
width="800"
append-to-body
>
......@@ -207,8 +207,9 @@ export default {
},
// 预览
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
// this.dialogImageUrl = file.url;
// this.dialogVisible = true;
window.open(file.url)
},
// 对象转成指定字符串分隔
listToString(list, separator) {
......
<template>
<div>
<el-descriptions border v-if="order.orderId">
<el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">{{ order.sumNum }}/{{ order.costVO.totalNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item label="运输方式">
<el-descriptions-item :label="$t('唛头')">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item :label="$t('已到箱数/总箱数')">{{ order.sumNum }}/{{ order.costVO.totalNum }}</el-descriptions-item>
<el-descriptions-item :label="$t('订单状态')"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" :class="{red: order.status === 1, green: order.status === 5 || order.status === 2}" /></el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="始发地">{{ order.logisticsInfoDto.startTitleZh || '' }}<span v-if="order.isExternalWarehouse" style="color: red">(外部仓)</span></el-descriptions-item>
<el-descriptions-item label="目的地">{{ order.logisticsInfoDto.destTitleZh || '' }}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{ order.consignorVO && order.consignorVO.name || ''}}</el-descriptions-item>
<el-descriptions-item label="发货人公司">{{ order.consignorVO && order.consignorVO.company || '' }}</el-descriptions-item>
<el-descriptions-item label="发货人电话">{{ order.consignorVO && (order.consignorVO.countryCode + order.consignorVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{ order.consigneeVO && order.consigneeVO.name || ''}}</el-descriptions-item>
<el-descriptions-item label="收货人公司">{{ order.consigneeVO && order.consigneeVO.company || '' }}</el-descriptions-item>
<el-descriptions-item label="收货人电话">{{ order.consigneeVO &&(order.consigneeVO.countryCode + order.consigneeVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item label="送货时间">{{ order.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item label="入仓类型">{{ getDictDataLabel(DICT_TYPE.ECW_WAREHOUSING_TYPE, order.warehouseType) }}</el-descriptions-item>
<el-descriptions-item label="订单号">{{ order.orderNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">{{ order.logisticsInfoDto.startTitleZh || '' }}<span v-if="order.isExternalWarehouse" style="color: red">{{ $t('(外部仓)') }}</span></el-descriptions-item>
<el-descriptions-item :label="$t('目的地')">{{ order.logisticsInfoDto.destTitleZh || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人姓名')">{{ order.consignorVO && order.consignorVO.name || ''}}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人公司')">{{ order.consignorVO && order.consignorVO.company || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('发货人电话')">{{ order.consignorVO && (order.consignorVO.countryCode + order.consignorVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人姓名')">{{ order.consigneeVO && order.consigneeVO.name || ''}}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人公司')">{{ order.consigneeVO && order.consigneeVO.company || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('收货人电话')">{{ order.consigneeVO &&(order.consigneeVO.countryCode + order.consigneeVO.phone) || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('送货时间')">{{ order.deliveryDate || '' }}</el-descriptions-item>
<el-descriptions-item :label="$t('入仓类型')">{{ getDictDataLabel(DICT_TYPE.ECW_WAREHOUSING_TYPE, order.warehouseType) }}</el-descriptions-item>
<el-descriptions-item :label="$t('订单号')">{{ order.orderNo }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
......
<template>
<el-dialog :visible.sync="show" title="快速新建客户" :close-on-click-modal="false" class="quick-create-customer">
<el-dialog :visible.sync="show" :title="$t('快速新建客户')" :close-on-click-modal="false" class="quick-create-customer">
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :validate-on-rule-change="false">
<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>
</el-form-item>
<el-form-item label="客户名称" prop="name">
<el-input v-model="form.name" placeholder="请输入客户名称" />
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
</el-form-item>
<el-form-item :label="$t('国家')" prop="country">
<el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="$l(dict, 'name')" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item label="联系人" prop="customerContacts.0.name">
<el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" />
<el-form-item :label="$t('联系人')" prop="customerContacts.0.name">
<el-input v-model="form.customerContacts[0].name" :placeholder="$t('请输入联系人')" />
</el-form-item>
<el-form-item label="手机号" prop="customerContacts.0.phoneNew">
<!-- <el-select v-model="form.customerContacts[0].areaCode" placeholder="请选择区号" filterable class="w-200">
<el-form-item :label="$t('手机号')" prop="customerContacts.0.phoneNew">
<!-- <el-select v-model="form.customerContacts[0].areaCode" :placeholder="$t('请选择区号')" filterable class="w-200">
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select> -->
<area-code-selector v-model="form.customerContacts[0].areaCode" />
<el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" placeholder="请输入联系方式" class="w-150 ml-10"/>
<el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" :placeholder="$t('请输入联系方式')" class="w-150 ml-10"/>
</el-form-item>
<el-form-item label="客户来源" prop="source">
<el-select v-model="form.source" placeholder="请选择客户来源">
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker
v-model="form.createTime"
type="datetime"
value-format="timestamp"
placeholder="选择创建时间">
:placeholder="$t('选择创建时间')">
</el-date-picker>
</el-form-item>
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理">
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/>
<el-form-item :label="$t('备注')" prop="remarks">
<el-input v-model="form.remarks" :placeholder="$t('请输入备注')"/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button @click="cancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</template>
......@@ -74,8 +80,22 @@ export default {
customerContacts:[{isDefault: 1}]
},
// 表单校验
rules: {
serviceUserList: [],
countryList: [],
}
},
watch:{
show(){
if(!this.show){
this.$emit('close')
}
}
},
computed:{
rules(){
return {
name : [{ required: true, message: this.$t("客户名称不能为空"), trigger: "blur" }],
country : [{ required: true, message: this.$t("国家不能为空"), trigger: "blur" }],
'customerContacts.0.phoneNew' : [{ required: true, message: this.$t("手机号不能为空"), trigger: "blur" }],
'customerContacts.0.name' : [{ required: true, message: this.$t("联系人不能为空"), trigger: "blur" }],
type : [{ required: true, message: this.$t("客户类别不能为空"), trigger: "blur" }],
......@@ -84,15 +104,6 @@ export default {
customerService : [{ required: true, message: this.$t("客户经理不能为空"), trigger: "blur" }],
status : [{ required: true, message: this.$t("客户状态不能为空"), trigger: "blur" }],
founder : [{ required: true, message: this.$t("创建人不能为空"), trigger: "blur" }],
},
serviceUserList: [],
countryList: [],
}
},
watch:{
show(){
if(!this.show){
this.$emit('close')
}
}
},
......@@ -125,7 +136,7 @@ export default {
let data = {...this.form}
data.type = this.form.type.join(",")
createCustomer(data).then(res => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t("新增成功"));
return getCustomerContactsSelect({customerId: res.data})
}).then(res => {
this.$emit('success', res.data.list[0])
......
......@@ -10,7 +10,7 @@
<el-form-item label="投诉类型" prop="type">
<el-select v-model="form.type" placeholder="请选择投诉类型">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="orderId">
......
import Vue from 'vue'
import VueI18n from './vue-i18n/vue-i18n.common'
import {getLocale} from '@/utils/db'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(VueI18n)
const i18n = new VueI18n({
locale: getLocale() || 'zh_CN',
formatFallbackMessages: true,
messages: {
'en_US': require('./languages/en_US.json'),
'zh_CN': require('./languages/zh_CN.json')
'en_US': Object.assign({}, enLocale, require('./languages/en_US.json')),
'zh_CN': Object.assign({}, zhLocale, require('./languages/zh_CN.json')),
}
})
......
......@@ -565,7 +565,7 @@
"卸柜时间": "Unloading time",
"开始卸柜": "Start unloading cabinet",
"请先通过卸柜审批": "Please pass the unloading approval first",
"请输入": "please enter",
"请输入": "please enter ",
"一键卸柜": "One-click unloading",
"清关状态": "Clearance Status",
"异常状态": "Exception Status",
......@@ -3534,5 +3534,57 @@
"显示搜索": "show search",
"显隐列": "Display column",
"隐藏": "hide",
"显示/隐藏": "show/hide"
"显示/隐藏": "show/hide",
"(外部仓)": "(External warehouse)",
"请上传": "Please upload",
"大小不超过": "Size does not exceed ",
"格式为": "Format is ",
"的文件": " only",
"货物修改": "Goods modification",
"货物入仓": "Goods warehousing",
"文档地址": "Document address",
"退出登录": "Log out",
"主题风格设置": "Theme Style Settings",
"主题颜色": "Theme Colors",
"系统布局配置": "System layout configuration",
"固定": "fixed",
"动态标题": "Dynamic Title",
"保存配置": "Save",
"重置配置": "Reset",
"选择联系人": "Choose Contact",
"快速新建客户": "Quick Create Customer",
"表单错误": "Form error",
"快递ID": "Express No",
"请输入快递ID": "Enter Express No",
"请输入备注-中文": "Enter Remark",
"渠道ID": "Channel ID",
"预计时间(天)": "Estimate Days",
"注意:运费/清关费 方案二选一": "Note: choose one of the two freight/customs clearance schemes",
"暂无优惠": "No discount",
"客户跟进": "Customer follow-up",
"请选择跟进时间": "Please select the follow-up time",
"规则英文名称": "English name of the rule",
"请输入规则英文名称": "Please enter the English name of the rule",
"规则英文名称不能为空": "The English name of the rule cannot be empty",
"WEB端广告图片(建议尺寸长*宽": "WEB advertising image (recommended size: length * width",
"APP端广告图片(建议尺寸长*宽": "APP advertising image (recommended size: length * width",
"优惠券ID": "Coupon ID",
"发布人": "Publisher",
"更新人": "Updated by",
"是否确认删除优惠券信息编号为{couponId}的数据项?": "Are you sure to delete the data item with coupon information number {couponId}?",
"是否确认导出所有优惠券信息数据项?": "Are you sure to export all coupon information data items?",
"待回复": "To be replied",
"已回复": "Replied",
"确认修改": "Confirm modification",
"商标{index}分类": "Trademark {index} classification",
"请选择商标{index}分类": "Please select trademark {index} classification",
"商标{index}商品": "Trademark {index} commodity",
"请选择商标{index}商品": "Please select trademark {index} product",
"第{index}阶梯": "Step {index}",
"前端必须以 / 开头": "The front end must start with/",
"前端不能以 / 开头": "The front end cannot start with/",
"是否确认删除此项?": "Are you sure to delete this item?",
"父子联动": "Parent-child linkage",
"选中父节点,自动选择子节点": "Select the parent node and select the child node automatically",
"加载中,请稍后": "Loading, please wait"
}
......@@ -25,7 +25,7 @@
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
<!-- <el-tooltip :content="$t('文档地址')" effect="dark" placement="bottom">-->
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
......@@ -37,7 +37,7 @@
</template>
<!-- <el-select v-model="locale" placeholder="语言" class="right-menu-item select-nav" @change="localeChange">
<!-- <el-select v-model="locale" :placeholder="$t('语言')" class="right-menu-item select-nav" @change="localeChange">
<el-option v-for="dict in langDatas" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> -->
......@@ -55,10 +55,10 @@
<el-dropdown-item>{{$t('个人中心')}}</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
<span>{{ $t('布局设置') }}</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
<span>{{ $t('退出登录') }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......
......@@ -3,7 +3,7 @@
<div>
<div class="setting-drawer-content">
<div class="setting-drawer-title">
<h3 class="drawer-title">主题风格设置</h3>
<h3 class="drawer-title">{{ $t('主题风格设置') }}</h3>
</div>
<div class="setting-drawer-block-checbox">
<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')">
......@@ -33,44 +33,44 @@
</div>
<div class="drawer-item">
<span>主题颜色</span>
<span>{{ $t('主题颜色') }}</span>
<theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
</div>
</div>
<el-divider/>
<h3 class="drawer-title">系统布局配置</h3>
<h3 class="drawer-title">{{ $t('系统布局配置') }}</h3>
<div class="drawer-item">
<span>开启 TopNav</span>
<span>{{ $t('开启') }} TopNav</span>
<el-switch v-model="topNav" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>开启 Tags-Views</span>
<span>{{ $t('开启') }} Tags-Views</span>
<el-switch v-model="tagsView" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>固定 Header</span>
<span>{{ $t('固定') }} Header</span>
<el-switch v-model="fixedHeader" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>显示 Logo</span>
<span>{{ $t('显示') }} Logo</span>
<el-switch v-model="sidebarLogo" class="drawer-switch" />
</div>
<div class="drawer-item">
<span>动态标题</span>
<span>{{ $t('动态标题') }}</span>
<el-switch v-model="dynamicTitle" class="drawer-switch" />
</div>
<el-divider/>
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">保存配置</el-button>
<el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">重置配置</el-button>
<el-button size="small" type="primary" plain icon="el-icon-document-add" @click="saveSetting">{{ $t('保存配置') }}</el-button>
<el-button size="small" plain icon="el-icon-refresh" @click="resetSetting">{{ $t('重置配置') }}</el-button>
</div>
</div>
</template>
......
......@@ -106,7 +106,8 @@ import '@/styles/index.scss'
*/
Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size
size: Cookies.get('size') || 'medium', // set element-ui default size
i18n: (key, value) => i18n.t(key, value)
})
// 重定向路由(关闭当前标签)
Vue.prototype.$redirect = (path) =>{
......@@ -122,7 +123,7 @@ Vue.prototype.$showFormValidateErrors = (errors) => {
let createElement = vm.$createElement
let fieldList = Object.values(errors)
Element.Notification({
title: '表单错误',
title: this.$t('表单错误'),
type: 'warning',
duration: 3000,
message: createElement('div', fieldList.map(function (errorList) {
......
......@@ -4,7 +4,6 @@ import Router from 'vue-router'
import Layout from '@/layout'
Vue.use(Router)
/**
* Note: 路由配置项
*
......@@ -256,7 +255,7 @@ export const constantRoutes = [
path: '/customerCommissionInfo/:dictId(\\d+)/:id(\\d+)?',
component: (resolve) => require(['@/views/ecw/customerCommissionInfo/index'], resolve),
name: 'customerCommissionInfo',
meta: {title: '佣金设置', icon: '', activeMenu: '/customer/customerCommissionInfo'},
meta: {title: '佣金设置', titleEn:'Commission settings', icon: '', activeMenu: '/customer/customerCommissionInfo'},
props: true,
},
{
......@@ -264,27 +263,27 @@ export const constantRoutes = [
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'customerEdit',
meta: {title: '编辑客户', icon: ''}
meta: {title:'编辑客户',titleEn:'Edit Customer', icon: ''}
},
{
path: 'add-edit/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'customerEdit',
meta: {title: '新建客户', icon: ''}
meta: {title: '新建客户',titleEn:'New customer', icon: ''}
},{
path: 'perfect/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/edit'),
props: true,
name: 'perfect',
meta: {title: '完善客户', icon: ''}
meta: {title: '完善客户',titleEn:'Perfect customers', icon: ''}
},
{
path: 'query/:customerId(\\d+)',
component: (resolve) => import('@/views/ecw/customer/query'),
props: true,
name: 'customerQuery',
meta: {title: '客户详情', icon: '', activeMenu: '/customer/customer'}
meta: {title: '客户详情',titleEn:'Customer details', icon: '', activeMenu: '/customer/customer'}
}
]
},
......@@ -299,7 +298,7 @@ export const constantRoutes = [
component: (resolve) => import('@/views/ecw/order/special'),
props: true,
name: 'order-special',
meta: {title: '订单特价申请', icon: '', activeMenu: '/order/index'}
meta: {title: '订单特价申请',titleEn:'Order special price application', icon: '', activeMenu: '/order/index'}
},
/* {
path: 'discount/:orderItemId(\\d+)',
......@@ -342,7 +341,7 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/ecw/order/associatedOrder'],resolve),
props: true,
name: 'associatedOrder',
meta: {title: '关联订单', icon: '', activeMenu: '/order/associatedOrder',noCache:true,}
meta: {title: '关联订单',titleEn:'Associated order', icon: '', activeMenu: '/order/associatedOrder',noCache:true,}
},
{
path: 'add-associated-order/:orderId(\\d+)',
......@@ -351,6 +350,7 @@ export const constantRoutes = [
name:'addAssociatedOrder',
meta:{
title:'添加关联订单',
titleEn:'Add associated order',
icon:'',
activeMenu:'/order/addAssociatedOrder',
noCache:true,
......@@ -363,6 +363,7 @@ export const constantRoutes = [
props: true,
meta: {
title: '订单互斥',
titleEn:'Orders are mutually exclusive',
icon:'',
activeMenu: '/order/mutexOrder',
noCache: true,
......@@ -374,6 +375,7 @@ export const constantRoutes = [
props: true,
meta:{
title: '未加入互斥',
titleEn:'Mutual exclusion is not added',
icon:'',
activeMenu: '/order/notMutexOrder',
noCache: true,
......@@ -386,6 +388,7 @@ export const constantRoutes = [
props: true,
meta:{
title:'调拨出仓',
titleEn:'Transfer out of warehouse',
icon:'',
activeMenu:'order/transferWarehousing',
noCache:true,
......@@ -398,6 +401,7 @@ export const constantRoutes = [
props: true,
meta:{
title:'调拨到仓',
titleEn:'Transfer to warehouse',
icon:'',
activeMenu:'order/transferToWarehouse',
noCache:true,
......
......@@ -67,7 +67,7 @@ export const DICT_TYPE = {
PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态
PAY_REFUND_ORDER_TYPE: 'pay_refund_order_type', // 退款订单类别
ECW_BANK_TYPE: 'bank_type', // 银行账号类型
// ECW_DATA_SOURCE: 'data_source', // 数据来源
ECW_DATA_SOURCE: 'data_source', // 数据来源
ECW_REGION_TYPE: 'region_trade_type', // 区域类型
ECW_TRANSPORT_TYPE: 'transport_type', //货运方式
ECW_CHARGE_TYPE: 'warehouse_charge_type', //仓储收费方式
......@@ -212,6 +212,8 @@ export const DICT_TYPE = {
BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态
BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
APP_TYPE:"app_type", //系统类型
}
/**
......
......@@ -38,10 +38,10 @@
<!-- 操作工具栏 -->
<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"
v-hasPermi="['bpm:process-instance:query']">{{$t('发起流程')}}</el-button>
</el-col>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......
......@@ -38,7 +38,11 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('主键')" align="center" prop="id" />
<el-table-column :label="$t('规则名称')" align="center" prop="name" />
<el-table-column :label="$t('规则名称')" align="center" prop="name">
<template slot-scope="scope">
{{ isChinese ? scope.row.name : scope.row.nameEn }}
</template>
</el-table-column>
<el-table-column :label="$t('规则分类')" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="scope.row.type" />
......@@ -66,10 +70,13 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="$t('规则名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入规则名称')" />
</el-form-item>
<el-form-item :label="$t('规则英文名称')" prop="nameEn">
<el-input v-model="form.nameEn" :placeholder="$t('请输入规则英文名称')" />
</el-form-item>
<el-form-item :label="$t('规则分类')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择规则分类')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE)"
......@@ -130,6 +137,7 @@ export default {
// 表单校验
rules: {
name: [{ required: true, message: this.$t('规则名称不能为空'), trigger: "blur" }],
nameEn: [{ required: true, message: this.$t('规则英文名称不能为空'), trigger: "blur" }],
type: [{ required: true, message: this.$t('规则分类不能为空'), trigger: "change" }],
score: [{ required: true, message: this.$t('规则得分不能为空'), trigger: "blur" }],
}
......@@ -244,6 +252,12 @@ export default {
this.exportLoading = false;
}).catch(() => {});
}
},
computed: {
isChinese() {
return this.$i18n.locale === 'zh_CN'
},
}
};
</script>
......@@ -38,7 +38,11 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('主键')" align="center" prop="id" />
<el-table-column :label="$t('规则名称')" align="center" prop="name" />
<el-table-column :label="$t('规则名称')" align="center" prop="name">
<template slot-scope="scope">
{{ isChinese ? scope.row.name : scope.row.nameEn }}
</template>
</el-table-column>
<el-table-column :label="$t('规则分类')" align="center" prop="type">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE" :value="scope.row.type" />
......@@ -66,10 +70,13 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="$t('规则名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入规则名称')" />
</el-form-item>
<el-form-item :label="$t('规则英文名称')" prop="nameEn">
<el-input v-model="form.nameEn" :placeholder="$t('请输入规则英文名称')" />
</el-form-item>
<el-form-item :label="$t('规则分类')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择规则分类')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE)"
......@@ -130,6 +137,7 @@ export default {
// 表单校验
rules: {
name: [{ required: true, message: this.$t('规则名称不能为空'), trigger: "blur" }],
nameEn: [{ required: true, message: this.$t('规则英文名称不能为空'), trigger: "blur" }],
type: [{ required: true, message: this.$t('规则分类不能为空'), trigger: "change" }],
score: [{ required: true, message: this.$t('规则得分不能为空'), trigger: "blur" }],
}
......@@ -244,6 +252,12 @@ export default {
this.exportLoading = false;
}).catch(() => {});
}
},
computed: {
isChinese() {
return this.$i18n.locale === 'zh_CN'
},
}
};
</script>
......@@ -101,7 +101,7 @@
<el-form-item :label="$t('英文内容')" prop="contentEn">
<editor v-model="form.contentEn" :min-height="150"/>
</el-form-item>
<el-form-item :label="$t('WEB端广告图片(建议尺寸')+'210*902)'" prop="bannerUrlWeb">
<el-form-item :label="$t('WEB端广告图片(建议尺寸长*宽')+'902*310)'" prop="bannerUrlWeb">
<el-col :span="8">
<el-input v-model="form.bannerUrlWeb" :placeholder="$t('请上传WEB端广告图片')" />
</el-col>
......@@ -113,7 +113,7 @@
</el-button>
</el-upload>
</el-form-item>
<el-form-item :label="$t('APP端广告图片(建议尺寸')+'688*294)'" prop="bannerUrlApp">
<el-form-item :label="$t('APP端广告图片(建议尺寸长*宽')+'688*294)'" prop="bannerUrlApp">
<el-col :span="8">
<el-input v-model="form.bannerUrlApp" :placeholder="$t('请上传APP端广告图片')" />
</el-col>
......
......@@ -508,7 +508,7 @@ export default {
this.$message.error(this.$t("放入箱数不能为0"));
return;
}
if (this.shopForm.putQuantity === 0) {
if (this.shopForm.putQuantity === 0 && this.isQuantity) {
this.$message.error(this.$t("放入数量(个)不能为0"));
return;
}
......
......@@ -304,7 +304,9 @@ export default {
// 二维码/条码编号
qrCode: "",
// 批量输入
batchObj: {},
batchObj: {
boxNum: 0,
},
// 批量纠错(订单号)
orderObj: {},
// 纠错
......@@ -403,7 +405,7 @@ export default {
break;
case "batchInput":
this.$set(this.dialogConfig, "fullscreen", false);
this.batchObj = {};
this.batchObj = { boxNum: 0 };
this.boxOrderInfo = {};
break;
case "correction":
......@@ -588,7 +590,7 @@ export default {
}).then((res) => {
const { data } = res;
this.boxOrderInfo = data;
this.batchObj.boxNum = data.num;
this.batchObj.boxNum = Number(data.num);
});
}
});
......
......@@ -24,8 +24,8 @@
<!-- <el-form-item :label="$t('排序')" prop="sort">
<el-input v-model="queryParams.sort" :placeholder="$t('请输入排序')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item label="快递ID" prop="expressId">
<el-input v-model="queryParams.expressId" placeholder="请输入快递ID" clearable @keyup.enter.native="handleQuery"/>
<el-form-item :label="$t('快递ID')" prop="expressId">
<el-input v-model="queryParams.expressId" :placeholder="$t('请输入快递ID')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('预计时间')">
<el-input v-model="queryParams.etaTime" :placeholder="$t('预计到达天数')" clearable @keyup.enter.native="handleQuery"/>
......@@ -34,7 +34,7 @@
<el-input v-model="queryParams.channelAgent" :placeholder="$t('请输入渠道代理')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('备注')" prop="remarksZh">
<el-input v-model="queryParams.remarksZh" placeholder="请输入备注-中文" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.remarksZh" :placeholder="$t('请输入备注-中文')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="备注-英文" prop="remarksEn">
<el-input v-model="queryParams.remarksEn" placeholder="请输入备注-英文" clearable @keyup.enter.native="handleQuery"/>
......@@ -69,10 +69,15 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="渠道ID" align="center" prop="channelId" />
<el-table-column :label="$t('名称')" align="center" prop="nameZh" />
<el-table-column :label="$t('渠道ID')" align="center" prop="channelId" />
<el-table-column :label="$t('名称')" align="center" prop="nameZh">
<template slot-scope="{row}">{{$l(row, 'name')}}</template>
</el-table-column>
<!-- <el-table-column label="名称-英文" align="center" prop="nameEn" /> -->
<el-table-column :label="$t('内部名称')" align="center" prop="internalNameZh" />
<el-table-column :label="$t('内部名称')" align="center" prop="internalNameZh">
<template slot-scope="{row}">{{$l(row, 'internalName')}}</template>
</el-table-column>
<!-- <el-table-column label="内部名称-英文" align="center" prop="internalNameEn" />
<el-table-column :label="$t('类型编码')" align="center" prop="typeNumber" />-->
<!-- <el-table-column label="仓库id字符串" align="center" prop="warehouseIds" /> -->
......@@ -91,7 +96,7 @@
<el-table-column :label="$t('简码')" align="center" prop="code" />
<el-table-column :label="$t('排序')" align="center" prop="sort" />
<el-table-column :label="$t('快递公司')" align="center" prop="companyName" />
<el-table-column label="预计时间(天)" align="center" prop="etaTime" />
<el-table-column :label="$t('预计时间(天)')" align="center" prop="etaTime" />
<el-table-column :label="$t('渠道代理')" align="center" prop="channelAgent" />
<el-table-column :label="$t('备注')" align="center" prop="remarksZh" />
<!-- <el-table-column label="备注-英文" align="center" prop="remarksEn" /> -->
......
......@@ -53,7 +53,7 @@
</el-form-item>
<el-form-item :label="$t('运费')" v-if="[2,3,4,5,6,7].indexOf(form.type) > -1">
<span slot="label"><span style="color: red">*</span>{{ $t('运费') }}</span>
<span slot="label"><span style="color: red">*</span>{{$t('运费')}}</span>
<div class="fee-item" v-for="(item, index) in fee[1]" :key="index">
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}}
......@@ -61,8 +61,8 @@
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> -->
<selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 2" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<!-- <selector v-if="[4].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> -->
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
<span v-if="[4].indexOf(form.type) > -1">{{$t('折扣率')}}</span>
......@@ -75,8 +75,13 @@
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />{{ $t('') }}<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<!-- <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
-->
<selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
{{$t('价格')}}
</template>
......@@ -94,6 +99,8 @@
<el-button v-if="fee[1].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[1].splice(index,1)" />
</template>
<!-- <div class="red-tips" v-if="errTips[1] && errTips[1][index]">{{errTips[1][index]}}</div> -->
<span style="color:red; margin-left: 10px;" v-if="index == 0 && [2,3,4,5].indexOf(form.type) > -1">{{$t('注意:运费/清关费 方案二选一')}}</span>
</div>
</el-form-item>
......@@ -102,7 +109,8 @@
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}}
<el-input v-model="item.fullAmount" @keyup.native="checkPositive(item, 'fullAmount')" style="width:100px" />
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<!-- <selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> -->
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
......@@ -116,8 +124,10 @@
<span v-if="[4].indexOf(form.type) > -1">%</span>
</template>
<template v-if="form.type==7">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />{{ $t('') }}<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<Selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" />
<!-- <Selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> -->
<selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
{{$t('价格')}}
</template>
......@@ -286,7 +296,8 @@ export default {
readonly: false,
// 表单参数
form: {
status: 1
status: 1,
isSimilarSuperposition: true
},
// 表单校验
rules: {
......@@ -351,12 +362,18 @@ export default {
// 满减组合单位列表
combUnitList(){
let arr = []
// 满减和折扣暂时不需要货币单位
if(this.form.type != 2 && this.form.type != 4){
this.currencyList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
value: 'fullCurrencyId_' + item.id
})
})
}
this.unitList.forEach(item => {
arr.push({
label: this.$l(item, 'title'),
......@@ -368,11 +385,6 @@ export default {
},
watch:{
'form.type'(val){
// 方数满减3和特价6需要单位
if((val == 3 || val == 6 || val == 2) && !this.unitList.length){
this.getUnitList()
}
// 非优惠券则查询优惠券列表
if(val && val != 1){
this.getCouponSelect()
......@@ -428,6 +440,7 @@ export default {
if(this.$route.query.readonly == 1){
this.readonly = true
}
this.getUnitList()
getCurrencyList().then(res => this.currencyList = res.data)
if (this.$route.query.id) {
this.initing = true
......@@ -507,7 +520,7 @@ export default {
// 满减活动如果选择的满多少金额减,则在选择满货币后需要同步减的货币,且禁用减的货币修改
checkReduceCurrency(item){
// 金额满减
if(this.form.type == 2){
if([2,4,5,7].indexOf(this.form.type) > -1){
// 只要不是按产品单位满减
if(!item.combUnit || item.combUnit.split('_')[0] != 'prodUnit'){
this.$set(item, 'reduceCurrencyDisabled', true)
......@@ -518,21 +531,29 @@ export default {
if(!currencyId){
currencyId = this.currencyList[0].id
}
// 满减
if(this.form.type == 2){
this.$set(item, 'reduceCurrencyId', currencyId)
}
// 优惠5,区间价7
if(this.form.type == 5 || this.form.type == 7){
this.$set(item, 'netReceiptsCurrencyId', currencyId)
}
}else this.$set(item, 'reduceCurrencyDisabled', false)
return
}
// 优惠
if(this.form.type == 5){
/* if(this.form.type == 5){
if(!item.fullCurrencyId){
this.$set(item, 'fullCurrencyId', this.currencyList[0].id)
}
this.$set(item, 'reduceCurrencyDisabled', true)
// this.$set(item, 'reduceCurrencyDisabled', true)
this.$set(item, 'netReceiptsCurrencyId', +item.fullCurrencyId)
return
}
} */
// 区间价
if(this.form.type== 7){
......@@ -576,7 +597,7 @@ export default {
validDays: undefined,
costType: undefined,
discountDetailed: undefined,
isSimilarSuperposition: undefined,
isSimilarSuperposition: true,
couponIds: undefined,
suitableUserType: undefined,
suitableLineType: undefined,
......@@ -618,38 +639,22 @@ export default {
this.errTips = {}
let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount)
discountDetailedVOs.map(item => {
// 目前只有满减使用组合单位
if(this.form.type == 2 && item.combUnit){
// 目前只有满减(1)和优惠(5)使用组合单位
if([2,4,5,7].indexOf(this.form.type) > -1 && item.combUnit){
// 满减需要 先删除单位,防止编辑的时候切换单位导致两个同时存在
delete item.fullCurrencyId
delete item.prodUnit
let tmp = item.combUnit.split('_')
/* if(this.form.type == 5){
item['fullCurrencyId'] =
} */
/* if(this.form.type == 7){
item.startAndEndCurrencyId =
} */
// 这里目前只能是满减,优惠会提示 “优惠劵满减货币不能为空”
item[tmp[0]] = tmp[1]
}
/* // 满减,折扣 则需要填写 满多少(fullAmount)减多少(reduceAmount)
// 优惠,满多少(fullAmount)收多少(netReceiptsAmount)
// 特价 netReceiptsAmount
// 区间价 startAmount 到 endAmount
const fields = {
2: ['fullAmount', 'reduceAmount'],
3: ['fullAmount', 'netReceiptsAmount'],
4: ['netReceiptsAmount'],
5: ['startAmount', 'endAmount', 'netReceiptsAmount']
}[this.form.type];
let err = false
if(fields){
fields.forEach(field => {
if(!item[field] || +item[field] <= 0){
err = true
this.$message.error((item.type == 1 ? this.$t('运费') : '清关费') + '不能为空且大于0')
this.errTips[item.type]
}
})
}
if(err) return false */
})
......
......@@ -134,7 +134,7 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list" border>
<el-table-column label="优惠券ID" align="center" prop="couponId" />
<el-table-column :label="$t('优惠券ID')" align="center" prop="couponId" />
<el-table-column :label="$t('类型')" align="center" prop="type">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" />
......@@ -146,7 +146,7 @@
{{$l(row, 'content')}}
</template>
</el-table-column> -->
<el-table-column label="发布人/发布时间" align="center" prop="startTime" width="180">
<el-table-column :label="$t('发布人') + '/' + $t('发布时间')" align="center" prop="startTime" width="180">
<template slot-scope="scope">
<div>{{ scope.row.creatorName }}</div>
<div>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</div>
......@@ -169,6 +169,12 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column-->
<el-table-column :label="$t('更新人') + '/' + $t('更新时间')" align="center" width="180">
<template slot-scope="scope">
<div>{{ scope.row.updaterName }}</div>
<div>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="createTime" width="180">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_IS_DRAFT" :value="row.status" />
......@@ -315,11 +321,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const couponId = row.couponId;
this.$modal.confirm('是否确认删除优惠券信息编号为"' + couponId + '"的数据项?').then(function() {
this.$confirm(this.$t('是否确认删除优惠券信息编号为{couponId}的数据项?', {couponId})).then(function() {
return deleteCoupon(couponId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$message.success(this.$t("删除成功"));
}).catch(() => {});
},
/** 导出按钮操作 */
......@@ -332,7 +338,7 @@ export default {
this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有优惠券信息数据项?').then(() => {
this.$confirm(this.$t('是否确认导出所有优惠券信息数据项?')).then(() => {
this.exportLoading = true;
return exportCouponExcel(params);
}).then(response => {
......
......@@ -13,7 +13,7 @@
<el-form-item :label="$t('国家')" prop="country">
<el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
</el-col>
......@@ -21,7 +21,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
<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=" isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -92,7 +92,7 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<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=" isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -100,7 +100,7 @@
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<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=" isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -122,7 +122,7 @@
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
<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=" isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -263,7 +263,7 @@
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini">
<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 + (isChinese ? item.nameZh : item.nameEn) + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template>
......@@ -302,7 +302,7 @@
<el-form-item label="">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label=" isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template>
......@@ -335,7 +335,7 @@
<el-form-item label="">
<el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
<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=" isChinese ? dict.label : dict.labelEn" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template>
......@@ -356,7 +356,7 @@
<el-row :gutter="10" style="margin-top: 15px">
<el-col :span="12">
<el-form-item label="发票抬头" prop="invoiceTitle">
<el-form-item :label="$t('发票抬头')" prop="invoiceTitle">
<el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
</el-form-item>
</el-col>
......@@ -811,6 +811,9 @@ export default {
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
userId(){
return this.$store.state.user.id
},
......
......@@ -13,7 +13,7 @@
<el-form-item :label="$t('国家')" prop="country">
<el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
</el-col>
......@@ -21,7 +21,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -39,7 +39,7 @@
<el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
<el-option v-for="node in nodeList"
:key="node.id" :label="node.titleZh" :value="node.id" />
:key="node.id" :label="isChinese ? node.titleZh : node.titleEn" :value="node.id" />
</el-select>
</el-form-item>
</el-col>
......@@ -73,12 +73,12 @@
<el-row :gutter="10">
<el-col :span="11">
<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=" isChinese ? item.titleZh : item.titleEn" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select>
</el-col>
<el-col :span="11">
<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=" isChinese ?item.titleZh : item.titleEn" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/>
</el-select>
</el-col>
</el-row>
......@@ -88,7 +88,7 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -96,7 +96,7 @@
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<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="isChinese ? dict.label:dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -118,7 +118,7 @@
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -258,7 +258,7 @@
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini">
<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 + (isChinese ? item.nameZh : item.nameEn) + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template>
......@@ -297,7 +297,7 @@
<el-form-item label="">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template>
......@@ -330,7 +330,7 @@
<el-form-item label="">
<el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
<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="isChinese ? dict.label :dict.labelEn " :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template>
......@@ -811,6 +811,9 @@ export default {
userId(){
return this.$store.state.user.id
},
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
/* userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
......
......@@ -12,7 +12,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
......@@ -30,19 +30,19 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -51,7 +51,7 @@
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<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="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -101,7 +101,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -164,7 +164,7 @@
<el-form-item :label="$t('国家')" prop="country">
<el-select v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.COUNTRY)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -172,7 +172,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')">
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -185,7 +185,7 @@
<el-form-item :label="$t('客户类别')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择客户类别')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
......@@ -242,7 +242,7 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -250,7 +250,7 @@
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -270,9 +270,10 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')">
<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="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -378,7 +379,7 @@
<template v-slot="{row}">
<el-select v-model="row.areaCode" :placeholder="$t('请选择区号')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.AREA_CODE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</template>
</el-table-column>
......@@ -404,7 +405,7 @@
<template v-slot="{row}">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</template>
</el-table-column>
......@@ -522,9 +523,12 @@ import Template from "@/views/cms/template/index.vue";
export default {
name: "Customer",
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
channel(){
return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => i.label).join('') :''
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :''
}
}
},
......@@ -612,7 +616,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -18,7 +18,7 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -137,6 +137,11 @@ export default {
this.customerServiceList = r.data;
})
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
methods: {
// 导出
handleExport() {
......
......@@ -19,19 +19,21 @@
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{ getDictDatas2(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE, (customer.transportType||'').split(',')).map(e => e.label).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('资源类型')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{ customer.creditLevelNameZh }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{isChinese ? customer.creditLevelNameZh :customer.creditLevelNameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ isChinese ? country.nameZh : country.nameEn }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户类别')">{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => e.label).join(', ') }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户类别')">
{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => isChinese ? e.label : e.labelEn).join(', ')}}
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item>
......@@ -111,7 +113,7 @@
<div slot="header" class="clearfix">
<el-form :inline="true">
<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.transportId" formatter="number" />
</el-form-item>
<el-form-item :label="$t('订单状态:')">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"/>
......@@ -166,7 +168,12 @@
<template v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="departureName" />
<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>
</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}}
......@@ -183,7 +190,7 @@
</template>
</el-table-column>
</el-table>
<pagination @pagination="getorderList" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :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 :label="$t('报价')">
......@@ -338,7 +345,11 @@
</div>
<el-table :data="customerCreditLogList">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column prop="name" :label="$t('规则名称')"></el-table-column>
<el-table-column :label="$t('规则名称')">
<template v-slot="{row}">
{{ 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" />
......@@ -389,7 +400,7 @@
<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="item.name"></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>
......@@ -463,7 +474,7 @@ export default {
})
getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
this.country = r.data.nameZh
this.country = r.data
})
})
getProductTypeList().then(r => {
......@@ -568,8 +579,8 @@ export default {
customerCreditLogList:[],
rucangtime:[],
queryParams:{
pageSize:10,
pageNo:1
rows:10,
page:1
},
orderList:[],
orderTotal:0,
......@@ -593,6 +604,9 @@ export default {
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
productType(){
const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType))
return productType ? productType.titleZh : ''
......@@ -602,11 +616,9 @@ export default {
return pickupPoint ? pickupPoint.titleZh : ''
},
promoter() {
console.log(this.customerSelect,'this.customerSelect.find');
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
},
customerService() {
console.log(this.serviceUserList,'this.serviceUserList');
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
id() {
......@@ -617,7 +629,8 @@ export default {
if(val === 'all'){
return this.$t('信用分')
}else{
return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
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
}
}
}
......@@ -646,7 +659,6 @@ export default {
},
getCustomerGrade(){
levelLogPage({...this.getCustomerGradeFrom,customerId:this.id,total:undefined}).then(r => {
console.log(r,'客户等级');
if(r.code === 0){
this.getCustomerGradeList = r.data.list;
this.getCustomerGradeFrom.total = r.data.total;
......@@ -657,7 +669,6 @@ export default {
creditLogPage(){
customerCreditLogPage({...this.customerCreditLogFrom,customerId:this.id}).then(r => {
if(r.code === 0){
console.log(r,'r');
this.customerCreditLogList = r.data.list;
this.customerCreditLogFrom.total = r.data.total;
}
......@@ -683,7 +694,6 @@ export default {
// 数据
getOrderStatistics(){
orderStatistics({customerId:this.id}).then(r => {
console.log(r,'数据')
if(r.code === 0){
this.orderStatisticsObj = r.data
}
......@@ -708,7 +718,7 @@ export default {
// 获取账单数据
infoListReceiptFn(){
infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0){
this.infoListReceiptList = r.data.list;
this.infoListReceiptTotal = r.data.total;
......
......@@ -27,19 +27,19 @@
<el-form-item :label="$t('佣金类型')" prop="transportId">
<el-select v-model="queryParams.type" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="departureId">
<el-select v-model="queryParams.departureId" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('始发地')" prop="objectiveId">
<el-select v-model="queryParams.objectiveId" clearable size="small">
<el-option v-for="dict in exportCityList"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
:key="dict.id" :label=" isChinese ? dict.titleZh : dict.titleEn" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="customsType">
......@@ -51,13 +51,13 @@
<el-form-item :label="$t('报关方式')" prop="approval">
<el-select v-model="queryParams.approval" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('备案')" prop="darkReturnType">
<el-select v-model="queryParams.darkReturnType" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<div style="width:100%;display: flex;justify-content: space-between;margin-bottom: 50px;">
......@@ -195,6 +195,9 @@ export default {
};
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
//目的地
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
......@@ -277,7 +280,8 @@ export default {
let index1 = this.exportCityList.findIndex(item =>item.id == row.departureId);
let index2 = this.importCityList.findIndex(item => item.id == row.objectiveId);
let flag = `${index1 === -1 ? this.$t('全部') : this.exportCityList[index1].titleZh}/${index2 === -1 ? this.$t('全部') : this.importCityList[index2].titleZh}`;
let flag = `${index1 === -1 ? this.$t('全部') : this.$i18n.locale === 'zh_CN' ? this.exportCityList[index1].titleZh : this.exportCityList[index1].titleEn}/${index2 === -1 ? this.$t('全部') :this.$i18n.locale === 'zh_CN'? this.importCityList[index2].titleZh : this.importCityList[index2].titleEn }`;
return flag
},
}
......
......@@ -38,7 +38,7 @@
<el-col :span="5">
<el-form-item :label="$t('始发地')" prop="departureId">
<div>
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.departureId"
<custom-selectors-dictionary :all-show="true" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="form.departureId"
:options="exportCityList"></custom-selectors-dictionary>
</div>
</el-form-item>
......@@ -46,7 +46,7 @@
<el-col :span="5">
<el-form-item :label="$t('目的地')" prop="objectiveId">
<div>
<custom-selectors-dictionary :all-show="true" label-key="titleZh" value-key="id" v-model="form.objectiveId"
<custom-selectors-dictionary :all-show="true" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="form.objectiveId"
:options="importCityList"></custom-selectors-dictionary>
</div>
</el-form-item>
......@@ -74,7 +74,7 @@
<el-form-item label-width="150px" :label="$t('佣金类型(明佣、暗佣)')">
<el-radio-group v-model="form.type">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_TYPE)" v-show="item.value != 0" :label="parseInt(item.value)"
:key="index">{{ item.label }}
:key="index">{{ isChinese ? item.label :item.labelEn }}
</el-radio>
</el-radio-group>
</el-form-item>
......@@ -85,7 +85,7 @@
<el-form-item :label="$t('返佣类型')" v-if="form.type == 2">
<el-radio-group v-model="form.darkReturnType">
<el-radio v-for="(item,index) in getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)" :label="parseInt(item.value)"
:key="index">{{ item.label }}
:key="index">{{ isChinese ? item.label :item.labelEn }}
</el-radio>
</el-radio-group>
</el-form-item>
......@@ -101,14 +101,14 @@
</div>
<div>
<el-select v-model="mingServantFrom[0].refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="mingServantFrom[0].refundCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div>
<custom-selectors-dictionary v-model="mingServantFrom[0].refundUnit" label-key="titleZh" value-key="id"
<custom-selectors-dictionary v-model="mingServantFrom[0].refundUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary>
</div>
</div>
......@@ -117,7 +117,7 @@
<el-form-item :label="$t('商品类型')" v-for="(item,index) in darkServantAndProductForm" :key="index">
<div class="shanping-type">
<div class="tool">
<custom-selectors-dictionary :all-show="true" v-model="item.productType" :options="productAttrList" label-key="titleZh"
<custom-selectors-dictionary :all-show="true" v-model="item.productType" :options="productAttrList" :label-key="isChinese ? 'titleZh' : 'titleEn'"
value-key="id"></custom-selectors-dictionary>
</div>
<div class="box">
......@@ -138,13 +138,13 @@
</div>
<div class="custom">
<el-select v-model="item.darkCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh:item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="item.darkCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div class="custom">
<custom-selectors-dictionary v-model="item.darkUnit" label-key="titleZh" value-key="id"
<custom-selectors-dictionary v-model="item.darkUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary>
</div>
</div>
......@@ -166,14 +166,14 @@
</div>
<div class="item">
<el-select v-model="item.amountCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="item.amountCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div class="item">
<custom-selectors-dictionary v-model="item.amountUnit"
label-key="titleZh" value-key="id" :options="weightList"></custom-selectors-dictionary>
:label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" :options="weightList"></custom-selectors-dictionary>
</div>
</div>
<div class="content">
......@@ -183,14 +183,14 @@
</div>
<div class="item">
<el-select v-model="item.refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="item.refundCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div class="item">
<custom-selectors-dictionary v-model="item.refundUnit"
label-key="titleZh" value-key="id" :options="weightList"></custom-selectors-dictionary>
:label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" :options="weightList"></custom-selectors-dictionary>
</div>
</div>
<el-button type="primary" @click="addToFn(2)" v-show="darkServantAndRebateForm.length -1 === index">{{$t('添加')}}</el-button>
......@@ -205,13 +205,13 @@
</div>
<div class="item">
<el-select v-model="mingServantAnddarkServant[0].refundCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].refundCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div class="item">
<custom-selectors-dictionary label-key="titleZh" value-key="id" v-model="mingServantAnddarkServant[0].refundUnit"
<custom-selectors-dictionary :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id" v-model="mingServantAnddarkServant[0].refundUnit"
:options="weightList"></custom-selectors-dictionary>
</div>
</div>
......@@ -227,13 +227,13 @@
</div>
<div class="item">
<el-select v-model="mingServantAnddarkServant[0].darkAdjustCurrency">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" />
</el-select>
<!-- <custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustCurrency"
:options="currencyList"></custom-selectors-dictionary> -->
</div>
<div class="item">
<custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustUnit" label-key="titleZh" value-key="id"
<custom-selectors-dictionary v-model="mingServantAnddarkServant[0].darkAdjustUnit" :label-key="isChinese ? 'titleZh' : 'titleEn'" value-key="id"
:options="weightList"></custom-selectors-dictionary>
</div>
</div>
......@@ -373,6 +373,9 @@ export default {
};
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
},
......
......@@ -8,8 +8,8 @@
</el-form-item>
<el-form-item :label="$t('投诉类型')" prop="type">
<el-select v-model="queryParams.type" :placeholder="$t('请选择投诉类型')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderId">
......@@ -21,7 +21,7 @@
<el-form-item :label="$t('处理状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('请选择处理状态')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label=" isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('投诉编号')" prop="code">
......@@ -116,7 +116,7 @@
<el-form-item :label="$t('投诉类型')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择投诉类型')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="$i18n.locale === 'zh_CN' ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderId">
......@@ -178,7 +178,7 @@
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh : item.titleEn " :value="item.id" />
</el-select>
</el-input>
</el-form-item>
......@@ -214,7 +214,7 @@
<el-form-item :label="$t('订单号')+':'" prop="orderId" >
<div>{{form.orderId}}</div>
</el-form-item>
<el-form-item label="提单号:" prop="ladingbillId" >
<el-form-item :label="$t('提单号') + ':'" prop="ladingbillId" >
<div>{{form.ladingbillId|| $t('无')}}</div>
</el-form-item>
<div>
......@@ -274,7 +274,7 @@
<el-form-item v-show="form.status == '3'" :label="$t('赔付金额')">
<el-input v-model="form.indemnity" :placeholder="$t('请输入赔付金额')">
<el-select slot="append" defaultable v-model="form.currencyUnit" :placeholder="$t('请选择货币单位')" style="width: 110px">
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in currencyList" :key="item.id" :label="isChinese ? item.titleZh :item.titleEn" :value="item.id" />
</el-select>
</el-input>
</el-form-item>
......@@ -314,6 +314,11 @@ export default {
DictSelector,
customerSelect
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() {
return {
DICT_TYPE,
......@@ -390,7 +395,7 @@ export default {
},
getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return label[0].titleZh
if(label.length>0) return this.isChinese ? label[0].titleZh : label[0].titleEn
return ''
},
getOrderList(key){
......
......@@ -12,7 +12,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
......@@ -30,19 +30,19 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -51,7 +51,7 @@
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<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=" isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -152,7 +152,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -160,7 +160,7 @@
<el-form-item :label="$t('所属代理')" prop="agentId">
<el-select v-model="form.agentId" :placeholder="$t('请选择所属代理')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -173,7 +173,7 @@
<el-form-item :label="$t('客户类别')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择客户类别')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
......@@ -211,7 +211,7 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -220,7 +220,7 @@
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -244,7 +244,7 @@
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
......@@ -361,6 +361,11 @@ import {getCreditPage} from "@/api/customer/credit";
export default {
name: "Customer",
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
components: {
},
data() {
......@@ -429,7 +434,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
......@@ -31,19 +31,19 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -52,7 +52,7 @@
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<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="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -99,7 +99,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop=" isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn' "></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -255,7 +255,7 @@ export default {
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
......@@ -444,6 +444,11 @@ export default {
this.$refs.multipleTable.clearSelection();
}
},
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
}
};
</script>
......@@ -13,10 +13,11 @@
<el-input v-model="queryParams.marks" :placeholder="$t('请输入关键字查找')" />
</el-form-item>
<el-form-item :label="$t('资源类型')" prop="customerType">
<el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small">
<!-- <el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-select> -->
<dict-selector :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable ></dict-selector>
</el-form-item>
<!-- <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
......@@ -45,17 +46,17 @@
</el-form>
<div class="total_num">
<span>{{ $t('开发客户:') }}</span>
<span>总箱数 {{totalData.developNum}} </span>
<span>总方数 {{totalData.developVolume}}</span>
<span>总重量 {{totalData.developWeight}}KG </span>
<span>{{$t('总箱数')}} {{totalData.developNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.developVolume}}</span>
<span>{{$t('总重量')}} {{totalData.developWeight}}KG </span>
<span>{{ $t('公司客户:') }}</span>
<span>总箱数 {{totalData.companyNum}} </span>
<span>总方数 {{totalData.companyVolume}}</span>
<span>总重量 {{totalData.companyWeight}}KG </span>
<span>{{$t('总箱数')}} {{totalData.companyNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.companyVolume}}</span>
<span>{{$t('总重量')}} {{totalData.companyWeight}}KG </span>
<span>{{ $t('汇总:') }}</span>
<span>总箱数 {{totalData.sumNum}} </span>
<span>总方数 {{totalData.sumVolume}}</span>
<span>总重量 {{totalData.sumWeight}}KG </span>
<span>{{$t('总箱数')}} {{totalData.sumNum}}{{$t('')}} </span>
<span>{{$t('总方数')}} {{totalData.sumVolume}}</span>
<span>{{$t('总重量')}} {{totalData.sumWeight}}KG </span>
</div>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
......
......@@ -9,13 +9,13 @@
<el-form-item :label="$t('咨询类型')" prop="type">
<el-select v-model="queryParams.type" :placeholder="$t('请选择咨询类型')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('状态')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('请选择状态')" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
......@@ -92,7 +92,7 @@
<el-form-item :label="$t('咨询类型')" prop="type">
<el-select v-model="form.type" :placeholder="$t('请选择咨询类型')" :disabled="form.id ? true : false">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.ECW_MESSAGE_LEAVE_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
......@@ -128,13 +128,13 @@
<el-col :span="4">{{$t('联系方式')}}:</el-col><el-col :span="12">{{messageVal.phone}}</el-col>
</el-row>
<el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('当前状态')}}:</el-col><el-col :span="12">{{messageVal.status === 1 ? '待回复' : '已回复'}}</el-col>
<el-col :span="4">{{$t('当前状态')}}:</el-col><el-col :span="12">{{messageVal.status === 1 ? $t('待回复') : $t('已回复')}}</el-col>
</el-row>
<el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('订单编号')}}:</el-col><el-col :span="12">{{messageVal.orderCode}}</el-col>
</el-row>
<el-row class="el-row-leaving" :gutter="10">
<el-col :span="4">{{$t('留言类型')}}:</el-col><el-col :span="12">{{messageVal.type === 1 ? '咨询':'建议'}}</el-col>
<el-col :span="4">{{$t('留言类型')}}:</el-col><el-col :span="12">{{messageVal.type === 1 ? $t('咨询'):$t('建议')}}</el-col>
</el-row>
<div style="background-color:#cccccc;padding:10px 20px;">
<el-row class="el-row-leaving" :gutter="10">
......@@ -169,6 +169,11 @@ export default {
name: "MessageLeave",
components: {
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() {
return {
......
......@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
......@@ -25,19 +25,19 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn " :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -47,7 +47,7 @@
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<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="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -88,7 +88,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn' "></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -162,6 +162,11 @@ export default {
customerComplaints,
transferCustomer
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
data() {
return {
show:false,
......@@ -243,7 +248,7 @@ export default {
},
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -13,7 +13,7 @@
<el-form-item :label="$t('客户等级')" prop="level">
<el-select clearable v-model="queryParams.level" :placeholder="$t('请选择客户等级')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('联系方式')">
......@@ -31,19 +31,19 @@
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="source">
<el-select clearable v-model="queryParams.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
:key="dict.id" :label=" isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户状态')" prop="status">
<el-select clearable v-model="queryParams.status" :placeholder="$t('请选择客户状态')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
:key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
......@@ -52,7 +52,7 @@
</el-form-item>
<el-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<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="isChinese ? item.nameZh : item.nameEn" :key="index" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item>
......@@ -93,7 +93,7 @@
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
</template>
</el-table-column>
<el-table-column :label="$t('信用等级')" prop="creditLevelNameZh"></el-table-column>
<el-table-column :label="$t('信用等级')" :prop="isChinese ? 'creditLevelNameZh' : 'creditLevelNameEn'"></el-table-column>
<el-table-column :label="$t('客户状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_STATUS" :value="scope.row.status" />
......@@ -245,10 +245,15 @@ export default {
// this.nodeList = r.data
// })
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
},
methods: {
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
return this.isChinese ? country?.nameZh : country?.nameEn
},
/** 查询列表 */
getList() {
......
......@@ -17,7 +17,7 @@
<div class="title-font">
<label>{{$t('报价单所属')}}{{list.relation?list.relation==1?$t('发货人'):$t('收货人'):$t('发货人')}}</label>
</div>
<el-descriptions :column="3" border class="card">
<el-descriptions :column="3" border class="card" v-if="list.consignorId">
<el-descriptions-item :label="$t('发货人')+':'">
{{consignorData.contactsName||$t('')}}
</el-descriptions-item>
......@@ -39,7 +39,7 @@
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border class="card">
<el-descriptions :column="3" border class="card" v-if="list.consigneeId">
<el-descriptions-item :label="$t('收货人')+':'">
{{consigneeData.contactsName||$t('')}}
</el-descriptions-item>
......@@ -226,8 +226,12 @@
<el-table-column label="">
<template slot-scope="scope">
{{scope.$index+1}}.
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="scope.row.type" />
<!-- {{$l(productNames[scope.row.prodId], 'title') || $t('未知')}} -->
{{getProductName(scope.row.prodId)}}
</template>
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column label="">
......@@ -418,6 +422,15 @@
};
},
computed:{
// 根据id获取商品名称(显示优惠列表的时候用)
getProductName(){
return prodId => {
if(!this.list) return this.$t('未知')
let row = this.list.offerProdRespVOList.find(item => item.prodId == prodId)
if(!row) return this.$t('未知')
return this.$l(row, 'prodTitle')
}
},
currentcyMap(){
let map = {}
this.currencyList.forEach(item => {
......@@ -501,15 +514,6 @@
},
// 预计费用(原价 - 优惠金额)
estimatedCosts(){
// let arr = []
// this.originalFeeList.forEach(item => {
// let it = {...item}
// let coupon = this.couponList.find(coupon => coupon.reduceCurrencyId == item.currencyId)
// if(coupon){
// it.amount -= coupon.reduceAmount
// }
// arr.push(it)
// })
let arr = []
let withInsuranceFee = false
let withOtherFee = false
......@@ -528,7 +532,7 @@
// }
let otherFee = this.otherFeeList.find(fee => fee.currencyId == item.currencyId)
if(otherFee){
it.amount += otherFee.amount
it.amount = it.amount.plus(otherFee.amount || 0)
withOtherFee = true
}
// 保价费(美元)
......
......@@ -11,10 +11,10 @@
</el-radio-group>
</el-form-item>
<br/>
<el-form-item :label="$t('订单类型')">
<el-form-item :label="$t('订单类型')" v-if="routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-checkbox-group v-model="form.type">
<el-checkbox label="1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2">{{$t('海外仓')}}</el-checkbox>
<el-checkbox label="1" v-if="routeOtherServices.indexOf('1') > -1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2" v-if="routeOtherServices.indexOf('4') > -1">{{$t('海外仓')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
......@@ -101,7 +101,7 @@
v-model="form.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
:label-field="$l('name')"
class="w-200"
></selector>
</el-form-item>
......@@ -234,7 +234,7 @@
<el-table-column :label="$t('商品特性')" width="250px">
<template slot-scope="{row}">
<el-checkbox-group v-model="row.prodAttrArr" @change="onProductAttrChange(row, $event)" :disabled="!canAddProduct">
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{item.attrName}}</el-checkbox>
<el-checkbox v-for="item in productAttrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group>
</template>
</el-table-column>
......@@ -325,7 +325,7 @@
</el-descriptions-item>
<el-descriptions-item :label="$t('其他费用')">
<el-input v-model="form.otherFee" placeholder="" class="w-100 mr-10"></el-input>
<selector v-model="form.otherFeeCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" />
<selector v-model="form.otherFeeCurrencyId" :options="currencyList" :label-field="$l('title')" value-field="id" defaultable class="w-100" />
</el-descriptions-item>
<el-descriptions-item :label="$t('原价')" :span="2">
<template v-for="item in originalFeeList">
......@@ -336,7 +336,7 @@
<div class="card-title" style="padding:20px 0;">{{$t('优惠信息')}}</div>
<el-table :data="couponList" :show-header="false">
<el-table :data="couponList" :show-header="false" :empty-text="$t('暂无优惠')">
<el-table-column label="">
<template slot-scope="scope">
{{scope.$index+1}}.
......@@ -355,7 +355,7 @@
</el-table-column>
<el-table-column label="">
<template slot-scope="{row}">
-{{row.reduceTotalAmount}}
-{{row.reduceAmount}}
{{currencyMap[row.reduceCurrencyId]}}
</template>
</el-table-column>
......@@ -440,7 +440,7 @@
</el-card>
<el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div>
<div class="card-title" slot="header">{{$l(transport, 'label')}}</div>
<!-- <el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')"></el-input>
</el-form-item> -->
......@@ -678,6 +678,7 @@ export default {
titleEn: it.titleEn,
endTime: it.endTime,
reduceTotalAmount: it.reduceTotalAmount,
reduceAmount: it.reduceAmount,
reduceCurrencyId: it.reduceCurrencyId
})
}
......
......@@ -20,7 +20,7 @@
{{$t('已加入关联订单列表')}}
</h1>
<div style="flex: 1;margin-left: 20px;">
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,relateOrderId:e.orderId})))" >{{$t('批量移出')}}</el-button>
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,relateOrderId:e.relateOrderId})))" >{{$t('批量移出')}}</el-button>
</div>
<div>
<el-button type="primary" @click="$router.push(`/order/add-associated-order/${orderId}`)">{{$t('添加关联订单')}}</el-button>
......
......@@ -36,11 +36,11 @@
<p style=" padding-top: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-bottom: 2.5mm; margin: 0px; font-weight: 600; font-size: 6mm; " >
{{item.orderNo}}
</p>
<p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-top: 2.6mm; padding-bottom: 2.6mm; margin: 0px; font-weight: 600; font-size: 6mm; " >
<p style="padding:0; border-bottom: 0.2mm solid #333; text-align: center; line-height: 7mm; padding-top: 2mm; padding-bottom: 2mm; margin: 0px; font-weight: 600; font-size: 6mm; word-break: break-all; height: 12mm; overflow: hidden;box-sizing: content-box;">
{{item.marks}}
</p>
<p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; margin: 0px; font-size: 5mm; text-transform: uppercase; padding-top: 3.5mm; padding-bottom: 2.5mm; " >
<p style=" white-space: nowrap; padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; margin: 0px; font-size: 5mm; text-transform: uppercase; padding-top: 3mm; padding-bottom: 2.5mm;">
{{item.startTitleEn}} --&gt;
<label style="font-weight: 600; font-size: 5.5mm">{{item.destTitleEn}} </label>
</p>
......@@ -52,7 +52,7 @@
</p>
</div>
<div style="width: 76mm">
<p style="text-align: center">
<p style="text-align: center; margin:0">
<!-- <label
style="font-size: 5mm; font-weight: 600; padding-right: 1mm"
>E&amp;C</label
......@@ -142,7 +142,7 @@ export default {
LODOP.SET_PRINT_PAGESIZE(0, 800, 600, "TAG");
for(let i in items){
LODOP.ADD_PRINT_HTM(0,0,800,600, items[i].innerHTML);
LODOP.ADD_PRINT_HTM("2mm",0,800,600, items[i].innerHTML);
if(i < items.length){
LODOP.NewPage()
}
......
......@@ -64,7 +64,7 @@
</p>
</div>
<p class="subs" style="text-align:center">
<el-button v-if="!preview" type="primary" @click="preview=true">{{$t('去打印')}}</el-button>
<el-button v-if="!preview" type="primary" @click="toPrint">{{$t('去打印')}}</el-button>
<el-button v-if="preview" type="primary" @click="print">{{$t('确定打印')}}</el-button>
</p>
</div>
......@@ -151,12 +151,27 @@ export default {
this.show = false
this.$emit('close');
},
toPrint(){
if (this.items.findIndex(e => e.checked) !== -1){
this.preview = true
} else {
this.$message.warning(this.$t('请选择品名'))
}
},
print(){
this.$nextTick(() => {
lodop().then(LODOP => {
LODOP.PRINT_INIT(this.title);
LODOP.SET_PRINT_PAGESIZE(0, 2100, 1800, "A4");
LODOP.ADD_PRINT_HTM("2%","2%","96%","96%", document.getElementById("myproa").innerHTML);
LODOP.SET_PREVIEW_WINDOW(1,0,0,'410mm','139mm',"");
LODOP.SET_PRINT_PAGESIZE(0,'203.9mm','178mm',"");
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW",true);
LODOP.ADD_PRINT_HTM('40mm',0,'204mm','148mm', document.getElementById("myproa").innerHTML);
LODOP.SET_PRINT_MODE("AUTO_CLOSE_PREWINDOW", true);
/* LODOP.SET_PRINT_PAGESIZE(0, 2100, 1800, "A4");
LODOP.ADD_PRINT_HTM("2%","2%","96%","96%", document.getElementById("myproa").innerHTML); */
LODOP.PREVIEW();
// LODOP.PREVIEW(); // 预览
......
......@@ -109,6 +109,14 @@
</template>
</el-descriptions-item>
<el-descriptions-item :label="$t('订单类型')">
<el-tag v-if="order.type.indexOf('1') > -1">
{{ $t('集运服务') }}
</el-tag>
<el-tag v-if="order.type.indexOf('2') > -1">
{{ $t('海外仓') }}
</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
......@@ -289,6 +297,33 @@
</div>
</el-col>
</el-row>
<div v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" class="page-title">优惠详情</div>
<el-table v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" :data="feeDetail.coupons">
<el-table-column label="优惠ID" prop="couponId"></el-table-column>
<el-table-column label="优惠名称">
<template slot-scope="{row}">
{{ $l(row, 'title') }}
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_COUPON_TYPE" :value="row.type" ></dict-tag>
</template>
</el-table-column>
<el-table-column label="运费优惠">
<template slot-scope="{row}">
{{ row.freightReduceAmount}}
{{currencyMap[row.freightReduceCurrencyId]}}
</template>
</el-table-column>
<el-table-column label="清关费优惠">
<template slot-scope="{row}">
{{ row.clearanceReduceAmount}}
{{ currencyMap[row.clearanceReduceCurrencyId] }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
......@@ -406,6 +441,8 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
console.log('2023-01-14 23:23 看到此消息则表示代码最新')
},
methods: {
// 显示费用详情
......@@ -488,7 +525,7 @@ export default {
label: this.$t('价格更新时间'),
value: parseTime(row.updateTime)
})
this.feeDetail = {freight, clearance, charging: row.charging}
this.feeDetail = {freight, clearance, charging: row.charging, coupons: row.couponInfoVOList}
},
closeFeeDetail(){
......
......@@ -5,10 +5,10 @@
<el-card>
<div slot="header" class="card-title">{{ editMode ? $t('编辑订单') + '-' + form.orderNo : $t('新建订单')}}</div>
<!--默认显示类型(selectedRouter==null),如果选择路线后没开通则隐藏-->
<el-form-item :label="$t('订单类型')" v-if="!selectedRouter || routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-form-item :label="$t('订单类型')" v-if="routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-checkbox-group v-model="form.type" :disabled="inWarehouse">
<el-checkbox label="1" v-if="!selectedRouter || routeOtherServices.indexOf('1') > -1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2" v-if="!selectedRouter || routeOtherServices.indexOf('2') > -1">{{$t('海外仓')}}</el-checkbox>
<el-checkbox label="1" v-if="routeOtherServices.indexOf('1') > -1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2" v-if="routeOtherServices.indexOf('4') > -1">{{$t('海外仓')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
......@@ -384,7 +384,7 @@
</el-card>
<el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div>
<div class="card-title" slot="header">{{$l(transport, 'label')}}</div>
<el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')" :disabled="false">
<el-button type="primary" slot="append" @click="getOrderCourierNumber" :disabled="false">{{$t('生成单号')}}</el-button>
......
......@@ -62,7 +62,7 @@
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable />
</el-form-item>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehousingType" clearable/>
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
......@@ -295,7 +295,7 @@
include(scope.row.inWarehouseState, [202, 207, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205]) &&
scope.row.status != 11 && exclude(scope.row.shipmentState, [314,315,317,318])
">
<el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']" :disabled="scope.row.parentOrderId">{{$t('入仓修改')}}</el-dropdown-item>
</template>
<!-- 退仓 -->
......@@ -495,7 +495,15 @@ export default {
currencyList:[]
};
},
watch:{
isChinese(){
this.getList()
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
......
......@@ -20,7 +20,7 @@
{{$t('已加入互斥订单列表')}}
</h1>
<div style="flex: 1;margin-left: 20px;">
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,mutualOrderId:e.orderId})))" >{{$t('批量移出')}}</el-button>
<el-button :disabled="multipleSelection.length === 0" type="primary" @click="batchGuanlianOrderByOrderId(multipleSelection.map(e =>({orderId:orderId,mutualOrderId:e.mutualOrderId})))" >{{$t('批量移出')}}</el-button>
</div>
<div>
<el-button type="primary" @click="$router.push('/order/not-mutex-order/'+ orderId)" >{{$t('添加互斥订单')}}</el-button>
......
......@@ -6,7 +6,7 @@
width="1280px"
>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabs">
<el-tab-pane :label="edit ? '货物修改' : '货物入仓'" name="first">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
......@@ -97,6 +97,9 @@
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="!tableData[$index].id && $index + '.boxGauge1'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
......@@ -105,6 +108,9 @@
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="!tableData[$index].id && $index + '.boxGauge2'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
......@@ -113,6 +119,9 @@
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="!tableData[$index].id && $index + '.boxGauge3'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
......@@ -122,7 +131,7 @@
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> 体积(m³)
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'">
......@@ -133,7 +142,7 @@
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> 重量(Kg)
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'">
......@@ -254,6 +263,9 @@
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="$index + '.boxGauge1'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[0] : '' }}</span>
......@@ -262,6 +274,9 @@
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="$index + '.boxGauge2'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[1] : '' }}</span>
......@@ -270,6 +285,9 @@
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="$index + '.boxGauge3'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[2] : '' }}</span>
......@@ -279,7 +297,7 @@
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> 体积(m³)
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'">
......@@ -290,7 +308,7 @@
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> 重量(Kg)
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'">
......@@ -333,7 +351,7 @@
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="opened = false">{{ $t('关 闭') }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? '确认修改' : '提 交' }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
......@@ -692,7 +710,7 @@ export default {
computed: {
title() {
return this.$route.name
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
},
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
......
......@@ -83,9 +83,11 @@
<template v-slot="{ row, column, $index }">
<el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>
<template v-else-if="wareItem(row.orderItemId) && wareItem(row.orderItemId).orderWarehouseInBackItemDoList && wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0">
<template v-if="!order.parentOrderId">
<el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
</template>
</template>
<el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>
</template>
</el-table-column>
......@@ -108,14 +110,14 @@
</el-card>
<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>
<el-form ref="form" :model="form" label-width="120px">
<el-form-item :label="item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 400px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + item.label">
<el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:label="$i18n.locale === 'en_US' ? item.titleEn : item.titleZh"
:value="item.id">
</el-option>
</el-select>
......@@ -123,12 +125,12 @@
</el-form-item>
<h2>{{$t('订单数据')}}</h2>
<el-form-item :label="$t('总方数')" style="width: 300px">
<el-form-item :label="$t('总方数')" style="width: 380px">
<el-input v-model="form.sumVolume" :placeholder="$t('请输入总方数')" readonly>
<span slot="append"></span>
</el-input>
</el-form-item>
<el-form-item :label="$t('总重量')" style="width: 300px">
<el-form-item :label="$t('总重量')" style="width: 380px">
<el-input v-model="form.sumWeight" :placeholder="$t('请输入总重量')" readonly>
<span slot="append">kg</span>
</el-input>
......@@ -468,7 +470,7 @@ export default {
return this.$route.path === "/order/warehousing-update"
},
title() {
return this.$route.name
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
},
orderSpecialNeedsDict() {
return this.$store.state.dict.dictDatas.order_special_needs
......@@ -478,7 +480,7 @@ export default {
this.specialList.forEach(e => {
const t = this.orderSpecialNeedsDict.find(f => f.value === e.advanceType)
if(t) {
result.push({...e, label: t.label})
result.push({...e, label: t.label, labelEn: t.labelEn})
}
})
return result
......
......@@ -89,7 +89,7 @@
<el-table-column prop="auditStatus" align="center" :label="$t('是否审核')" width="120">
<template slot-scope="scope">
<el-select v-model="scope.row.auditStatus" @change="handleStatusChange(scope.row, 'auditStatus')">
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="parseInt(auditStatusItem.value)" />
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="$l(auditStatusItem, 'label')" :value="parseInt(auditStatusItem.value)" />
</el-select>
</template>
</el-table-column>
......@@ -215,7 +215,7 @@ import { CommonStatusEnum, AuditStatusEnum } from '@/utils/constants';
import { uploadFile } from "@/api/infra/file";
import ImageUpload from '@/components/ImageUpload'
export default {
name: "ProductList",
name: "EcwProductIndex",
components: {
ImageUpload
},
......@@ -310,7 +310,7 @@ export default {
for (let index in this.attrList) {
let attrItem = this.attrList[index];
if (attrItem.id == attrId) {
productAttrArray.push(attrItem.attrName);
productAttrArray.push(this.$l(attrItem, 'attrName'));
}
}
}
......
......@@ -29,7 +29,7 @@
<el-form-item :label="$t('商品特性')" prop="attrId">
<!-- <dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_ORDER_ATTR" v-model="form.attrId" multiple /> -->
<el-checkbox-group v-model="attrIds">
<el-checkbox v-for="item in attrList" :label="item.id" :key="item.id">{{item.attrName}}</el-checkbox>
<el-checkbox v-for="item in attrList" :label="item.id" :key="item.id">{{$l(item, 'attrName')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item :label="$t('商品材质')" prop="materialType">
......
......@@ -27,7 +27,11 @@
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('编号')" align="center" prop="id" />
<el-table-column :label="$t('排序')" align="center" prop="sort" />
<el-table-column :label="$t('属性名称')" align="center" prop="attrName" />
<el-table-column :label="$t('属性名称')" align="center">
<template slot-scope="{row}">
{{$l(row, 'attrName')}}
</template>
</el-table-column>
<el-table-column :label="$t('属性代码')" align="center" prop="attrCode" />
<el-table-column :label="$t('备注')" align="center" prop="remark" />
<el-table-column prop="status" :label="$t('状态')" width="100">
......
......@@ -4,26 +4,26 @@
<div slot="header" class="clearfix">
<el-button v-show="isShowDelete" style="float: right; padding: 3px 0" type="text" @click="$emit('delete')">{{ $t('删除') }}</el-button>
</div>
<el-form-item :label="'商标' + (index + 1)">
<el-form-item :label="$t('商标') + (index + 1)">
<el-input v-model="form.brandName" :placeholder="$t('商标')"></el-input>
</el-form-item>
<el-form-item :label="`商标${index + 1}分类`">
<el-select v-model="form.productTypeId" :placeholder="`请选择商标${index + 1}分类`" @change="form.productIds = [0], updateValue()">
<el-form-item :label="$t('商标{index}分类', {index: index + 1})">
<el-select v-model="form.productTypeId" :placeholder="$t('请选择商标{index}分类', {index: index + 1})" @change="form.productIds = [0], updateValue()">
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.titleZh"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="`商标${index + 1}商品`">
<el-select v-model="form.productIds" :placeholder="`请选择商标${index + 1}商品`" multiple filterable clearable @change="updateValue">
<el-form-item :label="$t('商标{index}商品', {index: index+1})">
<el-select v-model="form.productIds" :placeholder="$t('请选择商标{index}商品', {index: index + 1})" multiple filterable clearable @change="updateValue">
<el-option
v-for="item in getProductListByTypeId(form.productTypeId)"
:key="item.id"
:label="item.titleZh"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
......
......@@ -7,7 +7,7 @@
<el-option
v-for="type in productTypeList"
:key="type.id"
:label="type.titleZh"
:label="$l(type, 'title')"
:value="type.id"
></el-option>
</el-select>
......@@ -92,7 +92,7 @@
<el-link type="danger" @click.native="form.priceStepList.splice(index, 1)">{{$t('删除')}}</el-link>
</template>
</div>
<el-form-item :label="$t(`第{index}阶梯`, {index: index + 1})">
<el-form-item :label="$t('第{index}阶梯', {index: index + 1})">
<el-input v-model="item.startNum" type="number" placeholder="" class="w-100"></el-input>
-
<el-input v-model="item.endNum" type="number" placeholder="" class="w-100"></el-input>
......@@ -336,7 +336,7 @@ export default {
checkList: [],
selectedRoutes: [], // 勾选的路线渠道
form: {
minWeightUnit: undefined,
minWeightUnit: 0,
priceStepList: [], // 阶梯价格
specialList: []
},
......@@ -423,8 +423,8 @@ export default {
}
},
'form.priceType'(priceType){
// 切换全包价的时候给默认货币单位
if(priceType == 1){
// 切换全包价的时候给默认货币单位,如果是回填则不需要给默认值
if(priceType == 1 && !this.form.allPrice){
this.$set(this.form, 'allPriceUnit', 1)
}
this.syncAllUnit()
......@@ -451,7 +451,7 @@ export default {
this.syncSpecialUnit({allPriceUnit})
},
'form.allVolumeUnit'(allVolumeUnit){
// 最小计量
// 最小计量
this.$set(this.form, 'minWeightUnit', allVolumeUnit)
this.syncSpecialUnit({allVolumeUnit})
},
......@@ -557,6 +557,7 @@ export default {
validateStartDate: undefined,
clearancePrice: 0,
transportPrice: 0,
minWeight: 0,
minWeightUnit: null
}
// 默认体积单位(立方米)
......@@ -719,6 +720,28 @@ export default {
if(this.form.stepPrice != 1){
// data.priceStepList = this.priceStepList
delete data.priceStepList
// 非阶梯价格判断是否运费(全包价是否为空)
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0'))
}
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true
}
})
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
stepPriceEmpty = true
}
})
if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空'))
}
}
// 修改单条路线
......@@ -771,27 +794,6 @@ export default {
data.productId = this.product.id;
data.lineChannelList = this.lineList.length ? this.lineList : this.selectedRoutes
if(this.form.stepPrice != 1){
// 非阶梯价格判断是否运费(全包价是否为空)
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error(this.$t('运费/全包价不能为0'))
}
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
if(!item.startNum || !item.endNum || !item.weightUnit){
stepPriceEmpty = true
}
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
stepPriceEmpty = true
}
})
if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空'))
}
}
this.loading = true
createProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("请求成功"));
......
......@@ -251,7 +251,7 @@ import {arrryToKeyedObjectBy} from '@/utils/index'
import { getProduct } from '@/api/ecw/product';
import {parseTime} from '@/utils/ruoyi'
export default {
name: "ProductPrice",
name: "EcwProductpriceIndex",
filters: {parseTime},
components: {
DictTag
......@@ -436,10 +436,9 @@ export default {
return this.cityList.filter(item => item.type == 1 || item.type == 3)
},
},
activated() {
/* console.log('activated', this.product.id)
this.$set(this.queryParams, 'typeId', +this.$route.query.product_type || null)
console.log('activated', Object.assign({}, this.$route.query))
/* this.$set(this.queryParams, 'typeId', +this.$route.query.product_type || null)
let productId = this.product?.id
console.log(this.$route.query.product_id, productId, this.$route.query.product_id != productId)
......@@ -449,7 +448,9 @@ export default {
pageSize: 10
}
}
this.handleQuery() */
this.handleQuery()
*/
this.getList();
},
watch:{
'$route.query.product_id'(){
......
......@@ -34,14 +34,14 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('公司名称')" align="center" prop="enterpriseName" />
<el-table-column :label="$t('用户昵称')" align="center" prop="nickname" />
<el-table-column :label="$t('用户昵称')" align="center" prop="nickname" width="150"/>
<el-table-column :label="$t('真实姓名')" align="center" prop="identityName" />
<el-table-column :label="$t('区号')">
<template v-slot:default = 'scope'>
+{{scope.row.areaCode ? `${scope.row.areaCode}`:''}}
</template>
</el-table-column>
<el-table-column :label="$t('手机号')" show-overflow-tooltip align="center" prop="mobile" >
<el-table-column :label="$t('手机号')" show-overflow-tooltip align="center" prop="mobile" width="150">
</el-table-column>
<el-table-column :label="$t('成交')" align="center" prop="customerStatus" show-overflow-tooltip >
<template v-slot="{row}">
......@@ -54,7 +54,7 @@
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column :label="$t('身份证审核状态')" align="center" prop="createTime" width="180">
<el-table-column :label="$t('身份证审核状态')" align="center" prop="createTime" >
<template slot-scope="scope">
<div v-if="!scope.row.identityAuditStatus">{{$t('未提交')}}</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.identityAuditStatus" ></dict-tag>
......@@ -63,7 +63,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column :label="$t('营业执照审核状态')" align="center" prop="createTime" width="180">
<el-table-column :label="$t('营业执照审核状态')" align="center" prop="createTime" >
<template slot-scope="scope">
<div v-if="!scope.row.enterpriseAuditStatus">{{$t('未提交')}}</div>
<dict-tag v-else :type="DICT_TYPE.AUDIT_STATUS" :value="scope.row.enterpriseAuditStatus" ></dict-tag>
......
<template>
<div class="infoheader">
<el-collapse v-model="activeNames">
<div v-for="item in helpData" :key="item.id">
<el-collapse-item :title="item.titleZh" :name="item.id">
<div v-html="item.contentZh" class="img">{{ item.contentZh }}</div>
<el-collapse v-model="activeNames" @change="handleChange">
<div v-for="(item, index) in helpData" :key="item.id">
<el-collapse-item :title="(index + 1) + '. ' + (isChinese ? item.titleZh : item.titleEn)" :name="index">
<div v-html="isChinese ? item.contentZh : item.contentEn" class="img"></div>
</el-collapse-item>
</div>
</el-collapse>
......@@ -11,7 +11,7 @@
</template>
<script>
import { getInternalHelpDocPage} from "@/api/system/internalHelpDoc";
import {getInternalHelpDoc, getInternalHelpDocPage} from "@/api/system/internalHelpDoc";
export default {
data() {
return {
......@@ -22,9 +22,23 @@ export default {
created() {
getInternalHelpDocPage({ pageNo: 1, pageSize: 100 }).then((r) => {
this.helpData = r.data.list
this.activeNames = this.helpData.map(m => { return m.id })
})
},
methods: {
handleChange(val) {
console.log(val)
if (val.length > 0 &&!this.helpData[val].contentZh && !this.helpData[val].contentEn){
getInternalHelpDoc(this.helpData[val].id).then(r => {
this.$set(this.helpData, val, r.data)
})
}
}
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
}
},
}
</script>
......
......@@ -22,14 +22,18 @@
v-hasPermi="['system:menu:create']">{{ $t('新增') }}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">{{$t('展开')}}/{{$t('折叠')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="menuList" row-key="id" :default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="name" :label="$t('菜单名称')" :show-overflow-tooltip="true" width="250"></el-table-column>
<el-table-column prop="name" :label="$t('菜单名称')" :show-overflow-tooltip="true" width="250">
<template slot-scope="{row}">
{{ $l(row, 'name') }}
</template>
</el-table-column>
<el-table-column prop="icon" :label="$t('图标')" align="center" width="100">
<template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" />
......@@ -74,7 +78,7 @@
<el-form-item :label="$t('菜单类型')" prop="type">
<el-radio-group v-model="form.type">
<el-radio v-for="dict in menuTypeDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">
{{dict.label}}</el-radio>
{{$l(dict, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
......@@ -135,7 +139,7 @@
<el-form-item :label="$t('菜单状态')">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
:key="dict.value" :label="parseInt(dict.value)">{{$l(dict, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
......@@ -241,12 +245,13 @@ export default {
}
return {
id: node.id,
label: node.name,
label: this.$l(node, 'name'),
children: node.children
};
},
/** 查询菜单下拉树结构 */
getTreeselect() {
console.log('this.handleTree', this.handleTree)
listMenu().then(response => {
this.menuOptions = [];
const menu = { id: 0, name: this.$t('主类目'), children: [] };
......@@ -327,10 +332,10 @@ export default {
if (path && path.indexOf('http://') === -1 || path.indexOf('https://') === -1) {
// 父权限为根节点,path 必须以 / 开头
if (this.form.parentId === 0 && path.charAt(0) !== '/') {
this.$modal.msgSuccess('前端必须以 / 开头')
this.$modal.msgSuccess(this.$t('前端必须以 / 开头'))
return
} else if (this.form.parentId !== 0 && path.charAt(0) === '/') {
this.$modal.msgSuccess('前端不能以 / 开头')
this.$modal.msgSuccess(this.$t('前端不能以 / 开头'))
return
}
}
......@@ -339,13 +344,13 @@ export default {
// 提交
if (this.form.id !== undefined) {
updateMenu(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false;
this.getList();
});
} else {
addMenu(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false;
this.getList();
});
......@@ -355,11 +360,11 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除名称为"' + row.name + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('是否确认删除此项?')).then(function() {
return delMenu(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t("删除成功"));
}).catch(() => {});
}
}
......
......@@ -105,11 +105,6 @@
<script>
import { getMyInternalMessagePage ,getRedInternalMessage, deleteInternalMessage} from "@/api/system/internalMessage";
let type = {
1:this.$t('订单消息'),
2:this.$t('出货消息'),
3:this.$t('提醒消息'),
}
export default {
name: "MyInternalMessage",
data() {
......@@ -144,7 +139,11 @@ export default {
form: {},
dialogVisible:false,
publicObj:{},
type,
type: {
1:this.$t('订单消息'),
2:this.$t('出货消息'),
3:this.$t('提醒消息'),
},
};
},
computed:{
......
......@@ -111,15 +111,15 @@
<el-option
v-for="item in dataScopeDictDatas"
:key="parseInt(item.value)"
:label="item.label"
:label="$l(item, 'label')"
:value="parseInt(item.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('数据权限')" v-show="form.dataScope === SysDataScopeEnum.DEPT_CUSTOM">
<el-checkbox :checked="!form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动(选中父节点,自动选择子节点)</el-checkbox>
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
<el-checkbox :checked="!form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">{{$t('父子联动')}}({{$t('选中父节点,自动选择子节点')}})</el-checkbox>
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">{{$t('展开')}}/{{$t('折叠')}}</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">{{$t('全选')}}/{{$t('全不选')}}</el-checkbox>
<el-tree
class="tree-border"
:data="deptOptions"
......@@ -128,8 +128,11 @@
ref="dept"
node-key="id"
:check-strictly="form.deptCheckStrictly"
empty-text="加载中,请稍后"
:props="defaultProps"
:empty-text="$t('加载中,请稍后')"
:props="{
label: 'name',
children: 'children'
}"
></el-tree>
</el-form-item>
</el-form>
......@@ -149,10 +152,10 @@
<el-input v-model="form.code" :disabled="true" />
</el-form-item>
<el-form-item :label="$t('菜单权限')">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id"
:check-strictly="true" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">{{$t('展开')}}/{{$t('折叠')}}</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">{{$t('全选')}}/{{$t('全不选')}}</el-checkbox>
<el-tree v-if="openMenu" class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id"
:check-strictly="true" :empty-text="$t('加载中,请稍后')" :props="defaultProps"></el-tree>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -223,10 +226,6 @@ export default {
},
// 表单参数
form: {},
defaultProps: {
label: "name",
children: "children"
},
// 表单校验
rules: {
name: [
......@@ -249,6 +248,14 @@ export default {
dataScopeDictDatas: getDictDatas(DICT_TYPE.SYSTEM_DATA_SCOPE)
};
},
computed:{
defaultProps(){
return {
label: this.$i18n.locale.indexOf('en') > -1 ? 'nameEn' : 'name',
children: "children"
}
},
},
created() {
this.getList();
},
......@@ -391,6 +398,7 @@ export default {
listSimpleMenus().then(response => {
// 处理 menuOptions 参数
this.menuOptions = [];
console.log("response.data:"+JSON.stringify(response.data));
this.menuOptions.push(...this.handleTree(response.data, "id"));
});
// 获得角色拥有的菜单集合
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('系统类型')" prop="appType">
<el-select v-model="queryParams.appType" :placeholder="$t('请选择系统类型')" clearable="">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.ECW_DATA_SOURCE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('强制更新')">
<el-select v-model="queryParams.forceUpdate" :placeholder="$t('请选择更新条件')" clearable="">
<el-option v-for="item in forceUpdateArray" :key="item.type" :label="$l(item, 'value')" :value="item.type"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('内部版本')" prop="versionCode">
<el-input v-model.number="queryParams.versionCode" :placeholder="$t('请输入内部版本')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['system:version:create']">新增</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['system:version:export']">导出</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="系统类型" align="center" prop="appType">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_DATA_SOURCE" :value="row.appType" />
</template>
</el-table-column>
<el-table-column label="版本号" align="center" prop="appVersion">
<template slot-scope="scope">
<el-link icon="el-icon-link" type="primary" :href="scope.row.appUrl">{{ scope.row.appVersion }}</el-link>
</template>
</el-table-column>
<el-table-column label="内部号" align="center" prop="versionCode" />
<el-table-column label="强制更新" align="center" prop="forceUpdate">
<template slot-scope="scope">
<span>{{ getName(scope.row.forceUpdate) }}</span>
</template>
</el-table-column>
<el-table-column label="说明" align="center" prop="desp" />
<el-table-column label="发布时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:version:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:version:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item :label="$t('系统')" prop="appType">
<el-select v-model="form.appType" :placeholder="$t('请选择系统类型')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.ECW_DATA_SOURCE)" :key="type.value" :label="type.label" :value="type.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('版本号')" prop="appVersion">
<el-input v-model="form.appVersion" :placeholder="$t('请输入版本号')" />
</el-form-item>
<el-form-item :label="$t('内部号')" prop="versionCode">
<el-input v-model.number="form.versionCode" :placeholder="$t('请输入内部号')" />
</el-form-item>
<el-form-item :label="$t('链接方式')">
<el-radio v-model="linkType" :label="1">链接</el-radio>
<el-radio v-model="linkType" :label="2">上传</el-radio>
</el-form-item>
<el-form-item v-if="linkType==2">
<el-upload
ref="upload"
:limit="1"
:headers="upload.headers"
:action="upload.url"
:data="upload.data"
:disabled="upload.isUploading"
:show-file-list="true"
:on-change="handleFileChange"
:on-progress="uploadProcess"
:on-success="handleFileSuccess"
>
<el-button size="small">{{ $t('上传') }}<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-upload>
</el-form-item>
<el-form-item :label="$t('版本链接')" prop="appUrl">
<el-input v-model="form.appUrl" :placeholder="$t('请输入版本链接')" :disabled="linkType==2"/>
</el-form-item>
<el-form-item :label="$t('强制更新')" prop="forceUpdate">
<el-select v-model="form.forceUpdate" :placeholder="$t('请选择更新条件')">
<el-option v-for="item in forceUpdateArray" :key="item.type" :label="$l(item, 'value')" :value="item.type"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('说明')" prop="desp">
<el-input type="textarea" v-model="form.desp" :placeholder="$t('请输入说明')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">{{$t('取 消')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createVersion, updateVersion, deleteVersion, getVersion, getVersionPage, exportVersionExcel } from "@/api/system/version";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { uploadFile } from "@/api/infra/file";
import {getToken} from "@/utils/auth";
export default {
name: "Version",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// app版本管理列表
list: [],
linkType:1,
forceUpdateArray:[
{type:1, value:this.$t('')},
{type:0, value:this.$t('')}
],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeForceUpdate: [],
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
appUrl: null,
appType: null,
appVersion: null,
versionCode: null,
desp: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
appType: [{ required: true, message: this.$t("系统类型不能为空"), trigger: "change" }],
appVersion: [{ required: true, message: this.$t("版本号不能为空"), trigger: "blur" }],
versionCode: [{ required: true, message: this.$t("内部号不能为空"), trigger: "blur" }],
appUrl: [{ required: true, message: this.$t("版本链接不能为空"), trigger: "blur" }],
forceUpdate: [{ required: true, message: this.$t("强制更新不能为空"), trigger: "change" }],
},
// 用户导入参数
upload: {
open: false, // 是否显示弹出层
title: "", // 弹出层标题
isUploading: false, // 是否禁用上传
url: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
headers: { Authorization: "Bearer " + getToken() }, // 设置上传的请求头部
data: {} // 上传的额外数据,用于文件名
},
};
},
computed: {
getName() {
return forceUpdate => {
for (let index in this.forceUpdateArray) {
let item = this.forceUpdateArray[index];
if (item.type == forceUpdate) {
return this.$l(item, 'value');
}
}
}
},
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeForceUpdate, 'forceUpdate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getVersionPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.linkType = 1;
this.form = {
id: undefined,
appUrl: undefined,
appType: undefined,
appVersion: undefined,
versionCode: undefined,
forceUpdate: undefined,
desp: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeForceUpdate = [];
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
// console.log(this.form);
this.title = "添加app版本管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getVersion(id).then(response => {
this.form = response.data;
this.linkType = 1;
this.open = true;
this.title = "修改app版本管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateVersion(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createVersion(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除app版本管理编号为"' + id + '"的数据项?').then(function() {
return deleteVersion(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 处理上传的文件发生变化 */
handleFileChange(file, fileList) {
this.upload.data.path = this.uuid() + "/" + file.name;
},
/** 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
// 清理
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
// 提示成功,并刷新
this.$modal.msgSuccess("上传成功");
this.$set(this.form, 'appUrl', response.data);
},
uploadProcess(event, file, fileList) {
this.upload.isUploading = true; // 禁止修改
},
// 覆盖默认的上传行为
requestUpload(params) {
},
// 上传预处理
beforeUpload(file) {
// if (file.type.indexOf("image/") == -1) {
// this.$modal.msgError(this.$t("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"));
// } else {
//上传
let formData = new FormData();
// console.log(file);
formData.append("file", file);
formData.append("path", this.uuid() + "/" + file.name);
uploadFile(formData).then(response => {
this.$set(this.form, 'appUrl', response.data);
// this.form.img = response.data;
})
// }
},
uuid() {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeForceUpdate, 'forceUpdate');
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有app版本管理数据项?').then(() => {
this.exportLoading = true;
return exportVersionExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
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