|
|
|
@ -106,6 +106,15 @@
|
|
|
|
|
<span class="iconfont icon-a-gaipei1"></span>
|
|
|
|
|
改配
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button
|
|
|
|
|
v-if="source == 'edit' || source == 'copy'"
|
|
|
|
|
type="link"
|
|
|
|
|
v-repeat
|
|
|
|
|
@click="returnCabin"
|
|
|
|
|
>
|
|
|
|
|
<span class="iconfont icon-tuihuotuihuo"></span>
|
|
|
|
|
退舱
|
|
|
|
|
</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 放舱(场站入货) -->
|
|
|
|
|
<OpBusinessYardDetails :details="details" @register="OYregisterModal" />
|
|
|
|
@ -591,6 +600,20 @@
|
|
|
|
|
<a-button type="primary" @click="sendChangeConfig">改 配</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 退舱 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
width="500px"
|
|
|
|
|
class="ds-modal-small"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
v-model:visible="returnCabinFlag"
|
|
|
|
|
title="退舱确认"
|
|
|
|
|
>
|
|
|
|
|
<BasicForm @register="registerFormR" />
|
|
|
|
|
<template #footer>
|
|
|
|
|
<a-button @click="returnCabinFlag = false">取 消</a-button>
|
|
|
|
|
<a-button type="primary" @click="handleCancelCabin">退 舱</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
@ -688,6 +711,8 @@
|
|
|
|
|
const fileFlag = ref(false)
|
|
|
|
|
// 改配弹窗开关
|
|
|
|
|
const changeConfigFlag = ref(false)
|
|
|
|
|
// 退舱弹窗开关
|
|
|
|
|
const returnCabinFlag = ref(false)
|
|
|
|
|
// 表单校验规则
|
|
|
|
|
const rules = {
|
|
|
|
|
traceValue: [
|
|
|
|
@ -1098,11 +1123,18 @@
|
|
|
|
|
schemas: fileForm,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
// 改配表单
|
|
|
|
|
const [registerFormC, { validate, setFieldsValue }] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: changeForm,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
// 退舱表单
|
|
|
|
|
const [registerFormR, { validate: validater, setFieldsValue: setFieldsValuer }] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: changeForm,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
// 改配
|
|
|
|
|
const changeConfig = () => {
|
|
|
|
|
GetChangeOrderStatus({ id: props.id }).then((res) => {
|
|
|
|
@ -1450,6 +1482,16 @@
|
|
|
|
|
{ name: '卸货港', code: 'dischargePort' },
|
|
|
|
|
{ name: '通知人', code: 'notifyPartyContent' },
|
|
|
|
|
])
|
|
|
|
|
// 退舱按钮
|
|
|
|
|
const returnCabin = () => {
|
|
|
|
|
// 未订舱或者已开船,不可退舱
|
|
|
|
|
const etd = props.details.etd
|
|
|
|
|
const now = new Date()
|
|
|
|
|
// if (!props?.details?.isBooking || new Date(etd) > now) {
|
|
|
|
|
// return createMessage.warning('未订舱或已开船不可退舱!')
|
|
|
|
|
// }
|
|
|
|
|
returnCabinFlag.value = true
|
|
|
|
|
}
|
|
|
|
|
// function uploadFile(file) {
|
|
|
|
|
// const formData = new FormData()
|
|
|
|
|
// formData.append('file', file.file)
|
|
|
|
@ -1620,15 +1662,7 @@
|
|
|
|
|
}
|
|
|
|
|
function handleCancelCabin() {
|
|
|
|
|
cabinLoad.value = true
|
|
|
|
|
CancelAllocationSlot(props.details.id).then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
notification.success({ message: '取消成功', duration: 3 })
|
|
|
|
|
emit('handleSetCtnList')
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
cabinLoad.value = false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function removeOrder() {
|
|
|
|
|
emit('removeOrder')
|
|
|
|
|