diff --git a/src/components/File/index.vue b/src/components/File/index.vue index 80c74662..f1e52c28 100644 --- a/src/components/File/index.vue +++ b/src/components/File/index.vue @@ -66,7 +66,7 @@ - + @@ -93,6 +93,11 @@ show: { type: Boolean, default: true, + }, + // 是否显示文件列表 + showFileList: { + type: Boolean, + default: true, }, // 附件列表高度,超过滚动 height: { @@ -174,6 +179,7 @@ const fileForm = ref(null) // 附件列表组件 const dsFileList = ref(null) + const emits = defineEmits(['handleSuccess']) // 提交上传 const handleOk = async () => { const res = await fileForm.value.validateFields() @@ -192,10 +198,15 @@ loading.value = false visible.value = false upFileList.value = [] - dsFileList.value.init() + if(props.showFileList){ + dsFileList.value.init() + } else { + emits('handleSuccess') + } createMessage.success('上传成功!') }) - .catch(() => { + .catch((res) => { + console.log(res) loading.value = false createMessage.error('上传失败!') }) diff --git a/src/views/bookingcabin/CabinManagement/columns.tsx b/src/views/bookingcabin/CabinManagement/columns.tsx index b2477733..af246bdc 100644 --- a/src/views/bookingcabin/CabinManagement/columns.tsx +++ b/src/views/bookingcabin/CabinManagement/columns.tsx @@ -4,6 +4,7 @@ import { useOptionsStore } from '/@/store/modules/options' import { SlotFlags } from '@vue/shared' import { getOptions } from '/@/hooks/dict' import { BookingLabelList } from './api' +import { GetClientListByCode } from '/@/api/common' const optionsStore = useOptionsStore() import { GetCarrierlist, @@ -162,15 +163,13 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - api: GetCarrierlist, - immediate: false, - labelField: 'shortName', - valueField: 'id', + api: GetClientListByCode, + params: { code: 'carrier' }, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'shortName', resultField: 'data', - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => {}, + immediate: false, } }, }, @@ -836,8 +835,8 @@ export const detialForm: FormSchema[] = [ colProps: { span: 4 }, }, { - label: '船公司名称', - field: 'carrier', + label: '船公司id', + field: 'carrierId', component: 'Input', defaultValue: null, show: false, @@ -850,23 +849,32 @@ export const detialForm: FormSchema[] = [ show: false, }, { - field: 'carrierId', + field: 'carrier', label: '船公司', + labelSlot: 'carrierId', component: 'ApiSelect', required: false, dynamicDisabled: false, colProps: { span: 4 }, componentProps: ({ formModel }) => { return { - api: GetCarrierlist, - immediate: false, - labelField: 'shortName', - valueField: 'id', + api: GetClientListByCode, + params: { code: 'carrier' }, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'shortName', resultField: 'data', - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => {}, + immediate: false, + onChange: (e, obj) => { + if (e && obj) { + formModel.carrierId = obj.id + formModel.carrierCode = obj.codeName + } + if (!e && !obj) { + formModel.carrierId = '' + formModel.carrierCode = '' + } + } } }, }, diff --git a/src/views/bookingcabin/CabinManagement/detail/index.vue b/src/views/bookingcabin/CabinManagement/detail/index.vue index b34f7d40..993436e9 100644 --- a/src/views/bookingcabin/CabinManagement/detail/index.vue +++ b/src/views/bookingcabin/CabinManagement/detail/index.vue @@ -7,34 +7,34 @@ 保存 - -
+ v-if="type === 'edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"> 关联订舱
委托单位
- @@ -48,7 +48,7 @@
客服
- - {{ item1.userName }} + {{ item1.pinYinCode }}
@@ -65,7 +65,7 @@
销售
- - {{ item1.userName }} + {{ item1.pinYinCode }}
@@ -82,7 +82,7 @@
操作
- - {{ item.userName }} + {{ item.pinYinCode }}
@@ -99,7 +99,7 @@
单证
- - {{ item.userName }} + {{ item.pinYinCode }}
@@ -116,7 +116,7 @@
商务
- - {{ item.userName }} + {{ item.pinYinCode }}
@@ -135,20 +135,20 @@
品名
- +
卖价
+ v-model:value="item.sellingPrice" />
销售日期
- +
@@ -165,7 +165,7 @@
- {{ type === 'Edit' ? '舱位修改' : '舱位新增' }} + {{ type === 'edit' ? '舱位修改' : '舱位新增' }} 已拆票