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' ? '舱位修改' : '舱位新增' }} 已拆票