Commit 09410acb authored by dcy's avatar dcy

Merge remote-tracking branch 'origin/dev' into dev

parents b4fdb349 6b54d1d9
...@@ -362,13 +362,6 @@ export const constantRoutes = [ ...@@ -362,13 +362,6 @@ export const constantRoutes = [
props: true, props: true,
name: 'shippingSea', name: 'shippingSea',
meta: {title: '海运出货操作', icon: '', activeMenu: '/shipment/boxSea'} meta: {title: '海运出货操作', icon: '', activeMenu: '/shipment/boxSea'}
},
{
path: 'shippingSea/preinstall/:boxId(\\d+)',
component: (resolve) => import('@/views/ecw/box/shipping/preinstall'),
props: true,
name: 'preinstall',
meta: {title: '出货安排(预装)', icon: '', activeMenu: '/shipment/boxSea'}
} }
] ]
}, },
......
...@@ -14,14 +14,19 @@ ...@@ -14,14 +14,19 @@
</template> </template>
<script> <script>
/**
* agent
*/
export default { export default {
name: "agent", name: "agent",
data() { data() {
return { return {
// agent对象
agent: {}, agent: {},
}; };
}, },
methods: { methods: {
/** 提交 */
onSubmit() { onSubmit() {
this.$refs["agentForm"].validate((valid) => { this.$refs["agentForm"].validate((valid) => {
if (valid) { if (valid) {
...@@ -29,6 +34,7 @@ export default { ...@@ -29,6 +34,7 @@ export default {
} }
}); });
}, },
/** 取消 */
cancel() { cancel() {
this.$emit("closeDialog"); this.$emit("closeDialog");
}, },
......
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col span="12"> <el-col :span="12">
<el-form-item label="预计开船时间" prop="time"> <el-form-item label="预计开船时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.departureTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="booking.departureTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select> </el-select>
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col span="12"> <el-col :span="12">
<el-form-item label="预计提单补料时间"> <el-form-item label="预计提单补料时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.feedTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="booking.feedTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select> </el-select>
...@@ -62,12 +62,12 @@ ...@@ -62,12 +62,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col span="12"> <el-col :span="12">
<el-form-item label="预计报关时间"> <el-form-item label="预计报关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.declarationTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="booking.declarationTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select> </el-select>
...@@ -76,12 +76,12 @@ ...@@ -76,12 +76,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col span="12"> <el-col :span="12">
<el-form-item label="预计截关时间"> <el-form-item label="预计截关时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="booking.cutOffTime"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="booking.cutOffTime"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="12"> <el-col :span="12">
<el-form-item label="通知人" label-width="80px"> <el-form-item label="通知人" label-width="80px">
<el-select v-model="booking.feedTimePerson" placeholder="请选择通知人"> <el-select v-model="booking.feedTimePerson" placeholder="请选择通知人">
</el-select> </el-select>
...@@ -99,18 +99,25 @@ ...@@ -99,18 +99,25 @@
</template> </template>
<script> <script>
/**
* 订舱
*/
export default { export default {
name: "booking", name: "booking",
data() { data() {
return { return {
// 船公司类型
types: ["PIL", "MSK", "CMA", "COSCO", "ZIM", "ONE", "OOCL", "MSC", "HPL"], types: ["PIL", "MSK", "CMA", "COSCO", "ZIM", "ONE", "OOCL", "MSC", "HPL"],
// 订舱对象
booking: {}, booking: {},
// 校验
rules: { rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }], time: [{ required: true, message: "必填", trigger: "change" }],
}, },
}; };
}, },
methods: { methods: {
/** 提交 */
onSubmit() { onSubmit() {
this.$refs["bookingForm"].validate((valid) => { this.$refs["bookingForm"].validate((valid) => {
if (valid) { if (valid) {
...@@ -118,6 +125,7 @@ export default { ...@@ -118,6 +125,7 @@ export default {
} }
}); });
}, },
/** 取消 */
cancel() { cancel() {
this.$emit("closeDialog"); this.$emit("closeDialog");
}, },
......
<template>
<div>
<el-form ref="cabinetForm" :rules="rules" :model="cabinet" label-width="80px">
<el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.arrivalTime"></el-date-picker>
</el-form-item>
<el-form-item label="仓库">
<el-select v-model="cabinet.warehouse" placeholder="请选择仓库">
</el-select>
</el-form-item>
<el-form-item label="装柜时间" prop="time">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.cabinetTime"></el-date-picker>
</el-form-item>
<el-form-item label="出仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="cabinet.outTime"></el-date-picker>
</el-form-item>
<el-form-item label="装柜图片">
<el-upload class="upload-demo" action="" :limit="1" :file-list="cabinet.fileList">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<!-- 开始装柜 -->
<el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body destroy-on-close>
<startPacking />
</el-dialog>
<!-- 操作 -->
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button type="success">封柜</el-button>
<el-button @click="cancel">取消</el-button>
<el-button type="danger" @click="startCabinet">开始装柜</el-button>
</el-row>
</div>
</template>
<script>
import startPacking from "./startPacking.vue";
/**
* 装柜
*/
export default {
name: "cabinet",
components: { startPacking },
props: {
boxId: String,
},
data() {
return {
// 弹窗
dialogVisible: false,
// 装柜对象
cabinet: {
fileList: [],
},
// 校验
rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }],
},
};
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["cabinetForm"].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
/** 取消 */
cancel() {
this.$emit("closeDialog");
},
/** 开始装柜 */
startCabinet() {
this.dialogVisible = true;
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="startPacking">
<el-card>
<el-row class="content-area">
<!-- 左侧 -->
<el-col :span="6" class="left-area">
<el-row v-for="item in testData" :key="item.key" class="title-info">
<div>
<p>{{item.title}}</p>
</div>
<div>
<p>111</p>
<p>111</p>
<p>111</p>
</div>
</el-row>
</el-col>
<!-- 右侧 -->
<el-col :span="18" class="right-area">
<!-- 操作 -->
<el-row class="table-title">
<div>当前装柜:第一部分</div>
<div>
<el-input v-model="qrCode" placeholder="请输入二维码/条码编号"></el-input>
<el-button type="primary">确定</el-button>
<el-button type="primary" @click="handlerClick('batchInput','批量输入')">批量输入</el-button>
<el-button type="primary" @click="handlerClick('correction','装柜纠错')">装柜纠错</el-button>
<el-button type="primary" @click="handlerClick('correctionOrder','批量装柜纠错')">批量装柜纠错</el-button>
</div>
</el-row>
<!-- 表格 -->
<el-row>
<el-table v-loading="loading" :data="listData">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="订单号" align="center" prop="selfNo">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.selfNo }}</a>
</template>
</el-table-column>
<el-table-column label="货物信息" align="center" prop="cubNo" />
<el-table-column label="计划箱数" align="center" prop="cabinetId" />
<el-table-column label="实装箱数" align="center" prop="transportType" />
<el-table-column label="体积" align="center" prop="squareNumber" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-col>
</el-row>
</el-card>
<!-- 统计 -->
<el-row>
<el-col :span="6" class="totle-info">
<div>
<p>总计:</p>
<p>111</p>
</div>
<div>
<p>容量:</p>
<p>111</p>
</div>
<div>已装0箱</div>
</el-col>
</el-row>
<!-- 操作 -->
<el-row class="button-area">
<el-button type="primary" @click="handlerClick('supplementOrder','补单')">补单</el-button>
<el-button type="primary">申请封柜</el-button>
<el-button type="primary" @click="handlerClick('modifyCabinet','修改柜信息')">修改柜信息</el-button>
<el-button type="primary">封柜审核中</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :fullscreen="dialogConfig.fullscreen" :width="dialogConfig.width" :modal-append-to-body=false append-to-body destroy-on-close>
<!-- 已装未装订单 -->
<template v-if="dialogConfig.type === 'orderTable'">
<el-table :data="[]">
<el-table-column label="已装" align="center" prop="selfNo" />
<el-table-column label="未装" align="center" prop="cubNo" />
</el-table>
</template>
<!-- 补单 -->
<template v-if="dialogConfig.type === 'supplementOrder'">
<supplementOrder />
</template>
<!-- 修改柜信息 -->
<template v-if="dialogConfig.type === 'modifyCabinet'">
<el-form ref="modifyForm" :rules="rules" :model="modifyCabinetObj" label-width="80px">
<el-form-item label="起运仓库" prop="warehouse">
<el-select v-model="modifyCabinetObj.warehouse" placeholder="请选择起运仓库">
</el-select>
</el-form-item>
<el-form-item label="预计时间" prop="estimatedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="modifyCabinetObj.estimatedTime"></el-date-picker>
</el-form-item>
<el-form-item label="选择柜型" prop="cabinetType">
<el-select v-model="modifyCabinetObj.cabinetType" placeholder="请选择柜型">
</el-select>
</el-form-item>
<el-form-item label="柜号">
<el-input v-model="modifyCabinetObj.cabinetNo" placeholder="请输入柜号" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('modifyForm')">下一步</el-button>
<el-button @click="closeDialog">取消</el-button>
</el-row>
</template>
<!-- 装柜纠错 -->
<template v-if=" dialogConfig.type === 'correction'">
<el-form ref="correctionForm" :rules="rules" :model="correctionObj" label-position="top">
<el-form-item label="装柜纠错(二维码/条形码编号)" prop="qrCode">
<el-input v-model="correctionObj.qrCode" placeholder="请输入二维码/条形码编号" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('correctionForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
</el-row>
</template>
<!-- 批量装柜纠错(订单号) -->
<template v-if=" dialogConfig.type === 'correctionOrder'">
<el-form ref="orderForm" :rules="rules" :model="orderObj" label-position="top">
<el-form-item label="装柜纠错(订单号)" prop="orderNo">
<el-input v-model="orderObj.orderNo" placeholder="请输入订单号" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('orderForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
</el-row>
</template>
<!-- 装柜批量输入 -->
<template v-if=" dialogConfig.type === 'batchInput'">
<el-form ref="batchForm" :rules="rules" :model="batchObj" label-position="top">
<el-form-item label="" prop="qrCode">
<el-input type="textarea" :rows="3" v-model="batchObj.qrCode" placeholder="请输入,多个以逗号分隔" clearable />
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit('batchForm')">提交</el-button>
<el-button @click="closeDialog">取消</el-button>
</el-row>
</template>
</el-dialog>
</div>
</template>
<script>
import supplementOrder from "./supplementOrder.vue";
/**
* 开始装柜
*/
export default {
name: "startPacking",
components: {
supplementOrder,
},
data() {
return {
// laoding
loading: false,
// 二维码/条码编号
qrCode: "",
// 表格数据
listData: [
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
],
// 左侧数据
testData: [
{
key: 1,
title: "第一部分",
},
{
key: 2,
title: "第二部分",
},
],
// 弹窗配置
dialogConfig: {
title: "",
dialogVisible: false,
width: "30%",
type: "",
fullscreen: false,
},
// 批量输入
batchObj: {},
// 批量纠错(订单号)
orderObj: {},
// 纠错
correctionObj: {},
// 修改柜信息
modifyCabinetObj: {},
// 修改柜信息校验
rules: {
warehouse: [{ required: true, message: "必填", trigger: "change" }],
estimatedTime: [{ required: true, message: "必填", trigger: "change" }],
cabinetType: [{ required: true, message: "必填", trigger: "change" }],
qrCode: [{ required: true, message: "必填", trigger: "change" }],
orderNo: [{ required: true, message: "必填", trigger: "change" }],
},
};
},
methods: {
/** 点击事件统一入口 */
handlerClick(type, title) {
this.shwoDialog({ type, title });
},
/** 表格订单号点击 */
orderClick(row) {
this.shwoDialog({
type: "orderTable",
title: row.selfNo,
});
},
/** 弹窗事件 */
shwoDialog(config) {
this.$set(this.dialogConfig, "title", config.title);
this.$set(this.dialogConfig, "type", config.type);
switch (config.type) {
case "orderTable":
case "modifyCabinet":
this.$set(this.dialogConfig, "fullscreen", false);
break;
case "supplementOrder":
this.$set(this.dialogConfig, "fullscreen", true);
break;
}
this.$set(this.dialogConfig, "dialogVisible", true);
},
/** 关闭弹窗 */
closeDialog() {
this.$set(this.dialogConfig, "dialogVisible", false);
},
/** 修改提交 */
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert("submit!");
}
});
},
},
};
</script>
<style lang="scss" scoped>
.startPacking {
p {
margin: 0;
}
.content-area {
display: flex;
.left-area {
border-right: 3px solid #e6ebf5;
padding-right: 10px;
.title-info {
height: 100px;
> div:first-child {
font-size: 16px;
background-color: #f2f2f2;
line-height: 30px;
text-align: center;
}
> :last-child {
display: flex;
> p {
margin-right: 10px;
color: #4f9cdd;
}
}
}
}
.right-area {
padding-left: 10px;
.table-title {
display: flex;
align-items: center;
margin-bottom: 10px;
> div:first-child {
flex: 1;
font-size: 16px;
}
> div:last-child {
display: flex;
> .el-input {
margin-right: 10px;
}
}
}
.order-href {
color: #4f9cdd;
}
}
}
.totle-info {
font-size: 20px;
margin-top: 15px;
> div {
display: flex;
margin-bottom: 5px;
}
}
.button-area {
text-align: center;
}
}
</style>
<template>
<div class="supplementOrder">
<el-card>
<!-- 内容区 -->
<el-row class="content-area">
<!-- 左侧 -->
<el-col :span="6" class="left-area">
<el-row>
<el-button type="primary">新增</el-button>
<el-button type="primary">删除</el-button>
</el-row>
<el-row v-for="item in testData" :key="item.key" class="title-info">
<div>
<p>{{item.title}}</p>
</div>
<div>
<p>111</p>
<p>111</p>
<p>111</p>
<div>
<i class="el-icon-delete"></i>
</div>
</div>
</el-row>
</el-col>
<!-- 右侧 -->
<el-col :span="18" class="right-area">
<el-row class="right-title">
<div>货物筛选</div>
<div>当前装柜:第一部分</div>
<div>可预装方数:111m³,重量:22KG</div>
</el-row>
<!-- 搜索工作栏 -->
<el-row>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="始发地">111</el-form-item>
<el-form-item label="目的地" prop="destination">
<el-select v-model="queryParams.destination" placeholder="请选择目的地">
</el-select>
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search">搜索</el-button>
</el-form-item>
</el-form>
</el-row>
<!-- 表格 -->
<el-row>
<el-row class="table-title">
<div>EC1111111</div>
<div>发往:xxxxxxxxxx</div>
<div>我司全代</div>
<div>入仓时间:1111111</div>
<div>
<div>[全部预装]</div>
<div>[收起]</div>
</div>
</el-row>
<el-table v-loading="loading" :data="listData">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="订单号" align="center" prop="selfNo" />
<el-table-column label="货物信息" align="center" prop="cubNo" />
<el-table-column label="计划箱数" align="center" prop="cabinetId" />
<el-table-column label="实装箱数" align="center" prop="transportType" />
<el-table-column label="体积" align="center" prop="squareNumber" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="small">预装</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<!-- 分页 -->
<el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
</el-col>
</el-row>
</el-card>
<el-row>
<el-col :span="6" class="totle-info">
<div>
<p>总计:</p>
<p>111</p>
</div>
<div>
<p>容量:</p>
<p>111</p>
</div>
</el-col>
</el-row>
<el-row class="button-area">
<el-button type="primary">完成</el-button>
</el-row>
</div>
</template>
<script>
/**
* 补单
*/
export default {
name: "supplementOrder",
data() {
return {
// loading
loading: false,
// 二维码/条码编号
cabinetNo: "",
// 表格数据
listData: [
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
{
selfNo: "111aaa",
cubNo: "11111111111111111111111111",
},
],
// 左侧数据
testData: [
{
key: 1,
title: "第一部分",
},
{
key: 2,
title: "第二部分",
},
],
// 查询参数
queryParams: {},
};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.supplementOrder {
p {
margin: 0;
}
.content-area {
display: flex;
.left-area {
border-right: 3px solid #e6ebf5;
padding-right: 10px;
.title-info {
margin-top: 10px;
height: auto;
> div:first-child {
font-size: 16px;
background-color: #f2f2f2;
line-height: 30px;
text-align: center;
}
> :last-child {
display: flex;
align-items: center;
> p {
margin-right: 10px;
color: #4f9cdd;
}
> div {
flex: 1;
text-align: right;
> i {
cursor: pointer;
color: red;
}
}
}
}
}
.right-area {
padding-left: 10px;
.right-title {
display: flex;
align-items: center;
margin-bottom: 10px;
font-size: 16px;
> div:first-child {
font-size: 18px;
}
> div:first-child + div {
margin-left: 20px;
}
> div:last-child {
flex: 1;
text-align: right;
font-size: 18px;
color: red;
}
}
.table-title {
display: flex;
line-height: 30px;
background-color: #4f9cdd;
color: #fff;
> div {
margin-left: 10px;
}
> div:last-child {
flex: 1;
display: flex;
justify-content: flex-end;
> div {
margin-right: 10px;
}
}
}
.el-pagination {
margin-top: 10px;
padding: 0;
text-align: right;
}
}
}
.totle-info {
font-size: 20px;
margin-top: 15px;
> div {
display: flex;
margin-bottom: 5px;
}
}
.button-area {
text-align: center;
}
}
</style>
<template> <template>
<div class="app-container preinstall"> <div class="preinstall">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
...@@ -215,6 +215,9 @@ ...@@ -215,6 +215,9 @@
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
/**
* 预装
*/
export default { export default {
name: "preinstall", name: "preinstall",
components: {}, components: {},
...@@ -248,21 +251,22 @@ export default { ...@@ -248,21 +251,22 @@ export default {
operatorData: { operatorData: {
operator: null, operator: null,
}, },
// 校验
rules: { rules: {
operator: [ operator: [
{ required: true, message: "请选择目的地操作员", trigger: "change" }, { required: true, message: "必填", trigger: "change" },
], ],
}, },
}; };
}, },
computed: { computed: {
// 始发地 /** 始发地 */
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3" (item) => item.tradeType == "2" || item.type == "3"
); );
}, },
// 目的地 /** 目的地 */
importWarehouseList() { importWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3" (item) => item.tradeType == "1" || item.type == "3"
...@@ -270,6 +274,7 @@ export default { ...@@ -270,6 +274,7 @@ export default {
}, },
}, },
created() { created() {
// 查询仓库数据
getWarehouseList().then((res) => (this.warehouseList = res.data)); getWarehouseList().then((res) => (this.warehouseList = res.data));
// this.getList(); // this.getList();
}, },
......
<template> <template>
<div> <div>
<!-- 海运流程图 -->
<el-scrollbar :vertical="true" style="width: 100%;" viewClass="shipping-chart"> <el-scrollbar :vertical="true" style="width: 100%;" viewClass="shipping-chart">
<div v-for="(nodes,index) in chartData['sea']" :key="index" class="chart-nodes"> <div v-for="(nodes,index) in chartData['sea']" :key="index" class="chart-nodes">
<div> <div>
...@@ -18,37 +19,58 @@ ...@@ -18,37 +19,58 @@
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" destroy-on-close>
<booking @closeDialog="closeDialog" v-if="dialogConfig.type === 'booking'" /> <!-- 弹窗 -->
<trailer @closeDialog="closeDialog" v-if="dialogConfig.type === 'trailer'" /> <el-dialog custom-class="shipping-dialog" :title="dialogConfig.title" :visible.sync="dialogConfig.dialogVisible" :width="dialogConfig.width" :fullscreen="dialogConfig.fullscreen" :close-on-click-modal=false :modal-append-to-body=false append-to-body destroy-on-close>
<preinstall v-if="dialogConfig.type === 'preinstall'" /> <!-- 订舱 -->
<bookingWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'booking'" />
<!-- 拖车 -->
<trailerWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'trailer'" />
<!-- 预装 -->
<preinstallWidget v-if="dialogConfig.type === 'preinstall'" />
<!-- agent -->
<agentWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'agent'" /> <agentWidget @closeDialog="closeDialog" v-if="dialogConfig.type === 'agent'" />
<!-- 装柜 -->
<cabinetWidget :boxId="boxId" @closeDialog="closeDialog" v-if="dialogConfig.type === 'cabinet'" />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import booking from "./booking"; import bookingWidget from "./booking";
import trailer from "./trailer"; import trailerWidget from "./trailer";
import preinstall from "./preinstall"; import preinstallWidget from "./preinstall";
import agentWidget from "./agent"; import agentWidget from "./agent";
import cabinetWidget from "./cabinet";
/**
* 海运流程图
*/
export default { export default {
name: "shippingChart", name: "shippingChart",
components: { booking, trailer, preinstall, agentWidget }, components: {
bookingWidget,
trailerWidget,
preinstallWidget,
agentWidget,
cabinetWidget,
},
props: { props: {
shippingType: String, shippingType: String,
boxId: String, boxId: String,
}, },
data() { data() {
return { return {
// 弹窗配置
dialogConfig: { dialogConfig: {
dialogVisible: false, dialogVisible: false,
title: "", title: "",
width: "30%", width: "30%",
type: "", fullscreen: false,
type: "", // 标识
}, },
// 流程图节点
chartData: { chartData: {
sea: [ sea: [
[ [
...@@ -153,30 +175,36 @@ export default { ...@@ -153,30 +175,36 @@ export default {
}; };
}, },
methods: { methods: {
/** 关闭弹窗 */
closeDialog() { closeDialog() {
this.$set(this.dialogConfig, "dialogVisible", false); this.$set(this.dialogConfig, "dialogVisible", false);
}, },
setCommonAttr(node) { /** 节点点击 */
this.$set(this.dialogConfig, "dialogVisible", true);
this.$set(this.dialogConfig, "title", node.title);
this.$set(this.dialogConfig, "type", node.type);
},
nodeClick(node) { nodeClick(node) {
console.log(node); this.$set(this.dialogConfig, "title", node.title);
switch (node.type) { switch (node.type) {
// 订舱
case "booking": case "booking":
this.$set(this.dialogConfig, "width", "40%"); this.$set(this.dialogConfig, "width", "700px");
this.setCommonAttr(node); this.$set(this.dialogConfig, "fullscreen", false);
break; break;
// 拖车
case "trailer": case "trailer":
// AGENT
case "agent": case "agent":
this.$set(this.dialogConfig, "width", "25%"); // 装柜
this.setCommonAttr(node); case "cabinet":
this.$set(this.dialogConfig, "width", "500px");
this.$set(this.dialogConfig, "fullscreen", false);
break; break;
// 预装
case "preinstall": case "preinstall":
this.$router.push(`/boxSea/shippingSea/preinstall/${this.boxId}`); this.$set(this.dialogConfig, "fullscreen", true);
this.$set(this.dialogConfig, "title", "出货安排(预装)");
break; break;
} }
this.$set(this.dialogConfig, "dialogVisible", true);
this.$set(this.dialogConfig, "type", node.type);
}, },
}, },
}; };
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<div style="display: flex; justify-content: space-between;align-items: flex-end;"> <div style="display: flex; justify-content: space-between;align-items: flex-end;">
<h2>海运出货操作</h2> <h2>海运出货操作</h2>
</div> </div>
<!-- 信息 -->
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
<el-descriptions :column="5" border> <el-descriptions :column="5" border>
<el-descriptions-item label="自编号"></el-descriptions-item> <el-descriptions-item label="自编号"></el-descriptions-item>
...@@ -15,6 +17,7 @@ ...@@ -15,6 +17,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- 海运流程图 -->
<div class="shipping-flow"> <div class="shipping-flow">
<shippingChart :boxId="boxId" /> <shippingChart :boxId="boxId" />
</div> </div>
...@@ -25,7 +28,9 @@ ...@@ -25,7 +28,9 @@
<script> <script>
import shippingChart from "./shippingChart"; import shippingChart from "./shippingChart";
/**
* 海运操作主页面
*/
export default { export default {
name: "shippingSea", name: "shippingSea",
components: { components: {
...@@ -40,7 +45,10 @@ export default { ...@@ -40,7 +45,10 @@ export default {
<style lang="scss"> <style lang="scss">
.shipping-flow { .shipping-flow {
margin-top: 5px; margin-top: 5px;
// 页面内元素弹框form控件宽度设置 }
// 海运操作统一弹窗样式
.shipping-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content { .el-form-item__content {
> div { > div {
width: 100%; width: 100%;
......
...@@ -38,10 +38,14 @@ ...@@ -38,10 +38,14 @@
</template> </template>
<script> <script>
/**
* 拖车
*/
export default { export default {
name: "trailer", name: "trailer",
data() { data() {
return { return {
// 状态
status: [ status: [
{ {
value: "1", value: "1",
...@@ -56,13 +60,16 @@ export default { ...@@ -56,13 +60,16 @@ export default {
label: "已还柜", label: "已还柜",
}, },
], ],
// 拖车对象
trailer: {}, trailer: {},
// 校验
rules: { rules: {
time: [{ required: true, message: "请选择时间", trigger: "change" }], time: [{ required: true, message: "必填", trigger: "change" }],
}, },
}; };
}, },
methods: { methods: {
/** 提交 */
onSubmit() { onSubmit() {
this.$refs["trailerForm"].validate((valid) => { this.$refs["trailerForm"].validate((valid) => {
if (valid) { if (valid) {
...@@ -70,6 +77,7 @@ export default { ...@@ -70,6 +77,7 @@ export default {
} }
}); });
}, },
/** 取消 */
cancel() { cancel() {
this.$emit("closeDialog"); this.$emit("closeDialog");
}, },
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
import {getOffer,deleteOffer} from '@/api/ecw/offer' import {getOffer,deleteOffer} from '@/api/ecw/offer'
import {getProductAttrList} from '@/api/ecw/productAttr' import {getProductAttrList} from '@/api/ecw/productAttr'
import {getCustomerList,getCustomer} from '@/api/ecw/customer' import {getCustomerList,getCustomer} from '@/api/ecw/customer'
import {getChannelLists,getChannel} from '@/api/ecw/channel' import {getChannelList,getChannel} from '@/api/ecw/channel'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse' import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
export default { export default {
name: "detail", name: "detail",
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
that.list = response.data; that.list = response.data;
that.list.transportRespVOList.forEach((item)=>{ that.list.transportRespVOList.forEach((item)=>{
if(item.channelIds){ if(item.channelIds){
getChannelLists({ids:item.channelIds}).then(res=>{ getChannelList({ids:item.channelIds}).then(res=>{
item.channelData = res.data item.channelData = res.data
}) })
} }
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}} {{orderData.date?orderData.date:''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3">
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="始发地"> <el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}} {{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="目的地"> </el-descriptions>
{{importCityName(orderData.startWarehouseId)}} <el-descriptions :column="4">
</el-descriptions-item>
<el-descriptions-item label="发货人"> <el-descriptions-item label="发货人">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}} {{orderData.consignorVO?orderData.consignorVO.name||'':''}}
</el-descriptions-item> </el-descriptions-item>
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
<el-descriptions-item label="发货电话"> <el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}} {{orderData.consignorVO?orderData.consignorVO.phone||'':''}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="收货人"> <el-descriptions-item label="收货人">
{{orderData.consigneeVO?orderData.consigneeVO.name||'':''}} {{orderData.consigneeVO?orderData.consigneeVO.name||'':''}}
</el-descriptions-item> </el-descriptions-item>
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">合单申请-{{orderData.orderSn||''}}</div>
<el-descriptions :column="4">
<el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}}
</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum?orderData.sumNum:0+'/'+orderData.totalNum?orderData.totalNum:0}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}}
</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="出货渠道">
{{orderData.channelName||'/'}}
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="发货人姓名">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货公司">
{{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="收货人姓名">
{{orderData.consigneeVO?orderData.consigneeVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货公司">
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<!-- 列表 -->
<div slot="header" class="card-title">已合单订单</div>
<el-table v-loading="loading" border :data="list">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" scope="orderSn" />
<el-table-column label="唛头" align="center" scope="marks" />
<el-table-column label="始发地" align="center">
<template slot-scope="scope">
<span>{{importCityName(scope.row.startWarehouseId)}}</span>
</template>
</el-table-column>
<el-table-column label="入仓货物属性" align="center">
<template slot-scope="scope">
<span>合计:</span>
<span>{{scope.row.totalNum+''+scope.row.volume+''+scope.row.weight+'kg'}}</span>
</template>
</el-table-column>
<el-table-column label="入仓时间" align="center" prop='createTime' />
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
</el-card>
<el-card class="card">
<!-- 列表 -->
<div slot="header" class="card-title">待合单订单</div>
<el-table border :data="singleData" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" scope="orderSn" />
<el-table-column label="唛头" align="center" scope="marks" />
<el-table-column label="始发地" align="center">
<template slot-scope="scope">
<span>{{importCityName(scope.row.startWarehouseId)}}</span>
</template>
</el-table-column>
<el-table-column label="入仓货物属性" align="center">
<template slot-scope="scope">
<span>合计:</span>
<span>{{scope.row.totalNum+''+scope.row.volume+''+scope.row.weight+'kg'}}</span>
</template>
</el-table-column>
<el-table-column label="入仓时间" align="center" prop='createTime' />
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<el-row v-if="singleData.length>0">
<el-checkbox v-model="checked">需要仓库打包</el-checkbox>
</el-row>
</el-card>
<div slot="footer" class="card">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="submitForm">取消</el-button>
</div>
</div>
</template>
<script>
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
import {getChannel} from '@/api/ecw/channel'
export default {
name: "SingleApply",
components: {
},
data() {
return {
checked:false,
orderData:{},
// 订单异常列表
list: [],
singleData:[],
tradeCityList:[],
multipleSelection:[],
loading:false
};
},
created() {
// this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderExceptionPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.orderData = response.data
this.loading = false;
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:''
},
getChannelName(){
getChannel(this.orderData.channelId).then(res=>{
this.orderData.channelName = res.data.nameZh
})
},
submitForm(){
}
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card{
margin-top: 20px;
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-card>
<div slot="header" class="card-title">拆单申请-{{orderData.orderSn||''}}</div>
<div class="btn-header">
<span class="card-title">原单信息</span>
<div>
<span v-if="orderData.status==0" class="red">异常无法拆单</span>
<el-button v-else type="primary" @click="addSplit">新建拆单 </el-button>
</div>
</div>
<el-descriptions :column="4">
<el-descriptions-item label="唛头">
{{orderData.marks?orderData.marks:''}}
</el-descriptions-item>
<el-descriptions-item label="已到箱数/总箱数">
{{orderData.sumNum?orderData.sumNum:0+'/'+orderData.totalNum?orderData.totalNum:0}}
</el-descriptions-item>
<el-descriptions-item label="订单状态">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="orderData.status" />
</el-descriptions-item>
<el-descriptions-item label="送货日期">
{{orderData.date?orderData.date:''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item>
<el-descriptions-item label="始发地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="目的地">
{{importCityName(orderData.startWarehouseId)}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="发货人姓名">
{{orderData.consignorVO?orderData.consignorVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货公司">
{{orderData.consignorVO?orderData.consignorVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="发货电话">
{{orderData.consignorVO?orderData.consignorVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="4">
<el-descriptions-item label="收货人姓名">
{{orderData.consigneeVO?orderData.consigneeVO.name||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货公司">
{{orderData.consigneeVO?orderData.consigneeVO.company||'':''}}
</el-descriptions-item>
<el-descriptions-item label="收货电话">
{{orderData.consigneeVO?orderData.consigneeVO.phone||'':''}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card">
<!-- 列表 -->
<div slot="header" class="card-title">货物信息</div>
<el-table v-loading="loading" border :data="orderData.list" :summary-method="getSummaries" show-summary>
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="品名" align="center" scope="orderSn">
<template slot-scope="scope">
<el-row>{{scope.row.prodTitleEn}}</el-row>
<el-row>{{scope.row.prodTitleZh}}</el-row>
</template>
</el-table-column>
<el-table-column label="填单货物属性" align="center">
<template slot-scope="scope">
<el-row>
<span>品牌:
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</span>
</el-row>
<el-row>
<span>箱数:{{scope.row.totalNum}}</span>
</el-row>
<el-row>
<span>体积:{{scope.row.volume}}</span>
</el-row>
<el-row>
<span>重量:{{scope.row.weight}}kg</span>
</el-row>
</template>
</el-table-column>
<el-table-column label="入库货物属性" align="center">
<template slot-scope="scope">
<el-row>
<span>规格:{{scope.row.boxGauge}}</span>
</el-row>
<el-row>
<span>品牌:
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</span>
<span style="margin-left: 10px;">箱数:{{scope.row.totalNum}}</span>
<span style="margin-left: 10px;">体积:{{scope.row.volume}}</span>
<span style="margin-left: 10px;">重量:{{scope.row.weight}}kg</span>
</el-row>
</template>
</el-table-column>
<el-table-column label="最后操作时间" align="center" prop='createTime' />
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
</el-card>
<el-card class="card" v-if="splitData.length>0">
<!-- 列表 -->
<div slot="header" class="card-title">拆单信息</div>
<div v-for="(item, index) in splitData" :key="index">
<div class="btn-header">
<div>
<span class="card-title">
{{item.orderSn}}
</span>
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
<span>发往:{{importCityName(item.startWarehouseId)}}</span>
</div>
<div>
<el-button type="primary" @click="addShop(index)">放入</el-button>
<el-button type="primary" plain @click="deleteSplit(index)">删除</el-button>
</div>
</div>
<el-table border :data="item.list">
<el-table-column label="序号" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="中文名" align="center" scope="prodTitleZh" />
<el-table-column label="英文名" align="center" scope="prodTitleEn" />
<el-table-column label="品牌" align="center" scope="brandType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="scope.row.brandType" />
</template>
</el-table-column>
<el-table-column label="体积" align="center" >
<template slot-scope="scope">
<span>{{scope.row.volume}}</span>
</template>
</el-table-column>
<el-table-column label="重量" align="center">
<template slot-scope="scope">
<span>{{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="箱数" align="center">
<template slot-scope="scope">
<span>{{scope.row.num}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="removeShop(index,scope.$index)">移出</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<div slot="footer" class="card">
<el-button v-if="orderData.status!=0" type="primary" @click="submitForm">提交申请</el-button>
<el-button plain type="primary" @click="submitForm">取消</el-button>
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="新建拆单" :visible.sync="open" width="400px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-form-item label="运输方式">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="目的仓库:" >
<el-select v-model="form.destWarehouseId" placeholder="请选择目的仓库" @change="changeDest">
<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="出货渠道">
<el-select v-model="form.channelId" placeholder="请选择出货渠道">
<el-option v-for="item in channelData" :key="item.channelId" :label="item.nameZh" :value="item.channelId"/>
</el-select>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="haddleAdd">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="放入品名" :visible.sync="openShop" width="400px" append-to-body>
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="80px">
<el-row>
<el-form-item label="中文品名:">
<el-select v-model="shopForm.prodTitleZh" placeholder="请选择中文品名" @change="changeProdTitleZh">
<el-option v-for="item in splitData.list" :label="item.prodTitleZh" :value="item.prodTitleZh" :key="item.prodTitleZh" ></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="英文品名:" >
<el-select v-model="shopForm.prodTitleEn" placeholder="请选择英文品名" @change="changeProdTitleEn">
<el-option v-for="item in splitData.list" :label="item.prodTitleEn" :value="item.prodTitleEn" :key="item.prodTitleEn" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="剩余箱数:">
{{shopForm.sum||0}}
</el-form-item>
<el-form-item label="放入箱数:">
<el-input-number v-model="shopForm.num" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
</el-form-item>
<el-form-item label="备注信息:">
<el-input v-model="shopForm.remarks"></el-input>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="shopAdd">确 定</el-button>
<el-button @click="shopCancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getOrderExceptionPage} from "@/api/ecw/orderException"
import {getTradeCityList} from '@/api/ecw/region'
import {DICT_TYPE} from '@/utils/dict'
import {getChannelPage} from '@/api/ecw/channel'
export default {
name: "SplitApply",
components: {
},
data() {
return {
checked:false,
orderData:{},
splitData:[],
splitIndex:0,
channelData:[],
tradeCityList:[],
multipleSelection:[],
loading:false,
open:false,
form:{
},
openShop:false,
shopForm:{},
// 表单校验
rules: {
transportId: [{ required: true, message: "请选择运输方式", trigger: "blur" }],
warehouseIds: [{ required: true, message: "请选择目的仓库", trigger: "blur" }],
channelId: [{ required: true, message: "请选择出货渠道", trigger: "blur" }],
},
// 表单校验
shopRules: {
prodTitleZh: [{ required: true, message: "请选择中文品名", trigger: "blur" }],
prodTitleEn: [{ required: true, message: "请选择英文品名", trigger: "blur" }],
},
query:{
pageSize:20,
pageNo:1,
}
};
},
created() {
// this.getList();
getTradeCityList().then(res => this.tradeCityList = res.data)
},
computed:{
importCityList(){
return this.tradeCityList.filter(item => item.type == 1)
}
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderExceptionPage(this.queryParams).then(response => {
this.orderData = response.data
this.form.destWarehouseId = response.data.destWarehouseId
this.loading = false;
this.query.warehouseIds = response.data.destWarehouseId
this.getChannel()
});
},
getChannel(){
getChannelPage(this.query).then(res=>this.channelData = res.data.list)
},
changeDest(){
this.query.warehouseIds = this.form.destWarehouseId
this.getChannel()
},
getSummaries(){
const sums = [];
if(!this.orderData || !this.orderData.list ||ths.orderData.length==0){
return sums
}
sums[0] = '小计'
var orderSum = 0
var orderV = 0
var orderW = 0
var leviteSum = 0
var leviteV = 0
var leviteW = 0
this.orderData.list.forEach((column, index) => {
orderSum += column.orderSum
orderV += column.volume
orderW += column.weight
leviteSum += column.orderSum
leviteV += column.volume
leviteW += column.weight
});
sums[1] = ''
sums[2] = '下单统计:'+ orderSum+''+ orderV +'' + orderW + ' kg'
sums[3] = '入仓统计:'+ leviteSum+''+ leviteV +'' + leviteW + ' kg'
sums[4] = ''
sums[5] = ''
return sums;
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
importCityName(id){
var arr = this.tradeCityList.filter(item => item.id == id)
return arr.length>0?arr[0].titleZh:''
},
submitForm(){
},
addShop(index){
this.splitIndex = index
this.shopForm.prodTitleZh = this.orderData.list[0].prodTitleZh
this.shopForm.prodTitleEn = this.orderData.list[0].prodTitleEn
var sum = list.num
this.splitData.list.forEach((item)=>{
if(item.prodTitleZh == this.shopForm.prodTitleZh){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopOpen = true
},
addSplit(){
this.open = true
},
changeProdTitleZh(){
var list = []
list = this.orderData.list.filter(item=>item.prodTitleZh == this.shopForm.prodTitleZh)
var sum = list.num
this.splitData.list.forEach((item)=>{
if(item.prodTitleZh == this.shopForm.prodTitleZh){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopForm.prodTitleEn = list[0].prodTitleEn
},
changeProdTitleEn(){
var list = []
list = this.orderData.list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
var sum = list.num
this.splitData.list.forEach((item)=>{
if(item.prodTitleEn == this.shopForm.prodTitleEn){
sum -= item.num
}
})
this.shopForm.sum = sum
this.shopForm.prodTitleZh = list[0].prodTitleZh
},
haddleAdd(){
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
})
this.splitData.push(this.form)
if(this.splitData.length==0){
this.splitData[0].list = this.orderData.list
}
this.open = false
},
cancel(){
this.open = false
this.form = {}
},
shopAdd(){
this.$refs["shopForm"].validate(valid => {
if (!valid) {
return;
}
})
var isExit = this.splitData[this.splitIndex].list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
if(isExit&&isExit.length==1){
this.splitData[this.splitIndex].list.forEach((item)=>{
item.num = this.shopForm.num
item.remarks = this.shopForm.remarks
})
}else{
var list = this.orderData.list.filter(item=>item.prodTitleEn == this.shopForm.prodTitleEn)
list.num = this.shopForm.num
list.remarks = this.shopForm.remarks
this.splitData[this.splitIndex].list.push(list)
}
this.shopOpen = false
},
removeShop(splitIndex,index){
this.splitData[splitIndex].list.splice(index,1)
},
shopCancel(){
this.shopOpen = false
this.shopForm = {}
},
/** 删除按钮操作 */
deleteSplit(index) {
const orderId = this.splitData[index].orderSn
this.$modal.confirm('是否确认删除订单号为"' + orderId + '"的数据项?').then(function () {
this.splitData.splice(index,1)
}).then(() => {
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
}
}
</script>
<style>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.card{
margin-top: 20px;
}
.btn-header{
width: 80%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0;
}
.red{
color:#ff3430;
font-size: 15px;
}
</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