Commit cdef7a95 authored by huhaiqing's avatar huhaiqing

票异常/起运/到港/清关接口联调

parent c34b48d2
......@@ -334,6 +334,21 @@ export function approvalCreate(data) {
});
}
/**
* 异常登记
*
* @export
* @param {*} data
* @return {*}
*/
export function abnormalCreate(data) {
return request({
url: "/ecw/box-abnormal/create",
method: "post",
data,
});
}
/***************************** 预装 start **********************************/
/**
......
......@@ -164,6 +164,8 @@ export const DICT_TYPE = {
BOX_SHIPPING_CHECK_STATUS: 'shipping_check_status', // 查验状态
BOX_SHIPPING_UNLOADING_ERROR: 'shipping_unloading_error', // 卸柜异常类型
BOX_SHIPPING_PRICE_UNIT: 'shipping_price_unit', // 金额单位
BOX_SHIPPING_TICKET_EXCEPTION: 'shipping_ticket_exception', // 票异常
BOX_SHIPPING_PROCESS: 'shipping_process', // 海运出货流程
}
/**
......
......@@ -4,7 +4,7 @@
<el-form-item label="操作步骤">
<el-select v-model="costObj.opStepType" placeholder="请选择操作步骤">
<el-option v-for="item in opStepTypes" :label="item.label" :value="item.key" :key="item.key"></el-option>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
......@@ -44,7 +44,6 @@
</template>
<script>
import { stepDatas } from "./shippingSea/utils";
import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "@/api/ecw/boxSea";
......@@ -56,8 +55,6 @@ export default {
return {
// 费用登记对象
costObj: {},
// 步骤
opStepTypes: stepDatas(),
// 供应商
allSupplier: [],
};
......
......@@ -24,7 +24,7 @@
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
</el-dialog>
</div>
</template>
......
......@@ -82,7 +82,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" size="small" @click="moveOut(scope.row)" v-if="!isUnderReview">移出</el-button>
<el-button type="text" size="small" disabled>拆单</el-button>
<!-- <el-button type="text" size="small" disabled>拆单</el-button> -->
</template>
</el-table-column>
</el-table>
......@@ -139,12 +139,10 @@
<el-option v-for="warehouse in $attrs.warehouseList" :key="warehouse.id" :label="warehouse.titleZh" :value="warehouse.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="预计时间" prop="estimatedTime">
<el-date-picker type="date" placeholder="请选择日期" v-model="modifyCabinetObj.estimatedTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="预计时间">{{preinstallDate}}</el-form-item>
<el-form-item label="选择柜型" prop="cabinetId">
<el-select v-model="modifyCabinetObj.cabinetId" placeholder="请选择柜型">
<el-option v-for="item in cabinetList" :label="item.name" :value="item.name" :key="item.id"></el-option>
<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="柜号">
......@@ -197,6 +195,7 @@
</template>
<script>
import dayjs from "dayjs";
import supplementOrder from "./supplementOrder.vue";
import { getCabinetPage } from "@/api/ecw/cabinet";
import {
......@@ -259,7 +258,6 @@ export default {
startWarehouseId: [
{ required: true, message: "必填", trigger: "change" },
],
estimatedTime: [{ required: true, message: "必填", trigger: "change" }],
cabinetId: [{ required: true, message: "必填", trigger: "change" }],
qrCode: [{ required: true, message: "必填", trigger: "change" }],
orderNo: [{ required: true, message: "必填", trigger: "change" }],
......@@ -426,6 +424,7 @@ export default {
};
boxUpdate(params).then((res) => {
serviceMsg(res, this);
this.closeDialog();
});
},
/* 补单完成 */
......@@ -470,7 +469,14 @@ export default {
/* 是否审核中 */
isUnderReview() {
const { currNode } = this.$attrs;
this.shipmentObj[currNode.keyName] === 44 ? true : false;
return this.shipmentObj[currNode.keyName] === 44 ? true : false;
},
/* 预计时间 */
preinstallDate() {
if (this.shipmentObj.yzDate) {
return dayjs(this.shipmentObj.yzDate).format("YYYY-MM-DD HH:mm:ss");
}
return null;
},
},
};
......
......@@ -147,7 +147,7 @@ import {
deleteSection,
serviceMsg,
createGoods,
deleteGoods,
remove,
} from "@/api/ecw/boxSea";
/**
* 补单
......@@ -218,9 +218,12 @@ export default {
},
/* 删除订单 */
deleteOrder(data) {
let ids = [data.orderItemId];
deleteGoods(ids).then((res) => {
let params = {
secId: this.partData.id,
shipmentId: this.$attrs.shipmentObj.id,
orderId: data.orderId,
};
remove(params).then((res) => {
serviceMsg(res, this).then(() => {
this.getSecGoods();
});
......
......@@ -20,7 +20,7 @@
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
</el-dialog>
</div>
</template>
......
......@@ -24,7 +24,7 @@
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="票异常" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" />
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
</el-dialog>
</div>
</template>
......
......@@ -2,30 +2,32 @@
<div>
<el-form ref="errorForm" :model="errorObj" label-width="140px">
<el-form-item label="操作步骤">
<el-select v-model="errorObj.step" placeholder="请选择操作步骤">
<el-select v-model="errorObj.opStep" placeholder="请选择操作步骤">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="票异常">
<el-select v-model="errorObj.ticketError" placeholder="请选择票异常">
<el-select v-model="errorObj.billAbnId" placeholder="请选择票异常">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="异常情况">
<el-input v-model="errorObj.description" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
<el-input v-model="errorObj.abnDetail" type="textarea" rows="2" placeholder="请输入异常情况"></el-input>
</el-form-item>
<el-form-item label="异常时间" prop="arrivalTime" class="two-element">
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorStart" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.errorend" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="是否更新订单状态">
<el-radio-group v-model="errorObj.updateOrder">
<el-radio-group v-model="errorObj.orderStatus">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="中文内容">
<el-input v-model="errorObj.chContent" type="textarea" rows="2" placeholder="请输入中文内容"></el-input>
<el-input v-model="errorObj.contentZh" type="textarea" rows="2" placeholder="请输入中文内容"></el-input>
</el-form-item>
<el-form-item label="英文内容">
<el-input v-model="errorObj.enContent" type="textarea" rows="2" placeholder="请输入英文内容"></el-input>
<el-input v-model="errorObj.contentEn" type="textarea" rows="2" placeholder="请输入英文内容"></el-input>
</el-form-item>
</el-form>
......@@ -37,6 +39,7 @@
</template>
<script>
import { abnormalCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 异常登记
*/
......@@ -60,13 +63,23 @@ export default {
],
};
},
watch: {},
created() {
const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode.dataKey };
},
methods: {
/** 提交 */
onSubmit() {
this.$refs["errorForm"].validate((valid) => {
if (valid) {
alert("submit!");
abnormalCreate({
...this.errorObj,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog");
});
});
}
});
},
......
......@@ -35,7 +35,7 @@
<el-form-item label="包装数量与单位" class="two-element">
<el-input v-model="subMaterialObj.packageNum" placeholder="请输入包装数量"></el-input>
<el-select v-model="subMaterialObj.packageUnit" placeholder="请选择单位">
<el-option v-for="unit in units" :key="unit.id" :value="unit.fuhao" :label="unit.titleZh"></el-option>
<el-option v-for="unit in units" :key="unit.id" :value="unit.id" :label="unit.titleZh"></el-option>
</el-select>
</el-form-item>
<el-form-item label="毛重(KGS)">
......
......@@ -44,7 +44,9 @@
</el-table-column>
<el-table-column label="实装箱数" align="center" prop="installNum" />
<el-table-column label="卸柜箱数" align="center" prop="unloadNum" />
<el-table-column label="清关状态" align="center" prop="" />
<el-table-column label="清关状态" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template>
</el-table-column>
<el-table-column label="体积" align="center" prop="volume" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -186,11 +188,24 @@ export default {
this.dialogVisible = false;
this.getLoadGoodsList();
},
// 打开异常
/* 打开异常 */
openError(row) {
this.currRow = row;
this.dialogVisible = true;
},
/* 清关状态 */
clearStatus(row) {
const { installNum, unloadNum } = row;
if (installNum === unloadNum) {
return "全部清关";
}
if (installNum >= unloadNum) {
return "部分清关";
}
if (unloadNum === 0) {
return "未清关";
}
},
},
};
</script>
......
......@@ -73,6 +73,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/dc-end.png"),
},
type: "booking", // 类型
dataKey: "1", // 字典数据键值
/**
* 订舱状态:11、未订舱;12、已订舱
*/
......@@ -94,6 +95,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/yz-end.png"),
},
type: "preinstall",
dataKey: "2", // 字典数据键值
/**
* 预装状态:21、未预装;22、预装审核中;23、预装审核失败;24、预装审核成功
*/
......@@ -113,6 +115,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/tc-end.png"),
},
type: "trailer",
dataKey: "3", // 字典数据键值
/**
* 拖车状态:31、未派车;32、已派车
*/
......@@ -145,6 +148,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/zg-end.png"),
},
type: "cabinet",
dataKey: "4", // 字典数据键值
/**
* 装柜状态:41、未装柜;42、装柜中;43、已装柜、待封柜;44、封柜审核中;45、封柜审核失败;46、封柜审核成功
*/
......@@ -166,10 +170,11 @@ function seaBaseData() {
end: require("@/assets/images/shipping/bg-end.png"),
},
type: "cusDeclaration",
voName: "customsInfo",
dataKey: "5", // 字典数据键值
/**
*报关状态:51、未报关;52、报关中;53、已报关
*/
voName: "customsInfo",
keyName: "dcStatus",
status: {
start: [51],
......@@ -185,6 +190,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/pc-end.png"),
},
type: "ship",
dataKey: "6", // 字典数据键值
/**
* 配船状态:61、未配船;62、已配船
*/
......@@ -204,6 +210,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/tdcl-end.png"),
},
type: "subMaterial",
dataKey: "7", // 字典数据键值
/**
* 提单补料状态:71、未提单补料;72、已提单补料
*/
......@@ -225,6 +232,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/bc-end.png"),
},
type: "barge",
dataKey: "8", // 字典数据键值
/**
* 驳船状态:81、未驳船;82、已驳船
*/
......@@ -246,6 +254,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/qy-end.png"),
},
type: "departure",
dataKey: "9", // 字典数据键值
/**
* 起运状态:91、未起运;92、已起运
*/
......@@ -267,6 +276,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/tdcopy-end.png"),
},
type: "blCopy",
dataKey: "10", // 字典数据键值
/**
* 提单COPY状态:101、未上传;102、已上传
*/
......@@ -286,6 +296,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/qg-end.png"),
},
title: "清关文件",
dataKey: "11", // 字典数据键值
/**
* 清关文件状态:111、未清关文件;112、已清关文件
*/
......@@ -307,6 +318,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/dg-end.png"),
},
type: "arrival",
dataKey: "12", // 字典数据键值
/**
* 到港状态:121、未到港;112、已到港
*/
......@@ -328,6 +340,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/qg-end.png"),
},
type: "cusClearance",
dataKey: "13", // 字典数据键值
/**
* 清关状态:131、未清关;132、已清关
*/
......@@ -349,6 +362,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/xg-end.png"),
},
type: "unloading",
dataKey: "14", // 字典数据键值
/**
* 卸柜状态:141、未卸柜;142、卸柜中;143、卸柜审核中;144、卸柜审核失败;145、卸柜审核成功;146、已卸柜
*/
......@@ -370,6 +384,7 @@ function seaBaseData() {
end: require("@/assets/images/shipping/js-end.png"),
},
type: "settlement",
dataKey: "15", // 字典数据键值
/**
* 结算状态:151、未结算;152、结算中;153、已结算
*/
......@@ -385,17 +400,6 @@ function seaBaseData() {
];
}
function stepDatas() {
return seaBaseData()
.flat()
.map((item) => {
return {
key: item.type,
label: item.title,
};
});
}
const constantDict = {
// 配船状态
saExmtStatus: [
......@@ -484,7 +488,6 @@ export const fileTypes = [
export {
getStatusName,
seaBaseData,
stepDatas,
constantDict,
formatStringNumber,
formatDateStr,
......
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