Commit c9967881 authored by shida.liu's avatar shida.liu

Merge branch 'feat-fake-pop-order-mession' into feature-20250212-fake-long-number

parents 2951ddbb 87caf0b5
...@@ -6,15 +6,16 @@ import { useLocation } from 'react-router-dom'; ...@@ -6,15 +6,16 @@ import { useLocation } from 'react-router-dom';
import { POP_GOOD_MANAGE } from '@/../config/permission.config'; import { POP_GOOD_MANAGE } from '@/../config/permission.config';
export const TaskTypeSelect = props => { export const TaskTypeSelect = props => {
const { permissions } = props;
const location = useLocation(); const location = useLocation();
const customer = useContext(ServiceContext); const customer = useContext(ServiceContext);
const isPopGoods = location.pathname.indexOf('popGoodsManage') > 0; // pop商品管理-商品库(应付审计用的, 驳回和修改状态下不能编辑) const isPopGoods = location.pathname.indexOf('popGoodsManage') > 0; // pop商品管理-商品库(应付审计用的, 驳回和修改状态下不能编辑)
const typeConfig = !isPopGoods const typeConfig = !isPopGoods
? TaskList(customer.canAddService, customer.canAddNormal, customer.canTakeawayService) ? TaskList(customer.canAddService, customer.canAddNormal, customer.canTakeawayService)
: TaskList( : TaskList(
POP_GOOD_MANAGE.ADD_SERVICE_GOODS === '0201031', permissions[POP_GOOD_MANAGE.ADD_SERVICE_GOODS],
POP_GOOD_MANAGE.ADD_NORMAL_GOODS === '0201041', permissions[POP_GOOD_MANAGE.ADD_NORMAL_GOODS],
POP_GOOD_MANAGE.ADD_TAKEAWAY_GOODS === '0201051', permissions[POP_GOOD_MANAGE.ADD_TAKEAWAY_GOODS],
); );
const selectTabs = task => { const selectTabs = task => {
if (!customer.isEdit && Object.keys(props.takeAway).length === 0) { if (!customer.isEdit && Object.keys(props.takeAway).length === 0) {
......
...@@ -564,6 +564,7 @@ const ServiceGoods = options => { ...@@ -564,6 +564,7 @@ const ServiceGoods = options => {
<ServiceContext.Provider value={providerValue}> <ServiceContext.Provider value={providerValue}>
<Title title="商品类型" /> <Title title="商品类型" />
<TaskTypeSelect <TaskTypeSelect
permissions={permissions}
productType={productType} productType={productType}
takeAway={takeAway} takeAway={takeAway}
onChange={productChange} onChange={productChange}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment