perf: 三峡: 预订类型

main
Lei OT 2 months ago
parent 6317c24a75
commit 397c886aea

@ -186,6 +186,11 @@ export default observer((props) => {
transform: (value) => value?.value || '',
default: '',
},
'cruiseBookType': {
key: 'cruiseBookType',
transform: (value) => value?.value || '',
default: '',
},
'hotelBookType': {
key: 'hotelBookType',
transform: (value) => value?.value || '',
@ -544,10 +549,10 @@ function getFields(props) {
item(
'cruiseBookType',
99,
<Form.Item name={`cruiseBookType`} initialValue={at(props, 'initialValue.cruiseBookType')[0] || (fieldProps?.cruiseBookType?.show_all ? { key: 'all', label: '预定类型' } : undefined)}>
<Form.Item name={`cruiseBookType`} initialValue={at(props, 'initialValue.cruiseBookType')[0] || (fieldProps?.cruiseBookType?.show_all ? { key: '-1', label: '预定类型' } : undefined)}>
<Select style={{ width: '100%' }} placeholder="预定类型" labelInValue allowClear>
{fieldProps?.cruiseBookType?.show_all && (
<Option key="all" value="" disabled>
<Option key="-1" value="-1" disabled>
预定类型
</Option>
)}
@ -555,7 +560,7 @@ function getFields(props) {
单订三峡
</Option>
<Option key="0" value="0">
其他
含行程
</Option>
</Select>
</Form.Item>,

@ -65,9 +65,11 @@ const paramKeyMapped = {
'DateDiff2': { key: 'CompareDateEnd' },
'keyword': { key: 'ProductName' },
'cruiseDirection': { key: 'Direction' },
'cruiseBookType': { key: 'BookingType' },
'hotelStar': { key: 'Star' },
'hotelRecommandRate': { key: 'RecommendedLevel' },
'hotelBookType': { key: 'BookingType' },
'country': { key: 'Country' },
'countryArea': { key: 'Area', transform: (val) => (val === 'china' ? '1' : val === 'foreign' ? '0' : '-1') },
};
@ -81,7 +83,10 @@ class HotelCruise {
this.cruise.loading = true;
this.cruise.dataSource = [];
const _queryParam = objectMapper(param, paramKeyMapped);
const queryParam = omit({ ...this.searchValuesToSub, ..._queryParam }, ['DepartmentList', 'orderStatus', 'keyword', 'Date1', 'Date2', 'DateDiff1', 'DateDiff2', 'cruiseDirection']);
const queryParam = omit({ ...this.searchValuesToSub, ..._queryParam }, [
'DepartmentList', 'orderStatus', 'keyword', 'Date1', 'Date2', 'DateDiff1', 'DateDiff2',
'cruiseDirection', 'cruiseBookType', 'country'
]);
queryParam.Compare = isEmpty(param.DateDiff1) ? '' : '1';
const res = await fetchCruiseData(queryParam);
const resCP =

@ -83,9 +83,9 @@ export default observer((props) => {
// 'countryArea',
shows: [
'DepartmentList', 'orderStatus', 'dates', 'keyword', 'cruiseDirection', 'agency',
// 'cruiseBookType', 'country', 'roomsRange', 'personRange'
'cruiseBookType', 'country', // 'roomsRange', 'personRange'
],
sort: { keyword: 101, agency: 103, cruiseDirection: 102, country: 104 },
sort: { keyword: 101, agency: 110, cruiseDirection: 102, country: 104 },
fieldProps: {
keyword: { placeholder: '产品名', col: 4 },
DepartmentList: { show_all: true, mode: 'multiple' },

Loading…
Cancel
Save