Commit 4b9ea5bb authored by huhaiqing's avatar huhaiqing

海运操作功能补全

parent a2327655
......@@ -61,11 +61,12 @@ export default {
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, [
"apRealTime",
"apConfirmTime",
"apUnloadPortTime",
]);
oldData = formatDateStr(
oldData,
["apRealTime", "apConfirmTime"],
"YYYY-MM-DD HH:mm:ss"
);
oldData = formatDateStr(oldData, ["apUnloadPortTime"]);
this.arrivalObj = oldData;
},
watch: {
......
......@@ -2,9 +2,7 @@
<div>
<el-form ref="blCopyForm" :model="blCopyObj" label-width="120px">
<el-form-item label="提单Copy">
<el-upload action="" :file-list="blCopyObj.copyUrl">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<FileUpload :limit="1" :isShowTip=false v-model="blCopyObj.copyUrl" :fileType="fileType" />
</el-form-item>
</el-form>
<el-row class="operate-button">
......@@ -17,23 +15,28 @@
<script>
import { ladingCopyCreate, serviceMsg } from "@/api/ecw/boxSea";
import FileUpload from "@/components/FileUpload";
import { fileTypes } from "../utils";
/**
* 提单copy
*/
export default {
name: "blCopy",
inheritAttrs: false,
components: { FileUpload },
data() {
return {
// 提单copy对象
blCopyObj: {},
// 文件格式
fileType: fileTypes,
};
},
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
this.blCopyObj = oldData;
this.blCopyObj.copyUrl = [];
},
methods: {
/** 提交 */
......
......@@ -8,16 +8,16 @@
<supplierSelect v-model="bookingObj.shipCompanyType" :companyType="'9'" placeholder="请选择船公司类型" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item label="驳船港">
<dockSelect v-model="bookingObj.bargePort" placeholder="请选择驳船港" :allDocks="this.$attrs.allDocks" />
<dockSelect v-model="bookingObj.bargePortId" placeholder="请选择驳船港" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item label="大船港">
<dockSelect v-model="bookingObj.bigPort" placeholder="请选择大船港" :allDocks="this.$attrs.allDocks" />
<dockSelect v-model="bookingObj.bigPortId" placeholder="请选择大船港" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item label="目的港">
<dockSelect v-model="bookingObj.destPort" placeholder="请选择目的港" :allDocks="this.$attrs.allDocks" />
<dockSelect v-model="bookingObj.destPortId" placeholder="请选择目的港" :allDocks="this.$attrs.allDocks" />
</el-form-item>
<el-form-item label="订舱公司">
<supplierSelect v-model="bookingObj.spaceCompany" :companyType="'1'" placeholder="请选择订舱公司" :allSupplier="this.$attrs.allSupplier" />
<supplierSelect v-model="bookingObj.spaceCompanyId" :companyType="'1'" placeholder="请选择订舱公司" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
<el-form-item label="预计驳船时间" prop="bargeTime">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.bargeTime"></el-date-picker>
......@@ -31,7 +31,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<userSelect v-model="bookingObj.feedTimePerson1" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
<userSelect v-model="bookingObj.sailNotifyUser" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
</el-form-item>
</el-col>
</el-row>
......@@ -39,12 +39,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="预计提单补料时间">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.feedTime"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.ladingBillTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<userSelect v-model="bookingObj.feedTimePerson2" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
<userSelect v-model="bookingObj.ladingBillNotifyUser" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
</el-form-item>
</el-col>
</el-row>
......@@ -52,12 +52,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="预计报关时间">
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.declarationTime"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" value-format="yyyy-MM-dd" v-model="bookingObj.customsTime"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<userSelect v-model="bookingObj.feedTimePerson3" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
<userSelect v-model="bookingObj.customsNotifyUser" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
</el-form-item>
</el-col>
</el-row>
......@@ -70,7 +70,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="通知人" label-width="80px">
<userSelect v-model="bookingObj.feedTimePerson4" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
<userSelect v-model="bookingObj.cutOffNotifyUser" placeholder="请选择通知人" :allUsers="this.$attrs.allUsers" />
</el-form-item>
</el-col>
</el-row>
......@@ -119,7 +119,13 @@ export default {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatStringNumber(oldData, ["shipCompanyType", "spaceCompany"]);
oldData = formatDateStr(oldData, ["sailTime", "bargeTime"]);
oldData = formatDateStr(oldData, [
"sailTime",
"bargeTime",
"ladingBillTime",
"customsTime",
"cutOffTime",
]);
this.bookingObj = oldData;
},
methods: {
......
......@@ -37,7 +37,7 @@
<script>
import startPacking from "./startPacking.vue";
import { cabinetCreate, serviceMsg } from "@/api/ecw/boxSea";
import { cabinetCreate, serviceMsg, approvalCreate } from "@/api/ecw/boxSea";
import { formatDateStr } from "../../utils";
import ImageUpload from "@/components/ImageUpload";
......@@ -79,11 +79,23 @@ export default {
shipmentId: this.$attrs.shipmentObj.id,
...this.cabinetObj,
operateType,
}).then((res) => {
if (operateType === 2) {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 2,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
} else {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
}
});
}
});
},
......
......@@ -28,9 +28,7 @@
</el-col>
</el-row>
<el-form-item label="电放凭证附件">
<el-upload action="" :file-list="cDocObj.cdElectricVoucher">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdElectricVoucher" :fileType="fileType" />
</el-form-item>
<el-form-item label="agent list">
......@@ -42,9 +40,7 @@
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdAgentlistTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item>
<el-upload action="" :file-list="cDocObj.cdAgentlistFile">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdAgentlistFile" :fileType="fileType" />
</el-form-item>
<el-form-item label="soncap">
......@@ -56,9 +52,7 @@
<el-date-picker type="date" placeholder="请选择日期" v-model="cDocObj.cdSoncapTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item>
<el-upload action="" :file-list="cDocObj.cdSoncapFile">
<el-button size="small" type="primary">选择文件</el-button>
</el-upload>
<FileUpload :limit="1" :isShowTip=false v-model="cDocObj.cdSoncapFile" :fileType="fileType" />
</el-form-item>
</el-form>
......@@ -72,13 +66,21 @@
<script>
import { clearanceDocCreate, serviceMsg } from "@/api/ecw/boxSea";
import { constantDict, formatDateStr, formatNumberString } from "../utils";
import {
constantDict,
formatDateStr,
formatNumberString,
fileTypes,
} from "../utils";
import FileUpload from "@/components/FileUpload";
/**
* 清关文件
*/
export default {
name: "clrDocument",
inheritAttrs: false,
components: { FileUpload },
data() {
return {
// 清关文件对象
......@@ -87,6 +89,8 @@ export default {
method: constantDict.billingMethod,
// 选项
status: constantDict.isFile,
// 文件类型
fileType: fileTypes,
};
},
created() {
......
......@@ -58,7 +58,8 @@ export default {
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["clEstTime", "clClearTime"]);
oldData = formatDateStr(oldData, ["clEstTime"]);
oldData = formatDateStr(oldData, ["clClearTime"], "YYYY-MM-DD HH:mm:ss");
this.cusClearanceObj = oldData;
},
watch: {
......
......@@ -61,7 +61,8 @@ export default {
created() {
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["dtRealShipTime", "dtEstArrivalTime"]);
oldData = formatDateStr(oldData, ["dtRealShipTime"], "YYYY-MM-DD HH:mm:ss");
oldData = formatDateStr(oldData, ["dtEstArrivalTime"]);
this.departureObj = oldData;
},
watch: {
......
......@@ -2,7 +2,7 @@
<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-input v-model="reviewObj.applyReason" type="textarea" rows="2" placeholder="请输入申请理由"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
......@@ -13,7 +13,7 @@
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
import { approvalCreate, serviceMsg } from "@/api/ecw/boxSea";
/**
* 预装反审
......@@ -36,7 +36,7 @@ export default {
shipmentId: this.$attrs.shipmentObj.id,
...this.reviewObj,
approvalStatus: -1,
approvalType: 1,
approvalType: 4,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
......
......@@ -7,7 +7,7 @@
</el-radio-group>
</el-form-item>
<el-form-item label="配船时间" v-show="shipObj.saExmtStatus === '2'">
<el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.shipTime" value-format="yyyy-MM-dd"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="shipObj.configTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
......
......@@ -33,8 +33,8 @@
<el-input v-model="subMaterialObj.markNo"></el-input>
</el-form-item>
<el-form-item label="包装数量与单位" class="two-element">
<el-input v-model="subMaterialObj.quantity" placeholder="请输入包装数量"></el-input>
<el-select v-model="subMaterialObj.unit" placeholder="请选择单位">
<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">{{unit.titleZh}}</el-option>
</el-select>
</el-form-item>
......@@ -42,7 +42,7 @@
<el-input v-model="subMaterialObj.kgs" placeholder="请输入毛重(KGS)"></el-input>
</el-form-item>
<el-form-item label="立方数(CBM)">
<el-input v-model="subMaterialObj.mesaurement" placeholder="请输入立方数(CBM)"></el-input>
<el-input v-model="subMaterialObj.cbm" placeholder="请输入立方数(CBM)"></el-input>
</el-form-item>
<el-form-item label="货物描述">
<el-input v-model="subMaterialObj.goodsDesc" placeholder="请输入货物描述"></el-input>
......
......@@ -8,7 +8,7 @@
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="卸柜时间">
<el-date-picker type="datetime" placeholder="请选择日期" v-model="unloadingObj.ulBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="date" placeholder="请选择日期" v-model="unloadingObj.ulBoxTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-form>
......
......@@ -238,11 +238,11 @@ export default {
},
{
title: "数量",
key: "",
key: "packageNum",
},
{
title: "体积",
key: "",
key: "cbm",
},
{
title: "业务员",
......@@ -264,7 +264,7 @@ export default {
{
title: "实际开船时间",
key: "dtRealShipTime",
type: "date",
type: "datetime",
},
{
title: "预计到港时间",
......@@ -306,12 +306,12 @@ export default {
{
title: "实际到港时间",
key: "apRealTime",
type: "date",
type: "datetime",
},
{
title: "确认到港",
key: "apConfirmTime",
type: "date",
type: "datetime",
},
{
title: "卸港时间",
......@@ -332,7 +332,7 @@ export default {
{
title: "清关时间",
key: "clClearTime",
type: "date",
type: "datetime",
},
{
title: "业务员",
......@@ -383,6 +383,9 @@ export default {
case "date":
val = dayjs(val).format("YYYY-MM-DD");
break;
case "datetime":
val = dayjs(val).format("YYYY-MM-DD HH:mm:ss");
break;
case "supplier":
val = this.getSupplier(Number(val));
break;
......@@ -441,9 +444,7 @@ export default {
flex-direction: column;
flex-wrap: wrap;
align-content: flex-start;
// width: 100%;
height: 500px;
height: 550px;
p {
margin: 0;
......
......@@ -446,15 +446,26 @@ function formatNumberString(obj, keys) {
return obj;
}
function formatDateStr(obj, keys) {
function formatDateStr(obj, keys, format = "YYYY-MM-DD") {
for (const [key, value] of Object.entries(obj)) {
if (keys.includes(key) && dayjs(value).isValid()) {
obj[key] = dayjs(value).format("YYYY-MM-DD");
obj[key] = dayjs(value).format(format);
}
}
return obj;
}
export const fileTypes = [
"doc",
"xls",
"ppt",
"txt",
"pdf",
"png",
"jpg",
"jpeg",
];
export {
statusName,
seaBaseData,
......
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