Commit b094be9f authored by huhaiqing's avatar huhaiqing

海运功能开发

parent b46d89d6
...@@ -55,6 +55,14 @@ export function exportboxExcel(query) { ...@@ -55,6 +55,14 @@ export function exportboxExcel(query) {
// 创建费用登记 // 创建费用登记
export function createCost(data) { export function createCost(data) {
if (data.id) {
return request({
url: "/ecw/box-cost/update",
method: "put",
data,
});
}
return request({ return request({
url: '/ecw/box-cost/create', url: '/ecw/box-cost/create',
method: 'post', method: 'post',
...@@ -62,6 +70,14 @@ export function createCost(data) { ...@@ -62,6 +70,14 @@ export function createCost(data) {
}) })
} }
// 删除费用登记
export function deleteCost(id) {
return request({
url: `/ecw/box-cost/delete?id=${id}`,
method: "delete",
})
}
// 审核详情 // 审核详情
export function approvalDetail(data) { export function approvalDetail(data) {
return request({ return request({
...@@ -72,6 +88,39 @@ export function approvalDetail(data) { ...@@ -72,6 +88,39 @@ export function approvalDetail(data) {
}) })
} }
// 出货操作日志列表
export function getLogList(params) {
return request({
url: '/ecw/box-op-log/list',
method: 'get',
params
})
}
// 获得费用登记列表
export function getCostList(params) {
return request({
url: '/ecw/box-cost/list',
method: 'get',
params
})
}
// 获得出货异常记录列表
export function getAbnormalList(params) {
return request({
url: '/ecw/box-abnormal/list',
method: 'get',
params
})
}
/**
* formData数据
*
* @param {*} params
* @return {*}
*/
function jsonToFormData(params) { function jsonToFormData(params) {
const formData = new FormData(); const formData = new FormData();
for (const [key, value] of Object.entries(params)) { for (const [key, value] of Object.entries(params)) {
......
...@@ -505,6 +505,21 @@ export function orderTagList(data) { ...@@ -505,6 +505,21 @@ export function orderTagList(data) {
}); });
} }
/**
* 单个装柜
*
* @export
* @param {*} data
* @return {*}
*/
export function singleCreate(data) {
return request({
url: "/ecw/box-load-info/singleCreate",
method: "post",
data,
});
}
/** /**
* 批量装柜 * 批量装柜
* *
...@@ -520,6 +535,21 @@ export function batchCreate(data) { ...@@ -520,6 +535,21 @@ export function batchCreate(data) {
}); });
} }
/**
* 单个删除已装柜标签
*
* @export
* @param {*} data
* @return {*}
*/
export function singleDelete(data) {
return request({
url: "/ecw/box-load-info/singleDelete",
method: "post",
data,
});
}
/** /**
* 批量删除已装柜标签 * 批量删除已装柜标签
* *
...@@ -695,27 +725,6 @@ export function extraCostList(params) { ...@@ -695,27 +725,6 @@ export function extraCostList(params) {
/***************************** 报关费用 end **********************************/ /***************************** 报关费用 end **********************************/
/**
* 服务提示消息回调
*
* @export
* @param {*} result
* @param {*} _vue
* @return {*}
*/
export function serviceMsg(result, _vue) {
return new Promise((resolve, reject) => {
const { code, msg } = result;
if (code === 0) {
_vue.$message.success("操作成功");
resolve();
} else {
_vue.$message.error(msg);
reject();
}
});
}
function jsonToFormData(params) { function jsonToFormData(params) {
const formData = new FormData(); const formData = new FormData();
for (const [key, value] of Object.entries(params)) { for (const [key, value] of Object.entries(params)) {
......
...@@ -49,7 +49,7 @@ a, ...@@ -49,7 +49,7 @@ a,
a:focus, a:focus,
a:hover { a:hover {
cursor: pointer; cursor: pointer;
color: inherit; // color: inherit;
text-decoration: none; text-decoration: none;
} }
......
<template> <template>
<div class="app-costForm"> <div class="app-costForm shippingSea-dialog">
<el-form ref="costForm" :model="costObj" label-width="80px"> <el-form ref="costForm" :model="costObj" label-width="80px">
<el-form-item label="操作步骤"> <el-form-item label="操作步骤">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<script> <script>
import { getSupplierPage } from "@/api/ecw/supplier"; import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box"; import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "@/api/ecw/boxSea"; import { serviceMsg } from "./shippingSea/utils";
export default { export default {
name: "costForm", name: "costForm",
...@@ -65,17 +65,19 @@ export default { ...@@ -65,17 +65,19 @@ export default {
const { data } = res; const { data } = res;
this.allSupplier = data.list; this.allSupplier = data.list;
}); });
const { costDetail } = this.$attrs;
this.costObj = { ...costDetail };
}, },
methods: { methods: {
submit() { submit() {
this.$refs["costForm"].validate((valid) => { this.$refs["costForm"].validate((valid) => {
if (valid) { if (valid) {
createCost({ createCost({
shipmentId: this.$attrs.currRow.id, shipmentId: this.$attrs.shipmentObj.id,
...this.costObj, ...this.costObj,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.$emit("closeDialog"); this.$emit("closeDialog", "cost");
}); });
}); });
} }
...@@ -84,3 +86,33 @@ export default { ...@@ -84,3 +86,33 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
<template>
<div class="shippingSea-dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="运输方式" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<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="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<div class="operate-button">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-form>
</div>
</template>
<script>
import { createbox, updatebox } from "@/api/ecw/box";
export default {
name: "editForm",
inheritAttrs: false,
props: {
transportTypes: Array,
warehouseList: Array,
cabinetList: Array,
shipmentObj: Object,
},
created() {
this.form = { ...this.shipmentObj };
},
data() {
return {
// 表单参数
form: {},
// 表单校验
rules: {
transportType: [
{ required: true, message: "运输方式不能为空", trigger: "blur" },
],
cabinetId: [
{ required: true, message: "柜型不能为空", trigger: "blur" },
],
startWarehouseId: [
{ required: true, message: "始发地不能为空", trigger: "blur" },
],
destWarehouseId: [
{ required: true, message: "目的地不能为空", trigger: "blur" },
],
},
};
},
methods: {
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.$emit("closeDialog", "edit");
});
return;
}
// 添加的提交
createbox(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.$emit("closeDialog", "add");
});
});
},
/** 取消按钮 */
cancel() {
this.$emit("closeDialog");
},
},
computed: {
exportWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
},
importWarehouseList() {
return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
},
},
};
</script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="自编号" prop="selfNo"> <el-form-item label="自编号" prop="selfNo">
<el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.selfNo" placeholder="请输入自编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="柜号" prop="cubNo"> <el-form-item label="柜号" prop="cubNo">
<el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery"/> <el-input v-model="queryParams.cubNo" placeholder="请输入柜号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="柜型" prop="cabinetId"> <el-form-item label="柜型" prop="cabinetId">
<el-select v-model="queryParams.cabinetId" placeholder="请选择柜型"> <el-select v-model="queryParams.cabinetId" placeholder="请选择柜型">
...@@ -34,27 +34,21 @@ ...@@ -34,27 +34,21 @@
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"/>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="boxStatus"> <el-form-item label="状态" prop="boxStatus">
<el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small"> <el-select v-model="queryParams.boxStatus" placeholder="请选择状态" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)" <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_SHIPMENT_STATUS)" :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-form-item label="运输方式" prop="transportType">
<el-select v-model="queryParams.transportType" placeholder="请选择运输方式" clearable size="small"> <el-select v-model="queryParams.transportType" placeholder="请选择运输方式" clearable size="small">
<el-option v-for="dict in transportTypes" <el-option v-for="dict in transportTypes" :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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
...@@ -64,14 +58,11 @@ ...@@ -64,14 +58,11 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <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-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['shipment:box:export']">导出
:loading="exportLoading"
v-hasPermi="['shipment:box:export']">导出
</el-button> </el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -81,10 +72,10 @@ ...@@ -81,10 +72,10 @@
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="自编号" align="center" prop="selfNo"> <el-table-column label="自编号" align="center" prop="selfNo">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'detail')">{{ scope.row.selfNo }}</el-button> <a href="javascript:void(0)" @click="handleCommand(scope.row, 'detail')">{{ scope.row.selfNo }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="柜号" align="center" prop="cubNo"/> <el-table-column label="柜号" align="center" prop="cubNo" />
<el-table-column label="柜型" align="center" prop="cabinetId"> <el-table-column label="柜型" align="center" prop="cabinetId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCabinetName(scope.row.cabinetId) }}</span> <span>{{ getCabinetName(scope.row.cabinetId) }}</span>
...@@ -92,16 +83,16 @@ ...@@ -92,16 +83,16 @@
</el-table-column> </el-table-column>
<el-table-column label="运输方式" align="center" prop="transportType"> <el-table-column label="运输方式" align="center" prop="transportType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType"/> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方数(预装/已装)" align="center" prop="squareNumber"/> <el-table-column label="方数(预装/已装)" align="center" prop="squareNumber" />
<el-table-column label="重量(预装/已装)" align="center" prop="weight"/> <el-table-column label="重量(预装/已装)" align="center" prop="weight" />
<el-table-column label="状态" align="center" prop="boxStatus"> <el-table-column label="状态" align="center" prop="boxStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus"/> <dict-tag :type="DICT_TYPE.BOX_SHIPMENT_STATUS" :value="scope.row.boxStatus" />
</template> </template>
</el-table-column> </el-table-column>
...@@ -142,80 +133,48 @@ ...@@ -142,80 +133,48 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
@pagination="getList"/>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="shippingSea-dialog"> <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body class="shippingSea-dialog">
<template v-if="dialogType === 'edit' || dialogType === 'add'"> <template v-if="dialogType === 'edit' || dialogType === 'add'">
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <editForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
<el-form-item label="运输方式" prop="transportType">
<el-radio-group v-model="form.transportType">
<el-radio v-for="dict in transportTypes" :key="dict.value" :label="dict.value">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="柜型" prop="cabinetId">
<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="startWarehouseId">
<el-select v-model="form.startWarehouseId" placeholder="请选择始发地">
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目的地" prop="destWarehouseId">
<el-select v-model="form.destWarehouseId" placeholder="请选择目的地">
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div class="operate-button">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template> </template>
<template v-if="dialogType === 'cost'"> <template v-if="dialogType === 'cost'">
<costForm v-if="open" @closeDialog="closeDialog" :currRow="currRow"/> <costForm v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
<template v-if="dialogType === 'error'"> <template v-if="dialogType === 'error'">
<regError v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow"/> <regError v-if="open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {createbox, updatebox, deletebox, getbox, getboxPage, exportboxExcel} from "@/api/ecw/box"; import { deletebox, getbox, getboxPage, exportboxExcel } from "@/api/ecw/box";
import {getCabinetPage} from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse";
import { DICT_TYPE } from '@/utils/dict'; import costForm from "./costForm.vue";
import costForm from './costForm.vue' import regError from "./regError.vue";
import regError from './regError.vue' import editForm from "./editForm.vue";
export default { export default {
name: "box", name: "indexSea",
components: { components: {
costForm, costForm,
regError regError,
editForm,
}, },
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: "到港时间" },
{value:'5', label:'清关时间'}, { value: "5", label: "清关时间" },
{value:'6', label:'提货时间'}, { value: "6", label: "提货时间" },
], ],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -239,60 +198,40 @@ ...@@ -239,60 +198,40 @@
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
id: null,
selfNo: null,
cubNo: null,
cabinetId: null,
boxStatus: null,
startWarehouseId: null,
destWarehouseId: null,
transportType: null,
}, },
cabinetList:[], cabinetList: [],
warehouseList: [], warehouseList: [],
transportTypes: [],
transportTypes:this.getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE),
// 表单参数
form: {},
// 表单校验
rules: {
transportType: [{ required: true, message: "运输方式不能为空", trigger: "blur" }],
cabinetId: [{ required: true, message: "柜型不能为空", trigger: "blur" }],
startWarehouseId: [{ required: true, message: "始发地不能为空", trigger: "blur" }],
destWarehouseId: [{ required: true, message: "目的地不能为空", trigger: "blur" }],
}
}; };
}, },
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '2' || item.type == '3') return this.warehouseList.filter(
(item) => item.tradeType == "2" || item.type == "3"
);
}, },
importWarehouseList() { importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == '1' || item.type == '3') return this.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
);
}, },
getCabinetName() { getCabinetName() {
return cabinetId => { return (cabinetId) => {
for (let index in this.cabinetList) { for (let index in this.cabinetList) {
let cabinetItem = this.cabinetList[index]; let cabinetItem = this.cabinetList[index];
if (cabinetItem.id == cabinetId) { if (cabinetItem.id == cabinetId) {
return cabinetItem.name; return cabinetItem.name;
} }
} }
return '/' };
} },
}
}, },
created() { created() {
this.transportTypes = this.getDictDatas(
this.transportTypes = this.transportTypes.filter(item => item.value == '1' || item.value == '2'); this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2");
getWarehouseList().then((res) => (this.warehouseList = 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;
}); });
this.getList(); this.getList();
...@@ -302,32 +241,16 @@ ...@@ -302,32 +241,16 @@
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.transportTypeList = ['1', '2']; params.transportTypeList = ["1", "2"];
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询 // 执行查询
getboxPage(params).then(response => { getboxPage(params).then((response) => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
cabinetId: undefined,
startWarehouseId: undefined,
destWarehouseId: undefined,
transportType: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
...@@ -341,140 +264,93 @@ ...@@ -341,140 +264,93 @@
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset();
this.open = true; this.open = true;
this.title = "添加出货"; this.title = "添加出货";
this.dialogType = "add"; this.dialogType = "add";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset();
const id = row.id; const id = row.id;
getbox(id).then(response => { getbox(id).then((response) => {
this.form = response.data; this.currRow = response.data;
this.open = true; this.open = true;
this.title = "修改出货"; this.title = "修改出货";
this.dialogType = "edit"; this.dialogType = "edit";
}); });
}, },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updatebox(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createbox(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm('是否确认删除出货编号为"' + id + '"的数据项?').then(function () { this.$modal
.confirm('是否确认删除出货编号为"' + id + '"的数据项?')
.then(function () {
return deletebox(id); return deletebox(id);
}).then(() => { })
.then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => { })
}); .catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams };
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行导出 // 执行导出
this.$modal.confirm('是否确认导出所有出货数据项?').then(() => { this.$modal
.confirm("是否确认导出所有出货数据项?")
.then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportboxExcel(params); return exportboxExcel(params);
}).then(response => { })
this.$download.excel(response, '${table.classComment}.xls'); .then((response) => {
this.$download.excel(response, "${table.classComment}.xls");
this.exportLoading = false; this.exportLoading = false;
}).catch(() => { })
}); .catch(() => {});
}, },
closeDialog() { /* 关闭弹窗 */
closeDialog(type) {
this.open = false; this.open = false;
if (type === "add" || type === "edit") {
this.getList();
}
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleCommand(row, command) { handleCommand(row, command) {
switch (command) { switch (command) {
case 'sea': case "sea":
this.$router.push('/boxSea/shippingSea/' + row.id) this.$router.push("/boxSea/shippingSea/" + row.id);
break; break;
case 'edit': case "edit":
this.handleUpdate(row); this.handleUpdate(row);
break; break;
case 'delete': case "delete":
this.handleDelete(row); this.handleDelete(row);
break; break;
case 'cost': case "cost":
this.title = '费用登记' this.title = "费用登记";
this.dialogType = 'cost'; this.dialogType = "cost";
this.open = true; this.open = true;
this.currRow = row; this.currRow = row;
break; break;
case 'error': case "error":
this.title = '异常登记' this.title = "异常登记";
this.dialogType = 'error'; this.dialogType = "error";
this.open = true; this.open = true;
this.currRow = row; this.currRow = row;
break; break;
case 'detail': case "detail":
this.$router.push('/boxSea/query/' + row.id) this.$router.push("/boxSea/query/" + row.id);
break; break;
} }
}, },
} },
}; };
</script> </script>
<style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style>
<template> <template>
<div> <div class="app-container shipping-detail">
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center"> <el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="19"> <el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="22">
<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-button size="small">编辑</el-button> <el-button size="small" @click="handleCommand('edit')">编辑</el-button>
<el-button size="small">操作</el-button> <el-button size="small" @click="handleCommand('router')">操作</el-button>
<el-button type="primary" size="small">异常登记</el-button> <el-button type="primary" size="small" @click="handleCommand('error')">异常登记</el-button>
<el-button type="primary" size="small">费用登记</el-button> <el-button type="primary" size="small" @click="handleCommand('cost')">费用登记</el-button>
<el-button type="danger" size="small">删除</el-button> <el-popconfirm title="确定是否删除" @confirm="handleCommand('delete')" style="marginLeft:10px;">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</div> </div>
</div> </div>
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
...@@ -44,55 +46,115 @@ ...@@ -44,55 +46,115 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-tabs style="margin-top: 15px" type="border-card"> <el-tabs style="margin-top: 15px" type="border-card" value="detail">
<el-tab-pane label="明细"> <el-tab-pane label="明细" name="detail">
<div class="detail-pane"> <div class="detail-pane">
<p>当前部分:</p> <div>当前部分:</div>
<el-select placeholder="请选择" v-model="sectionId" @change="sectionChange"> <el-select placeholder="请选择" v-model="sectionId" @change="sectionChange">
<el-option key="0" label="全部" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option> <el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select> </el-select>
<p class="box-weight"> <p class="box-weight">
{{getSectionInfo}} {{getSectionInfo}}
</p> </p>
<p class="document-status">单证状态:我司全代</p> <div class="document-status">
<p>单证状态:</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" />
</template>
</div>
</div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border>
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column prop="orderNo" label="订单号" align="center"></el-table-column>
<el-table-column prop="goodsList" label="货物信息" width="250px" align="center">
<template v-slot="{row}">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
{{index+1}}{{item.prodTitleZh}}
</div>
</section>
</template>
</el-table-column>
<el-table-column prop="num" label="计划箱数" align="center"></el-table-column>
<el-table-column prop="installNum" label="实装箱数" align="center"></el-table-column>
<el-table-column prop="unloadNum" label="卸柜箱数" align="center"></el-table-column>
<el-table-column prop="destWarehouseName" label="提货点" align="center"></el-table-column>
<el-table-column prop="volume" label="体积" align="center"></el-table-column>
<el-table-column prop="weight" label="重量" align="center"></el-table-column>
<el-table-column prop="totalWorth" label="货值" align="center"></el-table-column>
<el-table-column prop="customsType" label="报关方式" align="center">
<template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'customsType-red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div> </div>
<el-table :data="[]" style="width: 100%"> </template>
<el-table-column prop="" label="序号"> </el-table-column> </el-table-column>
<el-table-column prop="" label="订单号"> </el-table-column> <el-table-column prop="customsFee" label="报关费用" align="center"></el-table-column>
<el-table-column prop="" label="货物信息"> </el-table-column>
<el-table-column prop="" label="计划箱数"> </el-table-column>
<el-table-column prop="" label="实装箱数"> </el-table-column>
<el-table-column prop="" label="卸柜箱数"> </el-table-column>
<el-table-column prop="" label="提货点"> </el-table-column>
<el-table-column prop="" label="体积"> </el-table-column>
<el-table-column prop="" label="重量"> </el-table-column>
<el-table-column prop="" label="货值"> </el-table-column>
<el-table-column prop="" label="报关方式"> </el-table-column>
<el-table-column prop="" label="报关费用"> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="状态"></el-tab-pane> <el-tab-pane label="状态" name="status">
<el-tab-pane label="费用"> <div v-for="(item, index) in logList" :key="item.id" :class="`shipping-status ${index === 0 ? 'curr-status' : '' }`">
<el-table :data="[]" style="width: 100%"> <div class="status-line"></div>
<el-table-column prop="" label="序号"> </el-table-column> <div class="status-number">{{logList.length - index}}</div>
<el-table-column prop="" label="费用类型"> </el-table-column> <div class="status-info">
<el-table-column prop="" label="供应商"> </el-table-column> <div>{{item.titleZh}}</div>
<el-table-column prop="" label="金额"> </el-table-column> <div>
<el-table-column prop="" label="实付金额"> </el-table-column> <p>{{formatDate(item.createTime)}}</p>
<el-table-column prop="" label="实付日期"> </el-table-column> <p>{{item.operator}}</p>
<el-table-column prop="" label="操作"> </el-table-column> </div>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="费用" name="fee">
<el-table :data="costList" style="width: 100%" border>
<el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column prop="costType" label="费用类型" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="scope.row.costType" />
</template>
</el-table-column>
<el-table-column prop="supplierId" label="供应商" align="center">
<template slot-scope="scope">
{{getSupplier(scope.row.supplierId)}}
</template>
</el-table-column>
<el-table-column prop="price" label="金额" align="center"></el-table-column>
<el-table-column prop="" label="实付金额" align="center"></el-table-column>
<el-table-column prop="" label="实付日期" align="center"></el-table-column>
<el-table-column prop="" label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editCostClick(scope.row)" style="marginRight:10px;">编辑</el-button>
<el-popconfirm title="确定是否删除" @confirm="deleteCostClick(scope.row)">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="异常"> <el-tab-pane label="异常" name="error">
<el-table :data="[]" style="width: 100%"> <el-table :data="errorList" style="width: 100%" border>
<el-table-column prop="" label="序号"> </el-table-column> <el-table-column type="index" align="center" label="序号" width="50" />
<el-table-column prop="" label="操作步骤"> </el-table-column> <el-table-column prop="opStep" label="操作步骤" align="center">
<el-table-column prop="" label="异常"> </el-table-column> <template slot-scope="scope">
<el-table-column prop="" label="异常详情"> </el-table-column> <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PROCESS" :value="scope.row.opStep" />
<el-table-column prop="" label="异常时间"> </el-table-column> </template>
</el-table-column>
<el-table-column prop="billAbnId" label="异常" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.opStep" />
</template>
</el-table-column>
<el-table-column prop="abnDetail" label="异常详情" align="center" width="800"></el-table-column>
<el-table-column prop="" label="异常时间" align="center">
<template slot-scope="scope">
<span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span>
<span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="表单"> <el-tab-pane label="表单" name="download">
<el-table :data="[]" style="width: 50%"> <el-table :data="[]" style="width: 50%">
<el-table-column prop="" label="文件类型"> </el-table-column> <el-table-column prop="" label="文件类型"> </el-table-column>
<el-table-column prop="" label="下载链接"> </el-table-column> <el-table-column prop="" label="下载链接"> </el-table-column>
...@@ -101,11 +163,31 @@ ...@@ -101,11 +163,31 @@
</el-tabs> </el-tabs>
</el-col> </el-col>
</el-row> </el-row>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.visible" :width="dialogConfig.width" append-to-body class="shippingSea-dialog">
<template v-if="dialogConfig.type === 'edit'">
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" />
</template>
<template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" />
</template>
<template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" />
</template>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getbox } from "@/api/ecw/box"; import {
getbox,
getLogList,
getCostList,
getAbnormalList,
deleteCost,
deletebox,
} from "@/api/ecw/box";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
...@@ -113,42 +195,32 @@ import { ...@@ -113,42 +195,32 @@ import {
getSeaStatus, getSeaStatus,
getStatusName, getStatusName,
getTotlContent, getTotlContent,
formatDate,
serviceMsg,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getSectionList, boxGoodsDetail } from "@/api/ecw/boxSea"; import { getSectionList, boxGoodsDetail } from "@/api/ecw/boxSea";
import { getSupplierPage } from "@/api/ecw/supplier";
import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
export default { export default {
name: "boxDetail", name: "boxDetail",
props: { props: {
shipmentId: String, shipmentId: String,
}, },
components: {}, components: {
costForm,
regError,
editForm,
},
created() { created() {
// 查询出货信息 console.log();
getbox(this.shipmentId).then((res) => { this.transportTypes = this.getDictDatas(
const { data } = res; this.DICT_TYPE.ECW_TRANSPORT_TYPE
this.shipmentObj = data ?? {}; ).filter((item) => item.value == "1" || item.value == "2");
}); this.initData();
// 查询渠道 this.queryAllData();
getChannelList().then((res) => (this.channelList = res.data));
// 查询柜型
getCabinetPage(null).then(
(response) => (this.cabinetList = response.data.list)
);
// 仓库
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
// 部分
getSectionList({ shipmentId: this.shipmentId }).then((res) => {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: `第${index + 1}部分`,
};
});
});
// 装柜明细
this.getBoxGoodsDetail(0);
}, },
data() { data() {
return { return {
...@@ -160,29 +232,187 @@ export default { ...@@ -160,29 +232,187 @@ export default {
cabinetList: [], cabinetList: [],
// 仓库 // 仓库
warehouseList: [], warehouseList: [],
// 供应商
allSupplier: [],
// 部分list // 部分list
sectionList: [], sectionList: [],
// 单证数组
docStatus: [],
// 操作日志
logList: [],
// 费用
costList: [],
// 异常
errorList: [],
// 部分订单商品 // 部分订单商品
sectionObj: { sectionObj: {
secStatistics: {}, secStatistics: {},
sectionOrderList: [], sectionOrderList: [],
totalStatistics: {}, totalStatistics: {},
}, },
sectionId: "", // 部分ID
sectionId: "0",
// 弹窗配置
dialogConfig: {
visible: false,
title: "",
width: "600px",
type: "",
},
// 运输方式
transportTypes: [],
// 费用详情
costDetail: {},
}; };
}, },
methods: { methods: {
sectionChange(val) { // 初始化字典数据
console.log(val) initData() {
this.getBoxGoodsDetail(this.sectionId) // 查询渠道
getChannelList().then((res) => (this.channelList = res.data));
// 查询柜型
getCabinetPage(null).then(
(response) => (this.cabinetList = response.data.list)
);
// 仓库
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});
}, },
getBoxGoodsDetail(secId) { // 查询详情页所有数据
boxGoodsDetail({ shipmentId: this.shipmentId, secId }).then((res) => { queryAllData() {
let param = { shipmentId: this.shipmentId };
// 查询出货信息
this.getBoxDetail();
// 部分
getSectionList(param).then((res) => {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: `第${index + 1}部分`,
};
});
});
// 明细
this.getBoxGoodsDetail();
// 状态
getLogList(param).then((res) => {
this.logList = res.data;
});
// 费用
this.getCost();
// 异常
getAbnormalList(param).then((res) => {
this.errorList = res.data;
});
//表单
},
// 出货信息
getBoxDetail() {
getbox(this.shipmentId).then((res) => {
const { data } = res;
this.shipmentObj = data ?? {};
});
},
// 获取费用
getCost() {
getCostList({ shipmentId: this.shipmentId }).then((res) => {
this.costList = res.data;
});
},
// 部分切换
sectionChange() {
this.getBoxGoodsDetail();
},
// 获取部分详情以及物品
getBoxGoodsDetail() {
boxGoodsDetail({
shipmentId: this.shipmentId,
secId: this.sectionId,
}).then((res) => {
this.sectionObj = res.data; this.sectionObj = res.data;
}); });
}, },
// 供应商
getSupplier(id) {
let arr = this.allSupplier.find((item) => item.id == id) ?? {};
return arr.companyZh ?? "";
},
editCostClick(row) {
this.costDetail = row;
this.handleCommand("cost");
},
deleteCostClick(row) {
deleteCost(row.id).then((res) => {
serviceMsg(res, this).then((res) => {
this.getCost();
});
});
},
// 事件执行
handleCommand(type) {
switch (type) {
case "edit":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", "修改出货");
this.$set(this.dialogConfig, "type", "edit");
break;
case "router":
this.$router.push("/boxSea/shippingSea/" + this.shipmentId);
break;
case "cost":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", "费用登记");
this.$set(this.dialogConfig, "type", "cost");
break;
case "error":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", "异常登记");
this.$set(this.dialogConfig, "type", "error");
break;
case "delete":
deletebox(this.shipmentId).then((res) => {
serviceMsg(res, this).then((res) => {
this.$router.push("/shipment/boxSea");
});
});
break;
}
},
// 关闭弹框
closeDialog(type) {
this.$set(this.dialogConfig, "visible", false);
if (type === "edit") {
this.getBoxDetail();
}
if (type === "cost") {
this.getCost();
}
if (type === "error") {
getAbnormalList({ shipmentId: this.shipmentId }).then((res) => {
this.errorList = res.data;
});
}
},
formatDate,
}, },
computed: { computed: {
// 单证状态
getDocStatus() {
return (list = []) => {
// 获取类型
let customsTypes = list.map((item) => item.customsType);
// 去重
return Array.from(new Set(customsTypes));
};
},
/* 渠道 */ /* 渠道 */
getShipChannelName() { getShipChannelName() {
return (shippingChannelId) => { return (shippingChannelId) => {
...@@ -190,7 +420,6 @@ export default { ...@@ -190,7 +420,6 @@ export default {
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh; return channelItem.nameZh;
} }
return "/";
} }
}; };
}, },
...@@ -201,7 +430,6 @@ export default { ...@@ -201,7 +430,6 @@ export default {
if (cabinetItem.id == cabinetId) { if (cabinetItem.id == cabinetId) {
return cabinetItem.name; return cabinetItem.name;
} }
return "/";
} }
}; };
}, },
...@@ -242,15 +470,78 @@ export default { ...@@ -242,15 +470,78 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.detail-pane { .shipping-detail {
.detail-pane {
display: flex; display: flex;
align-items: center;
margin-bottom: 5px;
.box-weight { .box-weight {
margin-left: 10px; margin-left: 10px;
} }
.document-status { .document-status {
flex: 1; flex: 1;
text-align: right; justify-content: flex-end;
display: flex;
align-items: center;
> span {
margin-right: 10px;
}
}
}
.el-table__body {
.customsType-red {
color: red;
}
}
.shipping-status {
position: relative;
display: flex;
.status-line {
width: 1px;
height: calc(100% - 35px);
background-color: #e8eaec;
position: absolute;
left: 13px;
top: 30px;
}
.status-number {
width: 26px;
height: 26px;
border: 1px solid #ccc;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.status-info {
color: #999;
margin-left: 20px;
> :first-child {
font-size: 14px;
font-weight: bolder;
line-height: 26px;
}
> :last-child {
line-height: 26px;
display: flex;
> p {
margin: 0;
margin-right: 10px;
}
}
}
&.curr-status {
.status-number {
color: #fff;
background-color: #2d8cf0;
border-color: #2d8cf0;
}
.status-info {
color: #666;
}
}
} }
} }
</style> </style>
<template> <template>
<div> <div class="shippingSea-dialog">
<el-form ref="errorForm" :model="errorObj" label-width="140px"> <el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item label="操作步骤"> <el-form-item label="操作步骤">
<el-select v-model="errorObj.opStep" placeholder="请选择操作步骤"> <el-select v-model="errorObj.opStep" placeholder="请选择操作步骤">
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
</template> </template>
<script> <script>
import { abnormalCreate, serviceMsg } from "@/api/ecw/boxSea"; import { abnormalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "./shippingSea/utils";
/** /**
* 异常登记 * 异常登记
*/ */
...@@ -78,7 +79,7 @@ export default { ...@@ -78,7 +79,7 @@ export default {
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.$emit("closeDialog"); this.$emit("closeDialog", "error");
}); });
}); });
} }
...@@ -88,5 +89,32 @@ export default { ...@@ -88,5 +89,32 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
// 海运操作统一弹窗样式
.shippingSea-dialog {
// 页面内元素弹窗form控件宽度设置
.el-form-item__content {
> div:not(.el-input-number) {
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
}
}
}
}
</style> </style>
...@@ -186,7 +186,6 @@ export default { ...@@ -186,7 +186,6 @@ export default {
if (channelItem.channelId == shippingChannelId) { if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh; return channelItem.nameZh;
} }
return "/";
} }
}; };
}, },
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
</template> </template>
<script> <script>
import { agentSet, serviceMsg } from "@/api/ecw/boxSea"; import { agentSet } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue"; import supplierSelect from "./common/supplierSelect.vue";
import { formatStringNumber } from "../utils"; import { formatStringNumber, serviceMsg } from "../utils";
/** /**
* agent * agent
*/ */
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
<script> <script>
import regError from "../../regError"; import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea"; import { arrivalCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils"; import { formatDateStr, serviceMsg } from "../utils";
/** /**
* 到港 * 到港
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
</template> </template>
<script> <script>
import { bargeCreate, serviceMsg } from "@/api/ecw/boxSea"; import { bargeCreate } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString } from "../utils"; import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
/** /**
* 驳船 * 驳船
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
</template> </template>
<script> <script>
import { ladingCopyCreate, serviceMsg } from "@/api/ecw/boxSea"; import { ladingCopyCreate } from "@/api/ecw/boxSea";
import FileUpload from "@/components/FileUpload"; import FileUpload from "@/components/FileUpload";
import { fileTypes } from "../utils"; import { fileTypes, serviceMsg } from "../utils";
/** /**
* 提单copy * 提单copy
......
...@@ -85,11 +85,11 @@ ...@@ -85,11 +85,11 @@
</template> </template>
<script> <script>
import { booking, serviceMsg } from "@/api/ecw/boxSea"; import { booking } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue"; import supplierSelect from "./common/supplierSelect.vue";
import dockSelect from "./common/dockSelect.vue"; import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatStringNumber, formatDateStr } from "../utils"; import { formatStringNumber, formatDateStr, serviceMsg } from "../utils";
/** /**
* 订舱 * 订舱
*/ */
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
<script> <script>
import startPacking from "./startPacking.vue"; import startPacking from "./startPacking.vue";
import { cabinetCreate, serviceMsg } from "@/api/ecw/boxSea"; import { cabinetCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils"; import { formatDateStr, serviceMsg } from "../../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
/** /**
......
...@@ -196,14 +196,15 @@ import { getCabinetPage } from "@/api/ecw/cabinet"; ...@@ -196,14 +196,15 @@ import { getCabinetPage } from "@/api/ecw/cabinet";
import { import {
loadSecGoodsList, loadSecGoodsList,
orderTagList, orderTagList,
singleCreate,
batchCreate, batchCreate,
singleDelete,
batchDelete, batchDelete,
remove, remove,
serviceMsg,
boxUpdate, boxUpdate,
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { getTotlContent } from "../../utils"; import { getTotlContent, serviceMsg } from "../../utils";
/** /**
* 开始装柜 * 开始装柜
...@@ -354,12 +355,18 @@ export default { ...@@ -354,12 +355,18 @@ export default {
this.handlerBatchCreate("batch"); this.handlerBatchCreate("batch");
} }
if (formName === "correctionForm") { if (formName === "correctionForm") {
this.handlerBatchDelete({ this.handlerBatchDelete(
{
orderNumCode: this.correctionObj.qrCode, orderNumCode: this.correctionObj.qrCode,
}); },
"single"
);
} }
if (formName === "orderForm") { if (formName === "orderForm") {
this.handlerBatchDelete({ orderNo: this.orderObj.orderNo }); this.handlerBatchDelete(
{ orderNo: this.orderObj.orderNo },
"batch"
);
} }
if (formName === "modifyForm") { if (formName === "modifyForm") {
this.modifyBoxUpdate(); this.modifyBoxUpdate();
...@@ -383,28 +390,41 @@ export default { ...@@ -383,28 +390,41 @@ export default {
return; return;
} }
params.orderNumCode = this.qrCode; params.orderNumCode = this.qrCode;
singleCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
} else { } else {
params.orderNo = this.batchObj.qrCode; params.orderNo = this.batchObj.qrCode;
}
batchCreate(params).then((res) => { batchCreate(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
}
}, },
/* 删除已装柜 */ /* 删除已装柜 */
handlerBatchDelete(params) { handlerBatchDelete(params, type) {
params = { params = {
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
secId: this.tableData.id, secId: this.tableData.id,
...params, ...params,
}; };
if (type === "single") {
singleDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
} else {
batchDelete(params).then((res) => { batchDelete(params).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList(); this.getLoadSecGoodsList();
}); });
}); });
}
}, },
/* 移出 */ /* 移出 */
moveOut(row) { moveOut(row) {
......
...@@ -145,11 +145,10 @@ import { ...@@ -145,11 +145,10 @@ import {
preloadPage, preloadPage,
createSection, createSection,
deleteSection, deleteSection,
serviceMsg,
createGoods, createGoods,
remove, remove,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { formatDate, getTotlContent } from "../../utils"; import { formatDate, getTotlContent, serviceMsg } from "../../utils";
/** /**
* 补单 * 补单
*/ */
......
...@@ -65,12 +65,13 @@ ...@@ -65,12 +65,13 @@
</template> </template>
<script> <script>
import { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea"; import { clearanceDocCreate } from "@/api/ecw/boxSea";
import { import {
constantDict, constantDict,
formatDateStr, formatDateStr,
formatNumberString, formatNumberString,
fileTypes, fileTypes,
serviceMsg,
} from "../utils"; } from "../utils";
import FileUpload from "@/components/FileUpload"; import FileUpload from "@/components/FileUpload";
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<script> <script>
import regError from "../../regError"; import regError from "../../regError";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea"; import { clearanceCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils"; import { formatDateStr, serviceMsg } from "../utils";
/** /**
* 清关 * 清关
......
...@@ -131,14 +131,13 @@ ...@@ -131,14 +131,13 @@
import supplierSelect from "./common/supplierSelect.vue"; import supplierSelect from "./common/supplierSelect.vue";
import { import {
customsCreate, customsCreate,
serviceMsg,
extraCostList, extraCostList,
extraCostOrder, extraCostOrder,
extraCostCreate, extraCostCreate,
extraCostUpdate, extraCostUpdate,
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr } from "../utils"; import { formatNumberString, formatDateStr, serviceMsg } from "../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
/** /**
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<script> <script>
import regError from "../../regError"; import regError from "../../regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea"; import { shippingCreate } from "@/api/ecw/boxSea";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { formatDateStr } from "../utils"; import { formatDateStr, serviceMsg } from "../utils";
/** /**
* 起运 * 起运
......
...@@ -122,7 +122,11 @@ ...@@ -122,7 +122,11 @@
<el-table-column type="selection" align="center" width="55" fixed="left" /> <el-table-column type="selection" align="center" width="55" fixed="left" />
<el-table-column label="订单号" align="center" prop="orderNo" width="120" /> <el-table-column label="订单号" align="center" prop="orderNo" width="120" />
<el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" /> <el-table-column label="目的地" align="center" prop="destWarehouseName" width="120" />
<el-table-column label="入仓时间" align="center" prop="rucangTime" width="120" /> <el-table-column label="入仓时间" align="center" prop="rucangTime" width="120">
<template slot-scope="scope">
{{formatDate(scope.row.rucangTime)}}
</template>
</el-table-column>
<el-table-column label="品名" align="center" prop="prodTitleZh" width="120" /> <el-table-column label="品名" align="center" prop="prodTitleZh" width="120" />
<el-table-column label="箱数" align="center" prop="num" /> <el-table-column label="箱数" align="center" prop="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight"> <el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
...@@ -233,7 +237,11 @@ ...@@ -233,7 +237,11 @@
<dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="scope.row.unit" /> <dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="scope.row.unit" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材质" align="center" prop="material" /> <el-table-column label="材质" align="center" prop="material">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="scope.row.material" />
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)"> <el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
...@@ -274,13 +282,12 @@ import { ...@@ -274,13 +282,12 @@ import {
preloadPage, preloadPage,
createSection, createSection,
deleteSection, deleteSection,
serviceMsg,
createGoods, createGoods,
deleteGoods, deleteGoods,
approvalCreate, approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent } from "../utils"; import { formatDate, getTotlContent, serviceMsg } from "../utils";
import dayjs from "dayjs"; import dayjs from "dayjs";
/** /**
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
</template> </template>
<script> <script>
import { approvalCreate, serviceMsg } from "@/api/ecw/boxSea"; import { approvalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "../utils";
/** /**
* 反审 * 反审
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</template> </template>
<script> <script>
import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea"; import { settlementCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils"; import { formatDateStr, serviceMsg } from "../utils";
/** /**
* 结算 * 结算
*/ */
......
...@@ -20,8 +20,13 @@ ...@@ -20,8 +20,13 @@
</template> </template>
<script> <script>
import { shipConfigure, serviceMsg } from "@/api/ecw/boxSea"; import { shipConfigure } from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr, constantDict } from "../utils"; import {
formatNumberString,
formatDateStr,
constantDict,
serviceMsg,
} from "../utils";
/** /**
* 配船 * 配船
*/ */
......
...@@ -77,8 +77,8 @@ import dockSelect from "./common/dockSelect.vue"; ...@@ -77,8 +77,8 @@ import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit"; import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate, serviceMsg } from "@/api/ecw/boxSea"; import { billCreate } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict } from "../utils"; import { formatNumberString, constantDict, serviceMsg } from "../utils";
/** /**
* 提单补料 * 提单补料
......
...@@ -37,12 +37,13 @@ ...@@ -37,12 +37,13 @@
</template> </template>
<script> <script>
import { trailer, serviceMsg } from "@/api/ecw/boxSea"; import { trailer } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue"; import supplierSelect from "./common/supplierSelect.vue";
import { import {
formatStringNumber, formatStringNumber,
formatDateStr, formatDateStr,
formatNumberString, formatNumberString,
serviceMsg,
} from "../utils"; } from "../utils";
/** /**
* 拖车 * 拖车
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<script> <script>
import startUnloading from "./startUnloading.vue"; import startUnloading from "./startUnloading.vue";
import { unloadCreate, serviceMsg } from "@/api/ecw/boxSea"; import { unloadCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils"; import { formatDateStr, serviceMsg } from "../../utils";
import dockSelect from "../common/dockSelect.vue"; import dockSelect from "../common/dockSelect.vue";
/** /**
......
...@@ -94,8 +94,9 @@ import { ...@@ -94,8 +94,9 @@ import {
batchUnload, batchUnload,
allUnload, allUnload,
approvalCreate, approvalCreate,
serviceMsg,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils";
/** /**
* 开始卸柜 * 开始卸柜
*/ */
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
</template> </template>
<script> <script>
import { createError, serviceMsg } from "@/api/ecw/boxSea"; import { createError } from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils";
/** /**
* 卸柜异常 * 卸柜异常
*/ */
......
...@@ -623,7 +623,7 @@ function getColmnMapping() { ...@@ -623,7 +623,7 @@ function getColmnMapping() {
key: "remarks", key: "remarks",
}, },
{ {
title: "数量", title: "数量(个)",
key: "packageNum", key: "packageNum",
}, },
{ {
...@@ -943,6 +943,27 @@ export const fileTypes = [ ...@@ -943,6 +943,27 @@ export const fileTypes = [
"jpeg", "jpeg",
]; ];
/**
* 服务提示消息回调
*
* @export
* @param {*} result
* @param {*} _vue
* @return {*}
*/
function serviceMsg(result, _vue) {
return new Promise((resolve, reject) => {
const { code, msg } = result;
if (code === 0) {
_vue.$message.success("操作成功");
resolve();
} else {
_vue.$message.error(msg);
reject();
}
});
}
export { export {
getStatusName, getStatusName,
getColmnMapping, getColmnMapping,
...@@ -954,4 +975,5 @@ export { ...@@ -954,4 +975,5 @@ export {
formatNumberString, formatNumberString,
formatDate, formatDate,
getTotlContent, getTotlContent,
serviceMsg,
}; };
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