perf: 价格忽略对比:'WPI_SN 'WPP_VEI_SN'

feat: 增加多城市 FormItem
dev/2025b
LiaoYijun 2 months ago
parent a95992cb8e
commit 7cce92adea

@ -100,7 +100,7 @@ export const useProductsAuditStatesMapVal = (value) => {
*/
export const useProductsTypesFieldsets = (type) => {
const [isPermitted] = useAuthStore((state) => [state.isPermitted]);
const infoDefault = [['city'], ['title']];
const infoDefault = [['city', 'city_list'], ['title']];
const infoAdmin = ['title', 'product_title', 'code', 'remarks', 'dept']; // 'display_to_c'
const infoDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['display_to_c', 'sort_order'] : [];
const infoRecDisplay = isPermitted(PERM_PRODUCTS_MANAGEMENT) ? ['recommends_rate'] : [];

@ -329,7 +329,7 @@ export const useProductsStore = create(
weekdays: definition.weekend.join(','),
WPI_SN: editingProduct.info.id,
WPP_VEI_SN: activeAgency.travel_agency_id,
lastedit_changed: '',
lastedit_changed: {},
audit_state_id: -1,
key: generateId(),
fresh: false
@ -369,7 +369,8 @@ export const useProductsStore = create(
if (prevQuotation.key === formValues.key) {
const changedObject = {}
for (const [key, value] of Object.entries(formValues)) {
if (key === 'use_dates' || key === 'id' || key === 'key' || key === 'weekdayList') continue
if (key === 'use_dates' || key === 'id' || key === 'key' || key === 'weekdayList'
|| key === 'WPI_SN' || key === 'WPP_VEI_SN') continue
const preValue = prevQuotation[key]
const hasChanged = preValue !== value

@ -223,14 +223,6 @@ function getFields(props) {
</Form.Item>,
fieldProps?.city?.col || midCol
),
item(
'city_list',
99,
<Form.Item name='city_list' label={t('City')} {...fieldProps.city} rules={[{ required: true }]} tooltip={t('FormTooltip.City')}>
<CitySelector {...styleProps} {...editableProps('city_list')} placeholder={t('FormTooltip.City')} />
</Form.Item>,
fieldProps?.city_list?.col || midCol
),
item(
'dept',
99,
@ -248,6 +240,14 @@ function getFields(props) {
</Form.Item>,
fieldProps?.duration?.col || midCol
),
item(
'city_list',
99,
<Form.Item name='city_list' label={t('多城市')} tooltip={t('把产品绑定到多个城市')}>
<CitySelector {...styleProps} {...editableProps('city_list')} />
</Form.Item>,
fieldProps?.city_list?.col || midCol
),
item(
'km',
99,

Loading…
Cancel
Save