sunzehua 2 months ago
commit d89e24b39b

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

@ -171,7 +171,7 @@
position: absolute; position: absolute;
right: -20px; right: -20px;
top: 5px; top: 5px;
font-size: 10px; font-size: 12px;
color: #CED5D9; color: #CED5D9;
div { div {
margin-bottom: 4px; margin-bottom: 4px;
@ -188,25 +188,23 @@
height: 16px; height: 16px;
width: 16px; width: 16px;
border-radius: 2px; border-radius: 2px;
font-size: 10px; font-size: 12px;
text-align: center; text-align: center;
background: #F5F9FC;
color: @primary-color; color: @primary-color;
margin-right: 0; margin-right: 0;
margin-left: 4px; margin-left: 15px;
margin-bottom: 4px; margin-bottom: 4px;
cursor: pointer; cursor: pointer;
} }
.ds-cut-btn { .ds-cut-btn {
display: inline-block; display: inline-block;
width: 32px; width: 16px;
height: 16px; height: 16px;
line-height: 16px; line-height: 16px;
margin-left: 4px; margin-left: 15px;
margin-bottom: 4px; margin-bottom: 4px;
background: #F5F9FC;
color: @primary-color; color: @primary-color;
font-size: 10px; font-size: 12px;
text-align: center; text-align: center;
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;

@ -219,6 +219,10 @@
tareWeight: '', tareWeight: '',
note: '' note: ''
} }
const init = (data) => {
list.value = data
hotTb.value.hotInstance.loadData(data)
}
// //
const addRow = () => { const addRow = () => {
const deepCopyRow = JSON.parse(JSON.stringify(row)) const deepCopyRow = JSON.parse(JSON.stringify(row))
@ -324,6 +328,31 @@
createMessage.success('更新成功!') createMessage.success('更新成功!')
} }
} }
//
function GetCtnList() {
GetOpCtnList({
queryCondition: JSON.stringify([
{
FieldName: 'bsno',
FieldValue: props.id,
ConditionalType: 1,
},
]),
pageCondition: {
pageIndex: 1,
pageSize: 999,
sortConditions: [],
},
}).then((res) => {
const { data } = res
if (data.length == 0) {
list.value = []
} else {
list.value = data
}
hotTb.value.hotInstance.loadData(list.value)
})
}
onMounted(() => { onMounted(() => {
const hot = hotTb.value.hotInstance const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {}) hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
@ -340,9 +369,11 @@
} }
} }
}) })
GetCtnList()
}) })
defineExpose({ defineExpose({
list list,
init
}) })
</script> </script>

@ -1,6 +1,6 @@
import { FormSchema, BasicColumn } from '/@/components/Table' import { FormSchema, BasicColumn } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetPackageSelectList, GetShippingBillTemplateSelectList, GetClientPortSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -21,129 +21,171 @@ export const formSchema1: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'shipperContent', field: 'shipperId',
component: 'Input', component: 'Input',
defaultValue: '',
show: false, show: false,
}, },
{
label: '发货人',
field: 'shipper',
labelSlot: 'shipper',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 24 },
componentProps: ({ formModel }) => {
return {
api: GetShippingBillTemplateSelectList,
params: { type: 2, id: formModel.wtdwId },
labelField: 'templateName',
valueField: 'templateName',
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.shipperId = obj.id
formModel.shipperContent = obj.content
}
if (e === undefined && obj === undefined) {
formModel.shipperId = null
formModel.shipperContent = null
formModel.shipper = ''
}
},
}
},
},
{
label: ' ',
field: 'shipperContent',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
slice: [30, 35, 40],
},
},
{ {
label: '', label: '',
field: 'shipperId', field: 'consigneeId',
component: 'Input', component: 'Input',
defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'fhr', label: '收货人',
component: 'SelectTextArea', field: 'consignee',
labelSlot: 'consignee',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
label: '发货人', api: GetShippingBillTemplateSelectList,
details: formModel, params: { type: 1, id: formModel.wtdwId },
field: 'shipper', labelField: 'templateName',
onChange: (e) => { valueField: 'templateName',
if (e) { resultField: 'data',
switch (e.type) { immediate: false,
case 'Content': filterOption: (input: string, option: any) => {
formModel[`shipper${e.type}`] = e.res return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
break },
case 'Id': onChange: (e, obj) => {
formModel.shipperId = e.res.id if (e && obj) {
formModel.shipperContent = e.res.content formModel.consigneeId = obj.id
break formModel.consigneeContent = obj.content
default:
break
}
} }
} if (e === undefined && obj === undefined) {
formModel.consigneeId = null
formModel.consignee = null
formModel.consigneeContent = ''
}
},
} }
} },
}, },
{ {
label: '', label: ' ',
field: 'consigneeContent', field: 'consigneeContent',
component: 'Input', component: 'InputTextArea',
defaultValue: '', colProps: { span: 24 },
show: false, componentProps: {
slice: [30, 35, 40],
},
}, },
{ {
label: '', label: '',
field: 'consigneeId', field: 'notifyPartyId',
component: 'Input', component: 'Input',
defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'shr', label: '通知人',
component: 'SelectTextArea', field: 'notifyParty',
component: 'ApiSelect',
labelSlot: 'notifyParty',
required: false,
dynamicDisabled: false,
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
label: '发货人', api: GetShippingBillTemplateSelectList,
details: formModel, params: { type: 3, id: formModel.wtdwId },
field: 'consignee', labelField: 'templateName',
onChange: (e) => { valueField: 'templateName',
if (e) { resultField: 'data',
switch (e.type) { immediate: false,
case 'Content': alwaysLoad: false,
formModel[`consignee${e.type}`] = e.res filterOption: (input: string, option: any) => {
break return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
case 'Id': },
formModel.consigneeId = e.res.id onChange: (e, obj) => {
formModel.consigneeContent = e.res.content if (e && obj) {
break formModel.notifyPartyId = obj.id
default: formModel.notifyPartyContent = obj.content
break
}
} }
} if (e === undefined && obj === undefined) {
formModel.notifyPartyId = null
formModel.notifyPartyContent = ''
formModel.notifyParty = ''
}
},
} }
},
},
{
label: ' ',
field: 'notifyPartyContent',
component: 'InputTextArea',
required: false,
dynamicDisabled: false,
colProps: { span: 24 },
componentProps: {
slice: [30, 35, 40],
} }
}, },
{ {
label: '', label: '',
field: 'notifyPartyContent', field: 'secondNotifyPartyContent',
component: 'Input',
defaultValue: '', defaultValue: '',
component: 'Input',
show: false, show: false,
}, },
{ {
label: '', label: '',
field: 'notifyPartyId', field: 'secondNotifyParty',
component: 'Input',
defaultValue: '', defaultValue: '',
component: 'Input',
show: false, show: false,
}, },
{ {
field: 'tzr', label: '',
component: 'SelectTextArea', field: 'secondNotifyPartyId',
colProps: { span: 24 },
defaultValue: '', defaultValue: '',
componentProps: ({ formModel }) => { component: 'Input',
return { show: false,
label: '通知人',
details: formModel,
field: 'notifyParty',
onChange: (e) => {
if (e) {
switch (e.type) {
case 'Content':
formModel[`notifyParty${e.type}`] = e.res
break
case 'Id':
formModel.notifyPartyId = e.res.id
formModel.notifyPartyContent = e.res.content
break
default:
break
}
}
}
}
}
} }
] ]
@ -153,15 +195,23 @@ export const formSchema2: FormSchema[] = [
field: 'etd', field: 'etd',
label: '开船日期', label: '开船日期',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 3 }, colProps: { span: 5 },
defaultValue: '' defaultValue: null,
componentProps: {
allowClear: true,
valueFormat: 'YYYY-MM-DD',
}
}, },
{ {
field: 'eta', field: 'eta',
label: '预抵日期', label: '预抵日期',
component: 'DatePicker', component: 'DatePicker',
colProps: { span: 3 }, colProps: { span: 5 },
defaultValue: '' defaultValue: null,
componentProps: {
allowClear: true,
valueFormat: 'YYYY-MM-DD'
}
}, },
{ {
label: '船名Name', label: '船名Name',
@ -176,7 +226,7 @@ export const formSchema2: FormSchema[] = [
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 10 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
option: optionsStore.getOptionsByCode('GetVesselSelectList'), option: optionsStore.getOptionsByCode('GetVesselSelectList'),
@ -196,252 +246,274 @@ export const formSchema2: FormSchema[] = [
} }
}, },
{ {
label: '装货港', label: '海关航次',
field: 'loadPortId', field: 'voyno',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: ({ formModel }) => { componentProps: () => {
return { return {
allowClear: true, option: optionsStore.getOptionsByCode('GetVoynoSelectList'),
showSearch: true, labelField: 'voyNo',
api: () => { valueField: 'voyNo',
return new Promise((resolve) => {
const data = JSON.parse(
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
)
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
showName: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: (e, obj) => {
if (obj) {
formModel.loadPort = obj.portName
} else {
formModel.loadPort = ''
}
}
} }
} }
}, },
{ {
label: ' ', label: '装货港',
field: 'loadPort', field: 'loadPortCode',
component: 'Input',
colProps: { span: 3 }
},
{
label: '卸货港代码',
field: 'dischargePortId',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: ({ formModel }) => { componentProps: ({ formModel, formActionType }) => {
return { return {
allowClear: true, api: GetClientPortSelectList,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const data = JSON.parse(
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
)
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { labelField: 'pinYinCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
}, showName: 'ediCode',
immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (obj) { if (e && obj) {
formModel.dischargePort = obj.portName formModel.loadPortId = obj.id
} else { formModel.loadPort = obj.portName
formModel.dischargePort = '' }
if (!e && !obj) {
formModel.loadPortId = null
formModel.loadPort = null
} }
}, },
} }
}, },
}, },
{ {
label: ' ', label: '卸货港',
field: 'dischargePort', field: 'dischargePortCode',
component: 'Input', component: 'ApiSelect',
required: false, required: false,
colProps: { span: 3 }, dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel, formActionType }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
showName: 'ediCode',
valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.dischargePortId = obj.id
formModel.dischargePort = obj.portName
// 带出交货地
formModel.deliveryPlaceId = obj.id
formModel.deliveryPlace = obj.portName
formModel.deliveryPlaceCode = e
}
if (!e && !obj) {
formModel.dischargePortId = null
formModel.dischargePort = null
}
},
}
},
}, },
{ {
label: '海关航次', label: '交货地',
field: 'voyno', field: 'deliveryPlaceCode',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: () => { componentProps: ({ formModel }) => {
return { return {
option: optionsStore.getOptionsByCode('GetVoynoSelectList'), api: GetClientPortSelectList,
labelField: 'voyNo', resultField: 'data',
valueField: 'voyNo', labelField: 'pinYinCode',
filterOption: (input: string, option: any) => { showName: 'ediCode',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.deliveryPlaceId = obj.id
formModel.deliveryPlace = obj.portName
}
if (!e && !obj) {
formModel.deliveryPlaceId = null
formModel.deliveryPlace = null
}
}, },
} }
} },
}, },
{ {
label: '目的地', label: '收货地',
field: 'destinationId', field: 'receiptPlaceCode',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: true, api: GetClientPortSelectList,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const data = JSON.parse(
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
)
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
valueField: 'id',
resultField: 'data', resultField: 'data',
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 labelField: 'pinYinCode',
}, valueField: 'ediCode',
showName: 'ediCode',
onChange: (e, obj) => { onChange: (e, obj) => {
if (obj) { if (e && obj) {
formModel.destination = obj.portName formModel.receiptPlace = obj.portName
} else { formModel.receiptPlaceId = obj.id
formModel.destination = '' }
if (!e && !obj) {
formModel.receiptPlace = null
formModel.receiptPlaceId = null
} }
}, },
} }
}, },
}, },
{ {
label: ' ', label: '中转港',
field: 'destination', field: 'transPortCode',
component: 'Input',
colProps: { span: 3 }
},
{
label: '交货地',
field: 'deliveryPlaceId',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
// defaultValue: '', // defaultValue: '',
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetClientPortSelectList,
resultField: 'data',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
api: () => { labelField: 'pinYinCode',
return new Promise((resolve) => { showName: 'ediCode',
const data = JSON.parse( valueField: 'ediCode',
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')), immediate: false,
)
data.forEach((e) => {
e.ediCode = `${e.portName}/${e.ediCode}`
})
resolve({ data })
})
},
labelField: 'ediCode',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (obj) { if (e && obj) {
formModel.deliveryPlace = obj.portName formModel.transPortId = obj.id
} else { formModel.transPort = obj.portName
formModel.deliveryPlace = '' }
if (!e && !obj) {
formModel.transPortId = null
formModel.transPort = null
} }
}, },
} }
},
},
{
label: '',
field: 'loadPort',
component: 'Input',
required: false,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
oninput: () => {
formModel.loadPort = formModel.loadPort.replace(/[\u4e00-\u9fa5]/ig,'')
}
}
} }
}, },
{ {
label: ' ', label: '',
field: 'deliveryPlace', field: 'loadPortId',
component: 'Input',
show: false,
},
{
label: '',
field: 'dischargePort',
component: 'Input', component: 'Input',
required: false, required: false,
colProps: { span: 3 }, colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
oninput: () => {
formModel.dischargePort = formModel.dischargePort.replace(/[\u4e00-\u9fa5]/ig,'')
}
}
}
}, },
{ {
label: '收货地', label: '',
field: 'receiptPlaceId', field: 'dischargePortId',
component: 'ApiSelect', component: 'Input',
show: false,
},
{
label: '',
field: 'deliveryPlace',
component: 'Input',
required: false, required: false,
dynamicDisabled: false, colProps: { span: 5 },
// defaultValue: '',
colProps: { span: 3 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: true, oninput: () => {
showSearch: true, formModel.deliveryPlace = formModel.deliveryPlace.replace(/[\u4e00-\u9fa5]/ig,'')
api: () => {
return new Promise((resolve) => {
const data = JSON.parse(
JSON.stringify(optionsStore.getOptionsByCode('GetClientPortSelectList')),
)
data.forEach((item) => {
item.portName = `${item.portName}(${item.ediCode})`
})
resolve({ data })
})
},
labelField: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.receiptPlace = obj.label
} else {
formModel.receiptPlace = ''
}
} }
} }
}, }
}, },
{ {
label: ' ', label: '',
field: 'deliveryPlaceId',
component: 'Input',
show: false,
},
{
label: '',
field: 'receiptPlace', field: 'receiptPlace',
component: 'Input', component: 'Input',
required: false, required: false,
colProps: { span: 3 } colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
oninput: () => {
formModel.receiptPlace = formModel.receiptPlace.replace(/[\u4e00-\u9fa5]/ig,'')
}
}
}
},
{
label: '',
field: 'receiptPlaceId',
component: 'Input',
show: false,
},
{
label: '',
field: 'transPort',
component: 'Input',
required: false,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
oninput: () => {
formModel.transPort = formModel.transPort.replace(/[\u4e00-\u9fa5]/ig,'')
}
}
}
},
{
label: '',
field: 'transPortId',
component: 'Input',
show: false,
} }
] ]
@ -889,7 +961,8 @@ export const searchFormSchema: FormSchema[] = [
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
allowClear: true allowClear: true,
valueFormat: 'YYYY-MM-DD',
} }
} }
] ]

@ -7,15 +7,41 @@
<div class="ds-sea-lading-info"> <div class="ds-sea-lading-info">
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<!-- 按钮操作栏 --> <!-- 按钮操作栏 -->
<div class="btn-box flex"> <div class="btn-box">
<div> <div>
<a-tooltip placement="top" title="新建">
<SvgIcon size="18" name="create" @click="create" />
</a-tooltip>
<a-tooltip placement="top" title="保存">
<SvgIcon class="ml30" size="18" name="save" @click="save" />
</a-tooltip>
<a-tooltip placement="top" title="删除">
<SvgIcon class="ml30" size="18" name="delete" @click="deleteRow" />
</a-tooltip>
<a-tooltip placement="top" title="打印">
<SvgIcon class="ml30" size="18" name="print" />
</a-tooltip>
<!-- <a-popconfirm
:visible="deleteFlag"
title="确定要删除勾选的数据?"
ok-text="确定"
cancel-text="取消"
@confirm="deleteRow"
@cancel="cancelDelete"
@click="checkDelete"
>
<a-button type="link" >
<span class="iconfont icon-shanchu1"></span>
删除
</a-button>
</a-popconfirm> -->
<a-popconfirm <a-popconfirm
title="确定要调入主单的收发通信息吗?" title="确定要调入主单的收发通信息吗?"
ok-text="确定" ok-text="确定"
cancel-text="取消" cancel-text="取消"
@confirm="importMainInfo" @confirm="importMainInfo"
> >
<a-button type="link"> <a-button type="link" style="margin-left: 30px;">
<span class="iconfont icon-a-17Btuichu"></span> <span class="iconfont icon-a-17Btuichu"></span>
调入主单信息 调入主单信息
</a-button> </a-button>
@ -33,39 +59,19 @@
EDI报文导出 EDI报文导出
<span class="iconfont icon-30jiantouxiangxiafill"></span> <span class="iconfont icon-30jiantouxiangxiafill"></span>
</a-button> </a-button>
<a-button type="link" @click="msg">
<span class="iconfont icon-xiaopiaodayin"></span>
打印
</a-button>
</div>
<div>
<a-button type="link" @click="create">
<span class="iconfont icon-icon_tianjia"></span>
新建
</a-button>
<a-button type="link" @click="save">
<span class="iconfont icon-a-17Btuichu"></span>
保存
</a-button>
<a-popconfirm
:visible="deleteFlag"
title="确定要删除勾选的数据?"
ok-text="确定"
cancel-text="取消"
@confirm="deleteRow"
@cancel="cancelDelete"
@click="checkDelete"
>
<a-button type="link" >
<span class="iconfont icon-shanchu1"></span>
删除
</a-button>
</a-popconfirm>
</div> </div>
</div> </div>
<div class="flex"> <div class="flex">
<!-- 提单信息表 --> <!-- 提单信息表 -->
<BasicTable <div class="card-box bill-list">
<h4>分提单号</h4>
<div v-if="list.length == 0" class="mt15">
<img src="../../../../../assets/images/nodata.png" alt="">
<div class="no-message">暂无数据</div>
</div>
</div>
<!-- <BasicTable
class="ds-table-detail" class="ds-table-detail"
style="width: 280px" style="width: 280px"
:canRowSelect="true" :canRowSelect="true"
@ -73,21 +79,20 @@
rowKey="id" rowKey="id"
@register="registerTable" @register="registerTable"
@row-click="onRowClick" @row-click="onRowClick"
></BasicTable> ></BasicTable> -->
<!-- 提单信息详情 --> <!-- 提单信息详情 -->
<a-tabs v-model:activeKey="activeKey" class="ds-sea-child-tab"> <a-tabs v-model:activeKey="activeKey" class="ds-sea-child-tab">
<a-tab-pane key="1" tab="分单信息" size="small"> <a-tab-pane key="1" tab="分单信息" size="small">
<a-spin :spinning="dloading"> <a-spin :spinning="dloading">
<div class="flex card-box lading-box"> <div class="flex mt10">
<!-- 收发通表单 --> <!-- 收发通表单 -->
<BasicForm style="flex: 1;" @register="registerForm" /> <BasicForm style="flex: 1;" @register="registerForm" />
<!-- 集装箱组件 --> <!-- 集装箱组件 -->
<div style="width: 740px;"> <div style="width: 800px;" class="ml15">
<!-- 集装箱表单 --> <!-- 集装箱表单 -->
<BasicForm style="margin-bottom: 0;" @register="containerForm" /> <BasicForm style="margin-bottom: 0;" @register="containerForm" />
<container <container
ref="contBox" ref="contBox"
class="ml15"
:id="id" :id="id"
:setFieldsValue="setFieldsValue3" :setFieldsValue="setFieldsValue3"
></container> ></container>
@ -120,10 +125,11 @@
</a-form> </a-form>
</div> </div>
</div> </div>
<div class="card-box mt15" style="border-top: 1px solid #E8EBED;"> <Divider type="horizontal" />
<div>
<!-- ETD表单 --> <!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" /> <BasicForm style="margin-top: 8px;" @register="ETDForm" />
<a-row> <a-row class="mt15">
<a-col :span="7"> <a-col :span="7">
<a-form <a-form
v-model="formData" v-model="formData"
@ -165,7 +171,7 @@
</a-col> </a-col>
</a-row> </a-row>
<!-- 签单方式表单 --> <!-- 签单方式表单 -->
<BasicForm style="margin-top: -10px;" class="issue-form" @register="issueForm" /> <BasicForm style="margin-top: 0px;" class="issue-form" @register="issueForm" />
</div> </div>
</a-spin> </a-spin>
</a-tab-pane> </a-tab-pane>
@ -179,22 +185,23 @@
</a-spin> </a-spin>
<ladingHistory <ladingHistory
:id="id" :id="id"
:reload="reload" :reload="init"
ref="ladHistory" ref="ladHistory"
/> />
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, defineProps } from 'vue' import { ref, reactive, defineProps, onMounted, defineAsyncComponent } from 'vue'
import { BasicTable, useTable } from '/@/components/Table' import { Divider } from 'ant-design-vue'
import { SvgIcon } from '/@/components/Icon'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { GetSeaExportBillManageList } from '../../api/BookingLedger' import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo' import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo'
import { getOptions } from '/@/hooks/dict' import { getOptions } from '/@/hooks/dict'
// //
import container from './container.vue' const container = defineAsyncComponent(() => import("./container.vue"))
// //
import ladingHistory from './ladingHistory.vue' const ladingHistory = defineAsyncComponent(() => import("./ladingHistory.vue"))
import { EditSeaExportBillManage, BatchDelBillManageCtn, GetSeaExportBillManageInfo } from '../../api/BookingLedger' import { EditSeaExportBillManage, BatchDelBillManageCtn, GetSeaExportBillManageInfo } from '../../api/BookingLedger'
// //
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -208,12 +215,7 @@
details: { type: Object, default: {} } details: { type: Object, default: {} }
}) })
const activeKey = ref('1') const activeKey = ref('1')
//
const state = reactive({
rowKeys: []
})
const selectiChange = (v) => { const selectiChange = (v) => {
state.rowKeys = v
if (v.length == 0) { if (v.length == 0) {
resetFields1() resetFields1()
resetFields2() resetFields2()
@ -272,18 +274,10 @@
schemas: formSchema6, schemas: formSchema6,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
//
const onRowClick = (record) => {
state.rowKeys = [record?.id]
setSelectedRows([record])
}
// //
const deleteFlag = ref(false) const deleteFlag = ref(false)
// //
const checkDelete = () => { const checkDelete = () => {
if (state.rowKeys.length == 0) {
return createMessage.warning('请勾选要删除的数据!')
}
deleteFlag.value = true deleteFlag.value = true
} }
// //
@ -292,13 +286,9 @@
deleteFlag.value = false deleteFlag.value = false
BatchDelBillManageCtn({ id: props.id, ids: state.rowKeys }).then(res => { BatchDelBillManageCtn({ id: props.id, ids: state.rowKeys }).then(res => {
loading.value = false loading.value = false
reload() init()
}) })
} }
//
const cancelDelete = () => {
deleteFlag.value = false
}
const dloading = ref(false) const dloading = ref(false)
// //
const setFormValue = () => { const setFormValue = () => {
@ -332,47 +322,77 @@
}) })
} }
} }
const [registerTable, { reload, getSelectRows, setSelectedRows }] = useTable({ //
api: async (p) => { const init = () => {
const res: API.DataResult = await GetSeaExportBillManageList(p) //
return new Promise((resolve) => { const postData = {
resolve({ data: [...res.data], total: res.count }) pageCondition: {
}) pageIndex: 1,
}, pageSize: 100,
beforeFetch: (p) => { sortConditions: []
const postParam: API.PageRequest = { },
pageCondition: { queryCondition: []
pageIndex: p.page, }
pageSize: p.pageSize, let condition: API.ConditionItem[] = []
sortConditions: [] condition.push({
} FieldName: 'businessId',
} FieldValue: props.id,
let condition: API.ConditionItem[] = [] ConditionalType: 1
condition.push({ })
FieldName: 'businessId', postData.queryCondition = JSON.stringify(condition)
FieldValue: props.id, GetSeaExportBillManageList(postData).then(res => {
ConditionalType: 1 list.value = res.data
}) }).catch(() => {
postParam.queryCondition = JSON.stringify(condition)
return postParam })
}, }
columns: [ //
{ const list = ref([])
title: '分提单号', onMounted(() => {
dataIndex: 'hblno', init()
width: 190, create()
align: 'left'
}
],
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
canResize: false
}) })
// const [registerTable, { reload, getSelectRows, setSelectedRows }] = useTable({
// api: async (p) => {
// const res: API.DataResult = await GetSeaExportBillManageList(p)
// return new Promise((resolve) => {
// resolve({ data: [...res.data], total: res.count })
// })
// },
// beforeFetch: (p) => {
// const postParam: API.PageRequest = {
// pageCondition: {
// pageIndex: p.page,
// pageSize: p.pageSize,
// sortConditions: []
// }
// }
// let condition: API.ConditionItem[] = []
// condition.push({
// FieldName: 'businessId',
// FieldValue: props.id,
// ConditionalType: 1
// })
// postParam.queryCondition = JSON.stringify(condition)
// return postParam
// },
// columns: [
// {
// title: '',
// dataIndex: 'hblno',
// width: 190,
// align: 'left'
// }
// ],
// isTreeTable: false,
// pagination: true,
// striped: true,
// useSearchForm: false,
// showTableSetting: false,
// bordered: true,
// showIndexColumn: false,
// canResize: false
// })
const loading = ref(false) const loading = ref(false)
// //
const formData = reactive({ const formData = reactive({
@ -545,31 +565,6 @@
} }
}, 0) }, 0)
} }
function ToEn(a) {
// eslint-disable-next-line no-array-constructor
const arr1 = new Array('', ' thousand', ' million', ' billion')
const b = a.length
let f: any = null
let h = 0
let g = ''
const e = Math.ceil(b / 3)
const k = b - e * 3
g = ''
for (f = k; f < b; f += 3) {
++h
// eslint-disable-next-line no-undef
const num3 = f >= 0 ? a.substring(f, f + 3) : a.substring(0, k + 3)
// eslint-disable-next-line no-undef
const strEng = English(num3)
// eslint-disable-next-line eqeqeq
if (strEng != '') {
// eslint-disable-next-line eqeqeq
if (g != '') g += ' '
g += English(num3) + arr1[e - h]
}
}
return g
}
function English(a) { function English(a) {
// eslint-disable-next-line no-array-constructor // eslint-disable-next-line no-array-constructor
var arr2 = new Array( var arr2 = new Array(
@ -634,37 +629,6 @@
if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)] if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)]
return strRet return strRet
} }
function GetStringNum(str) {
var num = 0
if (str == null || str == '') return num
if (str.length == 0) return num
var if_find = false
var str_num = ''
for (var i = 0; i < str.length; i += 1) {
var member = str.substr(i, 1)
if (
member == '0' ||
member == '1' ||
member == '2' ||
member == '3' ||
member == '4' ||
member == '5' ||
member == '6' ||
member == '7' ||
member == '8' ||
member == '9' ||
member == '.' ||
member == '-'
) {
if (!if_find) {
str_num = str_num + member
}
} else {
if_find = true
}
}
return str_num
}
// //
const ladHistory = ref(null) const ladHistory = ref(null)
// //
@ -675,7 +639,6 @@
const contBox = ref(null) const contBox = ref(null)
// //
const create = () => { const create = () => {
state.rowKeys = []
resetFields1() resetFields1()
resetFields2() resetFields2()
resetFields3() resetFields3()
@ -685,17 +648,48 @@
formData.cntrSealNo = '' formData.cntrSealNo = ''
formData.description = '' formData.description = ''
formData.marks = '' formData.marks = ''
setFieldsValue1({
...props.details
})
setFieldsValue2({
...props.details
})
setFieldsValue3({
...props.details
})
setFieldsValue4({
...props.details
})
setFieldsValue5({ setFieldsValue5({
...props.details ...props.details
}) })
formData.agentId = props.details.agentId
formData.agentContent = props.details.agentContent
formData.cntrSealNo = props.details.cntrSealNo
formData.description = props.details.description
formData.marks = props.details.marks
createMessage.success('表单已置为新建状态!') createMessage.success('表单已置为新建状态!')
} }
// //
const importMainInfo = () => { const importMainInfo = () => {
console.log(props.details)
setFieldsValue1({ setFieldsValue1({
...props.details ...props.details
}) })
setFieldsValue2({
...props.details
})
setFieldsValue3({
...props.details
})
setFieldsValue4({
...props.details
})
setFieldsValue5({
...props.details
})
setFieldsValue6({
...props.details
})
} }
// //
const save = async() => { const save = async() => {
@ -711,14 +705,13 @@
loading.value = false loading.value = false
if (res.succeeded) { if (res.succeeded) {
createMessage.success('保存成功!') createMessage.success('保存成功!')
if (res.data && res.data.length) {
state.rowKeys = [res.data]
}
setFieldsValue1({ setFieldsValue1({
id: res.data id: res.data
}) })
} }
reload() init()
}).catch(() => {
loading.value = false
}) })
} }
const msg = () => { const msg = () => {
@ -729,23 +722,38 @@
<style lang="less"> <style lang="less">
.ds-sea-lading-info { .ds-sea-lading-info {
padding-left: 20px; padding-left: 20px;
.ant-col-24{
.ant-form-item {
margin-bottom: 0!important;
}
}
.ml30 {
margin-left: 30px;
}
.ant-tabs-content {
overflow-x: hidden!important;
}
.ds-sea-child-tab { .ds-sea-child-tab {
flex: 1; flex: 1;
margin-left: 16px; margin-left: 16px;
} }
.ant-form-small {
margin: 15px 0 15px 15px;
}
.card-box { .card-box {
padding: 0 20px 0 5px; padding: 10px 20px;
border: 1px solid #E8EBED; border: 1px solid #E8EBED;
border-top: none;
border-radius: 2px; border-radius: 2px;
} }
.ant-tabs-content { .ant-tabs-content {
height: calc(100vh - 200px); height: calc(100vh - 200px);
overflow: auto; overflow: auto;
} }
.ant-col-5 {
max-width: 20%!important;
flex: 0 0 20%!important;
}
.ant-col-10 {
max-width: 40%!important;
flex: 0 0 40%!important;
}
.ant-col-3 { .ant-col-3 {
max-width: 14.28%; max-width: 14.28%;
} }
@ -761,9 +769,11 @@
max-width: 42.84%; max-width: 42.84%;
} }
.btn-box { .btn-box {
margin: 5px -5px; margin: 5px 0;
justify-content: space-between; svg {
padding-right: 15px; position: relative;
top: 2px;
}
} }
.pkg { .pkg {
.ant-row>div:nth-child(1), .ant-row>div:nth-child(4), .ant-row>div:nth-child(6) { .ant-row>div:nth-child(1), .ant-row>div:nth-child(4), .ant-row>div:nth-child(6) {
@ -788,5 +798,13 @@
position: absolute; position: absolute;
top: -1px; top: -1px;
} }
.bill-list {
width: 260px;
}
.no-message {
text-align: center;
font-size: 12px;
color: #999999;
}
} }
</style> </style>

@ -18,7 +18,7 @@
<div class="flex" style="position: relative;"> <div class="flex" style="position: relative;">
<!-- 保存按钮组 --> <!-- 保存按钮组 -->
<ActionBar <ActionBar
v-if="source == 'edit' || (route.query.source == 'Create' && route.query.status == 'WAIT_ORDER_AUDIT')" v-if="(source == 'edit' || source == 'copy') || (route.query.source == 'Create' && route.query.status == 'WAIT_ORDER_AUDIT')"
:id="route.query.id" :id="route.query.id"
code="sea_freight_export" code="sea_freight_export"
name="hyck" name="hyck"

@ -406,62 +406,15 @@
// //
const source = ref(route.query.source || 'edit') const source = ref(route.query.source || 'edit')
onMounted(() => { onMounted(() => {
// if (source.value != 'edit') { const nval = props.details
// cargoInfoFormSchema1.forEach(item => { if (nval.id) {
// item.dynamicDisabled = true setFieldsValue1({ marks: nval.marks, description: nval.description })
// }) setFieldsValue2(nval)
// cargoInfoFormSchema2.forEach(item => { setFieldsValue3(nval)
// item.dynamicDisabled = true setFieldsValue4({ totalNo: nval.totalNo, ctnPriceInfo: nval.ctnPriceInfo })
// }) if (nval.cargoId) cargoId.value = nval.cargoId
// cargoInfoFormSchema3.forEach(item => { }
// item.dynamicDisabled = true
// })
// } else {
// cargoInfoFormSchema1.forEach(item => {
// item.dynamicDisabled = false
// })
// cargoInfoFormSchema2.forEach(item => {
// item.dynamicDisabled = false
// })
// cargoInfoFormSchema3.forEach(item => {
// item.dynamicDisabled = false
// })
// }
}) })
// function SetTOTALNO(SS) {
// let DSS = SS.toString()
// const i = DSS.indexOf('\n')
// let num = 0
// let strKind = ''
// let enCapital = ''
// if (i > 0) {
// const slist = DSS.split('\n')
// for (let i = 0; i < slist.length; i += 1) {
// const member = slist[i]
// const strNum: any = GetStringNum(member)
// if (i == 0) {
// strKind = member.substring(strNum.length)
// }
// num = parseFloat(num).add(parseFloat(strNum))
// }
// if (strKind !== '') {
// enCapital = strKind
// } else {
// strKind = props.details.kindpkgs
// enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
// }
// } else {
// const strNum: any = GetStringNum(DSS)
// strKind = DSS.substring(strNum.length)
// if (strKind !== '') {
// enCapital = strKind
// } else {
// strKind = props.details.kindpkgs
// enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
// }
// }
// return enCapital
// }
// //
const ctnChange = (v, item) => { const ctnChange = (v, item) => {
console.log(item) console.log(item)

@ -156,13 +156,9 @@
loading.value = false loading.value = false
}) })
} }
// onMounted(() => { onMounted(() => {
// emitter.on('customerBack', (v) => { reload()
// if (v.clientContact) { })
// insertTableDataRecord(v.clientContact)
// }
// })
// })
// onUnmounted(() => { // onUnmounted(() => {
// emitter.off('customerBack') // emitter.off('customerBack')
// }) // })

@ -264,14 +264,7 @@
'changeCtnInfo', 'changeCtnInfo',
'setGoodsTransform', 'setGoodsTransform',
]) ])
watch(
() => props.details,
(nval) => {
if (nval.id) {
GetCtnList(nval)
}
}
)
// //
const hotmain = ref(null) const hotmain = ref(null)
// -------------------------- // --------------------------
@ -850,27 +843,14 @@
} else { } else {
list.value = [] list.value = []
totalPkgs.value = 0 totalPkgs.value = 0
totalKgs.value = 0
totalCbm.value = 0
totalCtn.value = 0
data.forEach(async (item, index) => { data.forEach(async (item, index) => {
totalPkgs.value = totalPkgs.value totalPkgs.value = totalPkgs.value + (Number(item.pkgs) || 0)
? parseInt(totalPkgs.value) totalKgs.value = totalKgs.value + (Number(item.kgs) || 0)
: 0 + item.pkgs totalCbm.value = totalCbm.value + (Number(item.cbm) || 0)
? parseInt(item.pkgs) totalCtn.value = totalCtn.value + (Number(item.ctnNum) || 0)
: 0
totalKgs.value = totalKgs.value
? parseInt(totalKgs.value)
: 0 + item.kgs
? parseInt(item.kgs)
: 0
totalCbm.value = totalCbm.value
? parseInt(totalCbm.value)
: 0 + item.cbm
? parseInt(item.cbm)
: 0
totalCtn.value = totalCtn.value
? parseInt(totalCtn.value)
: 0 + item.ctnNum
? parseInt(item.ctnNum)
: 0
item.rowKey = index item.rowKey = index
const weightTypeList = await getDictOption('weight_type') const weightTypeList = await getDictOption('weight_type')
if (!weightTypeDict.value.length) { if (!weightTypeDict.value.length) {
@ -883,20 +863,6 @@
item.weightTypeName = e.name item.weightTypeName = e.name
} }
}) })
// const kindPkgsList = kindPkgsDict.value.length
// ? kindPkgsDict.value
// : (await GetPackageSelectList())?.data
// if (!kindPkgsDict.value.length) {
// kindPkgsDict.value.splice(0)
// kindPkgsList.forEach((e) => {
// kindPkgsDict.value.push(e)
// })
// }
// kindPkgsList.forEach((e) => {
// if (e.id == item.kindPkgs) {
// item.kindPkgsName = e.packageName
// }
// })
const isTempList = [ const isTempList = [
{ {
name: '是', name: '是',
@ -1295,14 +1261,50 @@
title: '称重日期', title: '称重日期',
}, },
]) ])
function init(data, hot) {
// init() const { ctnInfo } = data
// function init() { if (ctnInfo && ctnInfo.length > 0) {
// GetCtnSelectList().then((res) => { totalPkgs.value = 0
// ctnDict.value = res.data totalKgs.value = 0
// }) totalCbm.value = 0
// tableLoaded.value = true totalCtn.value = 0
// } ctnInfo.forEach(async (item, index) => {
totalPkgs.value = totalPkgs.value + (Number(item.pkgs) || 0)
totalKgs.value = totalKgs.value + (Number(item.kgs) || 0)
totalCbm.value = totalCbm.value + (Number(item.cbm) || 0)
totalCtn.value = totalCtn.value + (Number(item.ctnNum) || 0)
item.rowKey = index
const weightTypeList = await getDictOption('weight_type')
if (!weightTypeDict.value.length) {
weightTypeList.forEach((e) => {
weightTypeDict.value.push(e)
})
}
weightTypeList.forEach((e) => {
if (e.value == item.weightType) {
item.weightTypeName = e.name
}
})
const isTempList = [
{
name: '是',
value: true,
},
{
name: '否',
value: false,
},
]
isTempList.forEach((e) => {
if (e.value == item.isTemp) {
item.isTempName = e.name
}
})
})
list.value = ctnInfo
hot.loadData(list.value)
}
}
function changeSelectedRowKeys(keys) { function changeSelectedRowKeys(keys) {
selectArr.value = keys selectArr.value = keys
checkboxOption.value.selectedRowKeys = keys checkboxOption.value.selectedRowKeys = keys
@ -1977,6 +1979,8 @@
} }
} }
}) })
//
init(props.details, hot)
// //
emitter.on('ctnNumTable', (data) => { emitter.on('ctnNumTable', (data) => {
list.value.forEach(item => { list.value.forEach(item => {

@ -358,15 +358,14 @@
.iconfont { .iconfont {
display: inline-block; display: inline-block;
height: 18px; height: 18px;
width: 32px; width: 16px;
border-radius: 2px; border-radius: 2px;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
background: #F5F9FC;
color: #257AFA; color: #257AFA;
margin-right: 0; margin-right: 0;
margin-left: 4px; margin-left: 15px;
margin-bottom: 4px; margin-bottom: 0;
cursor: pointer; cursor: pointer;
} }
.copy-btn, .save-btn { .copy-btn, .save-btn {

@ -38,12 +38,6 @@
const linkageForm = (v) => { const linkageForm = (v) => {
emitter.emit('setEtd', v) emitter.emit('setEtd', v)
} }
watch(
() => props.details,
(nval) => {
setFieldsValue(nval)
}
)
onMounted(() => { onMounted(() => {
// //
emitter.on('setIssuePlace', (v) => { emitter.on('setIssuePlace', (v) => {
@ -55,6 +49,9 @@
}) })
} }
}) })
if (props.details && props.details.id) {
setFieldsValue(props.details)
}
// if (source.value != 'edit') { // if (source.value != 'edit') {
// noteFormSchema.forEach(item => { // noteFormSchema.forEach(item => {
// item.dynamicDisabled = true // item.dynamicDisabled = true

Loading…
Cancel
Save