Commit c6138b95 authored by wanglianghe's avatar wanglianghe

出货管理列表

parent 717da4a1
......@@ -10,6 +10,7 @@ export const DICT_TYPE = {
COMMON_STATUS: 'common_status',
AUDIT_STATUS: 'audit_status',
ADVANCE_STATUS: 'advance_status',
BOX_SHIPMENT_STATUS: 'box_shipment_status',
// ========== SYSTEM 模块 ==========
SYSTEM_USER_SEX: 'system_user_sex',
......
......@@ -3,46 +3,58 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="主键ID" prop="id">
<el-input v-model="queryParams.id" placeholder="请输入主键ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="自编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="柜型" prop="boxType">
<el-select v-model="queryParams.boxType" placeholder="请选择柜型">
<el-option v-for="item in CabinetPage" :label="item.name" :value="item.name" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="发货状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-form-item label="柜型" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="departureId">
<el-select v-model="queryParams.departureId" placeholder="请选择始发地">
<el-form-item label="始发地" prop="startWarehouseId">
<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-select>
</el-form-item>
<el-form-item label="目的地" prop="objectiveId">
<el-select v-model="queryParams.objectiveId" placeholder="请选择始发地">
<el-form-item label="目的地" prop="destWarehouseId">
<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-select>
</el-form-item>
<el-form-item label="运输方式" prop="transportId">
<el-select v-model="queryParams.transportId" 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-form-item label="" prop="date">
<el-select v-model="queryParams.dateType" placeholder="请选择时间类型" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
<el-form-item label="">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>
</el-form-item>
<el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</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-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
......@@ -53,7 +65,7 @@
<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="['shipment:box:create']">新增
v-hasPermi="['shipment:box:create']">出货安排
</el-button>
</el-col>
<el-col :span="1.5">
......@@ -67,29 +79,37 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="主键ID" align="center" prop="id"/>
<el-table-column label="自编号" align="center" prop="orderNo"/>
<el-table-column label="柜号" align="center" prop="cubNo"/>
<el-table-column label="柜型" align="center" prop="boxType">
<template v-model="queryParams.boxType">
<el-option v-for="item in CabinetPage" :label="item.name" :value="item.name" :key="item.id"></el-option>
<el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope">
<span>{{ getCabinetName(scope.row.cabinetId) }}</span>
</template>
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType"/>
</template>
</el-table-column>
<el-table-column label="发货状态" align="center" prop="status">
<el-table-column label="出货渠道" align="center" prop="shippingChannelId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.status"/>
<span>{{ getShipChannelName(scope.row.shippingChannelId) }}</span>
</template>
</el-table-column>
<el-table-column label="始发地" align="center" prop="departureId"/>
<el-table-column label="目的地" align="center" prop="objectiveId"/>
<el-table-column label="运输方式" align="center" prop="transportId">
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"/>
<el-table-column label="重量(预装/已装)" align="center" prop="weight"/>
<el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId"/>
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="日期" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ new Date(scope.row.createTime).format('yyyy-MM-dd') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -106,29 +126,39 @@
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" 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-item label="柜型" prop="boxType">
<el-select v-model="form.boxType" placeholder="请选择柜型">
<el-option label="请选择字典生成" value=""/>
<el-form-item label="运输方式" prop="transportType">
<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-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" :key="item.channelId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="始发地" prop="departureId">
<el-select v-model="form.departureId" placeholder="请选择始发地">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
<el-form-item label="柜型" prop="cabinetId" v-if="form.transportType !== 3">
<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-select>
</el-form-item>
<el-form-item label="目的地" prop="objectiveId">
<el-select v-model="form.objectiveId" placeholder="请选择始发地">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
<el-form-item label="始发地" prop="startWarehouseId">
<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-select>
</el-form-item>
<el-form-item label="运输类型" prop="transportId">
<el-select v-model="queryParams.transportId" 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-form-item label="目的地" prop="destWarehouseId">
<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-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
......@@ -142,12 +172,23 @@
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box";
import {getTradeCityList} from '@/api/ecw/region';
import {getCabinetPage} from "@/api/ecw/cabinet";
import { getChannelList } from '@/api/ecw/channel';
export default {
name: "box",
components: {},
data() {
return {
dateTypes:[
{value:'1', label:'预装时间/分拣时间'},
{value:'2', label:'装柜时间'},
{value:'3', label:'起运时间'},
{value:'4', label:'到港时间'},
{value:'5', label:'清关时间'},
{value:'6', label:'提货时间'},
],
// 遮罩层
loading: true,
// 导出遮罩层
......@@ -170,14 +211,15 @@
id: null,
orderNo: null,
cubNo: null,
boxType: null,
status: null,
departureId: null,
objectiveId: null,
transportId: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null,
},
tradeCityList: [],
CabinetPage:[],
cabinetList:[],
channelList:[],
// 表单参数
form: {},
// 表单校验
......@@ -186,20 +228,58 @@
},
computed: {
expoerCityList() {
return this.tradeCityList.filter(item => item.type == 2)
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
importCityList() {
return this.tradeCityList.filter(item => item.type == 1)
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
getCabinetName() {
return cabinetId => {
for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) {
return cabinetItem.name;
}
}
return '/'
}
},
getShipChannelName() {
return shippingChannelId => {
for (let index in this.channelList) {
let channelItem = this.channelList[index];
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
}
return '/'
}
}
},
created() {
getTradeCityList().then(res => this.tradeCityList = res.data);
getCabinetPage(null).then(response => {
this.CabinetPage = response.data.list;
this.cabinetList = response.data.list;
});
this.getList();
this.getChannelList();
},
methods: {
getChannelList(){
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() {
this.loading = true;
......@@ -222,10 +302,10 @@
reset() {
this.form = {
id: undefined,
boxType: undefined,
departureId: undefined,
objectiveId: undefined,
transportId: undefined,
cabinetId: undefined,
startWarehouseId: undefined,
destWarehouseId: undefined,
transportType: undefined,
};
this.resetForm("form");
},
......
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