Commit e0a48d94 authored by XieZhiXiong's avatar XieZhiXiong

feat: 处理积分订单价格展示问题

parent 114148df
/** 订单类型 */
/**
* 询价采购
*/
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
......@@ -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);
});
......
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