Commit 2d7a8e08 authored by huhaiqing's avatar huhaiqing

海运开发

parent 35da61a1
...@@ -275,6 +275,28 @@ export function clearanceCreate(data) { ...@@ -275,6 +275,28 @@ export function clearanceCreate(data) {
}); });
} }
/**
* 卸柜
*
* @export
* @param {*} data
* @return {*}
*/
export function unloadCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-cabinet-unload/update",
method: "put",
data,
});
}
return request({
url: "/ecw/box-cabinet-unload/create",
method: "post",
data,
});
}
/** /**
* 结算 * 结算
* *
...@@ -283,6 +305,13 @@ export function clearanceCreate(data) { ...@@ -283,6 +305,13 @@ export function clearanceCreate(data) {
* @return {*} * @return {*}
*/ */
export function settlementCreate(data) { export function settlementCreate(data) {
if (data.id) {
return request({
url: "/ecw/box-settlement/update",
method: "put",
data,
});
}
return request({ return request({
url: "/ecw/box-settlement/create", url: "/ecw/box-settlement/create",
method: "post", method: "post",
...@@ -290,6 +319,21 @@ export function settlementCreate(data) { ...@@ -290,6 +319,21 @@ export function settlementCreate(data) {
}); });
} }
/**
* 出货审核
*
* @export
* @param {*} data
* @return {*}
*/
export function approvalCreate(data) {
return request({
url: "/ecw/box-approval/create",
method: "post",
data,
});
}
/***************************** 预装 start **********************************/ /***************************** 预装 start **********************************/
/** /**
......
...@@ -247,8 +247,8 @@ ...@@ -247,8 +247,8 @@
<el-row style="margin-top: 15px"> <el-row style="margin-top: 15px">
<el-row> <el-row>
<el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules"> <el-form ref="operatorForm" :model="operatorData" size="small" :inline="true" label-width="120px" :rules="rules">
<el-form-item label="目的地操作员" prop="operator"> <el-form-item label="目的地操作员" prop="noticeUser">
<userSelect v-model="operatorData.operator" placeholder="请选择目的地操作员" :allUsers="this.$attrs.allUsers" size="small" /> <userSelect v-model="operatorData.noticeUser" placeholder="请选择目的地操作员" :allUsers="this.$attrs.allUsers" size="small" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
...@@ -269,6 +269,7 @@ import { ...@@ -269,6 +269,7 @@ import {
serviceMsg, serviceMsg,
createGoods, createGoods,
deleteGoods, deleteGoods,
approvalCreate,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
...@@ -310,12 +311,10 @@ export default { ...@@ -310,12 +311,10 @@ export default {
queryParams: {}, queryParams: {},
pageParam: { pageNo: 1, pageSize: 5 }, pageParam: { pageNo: 1, pageSize: 5 },
// 目的地操作员 // 目的地操作员
operatorData: { operatorData: {},
operator: null,
},
// 校验 // 校验
rules: { rules: {
operator: [{ required: true, message: "必填", trigger: "change" }], noticeUser: [{ required: true, message: "必填", trigger: "change" }],
}, },
// 出货信息 // 出货信息
shipmentObj: this.$attrs.shipmentObj, shipmentObj: this.$attrs.shipmentObj,
...@@ -392,7 +391,16 @@ export default { ...@@ -392,7 +391,16 @@ export default {
onSubmit() { onSubmit() {
this.$refs["operatorForm"].validate((valid) => { this.$refs["operatorForm"].validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); approvalCreate({
...this.operatorData,
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 1,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
} }
}); });
}, },
......
<template>
<div>
<el-form ref="reviewForm" :model="reviewObj" label-width="120px">
<el-form-item label="申请理由">
<el-input v-model="reviewObj.remark" type="textarea" rows="2" placeholder="请输入申请理由"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="success" @click="onSubmit">发起申请</el-button>
<el-button @click="cancel">关闭</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
/**
* 预装反审
*/
export default {
name: "review",
inheritAttrs: false,
data() {
return {
// 反审对象
reviewObj: {},
};
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["reviewForm"].validate((valid) => {
if (valid) {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
...this.reviewObj,
approvalStatus: -1,
approvalType: 1,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
}
});
},
/** 取消 */
cancel(type) {
this.$emit("closeDialog", type);
},
},
};
</script>
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<script> <script>
import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea"; import { settlementCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../utils";
/** /**
* 结算 * 结算
*/ */
...@@ -31,6 +32,12 @@ export default { ...@@ -31,6 +32,12 @@ export default {
settlementObj: {}, settlementObj: {},
}; };
}, },
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["slSettlementTime", "slSettledTime"]);
this.settlementObj = oldData;
},
methods: { methods: {
/** 提交 */ /** 提交 */
onSubmit(operateType) { onSubmit(operateType) {
...@@ -42,15 +49,15 @@ export default { ...@@ -42,15 +49,15 @@ export default {
operateType, operateType,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.cancel(); this.cancel("submit");
}); });
}); });
} }
}); });
}, },
/** 取消 */ /** 取消 */
cancel() { cancel(type) {
this.$emit("closeDialog"); this.$emit("closeDialog", type);
}, },
}, },
}; };
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<div> <div>
<el-form ref="unloadingForm" :model="unloadingObj" label-width="100px"> <el-form ref="unloadingForm" :model="unloadingObj" label-width="100px">
<el-form-item label="网点"> <el-form-item label="网点">
<el-select v-model="unloadingObj.ulOutletsId" placeholder="请选择网点"> <dockSelect v-model="unloadingObj.ulOutletsId" placeholder="请选择网点" :allDocks="this.$attrs.allDocks" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="到仓时间"> <el-form-item label="到仓时间">
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker> <el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
...@@ -29,8 +28,9 @@ ...@@ -29,8 +28,9 @@
<script> <script>
import startUnloading from "./startUnloading.vue"; import startUnloading from "./startUnloading.vue";
import { clearanceCreate, serviceMsg } from "@/api/ecw/boxSea"; import { unloadCreate, serviceMsg } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils"; import { formatDateStr } from "../../utils";
import dockSelect from "../common/dockSelect.vue";
/** /**
* 卸柜 * 卸柜
...@@ -38,7 +38,7 @@ import { formatDateStr } from "../../utils"; ...@@ -38,7 +38,7 @@ import { formatDateStr } from "../../utils";
export default { export default {
name: "unloading", name: "unloading",
inheritAttrs: false, inheritAttrs: false,
components: { startUnloading }, components: { startUnloading, dockSelect },
data() { data() {
return { return {
// 清关对象 // 清关对象
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
return; return;
} }
} }
clearanceCreate({ unloadCreate({
...this.unloadingObj, ...this.unloadingObj,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
operateType, operateType,
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
}, },
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", "type"); this.$emit("closeDialog", type);
}, },
// 开始卸柜 // 开始卸柜
startUnloading() { startUnloading() {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
import bookingWidget from "./nodePage/booking.vue"; import bookingWidget from "./nodePage/booking.vue";
import trailerWidget from "./nodePage/trailer.vue"; import trailerWidget from "./nodePage/trailer.vue";
import preinstallWidget from "./nodePage/preinstall.vue"; import preinstallWidget from "./nodePage/preinstall.vue";
import preinstallReviewWidget from "./nodePage/preinstallReview.vue";
import agentWidget from "./nodePage/agent.vue"; import agentWidget from "./nodePage/agent.vue";
import cabinetWidget from "./nodePage/cabinet/index.vue"; import cabinetWidget from "./nodePage/cabinet/index.vue";
import cusDeclarationWidget from "./nodePage/cusDeclaration.vue"; import cusDeclarationWidget from "./nodePage/cusDeclaration.vue";
...@@ -69,6 +70,7 @@ export default { ...@@ -69,6 +70,7 @@ export default {
cusClearanceWidget, cusClearanceWidget,
unloadingWidget, unloadingWidget,
settlementWidget, settlementWidget,
preinstallReviewWidget,
}, },
props: { props: {
shipmentObj: Object, shipmentObj: Object,
...@@ -87,8 +89,6 @@ export default { ...@@ -87,8 +89,6 @@ export default {
currentComponent: "", currentComponent: "",
// 当前步骤节点坐标 // 当前步骤节点坐标
currIndex: 0, currIndex: 0,
// 当前步骤节点状态
currNodeStatus: "",
// 当前节点 // 当前节点
currNode: {}, currNode: {},
}; };
...@@ -104,10 +104,10 @@ export default { ...@@ -104,10 +104,10 @@ export default {
}, },
/** 节点点击 */ /** 节点点击 */
nodeClick(currIndex, node) { nodeClick(currIndex, node) {
if (currIndex > this.currIndex) { /* if (currIndex > this.currIndex) {
this.$message.error("请先完成上一步"); this.$message.error("请先完成上一步");
return; return;
} } */
this.currNode = node; this.currNode = node;
this.currentComponent = `${node.type}Widget`; this.currentComponent = `${node.type}Widget`;
this.$set(this.dialogConfig, "width", "500px"); this.$set(this.dialogConfig, "width", "500px");
...@@ -128,8 +128,16 @@ export default { ...@@ -128,8 +128,16 @@ export default {
break; break;
// 预装 // 预装
case "preinstall": case "preinstall":
// 预装反审
const status = this.shipmentObj[node.keyName];
if ([23, 24].includes(status)) {
this.currentComponent = `preinstallReviewWidget`;
this.$set(this.dialogConfig, "width", "700px");
this.$set(this.dialogConfig, "title", "预装反审");
} else {
this.$set(this.dialogConfig, "fullscreen", true); this.$set(this.dialogConfig, "fullscreen", true);
this.$set(this.dialogConfig, "title", "出货安排(预装)"); this.$set(this.dialogConfig, "title", "出货安排(预装)");
}
break; break;
} }
this.$set(this.dialogConfig, "dialogVisible", true); this.$set(this.dialogConfig, "dialogVisible", true);
...@@ -158,17 +166,14 @@ export default { ...@@ -158,17 +166,14 @@ export default {
if (start.includes(val[keyName]) && val[voName]) { if (start.includes(val[keyName]) && val[voName]) {
node.currStatus = "wait"; node.currStatus = "wait";
this.currNodeStatus = val[keyName];
} }
if (wait.includes(val[keyName])) { if (wait.includes(val[keyName])) {
node.currStatus = "wait"; node.currStatus = "wait";
this.currNodeStatus = val[keyName];
} }
if (end.includes(val[keyName])) { if (end.includes(val[keyName])) {
node.currStatus = "end"; node.currStatus = "end";
this.currNodeStatus = val[keyName];
// 已完成节点个数 // 已完成节点个数
++nodeIndex; ++nodeIndex;
} }
...@@ -180,10 +185,6 @@ export default { ...@@ -180,10 +185,6 @@ export default {
} }
} }
}, },
/* 监听当前状态 */
currNodeStatus(val) {
this.$emit("setStatus", val);
},
}, },
}; };
</script> </script>
......
...@@ -392,6 +392,7 @@ export default { ...@@ -392,6 +392,7 @@ export default {
case "warehouse": case "warehouse":
val = this.getWarehouse(Number(val)); val = this.getWarehouse(Number(val));
break; break;
case "shipping_dcCustoms_status":
case "shipping_customs_type": case "shipping_customs_type":
val = this.getDict(type, String(val)); val = this.getDict(type, String(val));
break; break;
...@@ -411,9 +412,7 @@ export default { ...@@ -411,9 +412,7 @@ export default {
); );
}, },
getDock(id) { getDock(id) {
return ( return this.$attrs.allDocks.find((item) => item.id === id)?.titleZh ?? id;
this.$attrs.allDocks.find((item) => item.id === id)?.titleZh ?? id
);
}, },
getWarehouse(id) { getWarehouse(id) {
return ( return (
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</el-card> </el-card>
<!-- 海运流程图 --> <!-- 海运流程图 -->
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" @setStatus="setStatus" @getBoxInfo="getBoxInfo" /> <seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 --> <!-- 海运步骤图 -->
<seaStepDetail :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" /> <seaStepDetail :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :warehouseList="warehouseList" />
...@@ -106,10 +106,6 @@ export default { ...@@ -106,10 +106,6 @@ export default {
var arr = this.warehouseList.filter((item) => item.id == id); var arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? arr[0].titleZh : ""; return arr.length > 0 ? arr[0].titleZh : "";
}, },
/* 设置状态值 */
setStatus(status) {
this.statusLabel = statusName.get(status);
},
// 出货 // 出货
getBoxInfo() { getBoxInfo() {
getbox(this.shipmentId).then((res) => { getbox(this.shipmentId).then((res) => {
...@@ -118,6 +114,41 @@ export default { ...@@ -118,6 +114,41 @@ export default {
}); });
}, },
}, },
watch: {
/* 监听发货对象 */
shipmentObj(val) {
debugger
let currNodeStatus = 11,
isBreak = false;
// 迭代每个节点
for (let i = 0; i < this.seaBaseData.length; i++) {
const nodes = this.seaBaseData[i];
for (let j = 0; j < nodes.length; j++) {
const node = nodes[j];
const { keyName, voName, status } = node;
if (!keyName) continue;
const { start, wait, end } = status;
if (start.includes(val[keyName]) && val[voName]) {
currNodeStatus = val[keyName];
}
if (wait.includes(val[keyName])) {
currNodeStatus = val[keyName];
isBreak = true;
break;
}
if (end.includes(val[keyName])) {
currNodeStatus = val[keyName];
}
}
if (isBreak) break;
}
console.log(currNodeStatus)
this.statusLabel = statusName.get(currNodeStatus);
},
},
}; };
</script> </script>
......
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