Commit eee3f361 authored by dragondean@qq.com's avatar dragondean@qq.com

仓库模块国际化

parent 68b7bb0e
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<el-input <el-input
v-for="item in lineList" v-for="item in lineList"
:key="item.id" :key="item.id"
:value="!item.warehouseLineDO ? '数据异常,缺少warehouseLineDO字段' : $t('【{transport}】从【{from}】发往【{to}】', { :value="!item.warehouseLineDO ? $t('数据异常,缺少warehouseLineDO字段') : $t('【{transport}】从【{from}】发往【{to}】', {
transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType), transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType),
from: item.warehouseLineDO.startTitleZh, from: $l(item.warehouseLineDO, 'startTitle'),
to: item.warehouseLineDO.destTitleZh to: $l(item.warehouseLineDO, 'destTitle')
})" })"
disabled /> disabled />
</template> </template>
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
{{ {{
!item.warehouseLineDO ? $t('数据异常,缺少warehouseLineDO字段') : $t('【{transport}】从【{from}】发往【{to}】', { !item.warehouseLineDO ? $t('数据异常,缺少warehouseLineDO字段') : $t('【{transport}】从【{from}】发往【{to}】', {
transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType), transport: getDictDataLabel(DICT_TYPE.ECW_TRANSPORT_TYPE, item.warehouseLineDO.transportType),
from: item.warehouseLineDO.startTitleZh, from: $l(item.warehouseLineDO, 'startTitle'),
to: item.warehouseLineDO.destTitleZh to: $l(item.warehouseLineDO, 'destTitle')
}) })
}} }}
</el-checkbox> </el-checkbox>
...@@ -493,7 +493,7 @@ export default { ...@@ -493,7 +493,7 @@ export default {
data.lineChannelList = this.selectedRoutes data.lineChannelList = this.selectedRoutes
if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){ if((this.form.priceType == 0 && !this.form.transportPrice) || (this.form.priceType == 1 && !this.form.allPrice)){
return this.$message.error('运费/全包价不能为0') return this.$message.error(this.$t('运费/全包价不能为0'))
} }
createProductPrice(data).then(response => { createProductPrice(data).then(response => {
this.$modal.msgSuccess(this.$t("请求成功")); this.$modal.msgSuccess(this.$t("请求成功"));
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/> <dict-selector :type="DICT_TYPE.ECW_PRICE_AUDIT_STATUS" v-model="queryParams.auditStatus" clearable/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="combStatus"> <el-form-item :label="$t('状态')" prop="combStatus">
<el-select v-model="queryParams.combStatus" placeholder="请选择状态" clearable> <el-select v-model="queryParams.combStatus" :placeholder="$t('请选择状态')" clearable>
<el-option label="未设置价格" value="setPrice_1"></el-option> <el-option :label="$t('未设置价格')" value="setPrice_1"></el-option>
<el-option label="黑名单" value="blacklist_1"></el-option> <el-option :label="$t('黑名单')" value="blacklist_1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
for(let index in this.typeList) { for(let index in this.typeList) {
let typeItem = this.typeList[index]; let typeItem = this.typeList[index];
if(typeItem.id == typeId) { if(typeItem.id == typeId) {
return typeItem.titleZh; return this.$l(typeItem, 'title');
} }
} }
} }
...@@ -347,10 +347,10 @@ export default { ...@@ -347,10 +347,10 @@ export default {
if(validateEndDate && validateEndDate < nowDate) { if(validateEndDate && validateEndDate < nowDate) {
notSetPrice = true; notSetPrice = true;
} }
let setPriceText = notSetPrice ? '(未设置价格)' : ''; let setPriceText = notSetPrice ? '(' + this.$t('未设置价格') + ')' : '';
if(row.blacklist) return '黑名单' + setPriceText; if(row.blacklist) return this.$t('黑名单') + setPriceText;
if(row.auditStatus === AuditStatusEnum.PASS) return '已审核' + setPriceText; if(row.auditStatus === AuditStatusEnum.PASS) return this.$t('已审核') + setPriceText;
return '已下架' + setPriceText; return this.$t('已下架') + setPriceText;
} }
}, },
...@@ -377,7 +377,7 @@ export default { ...@@ -377,7 +377,7 @@ export default {
for(let index in this.currecyList) { for(let index in this.currecyList) {
let currecyItem = this.currecyList[index]; let currecyItem = this.currecyList[index];
if(currecyItem.id == currencyId) { if(currecyItem.id == currencyId) {
return currecyItem.titleZh; return this.$l(currecyItem, 'title');
} }
} }
} }
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
for(let index in this.unitList) { for(let index in this.unitList) {
let unitItem = this.unitList[index]; let unitItem = this.unitList[index];
if(unitItem.id == unitId) { if(unitItem.id == unitId) {
return unitItem.titleZh; return this.$l(unitItem, 'title');
} }
} }
} }
......
...@@ -4,47 +4,47 @@ ...@@ -4,47 +4,47 @@
<el-row :gutter="15"> <el-row :gutter="15">
<el-form ref="setForm" :model="formData" size="medium" label-width="100px"> <el-form ref="setForm" :model="formData" size="medium" label-width="100px">
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="每个客户占用货架超过盘点:" prop="shelvesNum"> <el-form-item label-width="245px" :label="$t('每个客户占用货架超过盘点')" prop="shelvesNum">
<el-input v-model="formData.shelvesNum" :style="{width: '30%'}" />&nbsp;&nbsp; <el-input v-model="formData.shelvesNum" :style="{width: '30%'}" />&nbsp;&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="每个客户占用货架区域超过盘点:" prop="shelvesAreaNum"> <el-form-item label-width="245px" :label="$t('每个客户占用货架区域超过盘点')" prop="shelvesAreaNum">
<el-input v-model="formData.shelvesAreaNum" :style="{width: '30%'}" />&nbsp;&nbsp; <el-input v-model="formData.shelvesAreaNum" :style="{width: '30%'}" />&nbsp;&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="入库超时预警 超过:" prop="rkOverDay"> <el-form-item label-width="245px" :label="$t('入库超时预警')" prop="rkOverDay">
<el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警 {{$t('超过')}} <el-input v-model="formData.rkOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;{{$t('')}}{{$t('自动预警')}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="上架超时预警 超过:" prop="sjOverDay"> <el-form-item label-width="245px" :label="$t('上架超时预警')" prop="sjOverDay">
<el-input v-model="formData.sjOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警 {{$t('超过')}} <el-input v-model="formData.sjOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;{{$t('')}}{{$t('自动预警')}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="在仓超时预警 超过:" prop="zcOverDay"> <el-form-item label-width="245px" :label="$t('在仓超时预警')" prop="zcOverDay">
<el-input v-model="formData.zcOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警 {{$t('超过')}}<el-input v-model="formData.zcOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;{{$t('')}}{{$t('自动预警')}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="打包超时预警 超过:" prop="dbOverDay"> <el-form-item label-width="245px" :label="$t('打包超时预警')" prop="dbOverDay">
<el-input v-model="formData.dbOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警 {{$t('超过')}}<el-input v-model="formData.dbOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;{{$t('')}}{{$t('自动预警')}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="待出库超时预警 超过:" prop="dckOverDay"> <el-form-item label-width="245px" :label="$t('待出库超时预警')" prop="dckOverDay">
<el-input v-model="formData.dckOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;天,自动预警 {{$t('超过')}}<el-input v-model="formData.dckOverDay" :style="{width: '30%'}" />&nbsp;&nbsp;{{$t('')}}{{$t('自动预警')}}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="仓租费类型:" prop="chargeType"> <el-form-item label-width="245px" :label="$t('仓租费类型')" prop="chargeType">
<el-radio-group v-model="formData.chargeType"> <el-radio-group v-model="formData.chargeType">
<el-radio v-for="item in chargeDictDatas" :key="item.value" :label="item.value">{{ item.label }}</el-radio> <el-radio v-for="item in chargeDictDatas" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group> </el-radio-group>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<el-form-item label-width="245px" label="仓租费设置:" prop="fee"> <el-form-item label-width="245px" :label="$t('仓租费设置')" prop="fee">
<el-input v-model="formData.fee" :style="{width: '30%'}" />&nbsp;&nbsp;$ <el-input v-model="formData.fee" :style="{width: '30%'}" />&nbsp;&nbsp;$
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item size="large"> <el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button> <el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button @click="resetForm">重置</el-button> <el-button @click="resetForm">{{$t('重置')}}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
settingList.push(chargeType); settingList.push(chargeType);
settingList.push(fee); settingList.push(fee);
createSetting({settingList:settingList}).then(response => { createSetting({settingList:settingList}).then(response => {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess(this.$t("操作成功"));
}); });
} }
} }
......
This diff is collapsed.
...@@ -6,36 +6,36 @@ ...@@ -6,36 +6,36 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:warehouse-area:create']">新增库域</el-button> v-hasPermi="['ecw:warehouse-area:create']">{{$t('新增库域')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> <el-table v-loading="loading" :data="list" row-key="id" default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column label="名称" align="center" prop="name" /> <el-table-column :label="$t('名称')" align="center" prop="name" />
<el-table-column label="代码" align="center" prop="code" /> <el-table-column :label="$t('代码')" align="center" prop="code" />
<el-table-column label="类型" align="center" prop="pid"> <el-table-column :label="$t('类型')" align="center" prop="pid">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.pid == 0 ? '库域' : '库区' }}</span> <span>{{ scope.row.pid == 0 ? $t('库域') : $t('库区') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="仓库" align="center" prop="warehouse" width="180"> <el-table-column :label="$t('仓库')" align="center" prop="warehouse" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ warehouseName(scope.row.warehouseId) }}</span> <span>{{ warehouseName(scope.row.warehouseId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:warehouse-area:update']">修改</el-button> v-hasPermi="['ecw:warehouse-area:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:warehouse-area:delete']">删除</el-button> v-hasPermi="['ecw:warehouse-area:delete']">{{$t('删除')}}</el-button>
<el-button size="mini" type="text" @click="handleCreate(scope.row)" v-if="scope.row.pid==0" <el-button size="mini" type="text" @click="handleCreate(scope.row)" v-if="scope.row.pid==0"
v-hasPermi="['ecw:warehouse-area:create']">添加库区</el-button> v-hasPermi="['ecw:warehouse-area:create']">{{$t('添加库区')}}</el-button>
<el-button size="mini" type="text" @click="positionManager(scope.row)" v-if="scope.row.pid>0" <el-button size="mini" type="text" @click="positionManager(scope.row)" v-if="scope.row.pid>0"
v-hasPermi="['ecw:warehouse-area:create']">查看储位</el-button> v-hasPermi="['ecw:warehouse-area:create']">{{$t('查看储位')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -46,30 +46,30 @@ ...@@ -46,30 +46,30 @@
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <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="80px">
<el-form-item label="上级库域" prop="parentName" v-if="parentDo"> <el-form-item :label="$t('上级库域')" prop="parentName" v-if="parentDo">
<span>{{parentDo.name}}</span> <span>{{parentDo.name}}</span>
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="parentType" v-if="parentDo"> <el-form-item :label="$t('类型')" prop="parentType" v-if="parentDo">
<span>库区</span> <span>{{$t('库区')}}</span>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="name"> <el-form-item :label="$t('名称')" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" /> <el-input v-model="form.name" :placeholder="$t('请输入名称')" />
</el-form-item> </el-form-item>
<el-form-item label="代码" prop="code"> <el-form-item :label="$t('代码')" prop="code">
<el-input v-model="form.code" placeholder="请输入代码" /> <el-input v-model="form.code" :placeholder="$t('请输入代码')" />
</el-form-item> </el-form-item>
<el-form-item label="仓库" prop="warehouseId"> <el-form-item :label="$t('仓库')" prop="warehouseId">
<el-select v-model="form.warehouseId" clearable :disabled="parentDo"> <el-select v-model="form.warehouseId" clearable :disabled="parentDo">
<el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="warehouse.titleZh" :value="warehouse.id" /> <el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">{{$t('确定')}}</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">{{$t('取消')}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
name: [{ required: true, message: "名称不能为空", trigger: "blur" }], name: [{ required: true, message: this.$t("名称不能为空"), trigger: "blur" }],
} }
}; };
}, },
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
for(let index in this.warehouseList) { for(let index in this.warehouseList) {
let warehouseItem = this.warehouseList[index]; let warehouseItem = this.warehouseList[index];
if(warehouseItem.id == warehouseId) { if(warehouseItem.id == warehouseId) {
return warehouseItem.titleZh; return this.$l(warehouseItem, 'title');
} }
} }
} }
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加库区库域"; this.title = this.$t("添加库区库域");
}, },
/** 新增库区 */ /** 新增库区 */
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
this.form.warehouseId = row.warehouseId; this.form.warehouseId = row.warehouseId;
this.form.pid = row.id; this.form.pid = row.id;
this.open = true; this.open = true;
this.title = "添加库区库域"; this.title = this.$t("添加库区库域");
}, },
findParent(pid) { findParent(pid) {
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
} }
this.open = true; this.open = true;
this.title = "修改库区库域"; this.title = this.$t("修改库区库域");
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
updateWarehouseArea(this.form).then(response => { updateWarehouseArea(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
...@@ -250,7 +250,7 @@ export default { ...@@ -250,7 +250,7 @@ export default {
} }
// 添加的提交 // 添加的提交
createWarehouseArea(this.form).then(response => { createWarehouseArea(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess(this.$t("新增成功"));
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
...@@ -259,11 +259,11 @@ export default { ...@@ -259,11 +259,11 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除库区库域编号为"' + id + '"的数据项?').then(function() { this.$modal.confirm(this.$t('是否确认删除库区库域编号为{id}的数据项?', {id})).then(function() {
return deleteWarehouseArea(id); return deleteWarehouseArea(id);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess(this.$t("删除成功"));
}).catch(() => {}); }).catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有库区库域数据项?').then(() => { this.$modal.confirm(this.$t('是否确认导出所有库区库域数据项?')).then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportWarehouseAreaExcel(params); return exportWarehouseAreaExcel(params);
}).then(response => { }).then(response => {
......
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