Commit 54cd0a43 authored by 邓春圆's avatar 邓春圆

添加 创建人,跟新时间,更新人

parent abd127f1
......@@ -4,19 +4,22 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('名称')" prop="nameZh">
<el-input v-model="queryParams.nameZh" :placeholder="$t('请输入名称')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.nameZh" :placeholder="$t('请输入名称')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="名称-英文" prop="nameEn">
<el-input v-model="queryParams.nameEn" placeholder="请输入名称-英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('内部名称')" prop="internalNameZh">
<el-input v-model="queryParams.internalNameZh" :placeholder="$t('请输入内部名称')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.internalNameZh" :placeholder="$t('请输入内部名称')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="内部名称-英文" prop="internalNameEn">
<el-input v-model="queryParams.internalNameEn" placeholder="请输入内部名称-英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('类型编码')" prop="typeNumber">
<el-input v-model="queryParams.typeNumber" :placeholder="$t('请输入类型编码')" clearable @keyup.enter.native="handleQuery"/>
<el-input v-model="queryParams.typeNumber" :placeholder="$t('请输入类型编码')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<!-- <el-form-item label="仓库ID字符串" prop="warehouseIds">
<el-input v-model="queryParams.warehouseIds" placeholder="请输入仓库ID字符串" clearable @keyup.enter.native="handleQuery"/>
......@@ -27,18 +30,21 @@
<el-form-item :label="$t('所属国家')" prop="countryId">
<el-select filterable clearable v-model="queryParams.countryId" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="$l(dict,'title')" :value="parseInt(dict.id)" />
:key="dict.id" :label="$l(dict,'title')" :value="parseInt(dict.id)"/>
</el-select>
<!-- <el-input v-model="queryParams.countryId" :placeholder="$t('请输入所属国家')" clearable @keyup.enter.native="handleQuery"/>-->
<!-- <el-input v-model="queryParams.countryId" :placeholder="$t('请输入所属国家')" 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"/>
<el-input v-model="queryParams.etaTime" :placeholder="$t('预计到达天数')" clearable
@keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('渠道代理')" prop="channelAgent">
<el-input v-model="queryParams.channelAgent" :placeholder="$t('请输入渠道代理')" clearable @keyup.enter.native="handleQuery"/>
<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="$t('请输入备注-中文')" 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"/>
......@@ -62,51 +68,54 @@
<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="['ecw:channel:create']">{{ $t('新增') }}</el-button>
v-hasPermi="['ecw:channel:create']">{{ $t('新增') }}
</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="['ecw:channel:export']">{{ $t('导出') }}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading"
v-hasPermi="['ecw:channel:export']">{{ $t('导出') }}
</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="$t('渠道ID')" align="center" prop="channelId" />
<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>
<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">
<template slot-scope="{row}">{{$l(row, 'internalName')}}</template>
<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" /> -->
<!-- <el-table-column :label="$t('仓库名')" align="center" prop="warehouseNameList" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-scrollbar style="margin-right: 6px;">-->
<!-- <div class="left">-->
<!-- <el-tag v-for="warehouseName in scope.row.warehouseNameList"-->
<!-- :key="warehouseName.index">-->
<!-- <span>{{warehouseName}}</span>-->
<!-- </el-tag>-->
<!-- </div>-->
<!-- </el-scrollbar>-->
<!-- </template>-->
<!-- </el-table-column>-->
<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="$t('预计时间(天)')" align="center" prop="etaTime" />
<el-table-column :label="$t('所属国家')">
<template slot-scope="{row}">
{{$l(row,'countryTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remarksZh" />
<!-- <el-table-column :label="$t('仓库名')" align="center" prop="warehouseNameList" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-scrollbar style="margin-right: 6px;">-->
<!-- <div class="left">-->
<!-- <el-tag v-for="warehouseName in scope.row.warehouseNameList"-->
<!-- :key="warehouseName.index">-->
<!-- <span>{{warehouseName}}</span>-->
<!-- </el-tag>-->
<!-- </div>-->
<!-- </el-scrollbar>-->
<!-- </template>-->
<!-- </el-table-column>-->
<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="$t('预计时间(天)')" align="center" prop="etaTime"/>
<el-table-column :label="$t('所属国家')">
<template slot-scope="{row}">
{{ $l(row, 'countryTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('备注')" align="center" prop="remarksZh"/>
<!-- <el-table-column label="备注-英文" align="center" prop="remarksEn" /> -->
<!-- <el-table-column :label="$t('状态')" align="center" prop="status" /> -->
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
......@@ -114,12 +123,22 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('创建人')" prop="creatorName"></el-table-column>
<el-table-column :label="$t('创建人')" prop="">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('跟新人')" prop="updaterName">
</el-table-column>
<el-table-column :label="$t('操作')" 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="['ecw:channel:update']">{{ $t('修改') }}</el-button>
v-hasPermi="['ecw:channel:update']">{{ $t('修改') }}
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:channel:delete']">{{ $t('删除') }}</el-button>
v-hasPermi="['ecw:channel:delete']">{{ $t('删除') }}
</el-button>
</template>
</el-table-column>
</el-table>
......@@ -131,14 +150,20 @@
</template>
<script>
import { createChannel, updateChannel, deleteChannel, getChannel, getChannelPage, exportChannelExcel } from "@/api/ecw/channel";
import {
createChannel,
updateChannel,
deleteChannel,
getChannel,
getChannelPage,
exportChannelExcel
} from "@/api/ecw/channel";
import {getCountryListAll} from "@/api/ecw/country";
import {getTradeCountryList} from "@/api/ecw/region";
export default {
name: "EcwChannelIndex",
components: {
},
components: {},
data() {
return {
// 遮罩层
......@@ -165,10 +190,8 @@ export default {
// 表单参数
form: {},
// 表单校验
rules: {
},
countryList:[],
rules: {},
countryList: [],
};
},
created() {
......@@ -219,12 +242,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const channelId = row.channelId;
this.$modal.confirm(this.$t('是否确认删除渠道管理编号为{channelId}的数据项?',{channelId})).then(function() {
return deleteChannel(channelId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.$modal.confirm(this.$t('是否确认删除渠道管理编号为{channelId}的数据项?', {channelId})).then(function () {
return deleteChannel(channelId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
......@@ -236,12 +260,13 @@ export default {
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有渠道管理数据项?').then(() => {
this.exportLoading = true;
return exportChannelExcel(params);
}).then(response => {
this.$download.excel(response, '渠道列表.xls');
this.exportLoading = false;
}).catch(() => {});
this.exportLoading = true;
return exportChannelExcel(params);
}).then(response => {
this.$download.excel(response, '渠道列表.xls');
this.exportLoading = false;
}).catch(() => {
});
}
}
};
......@@ -249,23 +274,23 @@ export default {
<style lang="scss">
.left {
.left {
.el-tag {
background-color: #e6f6fd;
border: 1px solid #ccecfb;
display: inline-block;
height:auto;
padding: 0 10px;
line-height: 30px;
font-size: 12px;
color: #02a1e9;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
.el-tag {
background-color: #e6f6fd;
border: 1px solid #ccecfb;
display: inline-block;
height: auto;
padding: 0 10px;
line-height: 30px;
font-size: 12px;
color: #02a1e9;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
}
}
}
}
</style>
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