Commit 264005a2 authored by Bill's avatar Bill

Merge branch 'v2' into v2-220318

parents d5aec47b 15e81254
This diff is collapsed.
......@@ -19,7 +19,7 @@ const SmilingFace = (props) => {
node = (
<div {...componentProps}>
<Mood type="sad" customStyle={{ marginRight: 8 }} />
<span>{intl.formatMessage({id: 'components.chaping'})}</span>
<span>差评</span>
</div>
);
break;
......@@ -29,7 +29,7 @@ const SmilingFace = (props) => {
node = (
<div {...componentProps}>
<Mood type="notBad" customStyle={{ marginRight: 8 }} />
<span>{intl.formatMessage({id: 'components.zhongping'})}</span>
<span>中评</span>
</div>
);
break;
......@@ -40,7 +40,7 @@ const SmilingFace = (props) => {
node = (
<div {...componentProps}>
<Mood type="smile" customStyle={{ marginRight: 8 }} />
<span>{intl.formatMessage({id: 'components.haoping'})}</span>
<span>好评</span>
</div>
);
break;
......
/** 订单类型 */
/**
* 询价采购
*/
export const ORDER_TYPE_INQUIRYT_PURCHASE = 1;
/**
* 需求采购
*/
export const ORDER_TYPE_DEMAND_PURCHASE = 2;
/**
* 现货采购
*/
export const ORDER_TYPE_STORE_PURCHASE = 3;
/**
* 集采
*/
export const ORDER_TYPE_CENTRAL_PURCHASE = 4;
/**
* 渠道直采
*/
export const ORDER_TYPE_CHANNEL_DIRECT_MINING = 5;
/**
* 渠道现货
*/
export const ORDER_TYPE_CHANNEL_STORE = 6;
/**
* 积分兑换
*/
export const ORDER_TYPE_POINTS = 7;
/**
* 渠道积分兑换
*/
export const ORDER_TYPE_CHANNEL_POINTS = 8;
/**
* 采购询价合同
*/
export const ORDER_TYPE_INQUIRY_CONTRACT = 9;
/**
* 采购竞价合同
*/
export const ORDER_TYPE_BIDDING_CONTRACT = 10;
/**
* 采购招标合同
*/
export const ORDER_TYPE_TENDER_CONTRACT = 11;
/**
* 请购单下单
*/
export const ORDER_TYPE_REQUISITION = 12;
/**
* 判断订单类型是否是积分订单
* @param orderType 订单类型 number
* @returns
*/
export const checkIsPointsOrder = (orderType: number) => orderType === ORDER_TYPE_POINTS || orderType === ORDER_TYPE_CHANNEL_POINTS;
\ No newline at end of file
......@@ -10,19 +10,23 @@ import { usePageStatus } from '@/hooks/usePageStatus';
interface Iprops {
extra?: React.ReactNode,
title: string | React.ReactNode,
onBack?: () => void | null
}
type SettingPanelType = {
pageConfig: any,
}
const Toolbar: React.FC<Iprops> = (props: Iprops) => {
const { pageConfig } = useSelector<SettingPanelType, STATE_PROPS>(['pageConfig']);
const { id } = usePageStatus();
const color = pageConfig?.[0]?.props?.backgroundColor;
const { title, extra } = props;
const goback =() => {
if (props.onBack) {
props.onBack()
return;
}
Modal.confirm({
title: '确认离开装修页?',
onOk: () => {
......
......@@ -12,6 +12,7 @@ import {
} from '@formily/antd';
import { ArrayList } from '@formily/react-shared-components';
import { toArr, isFn, FormPath } from '@formily/shared';
import { checkIsPointsOrder } from '@/constants/const/order';
import SmilingFace from '@/components/NiceForm/components/SmilingFace';
const ArrayComponents = {
......@@ -146,7 +147,7 @@ const EvaluationList = props => {
X {item.good.purchaseCount || ''}
{item.good.unit || ''}
</div>
<div className="goodInfo-price">{`¥ ${item.good.price}`}</div>
<div className="goodInfo-price">{`${!checkIsPointsOrder(item.orderType) ? '¥' : ''} ${item.good.price}${checkIsPointsOrder(item.orderType) ? '积分' : ''}`}</div>
</div>
</div>
</Col>
......
......@@ -39,6 +39,7 @@ export function normalizeUnevaluatedList(arr: any): Unevaluated[] {
comment: item.comment, // 评价
picture: Array.isArray(item.pics) ? item.pics.map(item => normalizeFiledata(item)) : [],
smile: item.star, // 笑脸
orderType: item.orderType, // 笑脸
};
ret.push(atom);
});
......
import React, { useEffect, useState } from 'react';
import { Spin, message } from 'antd';
import { Spin, message, Modal } from 'antd';
import { BrickProvider, createActions, ModuleTree, ModuleTreeCollapse, useSelector } from '@linkseeks/design-react';
import { history } from 'umi';
import styles from './index.less';
import configs from './common/schema';
......@@ -138,6 +137,15 @@ const CategoryNavigation = () => {
// const { data, code }
};
const onBack = () => {
Modal.confirm({
title: '确认离开装修页?',
onOk: () => {
history.goBack();
},
});
}
return (
<Spin spinning={loading}>
<BrickProvider
......@@ -148,7 +156,14 @@ const CategoryNavigation = () => {
customReducer={customReducer}
>
<div className={styles['wrapper']}>
<Toolbar title="正在编辑:品类导航页" extra={<ToolbarSubmit dataConfig={['pageConfig', 'hasRequestTabKey']} loading={loading} onSubmit={onSave}>保存</ToolbarSubmit>} />
<Toolbar
title="正在编辑:品类导航页"
extra={<ToolbarSubmit
dataConfig={['pageConfig', 'hasRequestTabKey']}
loading={loading}
onSubmit={onSave}>保存</ToolbarSubmit>}
onBack={onBack}
/>
<div className={styles['content']}>
<div className={styles.tree}>
<ModuleTree />
......
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