预定舱模块

szh-new
sunzehua 5 months ago
parent e7837d46b4
commit 4733508f10

File diff suppressed because it is too large Load Diff

@ -31,7 +31,6 @@
</template>
</template>
</BasicTable>
<cabinModal @register="registerModal"></cabinModal>
</div>
</template>
<script lang="ts" setup>
@ -39,7 +38,6 @@ import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { PageDataByBooking } from '../../operation/seaexport/api/BookingLedger'
import { columns, searchFormSchema, FeeStatus } from './columns'
import { BulbFilled, CheckCircleFilled } from '@ant-design/icons-vue';
import cabinModal from './detail.vue'
import { useModal } from '/@/components/Modal'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, setProps }] = useTable({

@ -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>

@ -0,0 +1,295 @@
<template>
<div class="ds-sea-export-table">
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handledbclick">
<template #toolbar>
<a-button type="link" size="mini" @click="handleAdd">
<span class="iconfont icon-jiahao2fill"></span>
新增合约号
</a-button>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
},
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
onClick: () => {
},
},
]" />
</template>
</template>
</BasicTable>
<cabinModal @register="registerModal"></cabinModal>
</div>
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { PageDataByBooking } from '../../operation/seaexport/api/BookingLedger'
import { columns, searchFormSchema, FeeStatus } from './columns'
import { BulbFilled, CheckCircleFilled, BulbOutlined } from '@ant-design/icons-vue';
import cabinModal from './detail.vue'
import { useModal } from '/@/components/Modal'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, setProps }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await PageDataByBooking(p)
return new Promise((resolve) => {
const arr = [
{
"createTime": "2023-03-27 11:44:47",
"updateTime": "2023-06-16 17:08:19",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 356029267136581,
"updateUserName": "王新艳",
"id": "400275393503301",
"contractNo": "TAOFA230080",
"contractName": "孟加拉吉大(干柜)",
"contractNote": "孟加拉吉大港干柜TAOFA230080",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:45:28",
"updateTime": "2023-06-12 18:14:31",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 142307070910551,
"updateUserName": "超级管理员",
"id": "400275560857669",
"contractNo": "PILTAOMZT2",
"contractName": "莫桑IOI港",
"contractNote": "",
"laneCode": "BJST",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:45:58",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400275683385413",
"contractNo": "PILCHNZATAR",
"contractName": "南非港口",
"contractNote": "南非港口 PILCHNZATAR",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:46:53",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400275910791237",
"contractNo": "PILTAOWAT2",
"contractName": "西非港口 ",
"contractNote": "西非港口 PILTAOWAT2",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:49:39",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400276591120453",
"contractNo": "PILNEANZTAR",
"contractName": "新西兰港口",
"contractNote": "新西兰港口 PILNEANZTAR ",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:49:57",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400276662751301",
"contractNo": "PILNEAAUTAR",
"contractName": "澳洲",
"contractNote": "澳洲PILNEAAUTAR",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:50:16",
"updateTime": "2023-04-11 10:40:09",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 356029263446085,
"updateUserName": "侯苏娜OP89",
"id": "400276740857925",
"contractNo": "TAOFA230118",
"contractName": "印度INCCU港口",
"contractNote": "印度INCCU港口TAOFS230225\n4.11 侯苏娜更新印度INCCU港口 TAOFA230118",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:50:47",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400276870033477",
"contractNo": "TAOFS230166",
"contractName": "印度PKKHI港口",
"contractNote": "印度PKKHI港口TAOFS230166\n",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:51:08",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400276956692549",
"contractNo": "TAOFS230167",
"contractName": "印度INNSA港口",
"contractNote": "印度INNSA港口TAOFS230167",
"carrierCode": "PIL",
"isOurOwnPrice": false
},
{
"createTime": "2023-03-27 11:51:27",
"updateTime": "",
"createUserId": 349708987428933,
"createUserName": "和川陈冠宇",
"updateUserId": 0,
"id": "400277031235653",
"contractNo": "TAOFA230036",
"contractName": "新加坡",
"contractNote": "新加坡TAOFA230036",
"carrierCode": "PIL",
"isOurOwnPrice": false
}
] as any
resolve({
data: arr, total: 10
})
})
},
beforeFetch: (p) => {
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: p.current,
pageSize: p.pageSize,
sortConditions: []
}
}
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
clickToRowSelect: false,
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: false,
indexColumnProps: {
width: 60,
},
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
canResize: true,
resizeHeightOffset: 80,
})
function handledbclick(record) {
console.log('双击')
}
function handleAdd() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
</script>
<style lang="less" scoped>
/deep/ .ant-form-item {
margin-bottom: 10px !important;
}
/deep/ .ant-card-body {
padding-bottom: 0px !important;
}
.table-operator {
margin-bottom: 18px;
}
.Close {
height: 45px;
overflow: hidden;
}
.vxe-table--render-default .vxe-body--row.row--stripe {
background: #f5f9fe;
}
.ant-card-body {
padding-top: 10px;
}
.inline {
position: relative;
}
.inline-right {
position: absolute;
top: 6px;
right: 25px;
}
.change {
display: flex;
justify-content: center;
margin-top: 25px;
div {
width: 120px;
height: 50px;
background-color: rgb(247, 249, 250);
border: 1px solid rgb(247, 249, 250);
color: rgb(105, 102, 102);
line-height: 50px;
text-align: center;
cursor: pointer;
transition: box-shadow 0.3s, background-color 0.3s;
margin-right: 10px;
}
div:hover {
border: 1px solid #d1cfcf;
}
}
</style>

@ -1397,6 +1397,7 @@ function handleChangePrice(val) {
// }
}
//
function handleSelectPrice(val) {
contractnoList.value.forEach(item => {
if (item.id === val) {
@ -1460,6 +1461,7 @@ function handleSelectCQ(item) {
}
const emit = defineEmits(['handleSuccess'])
//
function handleSubimt() {
this.$refs.form.validate(valid => {
if (valid) {
@ -1551,7 +1553,7 @@ function handleSave() {
}
}
//
function handleCopyMore() {
const data = {
originalId: this.mskCopyId,
@ -1689,6 +1691,7 @@ function handleChagneType() {
disabled.value = true
}
}
function handleSelectGoods(item) {
goodsFlag.value = false
this.$set(form, 'commodityCode', item.commodityCode)
@ -1908,12 +1911,13 @@ function getGoodsList() {
})
}
}
//
function getAutoViewRes({ type, res }) {
if (type === 'contractno') {
form.contractno = res.contractNo || ''
}
}
//
function getContractnoList() {
getContractno({ carrier: 'MSK' }).then(res => {
contractnoList.value = res.data

Loading…
Cancel
Save