Commit eeaaa5c2 authored by wanglianghe's avatar wanglianghe

海运、空运、海空联运列表

parent 453ae2ff
This diff is collapsed.
This diff is collapsed.
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<el-form-item label="始发地" prop="startWarehouseId"> <el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地"> <el-select v-model="queryParams.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的地" prop="destWarehouseId"> <el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地"> <el-select v-model="queryParams.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -45,14 +45,6 @@ ...@@ -45,14 +45,6 @@
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="运输方式" prop="transportType">
<el-select v-model="queryParams.transportType" placeholder="请选择运输方式" 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"/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
...@@ -126,8 +118,6 @@ ...@@ -126,8 +118,6 @@
</el-button> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">编辑</el-dropdown-item> <el-dropdown-item command="edit">编辑</el-dropdown-item>
<el-dropdown-item command="sea">操作-海运</el-dropdown-item>
<el-dropdown-item command="air">操作-空运</el-dropdown-item>
<el-dropdown-item command="seaAir">操作-海空联运</el-dropdown-item> <el-dropdown-item command="seaAir">操作-海空联运</el-dropdown-item>
<el-dropdown-item command="error">异常登记</el-dropdown-item> <el-dropdown-item command="error">异常登记</el-dropdown-item>
<el-dropdown-item command="cost">费用登记</el-dropdown-item> <el-dropdown-item command="cost">费用登记</el-dropdown-item>
...@@ -145,19 +135,13 @@ ...@@ -145,19 +135,13 @@
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" 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="transportType"> <el-form-item label="出货渠道" prop="shippingChannelId">
<el-radio-group v-model="form.transportType" @change="changeTransportType">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)" :key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出货渠道" prop="shippingChannelId" v-if="form.transportType === 3 || form.transportType === 4">
<el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道"> <el-select v-model="form.shippingChannelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option> <el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="柜型" prop="cabinetId" v-if="form.transportType !== 3"> <el-form-item label="柜型" prop="cabinetId">
<el-select v-model="form.cabinetId" placeholder="请选择柜型"> <el-select v-model="form.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in cabinetList" :label="item.name" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
...@@ -165,13 +149,13 @@ ...@@ -165,13 +149,13 @@
<el-form-item label="始发地" prop="startWarehouseId"> <el-form-item label="始发地" prop="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地"> <el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的地" prop="destWarehouseId"> <el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地"> <el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -186,9 +170,9 @@ ...@@ -186,9 +170,9 @@
<script> <script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box"; import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import {getTradeCityList} from '@/api/ecw/region';
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import { getWarehouseList } from "@/api/ecw/warehouse"
export default { export default {
name: "box", name: "box",
...@@ -196,7 +180,7 @@ ...@@ -196,7 +180,7 @@
data() { data() {
return { return {
dateTypes:[ dateTypes:[
{value:'1', label:'预装时间/分拣时间'}, {value:'1', label:'预装时间'},
{value:'2', label:'装柜时间'}, {value:'2', label:'装柜时间'},
{value:'3', label:'起运时间'}, {value:'3', label:'起运时间'},
{value:'4', label:'到港时间'}, {value:'4', label:'到港时间'},
...@@ -233,14 +217,15 @@ ...@@ -233,14 +217,15 @@
destWarehouseId: null, destWarehouseId: null,
transportType: null, transportType: null,
}, },
tradeCityList: [],
cabinetList:[], cabinetList:[],
channelList:[], channelList:[],
warehouseList: [],
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
rules: { rules: {
transportType: [{ required: true, message: "运输方式不能为空", trigger: "blur" }], shippingChannelId: [{ required: true, message: "出货渠道不能为空", trigger: "blur" }],
cabinetId: [{ required: true, message: "柜型不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }], startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }], destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
...@@ -248,11 +233,11 @@ ...@@ -248,11 +233,11 @@
}; };
}, },
computed: { computed: {
expoerCityList() { exportWarehouseList() {
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3) return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3')
}, },
importCityList() { importWarehouseList() {
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3) return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3')
}, },
getCabinetName() { getCabinetName() {
...@@ -281,7 +266,7 @@ ...@@ -281,7 +266,7 @@
}, },
created() { created() {
getTradeCityList().then(res => this.tradeCityList = res.data); getWarehouseList().then(res => this.warehouseList = res.data);
getCabinetPage(null).then(response => { getCabinetPage(null).then(response => {
this.cabinetList = response.data.list; this.cabinetList = response.data.list;
}); });
...@@ -293,19 +278,13 @@ ...@@ -293,19 +278,13 @@
getChannelList().then(res => this.channelList = res.data) getChannelList().then(res => this.channelList = res.data)
}, },
changeTransportType(value) {
if(value === 3) {
this.form.cabinetId = null;
} else if(value == 1 || value == 2) {
this.form.shippingChannelId = null;
}
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = {...this.queryParams};
params.transportType = 4;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询 // 执行查询
getboxPage(params).then(response => { getboxPage(params).then(response => {
...@@ -364,19 +343,8 @@ ...@@ -364,19 +343,8 @@
return; return;
} }
if(this.form.transportType != 3) { this.form.transportType = 4;
if(!this.form.cabinetId) { console.log(this.form);
this.$message.error('柜型不能为空');
return;
}
}
if(this.form.transportType == 3 || this.form.transportType == 4) {
if(!this.form.shippingChannelId) {
this.$message.error('出货渠道不能为空');
return;
}
}
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
...@@ -430,6 +398,14 @@ ...@@ -430,6 +398,14 @@
case 'sea': case 'sea':
this.$router.push('/box/shippingSea/' + row.id) this.$router.push('/box/shippingSea/' + row.id)
break; break;
case 'edit':
this.handleUpdate(row);
break;
case 'delete':
this.handleDelete(row);
break;
} }
}, },
} }
......
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