11
This commit is contained in:
parent
d0dc3fe1a1
commit
f7fa32c828
@ -212,6 +212,44 @@
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属国家" prop="countryId">
|
||||
<el-select v-model="form.countryId" placeholder="所属国家" @change="handleCountrySelectionChange" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryIdsOptions"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="国家大区" prop="countryAreaId">
|
||||
<el-select v-model="form.countryAreaId" placeholder="国家大区" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryAreaIdsOptionsForm"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="上级区域" prop="parentId">
|
||||
<!--<el-input v-model="form.parentId" placeholder="请输入上级区域" />-->
|
||||
<treeselect
|
||||
ref="tree"
|
||||
v-model="form.parentId"
|
||||
:options="parentAreaOptions"
|
||||
:normalizer="normalizer"
|
||||
:default-expand-level="1"
|
||||
:show-count="true"
|
||||
placeholder="请输入上级区域"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="区域名称" prop="regionName">
|
||||
<el-input v-model="form.regionName" placeholder="请输入区域名称" />
|
||||
@ -227,40 +265,11 @@
|
||||
<el-input v-model="form.shortName" placeholder="请输入简称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上级区域" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入上级区域" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属国家" prop="countryId">
|
||||
<el-select v-model="form.countryId" placeholder="所属国家" @change="handleCountrySelectionChange" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryIdsOptions"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="国家大区" prop="countryAreaId">
|
||||
<el-select v-model="form.countryAreaId" placeholder="国家大区" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryAreaIdsOptionsForm"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="行政级别" prop="regionType">
|
||||
<el-select v-model="form.regionType" placeholder="请选择">
|
||||
@ -312,10 +321,13 @@ import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisRegionView from '@/views/emis/emisRegion/emisRegionView';
|
||||
import emisRegionForm from '@/views/emis/emisRegion/emisRegionForm';
|
||||
import emisCountryAreaForm from '@/views/emis/emisCountryArea/emisCountryAreaForm';
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
|
||||
export default {
|
||||
name: "emisRegion",
|
||||
components: { elDateSimplePicker,emisRegionView,emisRegionForm ,emisCountryAreaForm},
|
||||
components: { elDateSimplePicker,emisRegionView,emisRegionForm ,emisCountryAreaForm,Treeselect,IconSelect},
|
||||
dicts: [
|
||||
'emis_region_level_type',
|
||||
],
|
||||
@ -336,6 +348,7 @@ export default {
|
||||
countryAreaIdsOptionsForm:[],
|
||||
tableDataCopy:[],
|
||||
tableData:[],
|
||||
parentAreaOptions:[],
|
||||
showTable:false,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
@ -344,6 +357,8 @@ export default {
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
//判断是否是编辑或者添加选择的国家
|
||||
from_inner:false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@ -387,6 +402,7 @@ export default {
|
||||
shortName: null,
|
||||
regionType: null,
|
||||
zipCode: null,
|
||||
currentCountryId:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -422,21 +438,36 @@ export default {
|
||||
/** 查询四级省市区镇表列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.currentCountryId = this.currentCountryId;
|
||||
listEmisRegion(this.queryParams).then(response => {
|
||||
|
||||
//console.log(response.rows);
|
||||
this.tableDataCopy = this.handleTree(response.rows, "id");
|
||||
this.tableData = JSON.parse(JSON.stringify(this.tableDataCopy)).map(item => { // 展示数据
|
||||
item.hasChildren = item.children && item.children.length > 0
|
||||
item.children = null
|
||||
// 记住层级关系
|
||||
item.idList = [item.id]
|
||||
return item
|
||||
})
|
||||
|
||||
|
||||
this.parentAreaOptions = this.handleTree(response.rows, "id");
|
||||
//编辑或者添加的时候选择国家不影响外面
|
||||
if(this.from_inner!=true){
|
||||
//console.log(this.from_inner);
|
||||
this.tableData = JSON.parse(JSON.stringify(this.tableDataCopy)).map(item => { // 展示数据
|
||||
item.hasChildren = item.children && item.children.length > 0
|
||||
item.children = null
|
||||
// 记住层级关系
|
||||
item.idList = [item.id]
|
||||
return item
|
||||
})
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 转换菜单数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.regionName,
|
||||
children: node.children,
|
||||
};
|
||||
},
|
||||
getAreaList(){
|
||||
this.loading = true;
|
||||
listEmisCountryArea(this.queryParams).then(response => {
|
||||
@ -499,6 +530,7 @@ export default {
|
||||
var oldCountryId = this.queryParams.countryId;
|
||||
this.currentCountryId = id;
|
||||
this.queryParams.countryId = this.currentCountryId;
|
||||
this.from_inner = true;
|
||||
listEmisCountryArea(this.queryParams).then(response => {
|
||||
this.loading = false;
|
||||
this.countryAreaIdsOptionsForm = [];
|
||||
@ -507,6 +539,8 @@ export default {
|
||||
this.countryAreaIdsOptionsForm.push(optItem);
|
||||
});
|
||||
});
|
||||
//更新上级区域列表
|
||||
this.getList();
|
||||
if(oldCountryId>0){
|
||||
this.queryParams.countryId = oldCountryId;
|
||||
}else{
|
||||
@ -567,6 +601,7 @@ export default {
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.countryId = data.id;
|
||||
this.from_inner = false;
|
||||
//this.form.continentId= data.id;
|
||||
this.handleCountryAreaQuery();
|
||||
},
|
||||
@ -574,6 +609,7 @@ export default {
|
||||
handleNodeAreaClick(data) {
|
||||
this.queryParams.countryAreaId = data.id;
|
||||
//this.form.continentId= data.id;
|
||||
this.from_inner = false;
|
||||
this.handleAreaQuery();
|
||||
},
|
||||
mouseenter(data) {
|
||||
@ -615,6 +651,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.from_inner = false;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -645,7 +682,11 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
|
||||
this.form.countryId = row.countryId;
|
||||
this.queryParams.currentCountryId = row.countryId;
|
||||
this.getList();
|
||||
this.form.parentId = row.id;
|
||||
console.log(this.form);
|
||||
// 子组件打开模式
|
||||
// if(row != undefined){
|
||||
// this.currentParentId = row.id
|
||||
|
||||
@ -1,15 +1,41 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20" type='flex'>
|
||||
<el-col :span="5" :xs="5">
|
||||
<div class="head-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="15" :xs="15">
|
||||
<el-input
|
||||
v-model="countryName"
|
||||
placeholder="国家名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
class="filter-tree tree"
|
||||
:data="countryTree"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="20">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
|
||||
<el-form-item label="" prop="lineCode">
|
||||
<el-input
|
||||
v-model="queryParams.lineCode"
|
||||
placeholder="线路代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="lineName">
|
||||
<el-input
|
||||
v-model="queryParams.lineName"
|
||||
@ -18,6 +44,39 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="country">
|
||||
<el-input
|
||||
v-model="queryParams.country"
|
||||
placeholder="目的国家"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="applyScope">
|
||||
<el-input
|
||||
v-model="queryParams.applyScope"
|
||||
placeholder="适用范围"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="logoType">
|
||||
<el-input
|
||||
v-model="queryParams.logoType"
|
||||
placeholder="品牌类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="" prop="lineCode">
|
||||
<el-input
|
||||
v-model="queryParams.lineCode"
|
||||
placeholder="线路代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="status">
|
||||
<el-input
|
||||
v-model="queryParams.status"
|
||||
@ -74,30 +133,9 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="country">
|
||||
<el-input
|
||||
v-model="queryParams.country"
|
||||
placeholder="目的国家"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="applyScope">
|
||||
<el-input
|
||||
v-model="queryParams.applyScope"
|
||||
placeholder="适用范围"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="logoType">
|
||||
<el-input
|
||||
v-model="queryParams.logoType"
|
||||
placeholder="品牌类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -187,11 +225,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="线路代码" align="center" prop="lineCode" min-width="100" />
|
||||
<el-table-column label="线路名称" align="center" prop="lineName" min-width="100" />
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" />
|
||||
<el-table-column label="单证员" align="center" prop="siteAuditMan" min-width="100" />
|
||||
<el-table-column label="单证员代码" align="center" prop="siteAuditManCode" min-width="100" />
|
||||
<el-table-column label="客服专员" align="center" prop="marketMan" min-width="100" />
|
||||
@ -201,6 +234,24 @@
|
||||
<el-table-column label="目的国家" align="center" prop="country" min-width="100" />
|
||||
<el-table-column label="适用范围" align="center" prop="applyScope" min-width="100" />
|
||||
<el-table-column label="品牌类型" align="center" prop="logoType" min-width="100" />
|
||||
|
||||
|
||||
|
||||
-->
|
||||
<el-table-column label="线路名称" align="center" prop="lineName" min-width="100" />
|
||||
<el-table-column label="线路编号" align="center" prop="lineCode" min-width="100" />
|
||||
<el-table-column label="起始国家" align="center" prop="startCountry" min-width="100" />
|
||||
<el-table-column label="目的国家" align="center" prop="country" min-width="100" />
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -233,71 +284,116 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改线路对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" :close-on-click-modal="false" append-to-body>
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="线路代码" prop="lineCode">
|
||||
<el-input v-model="form.lineCode" placeholder="请输入线路代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="线路名称" prop="lineName">
|
||||
<el-input v-model="form.lineName" placeholder="请输入线路名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-input v-model="form.status" placeholder="请输入启用状态" />
|
||||
<el-form-item label="英文名称" prop="lineNameEn">
|
||||
<el-input v-model="form.lineNameEn" placeholder="请输入英文名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单证员" prop="siteAuditMan">
|
||||
<el-input v-model="form.siteAuditMan" placeholder="请输入单证员" />
|
||||
<el-form-item label="线路代码" prop="lineCode">
|
||||
<el-input v-model="form.lineCode" placeholder="请输入线路代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单证员代码" prop="siteAuditManCode">
|
||||
<el-input v-model="form.siteAuditManCode" placeholder="请输入单证员代码" />
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="起始国家" prop="fromCountry">
|
||||
<el-select v-model="form.fromCountry" placeholder="起始国家" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryIdsOptions"
|
||||
v-bind:key="item.label"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="客服专员" prop="marketMan">
|
||||
<el-input v-model="form.marketMan" placeholder="请输入客服专员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="客服专员代码" prop="marketManCode">
|
||||
<el-input v-model="form.marketManCode" placeholder="请输入客服专员代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="操作员" prop="operateMan">
|
||||
<el-input v-model="form.operateMan" placeholder="请输入操作员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="操作员代码" prop="operateManCode">
|
||||
<el-input v-model="form.operateManCode" placeholder="请输入操作员代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目的国家" prop="country">
|
||||
<el-input v-model="form.country" placeholder="请输入目的国家" />
|
||||
<el-select v-model="form.country" placeholder="目的国家" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in countryIdsOptions"
|
||||
v-bind:key="item.label"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="适用范围" prop="applyScope">
|
||||
<el-input v-model="form.applyScope" placeholder="请输入适用范围" />
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计泡方式" prop="meterRate">
|
||||
<el-input v-model="form.meterRate" placeholder="请输入计泡方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品牌类型" prop="logoType">
|
||||
<el-input v-model="form.logoType" placeholder="请输入品牌类型" />
|
||||
<el-select v-model="form.logoType" placeholder="品牌类型" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in logoTypeIdsOptions"
|
||||
v-bind:key="item.label"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输方式" prop="transType">
|
||||
<el-select v-model="form.transType" placeholder="运输方式" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in dict.type.emis_biz_shipping_method"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="适用范围" prop="applyScope">
|
||||
<el-select v-model="form.applyScope" placeholder="适用范围" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in dict.type.emis_affiliate_type"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="24">
|
||||
<el-form-item label="进仓模板" prop="applyScope">
|
||||
<el-select v-model="form.applyScope" placeholder="进仓模板" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in dict.type.emis_affiliate_type"
|
||||
v-bind:key="item.value"
|
||||
v-bind:label="item.label"
|
||||
v-bind:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-show="moreInputVisible" > </el-col>
|
||||
<el-col :span="24">
|
||||
<el-divider content-position="right" @click="handleShowMoreInput" >更多信息[+]</el-divider>
|
||||
@ -321,12 +417,16 @@
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<emisTransLineView :id="id" ></EmisTransLineView>
|
||||
</el-dialog>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisTransLine, getEmisTransLine, delEmisTransLine, addEmisTransLine, updateEmisTransLine } from "@/api/emis/emisTransLine";
|
||||
import { listEmisTransLine, getEmisTransLine, delEmisTransLine, addEmisTransLine, updateEmisTransLine,changeTransLineStatus } from "@/api/emis/emisTransLine";
|
||||
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
||||
import { listEmisBrand, getEmisBrand, delEmisBrand, addEmisBrand, updateEmisBrand,changeBrandStatus } from "@/api/emis/emisBrand";
|
||||
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisTransLineView from '@/views/emis/emisTransLine/emisTransLineView';
|
||||
import emisTransLineForm from '@/views/emis/emisTransLine/emisTransLineForm';
|
||||
@ -334,14 +434,14 @@ import emisTransLineForm from '@/views/emis/emisTransLine/emisTransLineForm';
|
||||
export default {
|
||||
name: "emisTransLine",
|
||||
components: { elDateSimplePicker,emisTransLineView,emisTransLineForm },
|
||||
dicts: [
|
||||
],
|
||||
dicts: ['sys_normal_disable','emis_biz_shipping_method','emis_affiliate_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
countryName:null,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
@ -354,10 +454,18 @@ export default {
|
||||
total: 0,
|
||||
// 线路表格数据
|
||||
emisTransLineList: [],
|
||||
countryTree:[],
|
||||
countryIdsOptions:[],
|
||||
logoTypeIdsOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
currentId:null,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
@ -401,6 +509,14 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCountryList();
|
||||
this.getBrandList();
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
countryName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 查询线路列表 */
|
||||
@ -412,11 +528,84 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getCountryList() {
|
||||
this.loading = true;
|
||||
listEmisCountry(this.queryParams).then(response => {
|
||||
this.loading = false;
|
||||
this.countryTree = [];
|
||||
this.countryIdsOptions = [];
|
||||
var cTree={"id":"","label":"国家列表","children":[]};
|
||||
cTree.children.push({"id":40,"label":"中国"});
|
||||
this.countryIdsOptions.push({"value":40,"label":"中国"})
|
||||
//var lastContinentId = -1;
|
||||
response.rows.forEach(item =>{
|
||||
if(item.id != 40){
|
||||
var optItem={value:item.id,label:item.name};
|
||||
this.countryIdsOptions.push(optItem)
|
||||
|
||||
var treeItem={"id":item.id,"label":item.name};
|
||||
cTree.children.push(treeItem);
|
||||
}
|
||||
//lastContinentId = item.id;
|
||||
});
|
||||
this.queryParams.countryId = this.currentCountryId;
|
||||
this.countryTree.push(cTree);
|
||||
//this.getAreaList();
|
||||
});
|
||||
},
|
||||
getBrandList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||
}
|
||||
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
}
|
||||
this.logoTypeIdsOptions = [];
|
||||
listEmisBrand(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
response.rows.forEach(item =>{
|
||||
var optItem={value:item.id,label:item.name};
|
||||
this.logoTypeIdsOptions.push(optItem)
|
||||
});
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handleStatusChange(row) {
|
||||
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.lineName + '"线路吗?').then(function() {
|
||||
//改变线路的启用状态
|
||||
return changeTransLineStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.countryId = data.id;
|
||||
this.handleCountryAreaQuery();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleCountryAreaQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
@ -473,6 +662,7 @@ export default {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEmisTransLine(id).then(response => {
|
||||
response.data.status = response.data.status+"";
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user