海运出口详情bug

szh-new
lijingjia 4 months ago
parent 07c00fb12b
commit f81ef3a37f

@ -181,6 +181,7 @@
removeSchemaByField,
resetFields,
scrollToField,
linkageForm
} = useFormEvents({
emit,
getProps,
@ -280,6 +281,7 @@
clearValidate,
validateFields,
validate,
linkageForm,
submit: handleSubmit,
scrollToField: scrollToField,
}

@ -56,6 +56,7 @@
setup(props, { emit }) {
const attrs = useAttrs()
const { t } = useI18n()
console.log(props)
const [state] = useRuleFormItem(props, 'value', 'change')
//
const cutList = attrs.value.slice || []

@ -331,7 +331,15 @@ export function useFormEvents({
}
}
/**
* @description: Form submission
*/
async function linkageForm(item) {
emit('linkageForm', item)
}
return {
linkageForm,
handleSubmit,
clearValidate,
validate,

@ -43,6 +43,7 @@ export interface FormActionType {
validate: (nameList?: NamePath[]) => Promise<any>
getFieldList: (nameList?: NamePath[]) => Promise<any>
scrollToField: (name: NamePath, options?: ScrollOptions) => Promise<void>
linkageForm: () => Promise<void>
}
export type RegisterFn = (formInstance: FormActionType) => void

@ -241,7 +241,8 @@ export const formSchema: FormSchema[] = [
field: 'ediCode',
label: 'EDI代码',
component: 'Input',
colProps: { span: 12 },
required: true,
colProps: { span: 12 }
},
{

@ -0,0 +1,47 @@
/*
* @Description: api
* @Author: lijj
* @Date: 2024-04-25 15:48:33
*/
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/CodeService/GetCodeServiceList',
edit = '/mainApi/CodeService/EditCodeService',
info = '/mainApi/CodeService/GetCodeServiceInfo',
delete = '/mainApi/CodeService/BatchDelCodeService'
}
// 列表 (Auth)
export function GetCodeServiceList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data
})
}
// 编辑 (Auth)
export function EditCodeService(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data
})
}
// 详情 (Auth)
export function GetCodeServiceInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query
})
}
// 删除 (Auth)
export function BatchDelCodeService(data: PageRequest) {
return request<DataResult>({
url: Api.delete,
method: 'post',
data
})
}

@ -0,0 +1,99 @@
/*
* @Description: tsx
* @Author: lijj
* @Date: 2024-04-25 15:48:33
*/
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
title: '中文名称',
dataIndex: 'cnName',
width: 150,
},
{
title: '英文名称',
dataIndex: 'enName',
width: 150,
},
{
title: '国家',
dataIndex: 'countryName',
width: 120,
},
{
title: 'EDI代码',
dataIndex: 'ediCode',
width: 120,
},
{
title: '备注',
dataIndex: 'note',
width: 200,
}
]
export const searchFormSchema: FormSchema[] = [
{
field: 'cnName',
label: '中文名称',
colProps: { span: 6 },
component: 'Input',
},
{
field: 'ediCode',
label: 'EDI代码',
colProps: { span: 6 },
component: 'Input',
},
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'cnName',
label: '中文名称',
colProps: { span: 6 },
component: 'Input',
},
{
field: 'serviceName',
label: '英文名称',
colProps: { span: 6 },
required: true,
component: 'Input',
},
{
field: 'ediCode',
label: 'EDI代码',
colProps: { span: 6 },
required: true,
component: 'Input',
componentProps: {
maxlength: 5,
},
},
{
field: 'status',
label: '是否可用',
component: 'Switch',
slot: 'status',
colProps: { span: 6 },
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
autoSize: {
minRows: 5
}
}
}
]

@ -0,0 +1,130 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
:form-schema="formSchema"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<!-- 币别表单 -->
<BasicForm @register="registerForm">
<template #status="{ model }">
<a-switch v-model:checked="model.status" :checkedValue="1" :unCheckedValue="0" />
<span class="s-txt" :class="{ 's-active': model.status == 0 }">{{
model.status == 1 ? '可用' : '禁用'
}}</span>
</template>
</BasicForm>
<!--右下角按钮-->
<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 { formSchema } from '../columns'
//
import { EditCodeService, GetCodeServiceInfo } from '../api'
//
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: formSchema,
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 GetCodeServiceInfo({ 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 EditCodeService(values)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
}
exit && closeModal()
} finally {
loading.value = false
setModalProps({ confirmLoading: false, loading: false })
}
}
</script>
<style scoped>
.s-txt {
font-size: 12px;
margin-left: 10px;
color: #7a8798;
position: relative;
top: 1px;
}
.s-active {
color: #257afa;
}
</style>

@ -0,0 +1,138 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable">
<template #tableTitle>
<a-button
type="link"
@click="handleCreate"
>
<span class="iconfont icon-new_document"></span>
添加
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'userName'">
<span style="color: #0d84ff" @click="handleEdit(record)">{{ record.userName }}</span>
</template>
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleEdit.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
color: 'error',
popConfirm: {
title: '是否要删除此条数据?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record)
}
}
]"
/>
</template>
</template>
</BasicTable>
<Modal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { GetCodeServiceList, BatchDelCodeService } from './api'
import { useModal } from '/@/components/Modal'
import Modal from './components/Modal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '箱型映射信息表',
// api: getSysDictTypeList,
api: async (p) => {
const res: API.DataResult = await GetCodeServiceList(p)
// console.log(items);
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.code) {
condition.push({
FieldName: 'code',
FieldValue: data.code,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
canResize: false,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
//
async function handleDelete(record: Recordable) {
console.log(record)
const res: API.DataResult = await BatchDelCodeService({
id: '',
ids: [record.id],
})
if (res.succeeded) {
createMessage.success(res.message)
reload()
}
}
onMounted(() => {
//
})
function handleSuccess() {
reload()
}
</script>

@ -73,6 +73,9 @@
</goodsTable>
</div>
<Divider type="horizontal" />
<!-- 备注信息 -->
<noteInfo ref="RefNoteInfo" :details="bookingDetails"></noteInfo>
<Divider type="horizontal" />
<ediMore ref="RefediMore" :details="bookingDetails"></ediMore>
</a-tab-pane>
<a-tab-pane key="3-3" tab="费用信息" v-if="appStore.getfeeShow">
@ -200,6 +203,7 @@
import cargoInfo from './modules/cargoInfo.vue'
import goodsTable from './modules/goodsTable.vue'
import ediMore from './modules/ediMore.vue'
import noteInfo from './modules/noteInfo.vue'
import rightContent from './modules/rightContent.vue'
import { useGo } from '/@/hooks/web/usePage'
//
@ -228,16 +232,14 @@
const RefrightContent = ref()
const excuteRules = ref([])
const excuteRulesType = ref('')
const RefsedOrder = ref()
const RefgoodsTable = ref()
const OtherInfo = ref()
const RefbasicInfo = ref()
const RefmailingInfo = ref()
const RefcargoInfo = ref()
const RefediMore = ref(null)
const RefNoteInfo = ref(null)
const mainOrderActiveKey = ref('1-1')
// const checkFrom = ref([])
const isAdd = ref(false)
const inPageLoading = ref(false)
const detailsLoadOver = ref(false)
// const cargoRules = ref(rules.cargoRules)
@ -289,7 +291,6 @@
init()
//
function init() {
console.log('init')
if (route.query.id && !id.value) {
id.value = route.query.id
}
@ -298,24 +299,11 @@
excuteRulesType.value = ''
Showtabs.value = false
if (id.value) {
isAdd.value = false
getDetail()
getRightAll()
} else {
isAdd.value = true
detailsLoadOver.value = false
// bookingDetails.value.carrierid = type.value
// bookingDetails.value.carrier = type.value
isLockBooking.value = false
// setTimeout(() => {
// if (Object.keys(that.$refs).includes('RefsedOrder')) {
// RefsedOrder.value.init([])
// }
// if (Object.keys(that.$refs).includes('goodsTable')) {
// RefgoodsTable.value.init()
// }
// detailsLoadOver.value = true
// }, 200)
}
}
//
@ -331,15 +319,6 @@
id: id.value,
})
.then(async (res) => {
// 0 || 0001-01-01 00:00:00
res.data = JSON.parse(
JSON.stringify(res.data)
.replaceAll('"0001-01-01 00:00:00"', '""')
.replaceAll(':"0"', ':""')
.replaceAll(':0,', ':"",'),
)
if (route.query.isCopy) {
res.data = {
...res.data,
@ -354,115 +333,115 @@
appStore.settopDown(false)
inPageLoading.value = false
//
if (res.data.sourceId) {
let sourceDetailIdArr: any = []
await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => {
res.data.forEach((item) => {
sourceDetailIdArr.push({ label: item.detailName, value: item.id })
})
})
RefbasicInfo.value.updateSchema({
label: '来源明细',
field: 'sourceDetailId',
component: 'Select',
required: false,
dynamicDisabled: ({ values }) => {
return !values.sourceId || source.value != 'edit'
},
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: sourceDetailIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
})
}
if (res.data.saleId) {
const FnsaleId: any = await GetSaleList()
FnsaleId.data.forEach(async (item) => {
if (item.id == res.data.saleId) {
let saleDeptIdArr: any = []
let saleOrgIdArr: any = []
item.saleOrgList.forEach((item) => {
saleOrgIdArr.push({ label: item.orgName, value: item.orgId })
})
if (item.defaultOrgId) {
await GetDeptList({ orgId: item.defaultOrgId }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
res.data.forEach((item) => {
saleDeptIdArr.push({ label: item.orgName, value: item.id })
})
})
}
RefbasicInfo.value.updateSchema([
{
label: '所属分部',
field: 'saleOrgId',
component: 'Select',
required: false,
dynamicDisabled: source.value == 'edit' ? false : true,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: saleOrgIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
// formModel.saleDeptId = ''
GetDeptList({ orgId: e }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
let Arr: any = []
res.data.forEach((item) => {
Arr.push({ label: item.orgName, value: item.id })
})
updateSchema({
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: source.value == 'edit' ? false : true,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: Arr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
})
})
},
},
},
{
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: source.value == 'edit' ? false : true,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: saleDeptIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
])
}
})
}
// if (res.data.sourceId) {
// let sourceDetailIdArr: any = []
// await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => {
// res.data.forEach((item) => {
// sourceDetailIdArr.push({ label: item.detailName, value: item.id })
// })
// })
// RefbasicInfo.value.updateSchema({
// label: '',
// field: 'sourceDetailId',
// component: 'Select',
// required: false,
// dynamicDisabled: ({ values }) => {
// return !values.sourceId || source.value != 'edit'
// },
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: sourceDetailIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// })
// }
// if (res.data.saleId) {
// const FnsaleId: any = await GetSaleList()
// FnsaleId.data.forEach(async (item) => {
// if (item.id == res.data.saleId) {
// let saleDeptIdArr: any = []
// let saleOrgIdArr: any = []
// item.saleOrgList.forEach((item) => {
// saleOrgIdArr.push({ label: item.orgName, value: item.orgId })
// })
// if (item.defaultOrgId) {
// await GetDeptList({ orgId: item.defaultOrgId }).then((res) => {
// console.log(res, ' ')
// res.data.forEach((item) => {
// saleDeptIdArr.push({ label: item.orgName, value: item.id })
// })
// })
// }
// RefbasicInfo.value.updateSchema([
// {
// label: '',
// field: 'saleOrgId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: saleOrgIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// // formModel.saleDeptId = ''
// GetDeptList({ orgId: e }).then((res) => {
// console.log(res, ' ')
// let Arr: any = []
// res.data.forEach((item) => {
// Arr.push({ label: item.orgName, value: item.id })
// })
// updateSchema({
// label: '',
// field: 'saleDeptId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: Arr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// })
// })
// },
// },
// },
// {
// label: '',
// field: 'saleDeptId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: saleDeptIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// },
// ])
// }
// })
// }
})
.catch(() => {
appStore.settopDown(false)
@ -485,6 +464,8 @@
const otherForm = await OtherInfo.value.validate()
// EDI
const ediFrom = await RefediMore.value.validate()
//
const noteForm = await RefNoteInfo.value.validate()
//
const ctnInfo = RefgoodsTable.value.list
//
@ -505,6 +486,7 @@
...goodsForm,
...otherForm,
...customerForm,
...noteForm,
ediInfo: ediFrom,
ctnInfo
}
@ -872,6 +854,7 @@
result: remark ? 2 : 1,
ids: [id.value],
businessType: '1',
taskTypeName: route.query.status
}
if (remark) postData['remark'] = remark
loading.value = true

@ -98,7 +98,7 @@ export const basicInfoFormSchema: FormSchema[] = [
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
componentProps: ({ formModel, formActionType }) => {
return {
api: GetClientListByCode,
params: { code: 'controller' },
@ -109,6 +109,9 @@ export const basicInfoFormSchema: FormSchema[] = [
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
setTimeout(() => {
formActionType ? formActionType.linkageForm(obj) : null
}, 10)
formModel.customerId = obj.id
}
if (!e && !obj) {
@ -440,13 +443,15 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e, obj)
if (e && obj) {
formModel.shipperId = obj.id
formModel.shipperContent = obj.content
}
if (!e && !obj) {
if (e === undefined && obj === undefined) {
formModel.shipperId = null
formModel.shipperContent = null
formModel.shipper = ''
}
}
}
@ -478,13 +483,16 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e)
console.log(obj)
if (e && obj) {
formModel.consigneeId = obj.id
formModel.consigneeContent = obj.content
}
if (!e && !obj) {
if (e === undefined && obj === undefined) {
formModel.consigneeId = null
formModel.consigneeContent = null
formModel.consignee = null
formModel.consigneeContent = ''
}
}
}
@ -520,9 +528,10 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
formModel.notifyPartyId = obj.id
formModel.notifyPartyContent = obj.content
}
if (!e && !obj) {
if (e === undefined && obj === undefined) {
formModel.notifyPartyId = null
formModel.notifyPartyContent = null
formModel.notifyParty = ''
}
}
}
@ -532,7 +541,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
label: ' ',
field: 'shipperContent',
component: 'InputTextArea',
defaultValue: '',
colProps: { span: 8 },
componentProps: {
slice: [30, 35, 40]
@ -542,7 +550,6 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
label: ' ',
field: 'consigneeContent',
component: 'InputTextArea',
defaultValue: '',
colProps: { span: 8 },
componentProps: {
slice: [30, 35, 40]
@ -552,7 +559,8 @@ export const mailingInfoFormSchemaL: FormSchema[] = [
label: ' ',
field: 'notifyPartyContent',
component: 'InputTextArea',
defaultValue: '',
required: false,
dynamicDisabled: false,
colProps: { span: 8 },
componentProps: {
slice: [30, 35, 40]
@ -801,7 +809,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
componentProps: ({ formModel, formActionType }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
@ -811,10 +819,12 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formActionType ? formActionType.linkageForm(obj) : null
formModel.dischargePortId = obj.id
formModel.dischargePort = obj.portName
}
if (!e && !obj) {
formActionType ? formActionType.linkageForm(obj) : null
formModel.dischargePortId = null
formModel.dischargePort = null
}
@ -899,6 +909,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
valueField: 'ediCode',
immediate: false,
onChange: (e, obj) => {
console.log(obj)
if (e && obj) {
formModel.transPortId = obj.id
formModel.transPort = obj.portName
@ -1031,6 +1042,297 @@ export const mailingInfoFormSchemaR: FormSchema[] = [
// },
]
// 备注信息表单
export const noteFormSchema: FormSchema[] = [
{
field: 'agentContent',
label: 'AGENT',
component: 'InputTextArea',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
},
{
field: 'soRemark',
label: 'SO备注',
component: 'InputTextArea',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
},
{
field: 'closeDocRemark',
label: 'SI备注',
component: 'InputTextArea',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 8 },
componentProps: {
autoSize: { minRows: 3, maxRows: 3 }
}
},
{
field: 'issueType',
label: '签单方式',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetIssueTypeSelectList,
allowClear: true,
showSearch: true,
labelField: 'billType',
valueField: 'billType',
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(obj)
if (e && obj) {
formModel.issueTypeCode = obj.ediCode
formModel.noBill = obj.noBill
formModel.copyNoBill = obj.copyNoBill
}
if (!e && !obj) {
formModel.issueTypeCode = null
formModel.noBill = null
formModel.copyNoBill = null
}
}
}
},
},
{
field: 'issueTypeCode',
label: '签单方式code',
component: 'Input',
show: false
},
{
field: 'issueRemark',
label: '签单要求',
component: 'Input',
colProps: { span: 5 }
},
{
field: 'issueDate',
label: '签单日期',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: {
allowClear: true,
valueFormat: 'YYYY-MM-DD'
},
},
{
label: '签单地代码',
field: 'issuePlaceCode',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
valueField: 'ediCode',
showName: 'ediCode',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.issuePlace = obj.portName
formModel.issuePlaceId = obj.id
}
if (!e && !obj) {
formModel.issuePlace = null
formModel.issuePlaceId = null
}
}
}
},
},
{
label: '签单地点',
field: 'issuePlace',
component: 'Input',
required: false,
colProps: { span: 5 }
},
{
label: '签单地Id',
field: 'issuePlaceId',
component: 'Input',
show: false
},
{
field: 'service',
label: '运输条款',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetServiceSelectList,
allowClear: true,
showSearch: true,
labelField: 'cnName',
valueField: 'cnName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.serviceCode = obj.ediCode
}
if (!e && !obj) {
formModel.serviceCode = null
}
}
}
},
},
{
field: 'serviceCode',
label: '运输条款代码',
component: 'Input',
show: false
},
{
field: 'mblFrt',
label: '付费方式',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetClientFrtSelectList,
allowClear: true,
showSearch: true,
labelField: 'cnName',
valueField: 'cnName',
resultField: 'data',
immediate: false,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.mblFrtCode = obj.ediCode
}
if (!e && !obj) {
formModel.mblFrtCode = null
}
}
}
},
},
{
label: '付费方式代码',
field: 'mblFrtCode',
component: 'Input',
show: false,
},
{
label: '',
field: 'prepareAtCode',
component: 'Input',
show: false,
},
{
label: '',
field: 'prepareAtId',
component: 'Input',
show: false,
},
{
field: 'prepareAt',
label: '付费地点',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
valueField: 'portName',
showName: 'portName',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.prepareAtId = obj.id
formModel.prepareAtCode = obj.ediCode
}
if (!e && !obj) {
formModel.prepareAtId = null
formModel.prepareAtCode = null
}
}
}
}
},
{
field: 'noBill',
label: '提单份数',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: {
options: FnnoBill,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'copyNoBill',
label: '副本份数',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: {
options: FncopyNoBill,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}
]
// ediMore表单
export const ediMoreFormSchema: FormSchema[] = [
{
@ -1306,72 +1608,72 @@ export const ediMoreFormSchema: FormSchema[] = [
]
export const mastetMoreFormSchema: FormSchema[] = [
{
label: '',
field: 'masterShipperContent',
component: 'Input',
// defaultValue: '',
show: false,
},
{
field: 'masterShipperId',
component: 'SelectTextArea',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
label: '发货人',
onChange: (e) => {
if (e) {
formModel.masterShipperContent = e.res
}
},
}
},
},
{
label: '',
field: 'masterConsigneeContent',
component: 'Input',
// defaultValue: '',
show: false,
},
{
field: 'masterConsigneeId',
component: 'SelectTextArea',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
label: '收货人',
onChange: (e) => {
if (e) {
formModel.masterConsigneeContent = e.res
}
}
}
}
},
{
label: '',
field: 'masterNotifyPartyContent',
component: 'Input',
// defaultValue: '',
show: false,
},
{
field: 'masterNotifyPartyId',
component: 'SelectTextArea',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
label: '通知人',
onChange: (e) => {
if (e) {
formModel.masterNotifyPartyContent = e.res
}
},
}
},
},
// {
// label: '',
// field: 'masterShipperContent',
// component: 'Input',
// // defaultValue: '',
// show: false,
// },
// {
// field: 'masterShipperId',
// component: 'SelectTextArea',
// colProps: { span: 12 },
// componentProps: ({ formModel }) => {
// return {
// label: '发货人',
// onChange: (e) => {
// if (e) {
// formModel.masterShipperContent = e.res
// }
// },
// }
// },
// },
// {
// label: '',
// field: 'masterConsigneeContent',
// component: 'Input',
// // defaultValue: '',
// show: false,
// },
// {
// field: 'masterConsigneeId',
// component: 'SelectTextArea',
// colProps: { span: 12 },
// componentProps: ({ formModel }) => {
// return {
// label: '收货人',
// onChange: (e) => {
// if (e) {
// formModel.masterConsigneeContent = e.res
// }
// }
// }
// }
// },
// {
// label: '',
// field: 'masterNotifyPartyContent',
// component: 'Input',
// // defaultValue: '',
// show: false,
// },
// {
// field: 'masterNotifyPartyId',
// component: 'SelectTextArea',
// colProps: { span: 12 },
// componentProps: ({ formModel }) => {
// return {
// label: '通知人',
// onChange: (e) => {
// if (e) {
// formModel.masterNotifyPartyContent = e.res
// }
// },
// }
// },
// },
]
// cargoInfo表单
@ -2367,276 +2669,7 @@ export const otherInfoFormSchema: FormSchema[] = [
}
}
},
},
// {
// field: 'agentContent',
// label: 'AGENT',
// component: 'InputTextArea',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 8 },
// componentProps: {
// autoSize: { minRows: 3, maxRows: 3 }
// }
// },
// {
// field: 'closeDocRemark',
// label: '截单备注',
// component: 'InputTextArea',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 8 },
// componentProps: {
// autoSize: { minRows: 3, maxRows: 3 }
// }
// },
// {
// field: 'issueType',
// label: '签单方式',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetIssueTypeSelectList,
// allowClear: true,
// showSearch: true,
// labelField: 'billType',
// valueField: 'billType',
// immediate: false,
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// console.log(obj)
// if (e && obj) {
// formModel.issueTypeCode = obj.ediCode
// formModel.noBill = obj.noBill
// formModel.copyNoBill = obj.copyNoBill
// }
// if (!e && !obj) {
// formModel.issueTypeCode = null
// formModel.noBill = null
// formModel.copyNoBill = null
// }
// }
// }
// },
// },
// {
// field: 'issueTypeCode',
// label: '签单方式code',
// component: 'Input',
// show: false
// },
// {
// field: 'issueDate',
// label: '签单日期',
// component: 'DatePicker',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// valueFormat: 'YYYY-MM-DD'
// },
// },
// {
// label: '签单地代码',
// field: 'issuePlaceCode',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetClientPortSelectList,
// resultField: 'data',
// labelField: 'pinYinCode',
// valueField: 'ediCode',
// showName: 'ediCode',
// immediate: false,
// onChange: (e, obj) => {
// if (e && obj) {
// formModel.issuePlace = obj.portName
// formModel.issuePlaceId = obj.id
// }
// if (!e && !obj) {
// formModel.issuePlace = null
// formModel.issuePlaceId = null
// }
// }
// }
// },
// },
// {
// label: '签单地点',
// field: 'issuePlace',
// component: 'Input',
// required: false,
// colProps: { span: 4 }
// },
// {
// label: '签单地Id',
// field: 'issuePlaceId',
// component: 'Input',
// show: false
// },
// {
// field: 'mblFrt',
// label: '付费方式',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetClientFrtSelectList,
// allowClear: true,
// showSearch: true,
// labelField: 'cnName',
// valueField: 'cnName',
// resultField: 'data',
// immediate: false,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// if (e && obj) {
// formModel.mblFrtCode = obj.ediCode
// }
// if (!e && !obj) {
// formModel.mblFrtCode = null
// }
// }
// }
// },
// },
// {
// label: '付费方式代码',
// field: 'mblFrtCode',
// component: 'Input',
// show: false,
// },
// {
// label: '',
// field: 'prepareAtCode',
// component: 'Input',
// show: false,
// },
// {
// label: '',
// field: 'prepareAtId',
// component: 'Input',
// show: false,
// },
// {
// field: 'prepareAt',
// label: '付费地点',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetClientPortSelectList,
// resultField: 'data',
// labelField: 'pinYinCode',
// valueField: 'portName',
// showName: 'portName',
// immediate: false,
// onChange: (e, obj) => {
// if (e && obj) {
// formModel.prepareAtId = obj.id
// formModel.prepareAtCode = obj.ediCode
// }
// if (!e && !obj) {
// formModel.prepareAtId = null
// formModel.prepareAtCode = null
// }
// }
// }
// }
// },
// {
// field: 'service',
// label: '运输条款',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// api: GetServiceSelectList,
// allowClear: true,
// showSearch: true,
// labelField: 'cnName',
// valueField: 'cnName',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// immediate: false,
// onChange: (e, obj) => {
// if (e && obj) {
// formModel.serviceCode = obj.ediCode
// }
// if (!e && !obj) {
// formModel.serviceCode = null
// }
// }
// }
// },
// },
// {
// field: 'serviceCode',
// label: '运输条款代码',
// component: 'Input',
// show: false
// },
// {
// field: 'noBill',
// label: '正本份数',
// component: 'Select',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// options: FnnoBill,
// allowClear: true,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// },
// {
// field: 'copyNoBill',
// label: '副本份数',
// component: 'Select',
// required: false,
// dynamicDisabled: false,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// options: FncopyNoBill,
// allowClear: true,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// }
// }
// }
}
]
// 客户类别下拉框数据
@ -2716,8 +2749,10 @@ export const personFormSchema: FormSchema[] = [
GetOrderContactListByClientId({ id: v }).then(res => {
personList.value = res.data.map(item => {
return {
label: item.shortName,
value: item.id
label: item.name,
value: item.id,
email: item.email,
mobile: item.mobile
}
})
})
@ -2747,8 +2782,12 @@ export const personFormSchema: FormSchema[] = [
onChange: (v, obj) => {
if (obj) {
formModel.name = obj.label
formModel.email = obj.email
formModel.mobile = obj.mobile
} else {
formModel.name = null
formModel.email = null
formModel.mobile = null
}
}
}

@ -63,7 +63,7 @@
</a-button>
</a-dropdown>
</div>
<BasicForm @register="registerForm">
<BasicForm @register="registerForm" @linkageForm="linkageForm">
<!-- 编号复制 -->
<template #bookingNo="item">
<span v-show="item.values.bookingNo" class="iconfont icon-fuzhi11" @click="copyTxt(item, 'bookingNo')"></span>
@ -158,6 +158,15 @@
const editCustomerNo = () => {
customerNoRef.value.focus()
}
// 1.
// 2.
// 3.
// 4.
// 5.
// 6.
const linkageForm = async (item) => {
console.log(item)
}
watch(
() => props.details,
(v) => {

@ -575,6 +575,9 @@
</script>
<style lang="less">
.ds-goods-info {
h4 {
margin-bottom: 0!important;
}
.ant-col-15 {
max-width: 60%;
flex: 0 0 60%;

@ -153,7 +153,6 @@
{
getFieldsValue: getFieldsValueL,
updateSchema: updateSchemaL,
resetFieldsL,
setFieldsValue: setFieldsValueL,
validate: validateL,
},
@ -168,7 +167,6 @@
{
getFieldsValue: getFieldsValueR,
updateSchema: updateSchemaR,
resetFieldsR,
setFieldsValue: setFieldsValueR,
validate: validateR,
},
@ -260,6 +258,7 @@
watch(
() => props.details,
(nval) => {
console.log(nval)
setFieldsValueL({
...nval
})

@ -0,0 +1,74 @@
<!--
* @Desc:
* @Author: lijj
* @Date: 2024-07-27 16:53:34
-->
<template>
<div class="edi-more">
<h4>
备注信息
</h4>
<BasicForm @register="registerForm" />
</div>
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '/@/components/Form/index'
import { noteFormSchema } from './baseInfo.tsx'
import { ref, watch, defineProps, defineExpose, onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
//
const source = ref(route.query.source || 'edit')
const props = defineProps({
details: {
type: Object,
default: {},
}
})
const [
registerForm,
{ getFieldsValue, updateSchema, resetFields, setFieldsValue, validate },
] = useForm({
labelWidth: 200,
schemas: noteFormSchema,
showActionButtonGroup: false,
})
watch(
() => props.details,
(nval) => {
setFieldsValue(nval)
}
)
onMounted(() => {
if (source.value != 'edit') {
noteFormSchema.forEach(item => {
item.dynamicDisabled = true
})
}
})
defineExpose({
// RefediFrom,
getFieldsValue,
updateSchema,
validate
})
</script>
<style lang="less" scoped>
.edi-more {
h4 {
margin: 15px 0 5px;
}
.flex {
justify-content: space-between;
}
.btn {
font-weight: 400;
color: #257AFA;
cursor: pointer;
}
.is-open {
transform: rotate(270deg);
}
}
</style>
Loading…
Cancel
Save