舱单弹窗

szh-new
lijingjia 4 months ago
parent 09b2932600
commit ed012ecd4e

@ -44,8 +44,8 @@
line-height: 26px !important; line-height: 26px !important;
font-size: 12px; font-size: 12px;
} }
.ant-picker, .ant-input { .ant-picker {
height: 26px!important; height: 25px!important;
width: 100%; width: 100%;
font-size: 12px!important; font-size: 12px!important;
} }

@ -482,7 +482,6 @@ export const formSchema: FormSchema[] = [
label: '开船日期', label: '开船日期',
field: 'etd', field: 'etd',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '',
colProps: { colProps: {
span: 6, span: 6,
}, },
@ -611,7 +610,6 @@ export const formSchema: FormSchema[] = [
label: '提箱时间', label: '提箱时间',
field: 'pickUpTime', field: 'pickUpTime',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '',
colProps: { colProps: {
span: 6, span: 6,
}, },
@ -701,7 +699,6 @@ export const formSchema: FormSchema[] = [
label: '入货时间', label: '入货时间',
field: 'receiveTime', field: 'receiveTime',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '',
colProps: { colProps: {
span: 6, span: 6,
}, },
@ -714,7 +711,7 @@ export const formSchema: FormSchema[] = [
label: '截港日期', label: '截港日期',
field: 'closingDate', field: 'closingDate',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '', defaultValue: null,
colProps: { colProps: {
span: 8, span: 8,
}, },
@ -727,7 +724,6 @@ export const formSchema: FormSchema[] = [
label: '截单日期', label: '截单日期',
field: 'closeDocDate', field: 'closeDocDate',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '',
colProps: { colProps: {
span: 8, span: 8,
}, },
@ -740,7 +736,6 @@ export const formSchema: FormSchema[] = [
label: '截VGM日期', label: '截VGM日期',
field: 'closeVGMDate', field: 'closeVGMDate',
component: 'DatePicker', component: 'DatePicker',
defaultValue: '',
colProps: { colProps: {
span: 8, span: 8,
}, },

@ -8,7 +8,7 @@
> >
<a-row> <a-row>
<a-col :span="6"> <a-col :span="6">
<BasicTable @register="registerOpBusinessYardTable"> <BasicTable @register="registerOpBusinessYardTable" @row-click="onRowClick">
<template #tableTitle> <template #tableTitle>
<div class="buttonGroup"> <div class="buttonGroup">
<a-button type="link" @click="FnClickAdd"> <a-button type="link" @click="FnClickAdd">
@ -32,6 +32,7 @@
</a-col> </a-col>
<a-col :span="18" class="OPCol"> <a-col :span="18" class="OPCol">
<OpBusinessYardEdit <OpBusinessYardEdit
ref="YardEdit"
:business-id="businessId" :business-id="businessId"
:select-id="selectId" :select-id="selectId"
@success="handleSuccess" @success="handleSuccess"
@ -112,7 +113,14 @@
}, },
}, },
}) })
//
const YardEdit = ref(null)
//
const onRowClick = (record) => {
YardEdit.value.setFieldsValue({
...record
})
}
// //
function FnClickDel() { function FnClickDel() {
if (getSelectRows().length) { if (getSelectRows().length) {

@ -10,7 +10,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from 'vue' import { ref, watch, defineExpose } from 'vue'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './OpBusinessYardColumns' import { formSchema } from './OpBusinessYardColumns'
import { EditOpBusinessYard, GetOpBusinessYardInfo } from './LetterApi' import { EditOpBusinessYard, GetOpBusinessYardInfo } from './LetterApi'
@ -50,10 +50,8 @@
async function handleSave() { async function handleSave() {
let ApiData: any = { let ApiData: any = {
mainInfo: {},
} }
const values = await validate() const values = await validate()
console.log(values)
Object.keys(values).forEach((item) => { Object.keys(values).forEach((item) => {
if (item == 'businessId' && !values.businessId) { if (item == 'businessId' && !values.businessId) {
ApiData.businessId = props.businessId ApiData.businessId = props.businessId
@ -65,10 +63,11 @@
if (res.succeeded) { if (res.succeeded) {
createMessage.success(res.message) createMessage.success(res.message)
emit('success') emit('success')
} else {
createMessage.error(res.message)
} }
} }
defineExpose({
setFieldsValue
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.MainBox { .MainBox {

@ -15,16 +15,16 @@
预配舱单列表 预配舱单列表
</h4> </h4>
<div> <div>
<a-button type="link" @click="addOrder" class="pl0 pb0"> <a-button v-repeat type="link" @click="addOrder" class="pl0 pb0">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加分单 添加分单
</a-button> </a-button>
<a-button type="link" @click="sendOrderFun" class="pb0"> <a-button v-repeat type="link" @click="sendOrderFun" class="pb0">
<span class="iconfont icon-tijiao1"></span> <span class="iconfont icon-tijiao1"></span>
发送 发送
</a-button> </a-button>
<div style="white-space: nowrap;"> <div style="white-space: nowrap;">
<a-button type="link" @click="saveOrder" class="pl0 pt0"> <a-button v-repeat type="link" @click="saveOrder" class="pl0 pt0">
<span class="iconfont icon-baocun"></span> <span class="iconfont icon-baocun"></span>
保存 保存
</a-button> </a-button>
@ -52,41 +52,62 @@
</a-popconfirm> </a-popconfirm>
</div> </div>
</div> </div>
<div class="sec-order"> <a-spin :spinning="floading">
<template v-for="(sedDetail, sindex) in orderList" :key="sindex"> <div class="sec-order">
<div class="order-box"> <h4>主提单号</h4>
<a-checkbox class="check-btn" v-model:checked="sedDetail.checked" /> <template v-for="(sedDetail, sindex) in orderList" :key="sindex + 'f'">
<span <div class="order-box">
class="order-label" <a-checkbox v-if="!sedDetail.isHBL" class="check-btn mb10" v-model:checked="sedDetail.checked" />
:class="{ active: sindex == editIndex }" <span
@click.stop="changeOrder(sindex)" class="order-label"
> :class="{ active: sindex == editIndex }"
<a-tag @click.stop="changeOrder(sindex, sedDetail)"
class="tag" >
v-if="sedDetail.state" <a-tag
:color="sedDetail.state === '已直发' ? '#00CC00' : ''" class="tag"
>{{ sedDetail.state }}</a-tag v-if="sedDetail.state && !sedDetail.isHBL"
>> :color="sedDetail.state === '已直发' ? '#00CC00' : ''"
<template v-if="!sedDetail.isHBL"> >{{ sedDetail.state }}</a-tag
主提单号{{ sedDetail.mblno || '请填写主提单号' }} >
</template> <template v-if="!sedDetail.isHBL">
<template v-else> {{ sedDetail.mblno || '请填写主提单号' }}
分提单号{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }} </template>
</template> </span>
</span> </div>
</div> </template>
</template> </div>
</div> <div class="mt15">
<h4>分提单号</h4>
<template v-for="(sedDetail, sindex) in orderList" :key="sindex">
<div class="order-box">
<a-checkbox v-if="sedDetail.isHBL" class="check-btn mb10" v-model:checked="sedDetail.checked" />
<span
class="order-label"
:class="{ active: sindex == editIndex }"
@click.stop="changeOrder(sindex, sedDetail)"
>
<a-tag
class="tag"
v-if="sedDetail.state && sedDetail.isHBL"
:color="sedDetail.state === '已直发' ? '#00CC00' : ''"
>{{ sedDetail.state }}</a-tag
>
<template v-if="sedDetail.isHBL">
{{ sedDetail.hblno || '请填写分单号' }}
</template>
</span>
</div>
</template>
</div>
</a-spin>
</div> </div>
<div class="pre-details"> <a-spin :spinning="floading" style="flex: 1">
<a-form <a-form
class="ds-detail-form" class="ds-detail-form"
layout="vertical" layout="vertical"
ref="basicFrom" ref="basicFrom"
:selfUpdate="true"
size="small" size="small"
:model="formState" :model="formState"
autocomplete="off"
> >
<div class="ds-card"> <div class="ds-card">
<h4>基本信息</h4> <h4>基本信息</h4>
@ -96,7 +117,7 @@
label="主提单号" label="主提单号"
name="mblno" name="mblno"
> >
<a-input v-model:value="formState.mblno" /> <a-input v-model:value="formState.mblno" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-else :span="4"> <a-col v-else :span="4">
@ -174,7 +195,6 @@
> >
<a-select <a-select
class="sft-select" class="sft-select"
placeholder="模版"
v-model:value="formState.shipperId" v-model:value="formState.shipperId"
@change=" @change="
(e) => { (e) => {
@ -204,7 +224,6 @@
> >
<a-select <a-select
class="sft-select" class="sft-select"
placeholder="模版"
v-model:value="formState.consigneeId" v-model:value="formState.consigneeId"
@change=" @change="
(e) => { (e) => {
@ -234,7 +253,6 @@
> >
<a-select <a-select
class="sft-select" class="sft-select"
placeholder="模版"
v-model:value="formState.notifyPartyId" v-model:value="formState.notifyPartyId"
@change=" @change="
(e) => { (e) => {
@ -464,7 +482,7 @@
<a-textarea <a-textarea
class="input-box" class="input-box"
v-model:value="formState.marks" v-model:value="formState.marks"
:auto-size="{ minRows: 7, maxRows: 7 }" :auto-size="{ minRows: 12, maxRows: 12 }"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -475,7 +493,7 @@
> >
<a-textarea <a-textarea
v-model:value="formState.description" v-model:value="formState.description"
:auto-size="{ minRows: 7, maxRows: 7 }" :auto-size="{ minRows: 12, maxRows: 12 }"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -622,61 +640,50 @@
</a-row> </a-row>
</div> </div>
<div class="ds-card mt15"> <div class="ds-card mt15">
<h4>集装箱信息</h4>
<div class="flex" style="justify-content: space-between;"> <div class="flex" style="justify-content: space-between;">
<a-form-item <div class="flex">
label="场站" <h4>集装箱信息</h4>
name="yardId" <div >
> <span style="font-size: 12px;" class="ml10">场站</span>
<a-select v-model:value="formState.yardId" style="width: 200px"> <a-select v-model:value="formState.yardId" style="width: 100px">
<a-select-option <a-select-option
v-for="item in yardList" v-for="item in yardList"
:key="item.id" :key="item.id"
:value="item.id" :value="item.id"
> >
{{ item.codeName }} {{ item.codeName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </div>
<div>
<a-button type="link" @click="addCtn" class="pl0">
<span class="iconfont icon-new_document"></span>
新建
</a-button>
<a-button type="link" @click="CopyAddCtn">
<span class="iconfont icon-fuzhi3"></span>
复制新建
</a-button>
<a-button type="link" @click="DelCtn">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</div> </div>
</div> <div>
</div> <div style="float: right">
<div> <a-button type="link" @click="addCtn" class="pl0">
<a-col :span="24"> <span class="iconfont icon-new_document"></span>
<div class="mail-box"> 新建
<div class="ctn-btn"> </a-button>
<div class="import"> <a-button type="link" @click="CopyAddCtn">
<span class="iconfont icon-fuzhi3"></span>
</div> 复制新建
</div> </a-button>
<div class="table-box"> <a-button type="link" @click="DelCtn">
<hot-table ref="hotTb" :data="list" :settings="settings"> <span class="iconfont icon-shanchu21"></span>
<img 删除
v-show="!list.length" </a-button>
class="hot-tb-no-data"
src="../../../../../assets/images/nodata.png"
alt=""
/>
</hot-table>
</div>
</div> </div>
</a-col> </div>
</div>
<hot-table ref="hotTb" :data="list" :settings="settings">
<img
v-show="!list.length"
class="hot-tb-no-data"
src="../../../../../assets/images/nodata.png"
alt=""
/>
</hot-table>
</div> </div>
</a-form> </a-form>
</div> </a-spin>
</div> </div>
<a-modal <a-modal
width="50vw" width="50vw"
@ -743,7 +750,7 @@
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { preOrderD } from '/@/views/operation/seaexport/detail/modules/preOrderColumns' import { preOrderD } from '/@/views/operation/seaexport/detail/modules/preOrderColumns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification, createMessage } = useMessage()
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
import { HotTable } from '@handsontable/vue3' import { HotTable } from '@handsontable/vue3'
@ -755,37 +762,6 @@
}) })
const openPreOrderShow = ref(false) const openPreOrderShow = ref(false)
const id = ref() const id = ref()
const labelCol = {
xs: { span: 12 },
sm: { span: 4 },
md: { span: 4 }
}
const wrapperCol = {
xs: { span: 24 },
sm: { span: 15 },
md: { span: 20 },
}
const labelCol2 = {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 8 },
}
const wrapperCol2 = {
xs: { span: 24 },
sm: { span: 15 },
md: { span: 16 },
}
const labelCol3 = {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 6 },
}
const wrapperCol3 = {
xs: { span: 24 },
sm: { span: 15 },
md: { span: 16 },
}
// ----------------------------------------------- // -----------------------------------------------
function init() { function init() {
openPreOrderShow.value = true openPreOrderShow.value = true
@ -805,6 +781,11 @@
const orderList = ref<any>([]) const orderList = ref<any>([])
const formState = ref<any>({}) const formState = ref<any>({})
const editIndex = ref(0) const editIndex = ref(0)
const floading = ref(false)
//
const mainBillData = ref([])
//
const childBillData = ref([])
// //
function FngetPageESeaeEdi() { function FngetPageESeaeEdi() {
orderList.value.splice(0) orderList.value.splice(0)
@ -818,8 +799,10 @@
}, },
queryCondition: `[{"FieldName":"businessId","FieldValue":"${id.value}","ConditionalType":1}]`, queryCondition: `[{"FieldName":"businessId","FieldValue":"${id.value}","ConditionalType":1}]`,
} }
floading.value = true
GetShippingBillList(ApiData) GetShippingBillList(ApiData)
.then((res) => { .then((res) => {
floading.value = false
if (res.succeeded) { if (res.succeeded) {
if (res.data.length > 0) { if (res.data.length > 0) {
res.data.forEach((e) => { res.data.forEach((e) => {
@ -832,7 +815,7 @@
if (e.mblno == route.query.mblno) { if (e.mblno == route.query.mblno) {
isHBL = false isHBL = false
} }
orderList.value.push({ checked: true, isHBL, ...e }) orderList.value.push({ checked: false, isHBL, ...e })
}) })
formState.value = orderList.value[editIndex.value] formState.value = orderList.value[editIndex.value]
} else { } else {
@ -858,7 +841,7 @@
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err) floading.value = false
}) })
} }
// //
@ -888,10 +871,12 @@
ApiData.yard = e.shortName ApiData.yard = e.shortName
} }
}) })
floading.value = true
EditShippingBill(ApiData).then((res) => { EditShippingBill(ApiData).then((res) => {
floading.value = false
if (res.succeeded) { if (res.succeeded) {
orderList.value[editIndex.value].id = res.data orderList.value[editIndex.value].id = res.data
notification.success({ message: res.message, duration: 3 }) createMessage.success(res.message)
} }
}) })
} }
@ -1000,10 +985,14 @@
init() init()
} }
// //
function changeOrder(index) { function changeOrder(index, sedDetail) {
orderList.value[editIndex.value] = formState.value orderList.value[editIndex.value] = formState.value
editIndex.value = index editIndex.value = index
formState.value = orderList.value[index] formState.value = orderList.value[index]
orderList.value.forEach(item => {
item.checked = false
})
sedDetail.checked = true
// GetShippingBillInfo({ id: formState.value.id }).then((res) => { // GetShippingBillInfo({ id: formState.value.id }).then((res) => {
// if (res.succeeded) { // if (res.succeeded) {
// notification.success({ message: res.message, duration: 3 }) // notification.success({ message: res.message, duration: 3 })
@ -1130,34 +1119,34 @@
// }, // },
{ {
title: '箱号', title: '箱号',
width: 80, width: 120,
data: 'cntrNo', data: 'cntrNo',
}, },
{ {
title: '封号', title: '封号',
width: 80, width: 120,
data: 'sealNo', data: 'sealNo',
}, },
{ {
title: '件数', title: '件数',
width: 80, width: 120,
data: 'pkgs', data: 'pkgs',
}, },
{ {
title: '毛重', title: '毛重',
width: 80, width: 120,
data: 'kgs', data: 'kgs',
}, },
{ {
title: '尺码', title: '尺码',
width: 80, width: 120,
data: 'cbm', data: 'cbm',
}, },
// kindPkgsName // kindPkgsName
// kindPkgs // kindPkgs
{ {
title: '包装', title: '包装',
width: 120, width: 150,
data: 'kindPkgs', data: 'kindPkgs',
type: 'dropdown', type: 'dropdown',
// (process) // (process)

Loading…
Cancel
Save