预定舱模块
parent
e7837d46b4
commit
4733508f10
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,144 @@
|
||||
// @ts-ignore
|
||||
import { request } from '/@/utils/request'
|
||||
import { DataResult, PageRequest } from '/@/api/model/baseModel'
|
||||
|
||||
export function SearchShipSailingScheduleSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/SearchShipSailingSchedule',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SearchShipSailingSchedule(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/SearchShipSailingSchedule',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function getContractno(data) {
|
||||
return request<DataResult>({
|
||||
url: '/Para/QuerytParaContractNoInfo',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SearchCommodities(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/SearchCommodities',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function mskGetGetInfoSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/GetInfo',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function mskGetSaveSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/Save',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SearchLocations(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/SearchLocations',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SendMSKBooking(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/SendMSKBooking',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function mskGetSave(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/Save',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function mskGetGetInfo(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/GetInfo',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
export function GetInitInfoMsk() {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/GetInitInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function SendMSKBookingSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/SendMSKBooking',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function GetInitInfoMskApi() {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/GetInitInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function maskCopySPOT(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/BatchCopy',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SearchCommoditiesSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/SearchCommodities',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function SearchLocationsSpot(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKSPOTAPI/SearchLocations',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function CheckWarningBatchCopy(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/CheckWarningBatchCopy',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
export function maskCopy(data) {
|
||||
return request<DataResult>({
|
||||
url: '/BookingMSKAPI/BatchCopy',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
@ -0,0 +1,249 @@
|
||||
|
||||
import { ref } from 'vue'
|
||||
import { BasicColumn, FormSchema } from '/@/components/Table'
|
||||
import {
|
||||
GetCarrierlist, GetClientLanesSelectList, GetClientPortSelectList
|
||||
} from '/@/views/operation/seaexport/api/BookingLedger'
|
||||
// 字典
|
||||
import { getDictOption } from '/@/utils/dictUtil'
|
||||
import { GetCtnSelectList } from '/@/api/common'
|
||||
const FnblType = ref([])
|
||||
const FncargoId = ref([])
|
||||
getDictOption('bl_type').then(res => {
|
||||
FncargoId.value = res
|
||||
})
|
||||
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'contractNo',
|
||||
label: '合约号编号',
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'contractName',
|
||||
label: '合约号名称',
|
||||
component: 'Input',
|
||||
colProps: { span: 5 },
|
||||
},
|
||||
{
|
||||
field: 'createUserName',
|
||||
label: '创建者名称',
|
||||
component: 'Input',
|
||||
colProps: { span: 5 },
|
||||
},
|
||||
{
|
||||
field: 'carrierCode',
|
||||
label: '船公司',
|
||||
component: 'ApiSelect',
|
||||
required: false,
|
||||
dynamicDisabled: false,
|
||||
colProps: { span: 5 },
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: GetCarrierlist,
|
||||
immediate: false,
|
||||
labelField: 'shortName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '航线',
|
||||
field: 'laneCName',
|
||||
component: 'ApiSelect',
|
||||
required: false,
|
||||
dynamicDisabled: false,
|
||||
colProps: { span: 5 },
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: GetClientLanesSelectList,
|
||||
immediate: false,
|
||||
labelField: 'laneName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '目的港',
|
||||
field: 'podCode',
|
||||
component: 'ApiSelect',
|
||||
required: false,
|
||||
dynamicDisabled: false,
|
||||
colProps: { span: 4 },
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: () => {
|
||||
return new Promise((resolve) => {
|
||||
GetClientPortSelectList().then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
|
||||
})
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
immediate: false,
|
||||
labelField: 'cnName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
//列表
|
||||
export const columns: BasicColumn[] = [
|
||||
{ dataIndex: 'contractNo', title: '合约号编号', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'contractName', title: '合约号名称', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'contractNote', title: '合约号备注', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'carrierCode', title: '船公司', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'podCode', title: '目的港', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'laneCName', title: '航线', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'createUserName', title: '创建者名称', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'createTime', title: '创建时间', showHeaderOverflow: true, sortable: true },
|
||||
{ dataIndex: 'updateTime', title: '更新时间', showHeaderOverflow: true, sortable: true },
|
||||
]
|
||||
|
||||
//详情表单
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'contractNo',
|
||||
label: '合约号编号',
|
||||
component: 'Input',
|
||||
rules: [{ required:true, message: '请填写合约号编号' }],
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'contractName',
|
||||
label: '合约号名称',
|
||||
component: 'Input',
|
||||
rules: [{ required:true, message: '请填写合约号名称' }],
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'carrierCode',
|
||||
label: '船公司',
|
||||
component: 'ApiSelect',
|
||||
dynamicDisabled: false,
|
||||
rules: [{ required:true, message: '请填写船公司' }],
|
||||
colProps: { span: 6 },
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: GetCarrierlist,
|
||||
immediate: false,
|
||||
labelField: 'shortName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'contractNo',
|
||||
label: '合约号编号',
|
||||
component: 'Input',
|
||||
rules: [{ required:true, message: '请填写合约号编号' }],
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
label: '目的港',
|
||||
field: 'podCode',
|
||||
component: 'ApiSelect',
|
||||
dynamicDisabled: false,
|
||||
colProps: { span: 6 },
|
||||
rules: [{ required:true, message: '请填写合约号编号' }],
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: () => {
|
||||
return new Promise((resolve) => {
|
||||
GetClientPortSelectList().then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (item.ediCode) item.cnName = item.ediCode + '/' + item.cnName
|
||||
})
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
immediate: false,
|
||||
labelField: 'cnName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '航线',
|
||||
field: 'laneCName',
|
||||
component: 'ApiSelect',
|
||||
rules: [{ required:true, message: '请填写合约号编号' }],
|
||||
dynamicDisabled: false,
|
||||
colProps: { span: 6 },
|
||||
componentProps: () => {
|
||||
return {
|
||||
api: GetClientLanesSelectList,
|
||||
immediate: false,
|
||||
labelField: 'laneName',
|
||||
valueField: 'id',
|
||||
resultField: 'data',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'contractPartyName',
|
||||
label: '合约方公司全称',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'contractPartyCode',
|
||||
label: '合约方公司代码',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'contractLinkName',
|
||||
label: '合约方联系人',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'contractLinkEmail',
|
||||
label: '合约方联系邮件',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'isOurOwnPrice',
|
||||
label: '是否本公司合约价格',
|
||||
component: 'Switch',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'contractNote',
|
||||
label: '合约号备注',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
]
|
||||
|
@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<BasicModal width="1100px" v-bind="$attrs" :use-wrapper="true" title="合约号详情" @register="registerModal"
|
||||
@ok="handleSave">
|
||||
<BasicForm @register="registerForm" />
|
||||
<template #footer>
|
||||
<a-button pre-icon="ant-design:close-outlined" type="warning" :loading="loading" ghost
|
||||
style="margin-right: 0.8rem" @click="closeModal">取消</a-button>
|
||||
<a-button type="success" :loading="loading" pre-icon="ant-design:check-outlined" style="margin-right: 0.8rem"
|
||||
@click="handleSave(false)">仅保存</a-button>
|
||||
<a-button pre-icon="ant-design:check-circle-outlined" type="primary" :loading="loading"
|
||||
@click="handleSave(true)">保存并关闭</a-button>
|
||||
</template>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal'
|
||||
import { BasicForm, useForm } from '/@/components/Form/index'
|
||||
import { formSchema } from './columns'
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
setModalProps({ loading: false })
|
||||
})
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
})
|
||||
const loading = ref(false)
|
||||
async function handleSave(exit) {
|
||||
const values = await validate()
|
||||
console.log(values,exit)
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue