Commit b094be9f authored by huhaiqing's avatar huhaiqing

海运功能开发

parent b46d89d6
......@@ -55,6 +55,14 @@ export function exportboxExcel(query) {
// 创建费用登记
export function createCost(data) {
if (data.id) {
return request({
url: "/ecw/box-cost/update",
method: "put",
data,
});
}
return request({
url: '/ecw/box-cost/create',
method: 'post',
......@@ -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) {
return request({
......@@ -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) {
const formData = new FormData();
for (const [key, value] of Object.entries(params)) {
......
......@@ -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) {
});
}
/**
* 单个删除已装柜标签
*
* @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) {
/***************************** 报关费用 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) {
const formData = new FormData();
for (const [key, value] of Object.entries(params)) {
......
......@@ -49,7 +49,7 @@ a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
// color: inherit;
text-decoration: none;
}
......
<template>
<div class="app-costForm">
<div class="app-costForm shippingSea-dialog">
<el-form ref="costForm" :model="costObj" label-width="80px">
<el-form-item label="操作步骤">
......@@ -46,7 +46,7 @@
<script>
import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "@/api/ecw/boxSea";
import { serviceMsg } from "./shippingSea/utils";
export default {
name: "costForm",
......@@ -65,17 +65,19 @@ export default {
const { data } = res;
this.allSupplier = data.list;
});
const { costDetail } = this.$attrs;
this.costObj = { ...costDetail };
},
methods: {
submit() {
this.$refs["costForm"].validate((valid) => {
if (valid) {
createCost({
shipmentId: this.$attrs.currRow.id,
shipmentId: this.$attrs.shipmentObj.id,
...this.costObj,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog");
this.$emit("closeDialog", "cost");
});
});
}
......@@ -84,3 +86,33 @@ export default {
},
};
</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>
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<div class="shippingSea-dialog">
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item label="操作步骤">
<el-select v-model="errorObj.opStep" placeholder="请选择操作步骤">
......@@ -40,7 +40,8 @@
</template>
<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 {
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog");
this.$emit("closeDialog", "error");
});
});
}
......@@ -88,5 +89,32 @@ export default {
};
</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>
......@@ -186,7 +186,6 @@ export default {
if (channelItem.channelId == shippingChannelId) {
return channelItem.nameZh;
}
return "/";
}
};
},
......
......@@ -13,9 +13,9 @@
</template>
<script>
import { agentSet, serviceMsg } from "@/api/ecw/boxSea";
import { agentSet } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import { formatStringNumber } from "../utils";
import { formatStringNumber, serviceMsg } from "../utils";
/**
* agent
*/
......
......@@ -32,8 +32,8 @@
<script>
import regError from "../../regError";
import dayjs from "dayjs";
import { arrivalCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
import { arrivalCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 到港
......
......@@ -35,9 +35,9 @@
</template>
<script>
import { bargeCreate, serviceMsg } from "@/api/ecw/boxSea";
import { bargeCreate } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString } from "../utils";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
/**
* 驳船
......
......@@ -14,9 +14,9 @@
</template>
<script>
import { ladingCopyCreate, serviceMsg } from "@/api/ecw/boxSea";
import { ladingCopyCreate } from "@/api/ecw/boxSea";
import FileUpload from "@/components/FileUpload";
import { fileTypes } from "../utils";
import { fileTypes, serviceMsg } from "../utils";
/**
* 提单copy
......
......@@ -85,11 +85,11 @@
</template>
<script>
import { booking, serviceMsg } from "@/api/ecw/boxSea";
import { booking } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue";
import { formatStringNumber, formatDateStr } from "../utils";
import { formatStringNumber, formatDateStr, serviceMsg } from "../utils";
/**
* 订舱
*/
......
......@@ -37,8 +37,8 @@
<script>
import startPacking from "./startPacking.vue";
import { cabinetCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils";
import { cabinetCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../../utils";
import ImageUpload from "@/components/ImageUpload";
/**
......
......@@ -196,14 +196,15 @@ import { getCabinetPage } from "@/api/ecw/cabinet";
import {
loadSecGoodsList,
orderTagList,
singleCreate,
batchCreate,
singleDelete,
batchDelete,
remove,
serviceMsg,
boxUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
import { getTotlContent } from "../../utils";
import { getTotlContent, serviceMsg } from "../../utils";
/**
* 开始装柜
......@@ -354,12 +355,18 @@ export default {
this.handlerBatchCreate("batch");
}
if (formName === "correctionForm") {
this.handlerBatchDelete({
this.handlerBatchDelete(
{
orderNumCode: this.correctionObj.qrCode,
});
},
"single"
);
}
if (formName === "orderForm") {
this.handlerBatchDelete({ orderNo: this.orderObj.orderNo });
this.handlerBatchDelete(
{ orderNo: this.orderObj.orderNo },
"batch"
);
}
if (formName === "modifyForm") {
this.modifyBoxUpdate();
......@@ -383,28 +390,41 @@ export default {
return;
}
params.orderNumCode = this.qrCode;
singleCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
} else {
params.orderNo = this.batchObj.qrCode;
}
batchCreate(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
}
},
/* 删除已装柜 */
handlerBatchDelete(params) {
handlerBatchDelete(params, type) {
params = {
shipmentId: this.shipmentObj.id,
secId: this.tableData.id,
...params,
};
if (type === "single") {
singleDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
} else {
batchDelete(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getLoadSecGoodsList();
});
});
}
},
/* 移出 */
moveOut(row) {
......
......@@ -145,11 +145,10 @@ import {
preloadPage,
createSection,
deleteSection,
serviceMsg,
createGoods,
remove,
} from "@/api/ecw/boxSea";
import { formatDate, getTotlContent } from "../../utils";
import { formatDate, getTotlContent, serviceMsg } from "../../utils";
/**
* 补单
*/
......
......@@ -65,12 +65,13 @@
</template>
<script>
import { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea";
import { clearanceDocCreate } from "@/api/ecw/boxSea";
import {
constantDict,
formatDateStr,
formatNumberString,
fileTypes,
serviceMsg,
} from "../utils";
import FileUpload from "@/components/FileUpload";
......
......@@ -28,8 +28,8 @@
<script>
import regError from "../../regError";
import dayjs from "dayjs";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
import { clearanceCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 清关
......
......@@ -131,14 +131,13 @@
import supplierSelect from "./common/supplierSelect.vue";
import {
customsCreate,
serviceMsg,
extraCostList,
extraCostOrder,
extraCostCreate,
extraCostUpdate,
approvalCreate,
} from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr } from "../utils";
import { formatNumberString, formatDateStr, serviceMsg } from "../utils";
import ImageUpload from "@/components/ImageUpload";
/**
......
......@@ -31,9 +31,9 @@
<script>
import regError from "../../regError";
import { shippingCreate, serviceMsg } from "@/api/ecw/boxSea";
import { shippingCreate } from "@/api/ecw/boxSea";
import dayjs from "dayjs";
import { formatDateStr } from "../utils";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 起运
......
......@@ -122,7 +122,11 @@
<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="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="num" />
<el-table-column label="体积/重量/重货比" align="center" width="140" prop="volumeWeight">
......@@ -233,7 +237,11 @@
<dict-tag :type="DICT_TYPE.ECW_PACKAGE_TYPE" :value="scope.row.unit" />
</template>
</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">
<template slot-scope="scope">
<el-dropdown trigger="click" @command="(command)=>handleGoods('singele',scope.row,command)">
......@@ -274,13 +282,12 @@ import {
preloadPage,
createSection,
deleteSection,
serviceMsg,
createGoods,
deleteGoods,
approvalCreate,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { formatDate, getTotlContent } from "../utils";
import { formatDate, getTotlContent, serviceMsg } from "../utils";
import dayjs from "dayjs";
/**
......
......@@ -13,7 +13,8 @@
</template>
<script>
import { approvalCreate, serviceMsg } from "@/api/ecw/boxSea";
import { approvalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "../utils";
/**
* 反审
......
......@@ -18,8 +18,8 @@
</template>
<script>
import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
import { settlementCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../utils";
/**
* 结算
*/
......
......@@ -20,8 +20,13 @@
</template>
<script>
import { shipConfigure, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, formatDateStr, constantDict } from "../utils";
import { shipConfigure } from "@/api/ecw/boxSea";
import {
formatNumberString,
formatDateStr,
constantDict,
serviceMsg,
} from "../utils";
/**
* 配船
*/
......
......@@ -77,8 +77,8 @@ import dockSelect from "./common/dockSelect.vue";
import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict } from "../utils";
import { billCreate } from "@/api/ecw/boxSea";
import { formatNumberString, constantDict, serviceMsg } from "../utils";
/**
* 提单补料
......
......@@ -37,12 +37,13 @@
</template>
<script>
import { trailer, serviceMsg } from "@/api/ecw/boxSea";
import { trailer } from "@/api/ecw/boxSea";
import supplierSelect from "./common/supplierSelect.vue";
import {
formatStringNumber,
formatDateStr,
formatNumberString,
serviceMsg,
} from "../utils";
/**
* 拖车
......
......@@ -28,8 +28,8 @@
<script>
import startUnloading from "./startUnloading.vue";
import { unloadCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils";
import { unloadCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../../utils";
import dockSelect from "../common/dockSelect.vue";
/**
......
......@@ -94,8 +94,9 @@ import {
batchUnload,
allUnload,
approvalCreate,
serviceMsg,
} from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils";
/**
* 开始卸柜
*/
......
......@@ -27,7 +27,8 @@
</template>
<script>
import { createError, serviceMsg } from "@/api/ecw/boxSea";
import { createError } from "@/api/ecw/boxSea";
import { serviceMsg } from "../../utils";
/**
* 卸柜异常
*/
......
......@@ -623,7 +623,7 @@ function getColmnMapping() {
key: "remarks",
},
{
title: "数量",
title: "数量(个)",
key: "packageNum",
},
{
......@@ -943,6 +943,27 @@ export const fileTypes = [
"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 {
getStatusName,
getColmnMapping,
......@@ -954,4 +975,5 @@ export {
formatNumberString,
formatDate,
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