sunzehua 3 months ago
commit d89e24b39b

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

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

@ -219,6 +219,10 @@
tareWeight: '',
note: ''
}
const init = (data) => {
list.value = data
hotTb.value.hotInstance.loadData(data)
}
//
const addRow = () => {
const deepCopyRow = JSON.parse(JSON.stringify(row))
@ -324,6 +328,31 @@
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(() => {
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
@ -340,9 +369,11 @@
}
}
})
GetCtnList()
})
defineExpose({
list
list,
init
})
</script>

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

@ -7,15 +7,41 @@
<div class="ds-sea-lading-info">
<a-spin :spinning="loading">
<!-- 按钮操作栏 -->
<div class="btn-box flex">
<div class="btn-box">
<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
title="确定要调入主单的收发通信息吗?"
ok-text="确定"
cancel-text="取消"
@confirm="importMainInfo"
>
<a-button type="link">
<a-button type="link" style="margin-left: 30px;">
<span class="iconfont icon-a-17Btuichu"></span>
调入主单信息
</a-button>
@ -33,39 +59,19 @@
EDI报文导出
<span class="iconfont icon-30jiantouxiangxiafill"></span>
</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 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"
style="width: 280px"
:canRowSelect="true"
@ -73,21 +79,20 @@
rowKey="id"
@register="registerTable"
@row-click="onRowClick"
></BasicTable>
></BasicTable> -->
<!-- 提单信息详情 -->
<a-tabs v-model:activeKey="activeKey" class="ds-sea-child-tab">
<a-tab-pane key="1" tab="分单信息" size="small">
<a-spin :spinning="dloading">
<div class="flex card-box lading-box">
<div class="flex mt10">
<!-- 收发通表单 -->
<BasicForm style="flex: 1;" @register="registerForm" />
<!-- 集装箱组件 -->
<div style="width: 740px;">
<div style="width: 800px;" class="ml15">
<!-- 集装箱表单 -->
<BasicForm style="margin-bottom: 0;" @register="containerForm" />
<container
ref="contBox"
class="ml15"
:id="id"
:setFieldsValue="setFieldsValue3"
></container>
@ -120,10 +125,11 @@
</a-form>
</div>
</div>
<div class="card-box mt15" style="border-top: 1px solid #E8EBED;">
<Divider type="horizontal" />
<div>
<!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" />
<a-row>
<a-row class="mt15">
<a-col :span="7">
<a-form
v-model="formData"
@ -165,7 +171,7 @@
</a-col>
</a-row>
<!-- 签单方式表单 -->
<BasicForm style="margin-top: -10px;" class="issue-form" @register="issueForm" />
<BasicForm style="margin-top: 0px;" class="issue-form" @register="issueForm" />
</div>
</a-spin>
</a-tab-pane>
@ -179,22 +185,23 @@
</a-spin>
<ladingHistory
:id="id"
:reload="reload"
:reload="init"
ref="ladHistory"
/>
</div>
</template>
<script lang="ts" setup>
import { ref, reactive, defineProps } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { ref, reactive, defineProps, onMounted, defineAsyncComponent } from 'vue'
import { Divider } from 'ant-design-vue'
import { SvgIcon } from '/@/components/Icon'
import { BasicForm, useForm } from '/@/components/Form/index'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo'
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 { useMessage } from '/@/hooks/web/useMessage'
@ -208,12 +215,7 @@
details: { type: Object, default: {} }
})
const activeKey = ref('1')
//
const state = reactive({
rowKeys: []
})
const selectiChange = (v) => {
state.rowKeys = v
if (v.length == 0) {
resetFields1()
resetFields2()
@ -272,18 +274,10 @@
schemas: formSchema6,
showActionButtonGroup: false,
})
//
const onRowClick = (record) => {
state.rowKeys = [record?.id]
setSelectedRows([record])
}
//
const deleteFlag = ref(false)
//
const checkDelete = () => {
if (state.rowKeys.length == 0) {
return createMessage.warning('请勾选要删除的数据!')
}
deleteFlag.value = true
}
//
@ -292,13 +286,9 @@
deleteFlag.value = false
BatchDelBillManageCtn({ id: props.id, ids: state.rowKeys }).then(res => {
loading.value = false
reload()
init()
})
}
//
const cancelDelete = () => {
deleteFlag.value = false
}
const dloading = ref(false)
//
const setFormValue = () => {
@ -332,20 +322,16 @@
})
}
}
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 = {
//
const init = () => {
//
const postData = {
pageCondition: {
pageIndex: p.page,
pageSize: p.pageSize,
pageIndex: 1,
pageSize: 100,
sortConditions: []
}
},
queryCondition: []
}
let condition: API.ConditionItem[] = []
condition.push({
@ -353,26 +339,60 @@
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
postData.queryCondition = JSON.stringify(condition)
GetSeaExportBillManageList(postData).then(res => {
list.value = res.data
}).catch(() => {
})
}
//
const list = ref([])
onMounted(() => {
init()
create()
})
// 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 formData = reactive({
@ -545,31 +565,6 @@
}
}, 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) {
// eslint-disable-next-line no-array-constructor
var arr2 = new Array(
@ -634,37 +629,6 @@
if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)]
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)
//
@ -675,7 +639,6 @@
const contBox = ref(null)
//
const create = () => {
state.rowKeys = []
resetFields1()
resetFields2()
resetFields3()
@ -685,17 +648,48 @@
formData.cntrSealNo = ''
formData.description = ''
formData.marks = ''
setFieldsValue1({
...props.details
})
setFieldsValue2({
...props.details
})
setFieldsValue3({
...props.details
})
setFieldsValue4({
...props.details
})
setFieldsValue5({
...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('表单已置为新建状态!')
}
//
const importMainInfo = () => {
console.log(props.details)
setFieldsValue1({
...props.details
})
setFieldsValue2({
...props.details
})
setFieldsValue3({
...props.details
})
setFieldsValue4({
...props.details
})
setFieldsValue5({
...props.details
})
setFieldsValue6({
...props.details
})
}
//
const save = async() => {
@ -711,14 +705,13 @@
loading.value = false
if (res.succeeded) {
createMessage.success('保存成功!')
if (res.data && res.data.length) {
state.rowKeys = [res.data]
}
setFieldsValue1({
id: res.data
})
}
reload()
init()
}).catch(() => {
loading.value = false
})
}
const msg = () => {
@ -729,23 +722,38 @@
<style lang="less">
.ds-sea-lading-info {
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 {
flex: 1;
margin-left: 16px;
}
.ant-form-small {
margin: 15px 0 15px 15px;
}
.card-box {
padding: 0 20px 0 5px;
padding: 10px 20px;
border: 1px solid #E8EBED;
border-top: none;
border-radius: 2px;
}
.ant-tabs-content {
height: calc(100vh - 200px);
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 {
max-width: 14.28%;
}
@ -761,9 +769,11 @@
max-width: 42.84%;
}
.btn-box {
margin: 5px -5px;
justify-content: space-between;
padding-right: 15px;
margin: 5px 0;
svg {
position: relative;
top: 2px;
}
}
.pkg {
.ant-row>div:nth-child(1), .ant-row>div:nth-child(4), .ant-row>div:nth-child(6) {
@ -788,5 +798,13 @@
position: absolute;
top: -1px;
}
.bill-list {
width: 260px;
}
.no-message {
text-align: center;
font-size: 12px;
color: #999999;
}
}
</style>

@ -18,7 +18,7 @@
<div class="flex" style="position: relative;">
<!-- 保存按钮组 -->
<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"
code="sea_freight_export"
name="hyck"

@ -406,62 +406,15 @@
//
const source = ref(route.query.source || 'edit')
onMounted(() => {
// if (source.value != 'edit') {
// cargoInfoFormSchema1.forEach(item => {
// item.dynamicDisabled = true
// })
// cargoInfoFormSchema2.forEach(item => {
// item.dynamicDisabled = true
// })
// 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
// })
// }
const nval = props.details
if (nval.id) {
setFieldsValue1({ marks: nval.marks, description: nval.description })
setFieldsValue2(nval)
setFieldsValue3(nval)
setFieldsValue4({ totalNo: nval.totalNo, ctnPriceInfo: nval.ctnPriceInfo })
if (nval.cargoId) cargoId.value = nval.cargoId
}
})
// 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) => {
console.log(item)

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

@ -264,14 +264,7 @@
'changeCtnInfo',
'setGoodsTransform',
])
watch(
() => props.details,
(nval) => {
if (nval.id) {
GetCtnList(nval)
}
}
)
//
const hotmain = ref(null)
// --------------------------
@ -850,27 +843,14 @@
} else {
list.value = []
totalPkgs.value = 0
totalKgs.value = 0
totalCbm.value = 0
totalCtn.value = 0
data.forEach(async (item, index) => {
totalPkgs.value = totalPkgs.value
? parseInt(totalPkgs.value)
: 0 + item.pkgs
? parseInt(item.pkgs)
: 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
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) {
@ -883,20 +863,6 @@
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 = [
{
name: '是',
@ -1295,14 +1261,50 @@
title: '称重日期',
},
])
// init()
// function init() {
// GetCtnSelectList().then((res) => {
// ctnDict.value = res.data
// })
// tableLoaded.value = true
// }
function init(data, hot) {
const { ctnInfo } = data
if (ctnInfo && ctnInfo.length > 0) {
totalPkgs.value = 0
totalKgs.value = 0
totalCbm.value = 0
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) {
selectArr.value = keys
checkboxOption.value.selectedRowKeys = keys
@ -1977,6 +1979,8 @@
}
}
})
//
init(props.details, hot)
//
emitter.on('ctnNumTable', (data) => {
list.value.forEach(item => {

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

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

Loading…
Cancel
Save