Commit 67a31268 authored by XieZhiXiong's avatar XieZhiXiong

fix: 合同订单不展示 已支付金额

parent 081c257a
......@@ -215,25 +215,32 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'purchasePrice',
align: 'center',
},
{
title: '已支付/采购金额',
dataIndex: 'payAmount',
render: (text, record) => (
<DescProgress
descriptions={[
{
title: '已支付金额:',
value: `¥${text}`,
},
{
title: '采购金额:',
value: `¥${record.purchaseAmount}`,
},
]}
percent={(text / record.purchaseAmount) * 100}
/>
),
},
!isMateriel
? {
title: '已支付/采购金额',
dataIndex: 'payAmount',
render: (text, record) => (
<DescProgress
descriptions={[
{
title: '已支付金额:',
value: `¥${text}`,
},
{
title: '采购金额:',
value: `¥${record.purchaseAmount}`,
},
]}
percent={(text / record.purchaseAmount) * 100}
/>
),
} : {
title: '采购金额',
dataIndex: 'purchaseAmount',
align: 'center',
render: text => ${text}`,
}
,
{
title: '退货数量',
dataIndex: 'returnCount',
......
......@@ -259,79 +259,81 @@ export const addSchema = (orderType: number): ISchema => {
type: 'object',
properties: {
...(
!isMateriel ? ({
orderNo: {
type: 'string',
title: '订单号',
'x-component': 'OrderNo',
},
productId: {
type: 'string',
title: '商品ID',
'x-component': 'Text',
},
productName: {
type: 'string',
title: '商品名称',
'x-component': 'Text',
},
category: {
type: 'string',
title: '品类',
'x-component': 'Text',
},
brand: {
type: 'string',
title: '品牌',
'x-component': 'Text',
},
unit: {
type: 'string',
title: '单位',
'x-component': 'Text',
},
purchaseCount: {
type: 'string',
title: '采购数量',
'x-component': 'Text',
},
}) : ({
orderNo: {
type: 'string',
title: '订单号',
'x-component': 'OrderNo',
},
materielNo: {
type: 'string',
title: '物料编号',
'x-component': 'Text',
},
materielNameAndType: {
type: 'string',
title: '物料名称、规格',
'x-component': 'Text',
},
materielCategory: {
type: 'string',
title: '品类',
'x-component': 'Text',
},
materielBrand: {
type: 'string',
title: '品牌',
'x-component': 'Text',
},
materielUnit: {
type: 'string',
title: '单位',
'x-component': 'Text',
},
associated: {
type: 'string',
title: orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
'x-component': 'Text',
},
})
!isMateriel
? ({
orderNo: {
type: 'string',
title: '订单号',
'x-component': 'OrderNo',
},
productId: {
type: 'string',
title: '商品ID',
'x-component': 'Text',
},
productName: {
type: 'string',
title: '商品名称',
'x-component': 'Text',
},
category: {
type: 'string',
title: '品类',
'x-component': 'Text',
},
brand: {
type: 'string',
title: '品牌',
'x-component': 'Text',
},
unit: {
type: 'string',
title: '单位',
'x-component': 'Text',
},
purchaseCount: {
type: 'string',
title: '采购数量',
'x-component': 'Text',
},
})
: ({
orderNo: {
type: 'string',
title: '订单号',
'x-component': 'OrderNo',
},
materielNo: {
type: 'string',
title: '物料编号',
'x-component': 'Text',
},
materielNameAndType: {
type: 'string',
title: '物料名称、规格',
'x-component': 'Text',
},
materielCategory: {
type: 'string',
title: '品类',
'x-component': 'Text',
},
materielBrand: {
type: 'string',
title: '品牌',
'x-component': 'Text',
},
materielUnit: {
type: 'string',
title: '单位',
'x-component': 'Text',
},
associated: {
type: 'string',
title: orderType !== ORDER_TYPE_TENDER_CONTRACT ? '关联报价商品ID、名称、规格、品类、品牌' : '关联投标商品ID、名称、规格、品类、品牌',
'x-component': 'Text',
},
})
),
purchasePrice: {
type: 'string',
......@@ -343,11 +345,17 @@ export const addSchema = (orderType: number): ISchema => {
title: '采购金额',
'x-component': 'Text',
},
payAmount: {
type: 'string',
title: '已支付金额',
'x-component': 'Text',
},
...(
!isMateriel
? ({
payAmount: {
type: 'string',
title: '已支付金额',
'x-component': 'Text',
},
})
: ({})
),
returnCount: {
type: 'string',
title: '退货数量',
......
......@@ -241,25 +241,32 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
dataIndex: 'purchasePrice',
align: 'center',
},
{
title: '已支付/采购金额',
dataIndex: 'payAmount',
render: (text, record) => (
<DescProgress
descriptions={[
{
title: '已支付金额:',
value: `¥${text}`,
},
{
title: '采购金额:',
value: `¥${record.purchaseAmount}`,
},
]}
percent={(text / record.purchaseAmount) * 100}
/>
),
},
!isMateriel
? {
title: '已支付/采购金额',
dataIndex: 'payAmount',
render: (text, record) => (
<DescProgress
descriptions={[
{
title: '已支付金额:',
value: `¥${text}`,
},
{
title: '采购金额:',
value: `¥${record.purchaseAmount}`,
},
]}
percent={(text / record.purchaseAmount) * 100}
/>
),
} : {
title: '采购金额',
dataIndex: 'purchaseAmount',
align: 'center',
render: text => ${text}`,
}
,
{
title: '退货数量',
dataIndex: 'returnCount',
......
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