|
|
@ -39,7 +39,8 @@ const ProductInfo = ({ ...props }) => {
|
|
|
|
setInfoEditable(topPerm || (!hasHT && hasEditPer));
|
|
|
|
setInfoEditable(topPerm || (!hasHT && hasEditPer));
|
|
|
|
|
|
|
|
|
|
|
|
const _priceEditable = [-1, 3].includes(activeAgency?.audit_state_id) || isEmpty(editingProduct?.info?.id);
|
|
|
|
const _priceEditable = [-1, 3].includes(activeAgency?.audit_state_id) || isEmpty(editingProduct?.info?.id);
|
|
|
|
setPriceEditable(topPerm || (_priceEditable && hasEditPer));
|
|
|
|
// setPriceEditable(topPerm || (_priceEditable && hasEditPer));
|
|
|
|
|
|
|
|
setPriceEditable(true); // debug: 0
|
|
|
|
|
|
|
|
|
|
|
|
const showExtras = topPerm && hasHT; // !isEmpty(editingProduct) &&
|
|
|
|
const showExtras = topPerm && hasHT; // !isEmpty(editingProduct) &&
|
|
|
|
setExtrasVisible(showExtras);
|
|
|
|
setExtrasVisible(showExtras);
|
|
|
@ -50,7 +51,7 @@ const ProductInfo = ({ ...props }) => {
|
|
|
|
values.travel_agency_id = activeAgency.travel_agency_id;
|
|
|
|
values.travel_agency_id = activeAgency.travel_agency_id;
|
|
|
|
const copyNewProduct = structuredClone(newProductRecord);
|
|
|
|
const copyNewProduct = structuredClone(newProductRecord);
|
|
|
|
const poster = {
|
|
|
|
const poster = {
|
|
|
|
...(topPerm ? {} : { 'audit_state': -1 }), // 高级权限: 不变更状态值
|
|
|
|
// ...(topPerm ? { } : { 'audit_state': -1 }), // 高级权限: 不变更状态值
|
|
|
|
// "create_date": dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
|
// "create_date": dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
|
// "created_by": userId,
|
|
|
|
// "created_by": userId,
|
|
|
|
'travel_agency_id': activeAgency.travel_agency_id,
|
|
|
|
'travel_agency_id': activeAgency.travel_agency_id,
|
|
|
@ -96,6 +97,8 @@ const ProductInfo = ({ ...props }) => {
|
|
|
|
items={[
|
|
|
|
items={[
|
|
|
|
{ title: productsTypesMapVal[editingProduct?.info?.product_type_id]?.label || editingProduct?.info?.product_type_name },
|
|
|
|
{ title: productsTypesMapVal[editingProduct?.info?.product_type_id]?.label || editingProduct?.info?.product_type_name },
|
|
|
|
{ title: editingProduct?.info?.title ?? t('New') },
|
|
|
|
{ title: editingProduct?.info?.title ?? t('New') },
|
|
|
|
|
|
|
|
{ title: 'htID: ' + editingProduct?.info?.htid },
|
|
|
|
|
|
|
|
{ title: 'ID: ' + editingProduct?.info?.id },
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Divider className='my-1' />
|
|
|
|
<Divider className='my-1' />
|
|
|
|