|
|
|
@ -4,34 +4,24 @@
|
|
|
|
|
* @Date: 2024-04-29 11:54:04
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<a-modal
|
|
|
|
|
title="引入舱位"
|
|
|
|
|
@cancel="visible = false"
|
|
|
|
|
@ok="handleOk"
|
|
|
|
|
v-if="visible"
|
|
|
|
|
:visible="visible"
|
|
|
|
|
width="80%"
|
|
|
|
|
:confirmLoading="loading"
|
|
|
|
|
>
|
|
|
|
|
<a-modal title="引入舱位" @cancel="visible = false" @ok="handleOk" v-if="visible" :visible="visible" width="80%"
|
|
|
|
|
:confirmLoading="loading">
|
|
|
|
|
<a-spin :spinning="loading">
|
|
|
|
|
<BasicTable
|
|
|
|
|
class="ds-table-detail"
|
|
|
|
|
@register="registerTable"
|
|
|
|
|
/>
|
|
|
|
|
<BasicTable class="ds-table-detail" @register="registerTable" />
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { defineExpose, ref, defineProps, defineEmits } from 'vue'
|
|
|
|
|
import { BasicTable, useTable } from '/@/components/Table'
|
|
|
|
|
import { GetAvailableBookingSlots, BringInBookingSlotToOrder } from '../../api/BookingLedger.js'
|
|
|
|
|
import { storageColumns, storageSearchFormSchema } from './ladingInfo'
|
|
|
|
|
// 引入提示信息
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
import { useI18n } from '/@/hooks/web/useI18n'
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
import { defineExpose, ref, defineProps, defineEmits } from 'vue'
|
|
|
|
|
import { BasicTable, useTable } from '/@/components/Table'
|
|
|
|
|
import { GetAvailableBookingSlots, BringInBookingSlotToOrder } from '../../api/BookingLedger.js'
|
|
|
|
|
import { storageColumns, storageSearchFormSchema } from './ladingInfo'
|
|
|
|
|
// 引入提示信息
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
import { useI18n } from '/@/hooks/web/useI18n'
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
// 业务id
|
|
|
|
|
id: {
|
|
|
|
|
type: String
|
|
|
|
@ -40,11 +30,11 @@
|
|
|
|
|
reload: {
|
|
|
|
|
type: Function
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const emit = defineEmits(['createTask'])
|
|
|
|
|
// 引入处理入参方法
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
const [registerTable, { reload, getSelectRows }] = useTable({
|
|
|
|
|
})
|
|
|
|
|
const emit = defineEmits(['createTask'])
|
|
|
|
|
// 引入处理入参方法
|
|
|
|
|
import { formatParams } from '/@/hooks/web/common'
|
|
|
|
|
const [registerTable, { getForm, reload, getSelectRows }] = useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await GetAvailableBookingSlots(p)
|
|
|
|
@ -54,7 +44,18 @@
|
|
|
|
|
},
|
|
|
|
|
// 请求前的参数格式化
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
const data = formatParams(p)
|
|
|
|
|
const queryData = JSON.parse(formatParams(p).queryCondition)
|
|
|
|
|
let i = queryData.length
|
|
|
|
|
while (i--) {
|
|
|
|
|
if (queryData[i].FieldName === 'slotNo') {
|
|
|
|
|
queryData.splice(i, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
data.queryCondition = JSON.stringify(queryData)
|
|
|
|
|
data.otherQueryCondition = {}
|
|
|
|
|
data.otherQueryCondition = getForm().getFieldsValue().slotNo
|
|
|
|
|
return data
|
|
|
|
|
},
|
|
|
|
|
columns: storageColumns,
|
|
|
|
|
formConfig: {
|
|
|
|
@ -77,14 +78,14 @@
|
|
|
|
|
},
|
|
|
|
|
canResize: true,
|
|
|
|
|
resizeHeightOffset: 80
|
|
|
|
|
})
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
// 初始化组件
|
|
|
|
|
const init = () => {
|
|
|
|
|
})
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
// 初始化组件
|
|
|
|
|
const init = () => {
|
|
|
|
|
visible.value = true
|
|
|
|
|
}
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const handleOk = () => {
|
|
|
|
|
}
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const handleOk = () => {
|
|
|
|
|
const slots = getSelectRows()
|
|
|
|
|
if (!slots.length) return createMessage.warning('请选择舱位!')
|
|
|
|
|
loading.value = true
|
|
|
|
@ -97,12 +98,10 @@
|
|
|
|
|
visible.value = false
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
init
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style lang="less"></style>
|