11
This commit is contained in:
parent
9ca6ead633
commit
3757e84605
@ -60,15 +60,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="siteCode">
|
||||
<el-select v-model="queryParams.siteCode" placeholder="服务网点" clearable>
|
||||
<!-- <el-option
|
||||
v-for="dict in dict.type.emis_region_level_type"
|
||||
:key="dict.value"
|
||||
<el-form-item label="" prop="siteName">
|
||||
<el-select v-model="queryParams.siteName" placeholder="服务网点" clearable>
|
||||
<el-option
|
||||
v-for="dict in siteIdsOptions"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/> -->
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="isHinterland">
|
||||
@ -251,7 +250,14 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="服务网点名称" prop="siteName">
|
||||
<el-input v-model="form.siteName" placeholder="请输入服务网点名称" />
|
||||
<el-select v-model="form.siteName" placeholder="网点名称" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in siteIdsOptions"
|
||||
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="6">
|
||||
@ -334,6 +340,7 @@
|
||||
<script>
|
||||
import { listEmisDestination, getEmisDestination, delEmisDestination, addEmisDestination, updateEmisDestination, changeDescStatus } from "@/api/emis/emisDestination";
|
||||
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
||||
import { listEmisSite, getEmisSite, delEmisSite, addEmisSite, updateEmisSite } from "@/api/emis/emisSite";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisDestinationView from '@/views/emis/emisDestination/emisDestinationView';
|
||||
import emisDestinationForm from '@/views/emis/emisDestination/emisDestinationForm';
|
||||
@ -366,6 +373,7 @@ export default {
|
||||
emisDestinationList: [],
|
||||
countryTree:[],
|
||||
countryIdsOptions:[],
|
||||
siteIdsOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
defaultProps: {
|
||||
@ -446,6 +454,7 @@ export default {
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCountryList();
|
||||
this.getAreaList();
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
@ -457,9 +466,9 @@ export default {
|
||||
handleStatusChange(row) {
|
||||
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.lineName + '"目的地吗?').then(function() {
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.destName + '"目的地吗?').then(function() {
|
||||
//改变线路的启用状态
|
||||
return changeDescStatus(row.id, row.status);
|
||||
return changeDestStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
@ -485,6 +494,27 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getAreaList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
this.siteIdsOptions = [];
|
||||
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];
|
||||
}
|
||||
listEmisSite(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
response.rows.forEach(item =>{
|
||||
var optItem={value:item.id,label:item.siteName};
|
||||
this.siteIdsOptions.push(optItem);
|
||||
});
|
||||
//console.log(this.siteIdsOptions);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getCountryList() {
|
||||
this.loading = true;
|
||||
listEmisCountry(this.queryParams).then(response => {
|
||||
@ -522,7 +552,11 @@ export default {
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.country = data.label;
|
||||
if(data.label=="国家列表"){
|
||||
this.queryParams.country = null;
|
||||
}else{
|
||||
this.queryParams.country = data.label;
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 表单重置
|
||||
|
||||
@ -1,31 +1,107 @@
|
||||
<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="prodCode">
|
||||
<el-input
|
||||
v-model="queryParams.prodCode"
|
||||
placeholder="产品代码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="prodName">
|
||||
<el-input
|
||||
v-model="queryParams.prodName"
|
||||
placeholder="名称"
|
||||
placeholder="类型名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="prodNameEn">
|
||||
<el-form-item label="" prop="prodCode">
|
||||
<el-input
|
||||
v-model="queryParams.prodNameEn"
|
||||
placeholder="英文名称"
|
||||
v-model="queryParams.prodCode"
|
||||
placeholder="类型编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="country">
|
||||
<el-select v-model="queryParams.country" placeholder="国家" clearable>
|
||||
<el-option
|
||||
v-for="dict in countryIdsOptions"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agingDesc">
|
||||
<el-select v-model="queryParams.agingDesc" placeholder="时效标识" clearable>
|
||||
<el-option
|
||||
v-for="dict in countryIdsOptions"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="carryType">
|
||||
<el-select v-model="queryParams.carrType" placeholder="取重方式" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_take_weight_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="transType">
|
||||
<el-select v-model="queryParams.transType" placeholder="承运方式" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_biz_shipping_method"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="transLine">
|
||||
<el-select v-model="queryParams.trans_line" placeholder="所属线路" clearable>
|
||||
<el-option
|
||||
v-for="dict in translineIdsOptions"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
</el-select>
|
||||
</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>
|
||||
@ -117,25 +193,27 @@
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="产品代码" align="center" prop="prodCode" min-width="100" />
|
||||
<el-table-column label="名称" align="center" prop="prodName" min-width="100" />
|
||||
<el-table-column label="类型代码" align="center" prop="prodCode" min-width="100" />
|
||||
<el-table-column label="类型名称" align="center" prop="prodName" min-width="100" />
|
||||
<el-table-column label="英文名称" align="center" prop="prodNameEn" min-width="100" />
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" />
|
||||
<el-table-column label="时效标识" align="center" prop="agingDesc" min-width="100" />
|
||||
<el-table-column label="所属路线" align="center" prop="transLine" min-width="100" />
|
||||
<el-table-column label="所属国家" align="center" prop="country" min-width="100" />
|
||||
<el-table-column label="所属线路名称" align="center" prop="transLine" 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" prop="carryType" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_take_weight_method" :value="scope.row.carryType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="承运方式" align="center" prop="transType" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时效描述" align="center" prop="agingDesc" min-width="100" />
|
||||
<el-table-column label="最小时效" align="center" prop="minAging" min-width="100" />
|
||||
<el-table-column label="最大时效" align="center" prop="maxAging" min-width="100" />
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_take_weight_method" :value="scope.row.carryType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -169,16 +247,16 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改运输产品类型对话框 -->
|
||||
<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="750px" :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="prodCode">
|
||||
<el-form-item label="类型代码" prop="prodCode">
|
||||
<el-input v-model="form.prodCode" placeholder="请输入产品代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="名称" prop="prodName">
|
||||
<el-form-item label="类型名称" prop="prodName">
|
||||
<el-input v-model="form.prodName" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -189,17 +267,26 @@
|
||||
</el-col>
|
||||
<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="8">
|
||||
<el-form-item label="所属线路" prop="transLineCode">
|
||||
<el-input v-model="form.transLineCode" placeholder="请输入所属线路" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属线路名称" prop="transLine">
|
||||
<el-input v-model="form.transLine" placeholder="请输入所属线路名称" />
|
||||
<el-form-item label="所属线路" prop="transLine">
|
||||
<el-select v-model="form.transLine" placeholder="所属线路" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in translineIdsOptions"
|
||||
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">
|
||||
@ -214,6 +301,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="8">
|
||||
<el-form-item label="承运方式" prop="transType">
|
||||
<el-select v-model="form.transType" placeholder="请选择承运方式">
|
||||
@ -226,11 +314,22 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="时效描述" prop="agingDesc">
|
||||
<el-input v-model="form.agingDesc" placeholder="请输入时效描述" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小时效" prop="minAging">
|
||||
<el-input v-model="form.minAging" placeholder="请输入最小时效" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最大时效" prop="maxAging">
|
||||
<el-input v-model="form.maxAging" placeholder="请输入最大时效" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
@ -261,12 +360,15 @@
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" append-to-body>
|
||||
<emisTransProductView :id="id" ></EmisTransProductView>
|
||||
</el-dialog>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisTransProduct, getEmisTransProduct, delEmisTransProduct, addEmisTransProduct, updateEmisTransProduct } from "@/api/emis/emisTransProduct";
|
||||
import { listEmisTransProduct, getEmisTransProduct, delEmisTransProduct, addEmisTransProduct, updateEmisTransProduct,changeTransProductStatus } from "@/api/emis/emisTransProduct";
|
||||
import { listEmisCountry, getEmisCountry, delEmisCountry, addEmisCountry, updateEmisCountry } from "@/api/emis/emisCountry";
|
||||
import { listEmisTransLine, getEmisTransLine, delEmisTransLine, addEmisTransLine, updateEmisTransLine,changeTransLineStatus } from "@/api/emis/emisTransLine";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisTransProductView from '@/views/emis/emisTransProduct/emisTransProductView';
|
||||
import emisTransProductForm from '@/views/emis/emisTransProduct/emisTransProductForm';
|
||||
@ -297,6 +399,10 @@ export default {
|
||||
total: 0,
|
||||
// 运输产品类型表格数据
|
||||
emisTransProductList: [],
|
||||
countryTree:[],
|
||||
countryIdsOptions:[],
|
||||
translineIdsOptions:[],
|
||||
countryName:null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -326,6 +432,7 @@ export default {
|
||||
prodCode: null,
|
||||
prodName: null,
|
||||
prodNameEn: null,
|
||||
country:null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -370,10 +477,29 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
countryName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCountryList();
|
||||
this.getTranslineList();
|
||||
},
|
||||
methods: {
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.prodName + '"产品类型吗?').then(function() {
|
||||
//改变线路的启用状态
|
||||
return changeTransProductStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
/** 查询运输产品类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -392,6 +518,57 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getTranslineList() {
|
||||
this.loading = true;
|
||||
listEmisTransLine(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.translineIdsOptions = [];
|
||||
response.rows.forEach(item =>{
|
||||
var optItem={value:item.id,label:item.lineName};
|
||||
this.translineIdsOptions.push(optItem)
|
||||
|
||||
});
|
||||
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();
|
||||
});
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
if(data.label=="国家列表"){
|
||||
this.queryParams.country = null;
|
||||
}else{
|
||||
this.queryParams.country = data.label;
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user