szh-new
张同海 4 months ago
commit 42fb85624d

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -26,7 +26,7 @@
<div>
<input class="ds-tb-check" type="checkbox" v-model="allCheck" :indeterminate="someCheck" />
<hot-table ref="hotTb" :data="list" :settings="settings">
<img v-show="!list.length" class="hot-tb-no-data" src="../../assets/images/nodata.png" alt="">
<img v-show="!list.length" src="../../assets/images/nodata.png" alt="">
</hot-table>
</div>
</div>

@ -298,13 +298,17 @@
}
function renderLabelHelpMessage() {
const { label, helpMessage, helpComponentProps, subLabel } = props.schema
const { label, helpMessage, helpComponentProps, subLabel, labelSlot } = props.schema
const renderLabel = subLabel ? (
<span>
{label} <span class="text-secondary">{subLabel}</span>
</span>
) : (
label
labelSlot ? (
<span>
{label} {getSlot(slots, labelSlot, unref(getValues))}
</span>
) : label
)
const getHelpMessage = isFunction(helpMessage) ? helpMessage(unref(getValues)) : helpMessage
if (!getHelpMessage || (Array.isArray(getHelpMessage) && getHelpMessage.length === 0)) {

@ -210,6 +210,8 @@ export interface FormSchema {
// Custom slot, similar to renderColContent
colSlot?: string
// label上的插槽
labelSlot?: string
dynamicDisabled?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean)

@ -1,5 +1,11 @@
.ant-form-item-label {
width: 100%!important;
>label {
font-size: 12px!important;
width: 100%!important;
>span {
display: inline-block;
width: 100%;
}
}
}

@ -1,42 +1,42 @@
// 小弹窗
.ds-modal-small {
.ant-modal-header {
border-bottom: none;
padding: 16px 16px 0px 16px;
.ant-modal-title {
font-size: 12px;
position: relative;
top: 16px;
left: 16px;
}
.ant-modal-header {
border-bottom: none;
padding: 16px 16px 0px 16px;
.ant-modal-title {
font-size: 12px;
position: relative;
top: 16px;
left: 16px;
}
.ant-modal-body {
padding: 15px 30px;
.ant-form {
background-color: #F5F9FC;
border-radius: 2px;
padding: 10px 20px 15px;
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item-label {
padding-bottom: 0;
>label {
font-size: 12px;
}
}
.ant-modal-body {
padding: 15px 30px;
.ant-form {
background-color: #F5F9FC;
border-radius: 2px;
padding: 10px 20px 15px;
.ant-form-item {
margin-bottom: 0;
}
.ant-form-item-label {
padding-bottom: 0;
>label {
font-size: 12px;
}
}
}
.ant-modal-footer {
border: none;
padding: 5px 30px 20px;
.ant-btn {
height: 26px;
width: 100px;
span {
position: relative;
top: -1px;
}
}
.ant-modal-footer {
border: none;
padding: 5px 30px 20px;
.ant-btn {
height: 26px;
width: 100px;
padding: 0;
line-height: 27px;
span {
position: relative;
top: -1px;
}
}
}

@ -1,3 +1,76 @@
// 列表页面表单和表格的整体样式管理
.ds-table, .ds-table-detail {
.ant-form {
padding: 10px 19px 1px!important;
.ant-btn {
height: 26px;
margin: 0 0 0px 10px;
}
}
.ant-table-wrapper {
padding: 0!important;
.ant-table-title {
padding: 0;
}
.ant-table-title {
padding: 5px 10px!important;
}
}
.ant-table-selection-column {
border-right: 1px solid rgba(232, 232, 232, 1) !important;
}
.ant-table-thead {
th {
padding: 7px 7px!important;
}
.ant-table-column-sorters, .ant-table-filter-column {
justify-content: flex-start;
.ant-table-column-title {
flex: none;
}
}
}
.ant-table-container {
padding: 0 0 0 20px;
.ant-table-header {
tr {
height: 36px!important;
th {
display: table-cell;
vertical-align: middle;
.ant-table-column-sorter-up, .ant-table-column-sorter-down {
font-size: 8px;
}
}
}
.ant-table-column-sorters {
}
}
.ant-table-tbody {
.ant-table-row {
height: 36px !important;
.ant-table-cell {
padding: 6px 8px;
display: table-cell;
vertical-align: middle;
}
}
}
}
.ant-pagination {
margin: 2px 0 3px!important;
font-size: 12px;
}
.ant-table-cell-fix-right {
text-align: center!important;
}
}
.ds-table-detail {
.ant-table-container {
padding: 0px;
}
}
.ant-table-thead {
th {
background-color: rgba(240, 244, 250, 1) !important;
@ -49,12 +122,13 @@
}
// handsontable 全选checkbox
.handsontable {
.hot-tb-no-data {
>img {
position: absolute;
top: 100px;
top: 50%;
width: 300px;
left: 50%;
margin-left: -150px;
margin-top: -70px;
}
input[type="checkbox"] {
border-color: #E8EBED;

@ -65,6 +65,9 @@
line-height: 26px !important;
}
}
.ant-input-disabled {
// height: 16px !important;
}
// .ant-select-selection-search-input {
// height: 26px !important;
// font-size: 12px!important;
@ -121,80 +124,6 @@
padding: 5px 15px !important;
}
}
// 列表页面表单和表格的整体样式管理
.ds-table, .ds-table-detail {
.ant-form {
padding: 10px 19px 1px!important;
.ant-btn {
height: 26px;
margin: 0 0 0px 10px;
}
}
.ant-table-wrapper {
padding: 0!important;
.ant-table-title {
padding: 0;
}
.ant-table-title {
padding: 5px 10px!important;
}
}
.ant-table-selection-column {
border-right: 1px solid rgba(232, 232, 232, 1) !important;
}
.ant-table-thead {
th {
padding: 7px 7px!important;
}
.ant-table-column-sorters, .ant-table-filter-column {
justify-content: flex-start;
.ant-table-column-title {
flex: none;
}
}
}
.ant-table-container {
padding: 0 0 0 20px;
.ant-table-header {
tr {
height: 36px!important;
th {
display: table-cell;
vertical-align: middle;
.ant-table-column-sorter-up, .ant-table-column-sorter-down {
font-size: 8px;
}
}
}
.ant-table-column-sorters {
}
}
.ant-table-tbody {
.ant-table-row {
height: 36px !important;
.ant-table-cell {
padding: 6px 8px;
display: table-cell;
vertical-align: middle;
}
}
}
}
.ant-pagination {
margin: 2px 0 3px!important;
font-size: 12px;
}
.ant-table-cell-fix-right {
text-align: center!important;
}
}
.ds-table-detail {
.ant-table-container {
padding: 0px;
}
}
// 定义所有表单组件高度为26
// .ant-select-selector,
// .ant-input-number-input-wrap {

@ -1970,3 +1970,39 @@ export function ImportBillManageHistory(data) {
data
})
}
// 提单信息详情
export function GetSeaExportBillManageInfo(params) {
return request({
url: '/opApi/SeaExportBillManage/GetSeaExportBillManageInfo',
method: 'get',
params
})
}
// 委托单位联系人列表
export function GetBusinessOrderContactList(data) {
return request({
url: '/opApi/BusinessOrderContact/GetBusinessOrderContactList',
method: 'post',
data
})
}
// 委托单位联系人编辑
export function EditBusinessOrderContact(params) {
return request({
url: '/opApi/BusinessOrderContact/EditBusinessOrderContact',
method: 'get',
params
})
}
// 委托单位联系人详情
export function GetBusinessOrderContactInfo(data) {
return request({
url: '/opApi/BusinessOrderContact/GetBusinessOrderContactInfo',
method: 'post',
data
})
}

@ -26,7 +26,7 @@
删除
</a-button>
</a-popconfirm>
<a-button type="link">
<a-button type="link" @click="updateCalc">
<span class="iconfont icon-refresh-1-copy"></span>
更新合计
</a-button>
@ -54,8 +54,12 @@
HotTable,
})
const props = defineProps({
// id
id: {
type: String
},
setFieldsValue: {
type: Function
}
})
// ref
@ -155,7 +159,7 @@
const list = ref([])
//
const settings = {
height: '507',
height: '208',
width: '100%',
autoWrapRow: true,
autoWrapCol: true,
@ -292,6 +296,35 @@
}
})
}
//
const updateCalc = () => {
if (list.value.length) {
const obj = {
pkgs: 0,
noPkgs: 0,
grossWeight: 0,
kgs: 0,
measurement: 0,
cbm: 0
}
list.value.forEach(item => {
if (item.pkgs) {
obj.pkgs = obj.pkgs + Number(item.pkgs)
obj.noPkgs = obj.pkgs
}
if (item.kgs) {
obj.kgs = obj.kgs + Number(item.kgs)
obj.grossWeight = obj.kgs
}
if (item.cbm) {
obj.cbm = obj.cbm + Number(item.cbm)
obj.measurement = obj.cbm
}
})
props.setFieldsValue(obj)
createMessage.success('更新成功!')
}
}
onMounted(() => {
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})

@ -45,7 +45,6 @@ export const formSchema1: FormSchema[] = [
details: formModel,
field: 'shipper',
onChange: (e) => {
console.log(e)
if (e) {
switch (e.type) {
case 'Content':
@ -63,34 +62,7 @@ export const formSchema1: FormSchema[] = [
}
}
},
{
label: '企业代码',
field: 'shipperCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'shipperCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'shipperTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'shipperEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '',
field: 'consigneeContent',
@ -116,7 +88,6 @@ export const formSchema1: FormSchema[] = [
details: formModel,
field: 'consignee',
onChange: (e) => {
console.log(e)
if (e) {
switch (e.type) {
case 'Content':
@ -134,34 +105,6 @@ export const formSchema1: FormSchema[] = [
}
}
},
{
label: '企业代码',
field: 'consigneeCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'consigneeCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'consigneeTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'consigneeEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '',
field: 'notifyPartyContent',
@ -187,7 +130,6 @@ export const formSchema1: FormSchema[] = [
details: formModel,
field: 'notifyParty',
onChange: (e) => {
console.log(e)
if (e) {
switch (e.type) {
case 'Content':
@ -204,34 +146,6 @@ export const formSchema1: FormSchema[] = [
}
}
}
},
{
label: '企业代码',
field: 'notifyPartyCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'notifyPartyCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'notifyPartyTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'notifyPartyEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
}
]
@ -239,7 +153,7 @@ export const formSchema1: FormSchema[] = [
export const formSchema2: FormSchema[] = [
{
field: 'etd',
label: 'ETD',
label: '开船日期',
component: 'DatePicker',
colProps: { span: 3 },
defaultValue: ''
@ -504,7 +418,6 @@ export const formSchema2: FormSchema[] = [
data.forEach((item) => {
item.portName = `${item.portName}(${item.ediCode})`
})
console.log(data)
resolve({ data })
})
},
@ -545,7 +458,6 @@ export const formSchema3: FormSchema[] = [
return {
autoSize: { minRows: 3, maxRows: 3 },
onkeyup: (e) => {
console.log(e)
const arr = e.currentTarget._value.split('\n')
let pkgs = 0
for (let i = 0; i < arr.length; i++) {
@ -558,7 +470,6 @@ export const formSchema3: FormSchema[] = [
}
}
}
console.log(formActionType)
formModel.pkgs = pkgs
formActionType ? formActionType.submit() : null
}
@ -983,3 +894,91 @@ export const searchFormSchema: FormSchema[] = [
}
}
]
// 其他信息表单
export const formSchema6: FormSchema[] = [
{
label: '企业代码',
field: 'shipperCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'shipperCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'shipperTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'shipperEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '企业代码',
field: 'consigneeCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'consigneeCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'consigneeTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'consigneeEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '企业代码',
field: 'notifyPartyCode',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '国家代码',
field: 'notifyPartyCountry',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '电话',
field: 'notifyPartyTel',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
},
{
label: '邮箱',
field: 'notifyPartyEmail',
component: 'Input',
defaultValue: '',
colProps: { span: 12 }
}
]

@ -9,10 +9,17 @@
<!-- 按钮操作栏 -->
<div class="btn-box flex">
<div>
<a-button type="link" @click="msg">
<span class="iconfont icon-a-17Btuichu"></span>
调入主单信息
</a-button>
<a-popconfirm
title="确定要调入主单的收发通信息吗?"
ok-text="确定"
cancel-text="取消"
@confirm="importMainInfo"
>
<a-button type="link">
<span class="iconfont icon-a-17Btuichu"></span>
调入主单信息
</a-button>
</a-popconfirm>
<a-button type="link" @click="historyHandle">
<span class="iconfont icon-time"></span>
历史引入
@ -56,7 +63,7 @@
<!-- 提单信息表 -->
<BasicTable
class="ds-table-detail"
style="width: 370px"
style="width: 280px"
:canRowSelect="true"
:row-selection="{ selectedRowKeys: state.rowKeys, onChange: selectiChange }"
rowKey="id"
@ -66,95 +73,102 @@
<!-- 提单信息详情 -->
<a-tabs v-model:activeKey="activeKey" class="ds-sea-child-tab">
<a-tab-pane key="1" tab="提单信息" size="small">
<div class="flex card-box">
<!-- 收发通表单 -->
<BasicForm style="flex: 1;" @register="registerForm" />
<!-- 集装箱组件 -->
<div style="width: 650px;">
<!-- 集装箱表单 -->
<BasicForm style="margin-bottom: 0;" @register="containerForm" />
<container
ref="contBox"
class="ml15"
:id="id"
></container>
<a-form
v-model="formData"
class="ant-form-small"
layout="vertical"
>
<a-row :gutter="15">
<a-col :span="6">
<a-form-item label="代理">
<a-select
v-model:value="formData.agentId"
width="300px"
placeholder="请选择"
>
<a-select-option v-for="item in getOptions('agentcn')" :key="item.id" :value="item.id">
{{ item.shortName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="18">
<a-form-item label="AGENT">
<a-input style="height: 26px" v-model:value="formData.agentContent" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
</div>
<div class="card-box mt15" style="border-top: 1px solid #E8EBED;">
<!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" />
<a-row>
<a-col :span="7">
<a-form
v-model="formData"
class="ant-form-small cntrSealNo"
style="margin-top: -15px ;"
layout="vertical"
>
<a-col :span="24">
<a-form-item label="箱号封号">
<a-textarea v-model:value="formData.cntrSealNo" :autoSize="{ minRows: 10, maxRows: 10 }" placeholder="请输入" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24" style="margin-top: 26px;">
<a-form-item label="唛头">
<a-textarea v-model:value="formData.marks" :autoSize="{ minRows: 9, maxRows: 9 }" placeholder="请输入" allow-clear />
</a-form-item>
</a-col>
</a-form>
</a-col>
<a-col :span="10">
<a-spin :spinning="dloading">
<div class="flex card-box">
<!-- 收发通表单 -->
<BasicForm style="flex: 1;" @register="registerForm" />
<!-- 集装箱组件 -->
<div style="width: 740px;">
<!-- 集装箱表单 -->
<BasicForm style="margin-bottom: 0;" @register="containerForm" />
<container
ref="contBox"
class="ml15"
:id="id"
:setFieldsValue="setFieldsValue3"
></container>
<a-form
v-model="formData"
class="ant-form-small"
style="margin: -15px -12px 0 15px"
style="margin-top: 10px;"
layout="vertical"
>
<a-form-item label="货物描述">
<a-textarea v-model:value="formData.description" :autoSize="{ minRows: 21, maxRows: 21 }" style="height: 409px" placeholder="请输入" allow-clear />
</a-form-item>
<a-row :gutter="15">
<a-col :span="6">
<a-form-item label="代理">
<a-select
v-model:value="formData.agentId"
width="300px"
placeholder="请选择"
>
<a-select-option v-for="item in getOptions('agentcn')" :key="item.id" :value="item.id">
{{ item.shortName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="18">
<a-form-item label="AGENT">
<a-input style="height: 26px" v-model:value="formData.agentContent" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-col>
<a-col :span="7">
<BasicForm
class="pkg"
style="margin: -15px -12px 0 27px;"
@register="CountForm"
@submit="submit"
/>
</a-col>
</a-row>
<!-- 签单方式表单 -->
<BasicForm style="margin-top: -10px;" class="issue-form" @register="issueForm" />
</div>
</div>
</div>
<div class="card-box mt15" style="border-top: 1px solid #E8EBED;">
<!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" />
<a-row>
<a-col :span="7">
<a-form
v-model="formData"
class="ant-form-small cntrSealNo"
style="margin-top: -15px ;"
layout="vertical"
>
<a-col :span="24">
<a-form-item label="箱号封号">
<a-textarea v-model:value="formData.cntrSealNo" :autoSize="{ minRows: 10, maxRows: 10 }" placeholder="请输入" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24" style="margin-top: 26px;">
<a-form-item label="唛头">
<a-textarea v-model:value="formData.marks" :autoSize="{ minRows: 9, maxRows: 9 }" placeholder="请输入" allow-clear />
</a-form-item>
</a-col>
</a-form>
</a-col>
<a-col :span="10">
<a-form
v-model="formData"
class="ant-form-small"
style="margin: -15px -12px 0 15px"
layout="vertical"
>
<a-form-item label="货物描述">
<a-textarea v-model:value="formData.description" :autoSize="{ minRows: 21, maxRows: 21 }" style="height: 409px" placeholder="请输入" allow-clear />
</a-form-item>
</a-form>
</a-col>
<a-col :span="7">
<BasicForm
class="pkg"
style="margin: -15px -12px 0 27px;"
@register="CountForm"
@submit="submit"
/>
</a-col>
</a-row>
<!-- 签单方式表单 -->
<BasicForm style="margin-top: -10px;" class="issue-form" @register="issueForm" />
</div>
</a-spin>
</a-tab-pane>
<a-tab-pane key="2" tab="其他信息" size="small">
<BasicForm
@register="OtherForm"
/>
</a-tab-pane>
</a-tabs>
</div>
@ -171,13 +185,13 @@
import { BasicTable, useTable } from '/@/components/Table'
import { BasicForm, useForm } from '/@/components/Form/index'
import { GetSeaExportBillManageList } from '../../api/BookingLedger'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5 } from './ladingInfo'
import { formSchema1, formSchema2, formSchema3, formSchema4, formSchema5, formSchema6 } from './ladingInfo'
import { getOptions } from '/@/hooks/dict'
//
import container from './container.vue'
//
import ladingHistory from './ladingHistory.vue'
import { EditSeaExportBillManage, BatchDelBillManageCtn } from '../../api/BookingLedger'
import { EditSeaExportBillManage, BatchDelBillManageCtn, GetSeaExportBillManageInfo } from '../../api/BookingLedger'
//
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
@ -210,7 +224,7 @@
}
setFormValue()
}
//
// ()
const [registerForm, { setFieldsValue: setFieldsValue1, validate: validate1, resetFields: resetFields1 }] =
useForm({
labelWidth: 150,
@ -225,7 +239,7 @@
showActionButtonGroup: false,
})
//
const [CountForm, { setFieldsValue: setFieldsValue3, validate: validate3, resetFields: resetFields3 }] =
const [CountForm, { setFieldsValue: setFieldsValue3, validate: validate3, resetFields: resetFields3, getFieldsValue: getFieldsValue3 }] =
useForm({
labelWidth: 150,
schemas: formSchema3,
@ -245,11 +259,17 @@
schemas: formSchema5,
showActionButtonGroup: false,
})
//
const [OtherForm, { setFieldsValue: setFieldsValue6, validate: validate6, resetFields: resetFields6 }] =
useForm({
labelWidth: 150,
schemas: formSchema6,
showActionButtonGroup: false,
})
//
const onRowClick = (record) => {
state.rowKeys = [record?.id]
setSelectedRows([record])
setFormValue()
}
//
const deleteFlag = ref(false)
@ -273,29 +293,38 @@
const cancelDelete = () => {
deleteFlag.value = false
}
const dloading = ref(false)
//
const setFormValue = () => {
const row = getSelectRows()[0]
setFieldsValue1({
...row
})
setFieldsValue2({
...row
})
setFieldsValue3({
...row
})
setFieldsValue4({
...row
})
setFieldsValue5({
...row
})
formData.agentId = row.agentId
formData.agentContent = row.agentContent
formData.cntrSealNo = row.cntrSealNo
formData.description = row.description
formData.marks = row.marks
const id = row?.id
if (id) {
dloading.value = true
GetSeaExportBillManageInfo({ id }).then(res => {
dloading.value = false
const row = res.data
setFieldsValue1({
...row
})
setFieldsValue2({
...row
})
setFieldsValue3({
...row
})
setFieldsValue4({
...row
})
setFieldsValue5({
...row
})
formData.agentId = row.agentId
formData.agentContent = row.agentContent
formData.cntrSealNo = row.cntrSealNo
formData.description = row.description
formData.marks = row.marks
})
}
}
const [registerTable, { reload, getSelectRows, setSelectedRows }] = useTable({
api: async (p) => {
@ -325,7 +354,7 @@
{
title: '分提单号',
dataIndex: 'hblno',
width: 90,
width: 190,
align: 'left'
}
],
@ -651,6 +680,14 @@
formData.cntrSealNo = ''
formData.description = ''
formData.marks = ''
createMessage.success('表单已置为新建状态!')
}
//
const importMainInfo = () => {
console.log(props.details)
setFieldsValue1({
...props.details
})
}
//
const save = async() => {

@ -116,6 +116,7 @@
<a-tab-pane key="3" tab="提单信息">
<LadingInfo
:id="id"
:details="bookingDetails"
></LadingInfo>
</a-tab-pane>
<a-button type="link" class="right-flag" @click="toggle">

@ -0,0 +1,110 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
:form-schema="formSchema"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<!-- 包装表单 -->
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>
取消
</a-button>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>
仅保存
</a-button>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>
保存并关闭
</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
//
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
//
import { personFormSchema } from './baseInfo'
//
import { EditBusinessOrderContact, GetBusinessOrderContactInfo } from '/@/views/operation/seaexport/api/BookingLedger'
//
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
// loading
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
useForm({
labelWidth: 100,
schemas: personFormSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
setModalProps({ confirmLoading: true });
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetBusinessOrderContactInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
async function handleSave(exit) {
try {
const values = await validate()
loading.value = true
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await EditBusinessOrderContact(values)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
setModalProps({ confirmLoading: false, loading: false })
}
}
</script>

@ -2,7 +2,7 @@ import { useComponentRegister } from '/@/components/Form'
import SelectTextArea from '/@/views/operation/seaexport/components/SelectTextArea.vue'
useComponentRegister('SelectTextArea', SelectTextArea)
import { ref } from 'vue'
import { FormSchema } from '/@/components/Table'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
import {
@ -556,6 +556,7 @@ export const basicInfoFormSchema: FormSchema[] = [
},
{
label: '委托单位',
labelSlot: 'customerId',
field: 'customerId',
component: 'ApiSelect',
required: false,
@ -579,17 +580,6 @@ export const basicInfoFormSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// filterOption: (input: string, option: any) => {
// let RData = false
// if (option.codeName.toLowerCase().indexOf(input.toLowerCase()) >= 0) {
// RData = true
// } else if (option.shortName.toLowerCase().indexOf(input.toLowerCase()) >= 0) {
// RData = true
// } else if (option.enShortName.toLowerCase().indexOf(input.toLowerCase()) >= 0) {
// RData = true
// }
// return RData
// },
onChange: (e, obj) => {
if (obj) {
formModel.customerName = obj.label
@ -2619,4 +2609,111 @@ export const otherInfoFormSchema: FormSchema[] = [
}
}
}
]
]
// 关系人表单
export const personFormSchema: FormSchema[] = [
{
field: 'service',
label: '联系人',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 12 },
componentProps: () => {
return {
option: optionsStore.getOptionsByCode('GetServiceSelectList'),
allowClear: true,
showSearch: true,
labelField: 'enName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
},
{
label: '邮箱',
field: 'email',
component: 'Input',
colProps: { span: 12 },
},
{
label: '电话',
field: 'email',
component: 'Input',
colProps: { span: 12 },
},
{
field: 'customerType',
label: '客户类别',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
if (obj) formModel.customerTypeName = obj.label
}
}
}
},
{
field: 'customerTypeName',
label: '',
defaultValue: '',
component: 'Input',
show: false,
colProps: { span: 24 }
},
{
field: 'note',
label: '备注',
defaultValue: '',
component: 'InputTextArea',
colProps: { span: 24 }
}
]
// 关系人表格
export const personColumns: BasicColumn[] = [
{
dataIndex: 'name',
title: '联系人',
sorter: true,
width: 120,
},
{
dataIndex: 'email',
title: '邮箱',
sorter: true,
width: 150,
},
{
dataIndex: 'tel',
title: '电话',
sorter: true,
width: 120,
},
{
dataIndex: 'note',
title: '备注',
sorter: true,
width: 220,
},
]

@ -20,6 +20,10 @@
</a-button>
</ConfigForm>
<BasicForm @register="registerForm">
<!-- label插槽 -->
<template #customerId="item">
<span class="iconfont icon-tuandui" @click="openPersonModal(item)"></span>
</template>
<template #isBusinessLocking="item">
<a-input disabled :value="item.isBusinessLocking ? '已锁定' : '未锁定'"></a-input>
<span v-if="item.isBusinessLocking" class="iconfont icon-chenggong"></span>
@ -29,14 +33,54 @@
<span v-if="item.isFeeLocking" class="iconfont icon-chenggong"></span>
</template>
</BasicForm>
<a-modal
v-model:visible="visible"
title="费用模版"
width="80%"
>
<BasicTable
@register="registerTable"
>
<template #tableTitle>
<a-button type="link" @click="create">
<span class="iconfont icon-new_document"></span>
新增
</a-button>
<a-button type="link" @click="del">
<span class="iconfont icon-shanchu2"></span>
删除
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleEdit.bind(null, record)
},
]"
/>
</template>
</template>
<template #footer></template>
</BasicTable>
</a-modal>
<PersonModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '/@/components/Form/index'
import { basicInfoFormSchema } from './baseInfo.tsx'
import { ref, watch, onMounted } from 'vue'
import { basicInfoFormSchema, personColumns } from './baseInfo.tsx'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { ref, watch } from 'vue'
import { GetBusinessOrderContactList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
import PersonModal from './PersonModal.vue'
const { createMessage } = useMessage()
import { useModal } from '/@/components/Modal'
const [registerModal, { openModal }] = useModal()
const props = defineProps({
details: { type: Object, default: {} },
})
@ -49,6 +93,53 @@
showActionButtonGroup: false,
size: 'small',
})
const visible = ref(false)
// id
let customerId = ''
//
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetBusinessOrderContactList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
var currentPageInfo: any = getPaginationRef()
const postParam = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
condition.push({
FieldName: 'customerId',
FieldValue: customerId,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns: personColumns,
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
canResize: false,
immediate: false,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right'
}
})
//
const RefChilrenRef = ref('')
function TransferData() {
@ -61,6 +152,38 @@
})
})
RefChilrenRef.value.FnaddFormToSet(Arr)
}
//
const openPersonModal = (item) => {
console.log(item.values)
if (item?.values?.customerId) {
customerId = item.values.customerId
} else {
return createMessage.warning('请选择委托单位!')
}
visible.value = true
reload()
}
//
const create = () => {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function handleSuccess() {
reload()
}
//
function handleEdit(record) {
openModal(true, {
record,
isUpdate: true,
})
}
//
const del = () => {
}
watch(
() => props.details,
@ -94,5 +217,20 @@
max-width: 14.28%!important;
flex: 0 0 14.28%;
}
.icon-tuandui {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 2px;
background: #F2F9FF;
color: #257AFA;
text-align: center;
line-height: 16px;
position: absolute;
right: 0;
margin-right: 0;
top: 4px;
cursor: pointer;
}
}
</style>

Loading…
Cancel
Save