Commit ce7973e7 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents d2e593f4 e1b79321
......@@ -2,26 +2,34 @@
* 给Standard table 设置搜索值
*/
import { useMemo } from "react";
import { useCallback, useMemo, useState } from "react";
import { usePageStatus } from "./usePageStatus";
const useSetSearchValueInTable = () => {
const { id, lastTypeParams, pageStatus, preview, ...rest } = usePageStatus();
const cacheData = useMemo(() => rest, [rest])
const [searchData, setSearchData] = useState(() => rest);
const cacheData = useMemo(() => searchData, [searchData])
const formatInitialValue = useMemo(() => {
const length = Object.keys(rest).length;
const length = (cacheData && Object.keys(cacheData).length) || 0;
if (length === 0) {
return {}
}
return {
value: rest
initialValues: cacheData
}
}, [cacheData])
const clear = useCallback(() => {
setSearchData(null);
}, [])
return {
searchData: rest,
searchData: cacheData,
formatInitialValue,
clear
}
}
......
......@@ -9,7 +9,7 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Button, Card, DatePicker, Modal} from 'antd';
import NiceForm from '@/components/NiceForm';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { createFormActions } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
......@@ -21,7 +21,9 @@ import useFetchColumns from '../../hooks/useFetchColumns';
import UploadVoucherModal from '../../components/UploadVoucherModal';
import Voucher from '../../components/Voucher';
import useSetSearchValueInTable from '@/hooks/useSetSearchValueInTable';
import { GetSettleAccountsMemberSettlementPagePayableSettlementRequest } from '@/services/SettleV2Api';
const { onFieldValueChange$ } = FormEffectHooks
const { RangePicker } = DatePicker;
const formActions = createFormActions();
interface SearchParams {
......@@ -39,7 +41,7 @@ interface SearchParams {
const SettlementList = () => {
const ref = useRef<any>({})
const { searchData, formatInitialValue } = useSetSearchValueInTable();
const { searchData, formatInitialValue, clear } = useSetSearchValueInTable();
const { columns, manualStatus, payModalVisible, balanceInfo, payModalOnCancel, viewModalonCancel, viewVisible, payVoucherInfo } = useFetchColumns("payable");
const [files, setFiles] = useState<any>([]);
const [uploadSubmitLoading, setUploadSubmitLoading] = useState<boolean>()
......@@ -48,17 +50,20 @@ const SettlementList = () => {
* 分页查询
* @param {params: SearchParams}
*/
const fetchListData = useCallback(async (params: any) => {
const fetchListData = useCallback(async (params: GetSettleAccountsMemberSettlementPagePayableSettlementRequest) => {
const searchParams = {
...params,
orderType: params.orderType || 0,
status: params.status || 0,
...searchData,
...params,
}
const postData = {
...searchParams,
status: searchParams.status || '0',
orderType: searchParams.orderType || '0',
}
// /settle/accounts/member/settlement/pagePayableSettlement
const { data } = await PublicApi.getSettleAccountsMemberSettlementPagePayableSettlement(searchParams);
const { data } = await PublicApi.getSettleAccountsMemberSettlementPagePayableSettlement(postData);
return data
}, [])
}, [searchData])
/**
* 手动结算
......@@ -143,10 +148,9 @@ const SettlementList = () => {
schema={schema}
onSubmit={handleSearch}
{...formatInitialValue}
// onReset={() => {
// formActions.setFieldValue('startTime', null);
// formActions.setFieldValue('endTime', null);
// }}
onReset={() => {
clear();
}}
/>
}
/>
......
......@@ -51,7 +51,7 @@ const AccountReceivable = () => {
handleViewPayModal
} = useFetchColumns("receiveable");
const [files, setFiles] = useState([]);
const { searchData, formatInitialValue } = useSetSearchValueInTable();
const { searchData, formatInitialValue, clear } = useSetSearchValueInTable();
const columns = [
{
......@@ -184,8 +184,7 @@ const AccountReceivable = () => {
schema={schema}
onSubmit={handleSearch}
onReset={() => {
formActions.setFieldValue('startTime', null);
formActions.setFieldValue('endTime', null);
clear();
}}
{...formatInitialValue}
/>
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-05-24 17:01:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-05 16:43:55
* @LastEditTime: 2021-07-08 18:02:59
* @Description: 审核入库资料
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -21,6 +21,7 @@ import { history } from 'umi';
import { usePageStatus } from '@/hooks/usePageStatus';
import { PublicApi } from '@/services/api';
import { GetMemberDepositVerifyDetailResponse } from '@/services/MemberV2Api';
import { normalizeFiledata } from '@/utils';
import AnchorPage from '@/layouts/AnchorPage';
import AvatarWrap from '@/components/AvatarWrap';
import AuditProcess from '@/components/AuditProcess';
......@@ -61,6 +62,11 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
}).then(res => {
if (res.code === 1000) {
setMemberInfo(res.data);
setQualifications(res.data.qualities.map((item) => ({
file: item.url ? [normalizeFiledata(item.url)] : [],
expireDay: item.expireDay,
permanent: item.permanent === 1 ? [item.permanent] : [],
})));
}
}).finally(() => {
setInfoLoaading(false);
......@@ -89,6 +95,7 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
validateId,
...value,
depositDetails: comingData,
// 要手动将旧数据带过去
qualities: (
qualifications
.filter((item) => item.file && item.file[0] && item.file[0].status === 'done')
......
import React from 'react';
import { Axis, Chart, Tooltip, Legend } from 'bizcharts'
import Line from 'bizcharts/lib/geometry/Line';
import Point from 'bizcharts/lib/geometry/Point';
const LineChart = () => {
// 数据源
const data = [
{
month: "Jan",
city: "Tokyo",
temperature: 7
},
{
month: "Jan",
city: "London",
temperature: 3.9
},
{
month: "Feb",
city: "Tokyo",
temperature: 6.9
},
{
month: "Feb",
city: "London",
temperature: 4.2
},
{
month: "Mar",
city: "Tokyo",
temperature: 9.5
},
{
month: "Mar",
city: "London",
temperature: 5.7
},
{
month: "Apr",
city: "Tokyo",
temperature: 14.5
},
{
month: "Apr",
city: "London",
temperature: 8.5
},
{
month: "May",
city: "Tokyo",
temperature: 18.4
},
{
month: "May",
city: "London",
temperature: 11.9
},
{
month: "Jun",
city: "Tokyo",
temperature: 21.5
},
{
month: "Jun",
city: "London",
temperature: 15.2
},
{
month: "Jul",
city: "Tokyo",
temperature: 25.2
},
{
month: "Jul",
city: "London",
temperature: 17
},
{
month: "Aug",
city: "Tokyo",
temperature: 26.5
},
{
month: "Aug",
city: "London",
temperature: 16.6
},
{
month: "Sep",
city: "Tokyo",
temperature: 23.3
},
{
month: "Sep",
city: "London",
temperature: 14.2
},
{
month: "Oct",
city: "Tokyo",
temperature: 18.3
},
{
month: "Oct",
city: "London",
temperature: 10.3
},
{
month: "Nov",
city: "Tokyo",
temperature: 13.9
},
{
month: "Nov",
city: "London",
temperature: 6.6
},
{
month: "Dec",
city: "Tokyo",
temperature: 9.6
},
{
month: "Dec",
city: "London",
temperature: 4.8
}
];
const scale = {
temperature: { min: 0 },
city: {
formatter: v => {
return {
London: '伦敦',
Tokyo: '东京'
}[v]
}
}
}
return (
<Chart scale={scale} padding={[30, 20, 60, 40]} autoFit height={312} data={data} interactions={['element-active']}>
<Point position="month*temperature" color="city" shape='circle' />
<Line position="month*temperature" color="city" label="temperature" />
<Axis
name="temperature"
label={{
formatter: val => `${val}亿`,
}}
/>
<Tooltip shared showCrosshairs />
<Legend visible={false} />
{/* <Legend background={{
padding:[5,100,5,36],
style: {
fill: '#eaeaea',
stroke: '#fff'
}
}} /> */}
</Chart>
)
}
export default LineChart
import React from 'react';
import LineChart from './chart';
import CustomizeCard from '../CustomizeCard';
const AfterServiceRate = () => {
return (
<CustomizeCard title="供货售后率" bodyStyle={{padding: '0 16px', height: '312px'}}>
<LineChart />
</CustomizeCard>
)
}
export default AfterServiceRate
.container {
display: flex;
flex-direction: column;
.title {
margin-bottom: @margin-md;
color: "#909399";
font-size: 12px;
}
.percent {
display: flex;
flex-direction: row;
align-items: center;
.percentItem {
position: relative;
text-align: right;
padding: 4px 8px;
font-size: 12px;
line-height: 12px;
color: #fff;
}
}
}
import React from 'react';
// import TimelyDeliveryRate from './chart';
import PercentChart from './PercentChart';
import CustomizeCard from '../CustomizeCard';
import StatusLabel from '../StatusLabel';
const AfterSoldEvaluation = () => {
const data = [
{
title: '售后退货评价',
value: [2, 6, 12, 16, 64]
},
{
title: '售后换货评价',
value: [2, 7, 12, 16, 64]
},
{
title: '售后维修评价',
value: [5, 0, 18, 16, 64]
}
]
const options = [
{ label: '非常满意' },
{ label: '满意' },
{ label: '一般' },
{ label: '不满意' },
{ label: '非常不满意' },
]
return (
<CustomizeCard
title="售后评价" bodyStyle={{padding: '24px 16px', height: '312px'}}
extra={
<StatusLabel options={options}/>
}
>
{
data.map((_item) => {
return (
<div style={{marginBottom: '48px'}}>
<PercentChart data={_item.value} title={_item.title} />
</div>
)
})
}
{/* <PercentChart data={data} title="售后退货评价" />
<PercentChart data={data} title="售后退货评价" /> */}
</CustomizeCard>
)
}
export default AfterSoldEvaluation
import React from 'react';
import styles from './chart.less'
const colors = ["#1fbf87", "#4b8bfa", "#5d7092", "#f7a12b", "#e05a55", "#fff", "#000"]
interface Iprops {
data: number[],
title: string
}
const PercentChart: React.FC<Iprops> = (props: Iprops) => {
const { data, title } = props;
return (
<div className={styles.container}>
<p className={styles.title}>{title}</p>
<div className={styles.percent}>
{
data.map((_item, index) => {
return (
(_item !== 0 && (
<div key={_item} className={styles.percentItem} style={{flex: _item, background: colors[index], }}>{`${_item}%`}</div>
))|| null
)
})
}
</div>
</div>
)
}
export default PercentChart
import React from 'react';
import CustomizeCard from '../CustomizeCard';
import CommonDonutChart from '../DonutChart';
import StatusLabel from '../StatusLabel';
import styles from './index.less';
import cx from 'classnames';
const ContractPrice = () => {
const renderItem = (data: { percent: string, range: string, value: number }) => {
return (
<div className={styles.renderItem}>
<span className={styles.range}>{data.range}</span>
<div className={styles.dataInfo}>
<span className={styles.percent}>36%</span>
<span className={styles.count}>12</span>
</div>
</div>
)
}
const options = [
{
label: '90%-100%',
render: () => {
return renderItem({ percent: '36%', value: 12, range: "90% - 100%" })
}
},
{
label: '80%-89%',
render: () => {
return renderItem({ percent: '36%', value: 12, range: "90% - 100%" })
}
},
{
label: '70%-79%',
render: () => {
return renderItem({ percent: '36%', value: 12, range: "90% - 100%" })
}
}
]
return (
<CustomizeCard
title="采购合同执行金额"
bodyStyle={{height: '312px', padding: '0'}}
>
<div className={styles.container}>
<div className={styles.sectionItem}>
<CommonDonutChart />
</div>
<div className={cx(styles.sectionItem, styles.labelSection)}>
<StatusLabel direction={"column"} options={options} type="circle"/>
</div>
</div>
</CustomizeCard>
)
}
export default ContractPrice
.container {
display: flex;
flex-direction: row;
.sectionItem {
flex: 1
}
.labelSection {
display: flex;
flex-direction: column;
// align-items: center;
justify-content: center;
padding-left: @padding-md;
}
}
.renderItem {
display: flex;
flex-direction: row;
.range {
font-size: 12px;
color: #5c626a;
padding-right: 8px;
border-right: 1px solid #EBECF0;
}
.dataInfo {
margin-left: 8px;
.percent {
color: #91959B;
font-size: 12px;
margin-right: 8px;
}
.count {
color: #5C626A;
font-size: 12px;
}
}
}
import React from 'react';
import ReactDOM from "react-dom";
// import { Legend } from "bizcharts";
// import * as BizCharts from 'bizcharts'
import DonutChart from 'bizcharts/lib/plots/DonutChart';
// 数据源
const data = [
{
type: "分类一",
value: 27,
},
{
type: "分类二",
value: 25,
},
{
type: "分类三",
value: 18,
},
{
type: "分类四",
value: 15,
},
{
type: "分类五",
value: 10,
},
{
type: "其它",
value: 5,
},
];
function CommonDonutChart() {
return (
<DonutChart
data={data || []}
title={null}
autoFit
description={null}
height={312}
radius={0.8}
padding="auto"
angleField="value"
colorField="type"
pieStyle={{ stroke: "white", lineWidth: 5 }}
label={null}
statistic={{
title: {
formatter: (text) => {
return '合同总数'
},
style: {
fontSize: "12px",
color: "#91959B",
},
},
content: {
formatter: (text) => {
return '568'
},
style: {
fontSize: "28px",
color: "#303133",
marginTop: "12px"
},
}
}}
legend={{
visible: false,
}}
/>
);
}
export default CommonDonutChart
......@@ -4,7 +4,9 @@
.item {
color: #5c626a;
font-size: 12px;
display: flex;
flex-direction: row;
align-items: center;
}
}
......@@ -19,6 +21,10 @@
.column {
flex-direction: column;
.item {
margin-bottom: @margin-md;
}
}
.circle {
......
......@@ -5,6 +5,7 @@ import cx from 'classnames';
type Options = {
label: string,
color?: string | null,
render?: () => React.ReactNode
}
interface Iprops {
......@@ -23,18 +24,13 @@ const StatusLabel: React.FC<Iprops> = (props: Iprops) => {
{
options.map((_item, index) => {
return (
<div className={styles.item}>
<div className={styles.item} key={index}>
<span className={cx(styles[type])} style={_item.color ? {background: _item.color} : {background: colors[index] || '#fff'}}></span>
<span>{_item.label}</span>
<span>{_item.render?.() || _item.label}</span>
</div>
)
})
}
{/* <div className={styles.item}>
<span className={cx(styles[type])}></span>
<span>满意</span>
</div> */}
</div>
)
}
......
import React from 'react';
import CustomizeCard from '../CustomizeCard';
import { Chart, Interval, Tooltip } from 'bizcharts';
interface Iprops {}
type DataType = {
month: string,
number: number
}
const Suggestion = () => {
const data: DataType[] = [
{ month: '1951 年', number: 38 },
{ month: '1952 年', number: 52 },
{ month: '1956 年', number: 61 },
{ month: '1957 年', number: 45 },
{ month: '1958 年', number: 48 },
{ month: '1959 年', number: 38 },
{ month: '1960 年', number: 38 },
{ month: '1962 年', number: 38 },
];
return (
<CustomizeCard
title="投诉建议"
bodyStyle={{height: '312px', padding: '0'}}
>
<Chart height={312} autoFit data={data} interactions={['active-region']} padding={[30, 30, 30, 50]} >
<Interval position="month*number" />
<Tooltip shared />
</Chart>
</CustomizeCard>
)
}
export default Suggestion
import React from 'react';
import { Axis, Chart } from 'bizcharts';
import LineAdvance from 'bizcharts/lib/geometry/LineAdvance'
type DataType = {
month: string,
value: number
}
const data: DataType[] = [
{
month: '一月',
value: 95
},
{
month: '二月',
value: 80
},
{
month: '三月',
value: 85
},
{
month: '四月',
value: 97.5
},
{
month: '五月',
value: 66
},
{
month: '六月',
value: 60
},
{
month: '七月',
value: 95
},
{
month: '八月',
value: 0
}
]
const TimelyDeliveryRate = () => {
return (
<Chart padding={[10, 20, 50, 40]} autoFit height={300} data={data} >
<LineAdvance
shape="smooth"
point
area
position="month*value"
// color="city"
/>
<Axis
name="value"
label={{
formatter: val => `${val}亿`,
}}
/>
</Chart>
)
}
export default TimelyDeliveryRate
import React from 'react';
import TimelyDeliveryRate from './chart';
import CustomizeCard from '../CustomizeCard';
const TimelyDeliveryRateContainer = () => {
return (
<CustomizeCard title="供货及时率" bodyStyle={{padding: 0, height: '312px'}}>
<TimelyDeliveryRate />
</CustomizeCard>
)
}
export default TimelyDeliveryRateContainer
......@@ -9,6 +9,11 @@ import ProjectItem from './components/ProjectItem';
import CustomizeCard from './components/CustomizeCard';
import AnnotationArc from './components/AnnotationArc';
import MemberEvaluateScoreContainer from './components/MemberEvaluateScore/container';
import Suggestion from './components/Suggestion';
import ContractPrice from './components/Contract/ContractPrice';
import TimelyDeliveryRate from './components/TimelyDeliveryRate';
import AfterServiceRate from './components/AfterServiceRate';
import AfterSoldEvaluation from './components/AfterSoldEvaluation';
const Dashboard = () => {
return (
......@@ -51,6 +56,30 @@ const Dashboard = () => {
<Col span={8}>
<MemberEvaluateScoreContainer />
</Col>
<Col span={8}>
<Suggestion />
</Col>
<Col span={8}>
<ContractPrice />
</Col>
<Col span={8}>
<ContractPrice />
</Col>
<Col span={8}>
<ContractPrice />
</Col>
<Col span={12}>
<TimelyDeliveryRate />
</Col>
<Col span={12}>
<AfterServiceRate />
</Col>
<Col span={16}>
<AfterSoldEvaluation />
</Col>
<Col span={8}>
<MemberEvaluateScoreContainer />
</Col>
</Row>
</PageHeaderWrapper>
......
......@@ -115,16 +115,18 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
// 流转记录(内/外)
// 招投标
const inCheckRecordFn = !type.indexOf('c')
?
PublicApi.getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecord
:
PublicApi.getPurchaseSubmitTenderInCheckRecordGetSubmitTenderInCheckRecord
const inReocrdRes = await inCheckRecordFn({ inviteTenderId: searchId })
if (inReocrdRes.code === 1000) {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
// const inCheckRecordFn = !type.indexOf('c')
// ?
// PublicApi.getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecord
// :
// PublicApi.getPurchaseSubmitTenderInCheckRecordGetSubmitTenderInCheckRecord
// const inReocrdRes = await inCheckRecordFn({ inviteTenderId: searchId })
// if (inReocrdRes.code === 1000) {
// setInteriorProcurementOrderLogResponses(inReocrdRes.data)
// }
// * 内部专用
let inCheckRecordFn: any;
// * 外部专用 特殊处理
let specialParams: any = {};
......@@ -132,16 +134,25 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
if(type === 'callForBid' || type === 'tenderInCallForBid') {
specialParams['inviteTenderId'] = type === 'callForBid' ? id : data.inviteTender.id
outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecord
inCheckRecordFn = PublicApi.getPurchaseInviteTenderInCheckRecordGetInviteTenderInCheckRecord
} else if(type === 'tender' || type === 'callForBidInTender') {
specialParams['submitTenderId'] = data.submitTender.id
specialParams['submitTenderId'] = data.id
outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetSubmitTenderOutCheckRecord
inCheckRecordFn = PublicApi.getPurchaseSubmitTenderInCheckRecordGetSubmitTenderInCheckRecord
}
// const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
const outRecordRes = await outCheckRecordFn(specialParams)
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
}
const inReocrdRes = await inCheckRecordFn(specialParams)
if (inReocrdRes.code === 1000) {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
// 流程状态(内/外)
// 招投标 投标里面的投标流程单独调接口
const processRes = type === 'tender' ?
......
......@@ -54,7 +54,7 @@ export const useConfirmDetail = (options: {}) => {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecord
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
......
......@@ -69,6 +69,8 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
inviteTenderMateriel: item.inviteTenderMateriel,
count: item.inviteTenderMateriel.count,
unitName: item.inviteTenderMateriel.unitName,
isAwardTender: item.isAwardTender,
awardTenderRatio: item.awardTenderRatio,
// submitTenderMateriel: { id: item.id }
})
})
......@@ -81,8 +83,8 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
temp['submitTender'] = { id: _item.submitTender.id }
temp['totalAmount'] = _item.totalAmount
// 默认不授标 授标率100
temp['isAwardTender'] = false
temp['awardRate'] = 100
temp['isAwardTender'] = item.isAwardTender
temp['awardRate'] = item.awardTenderRatio
tempOjbect[_item.id] = {...temp, ..._item.submitTender.submitTenderMateriel[index]}
})
return tempOjbect
......
......@@ -70,15 +70,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -69,6 +69,8 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
inviteTenderMateriel: item.inviteTenderMateriel,
count: item.inviteTenderMateriel.count,
unitName: item.inviteTenderMateriel.unitName,
isAwardTender: item.isAwardTender,
awardTenderRatio: item.awardTenderRatio,
// submitTenderMateriel: { id: item.id }
})
})
......@@ -81,8 +83,8 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
temp['submitTender'] = { id: _item.submitTender.id }
temp['totalAmount'] = _item.totalAmount
// 默认不授标 授标率100
temp['isAwardTender'] = false
temp['awardRate'] = 100
temp['isAwardTender'] = item.isAwardTender
temp['awardRate'] = item.awardTenderRatio
tempOjbect[_item.id] = {...temp, ..._item.submitTender.submitTenderMateriel[index]}
})
return tempOjbect
......
......@@ -70,15 +70,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -70,15 +70,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -125,15 +125,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -46,7 +46,7 @@ export const useRemarkDetail = (options: DetailHookProps) => {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecord
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
......
......@@ -70,15 +70,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -119,15 +119,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -48,7 +48,7 @@ export const useNoticeDetail = (options: DetailHookProps) => {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecord
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
......
......@@ -131,15 +131,15 @@ export const insideRecordCols: any[] = [
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -50,7 +50,7 @@ export const useReportDetail = (options: DetailHookProps) => {
setInteriorProcurementOrderLogResponses(inReocrdRes.data)
}
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetTenderOutCheckRecord
const outCheckRecordFn = PublicApi.getPurchaseTenderOutCheckRecordGetInviteTenderOutCheckRecord
const outRecordRes = await outCheckRecordFn({ inviteTenderId: searchId })
if (outRecordRes.code === 1000) {
setExternalProcurementOrderLogResponses(outRecordRes.data)
......
import React, { useContext, useState } from 'react'
import { Table, Row, Col } from 'antd'
import { Table, Row, Col, message, Spin } from 'antd'
import MellowCard from '@/components/MellowCard'
import { BidDetailContext } from '@/pages/procurement/_public/bid/context';
import style from './index.less'
......@@ -36,6 +36,10 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
name: item.inviteTenderMateriel.name,
type: item.inviteTenderMateriel.type,
unitName: item.inviteTenderMateriel.unitName,
awardTenderRatio: item.awardTenderRatio,
commodityId: item.commodityId,
commodityName: item.commodityName,
commoditySkuId: item.commoditySkuId,
})) : []
})
......@@ -55,32 +59,43 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
})
const onExpandRender = async (e, r) => {
setTableData(() => [...tableData].map(item => ({
...item,
description: <div className={style.childrenWrap}>
const renderDescription = async (record) => {
// 商品信息
let res = await PublicApi.getProductCommodityGetCommodity({id: record.commoditySkuId})
// 商品规格信息
let spec = await PublicApi.getProductCommodityGetCommodityAttributeByUnitPriceAndPicId({ unitPriceAndPicId: record.commodityId })
const { code , data } = res
if(code === 1000) {
const newData = [...tableData];
const index = newData.findIndex(item => record.id === item.id);
const item = newData[index];
item.description = (<div className={style.childrenWrap}>
<Row>
<Col span={3}>
<div className={style.childrenTitle}>
<p>对应</p>
<p>标商品</p>
<p>标商品</p>
</div>
</Col>
<Col span={6}>
<div className={style.childrenContent}>
<p><span>商品编号:</span>{r.code}</p>
<p><span>商品名称:</span>{r.name}</p>
<p><span>商品编号:</span>{data.code}</p>
<p><span>商品名称:</span>{data.name}</p>
</div>
</Col>
<Col span={6}>
<div className={style.childrenContent}>
<p><span>规格型号:</span>{r.type}</p>
<p><span>品类:</span>{r.categoryName}</p>
<p><span>规格型号:</span>
{
spec.data.length ? spec.data.map(item => item.customerAttributeValueList[0].value).join('/') : null
}
</p>
<p><span>品类:</span>{data.customerCategory.fullName}</p>
</div>
</Col>
<Col span={6}>
<div className={style.childrenContent}>
<p><span>品牌:</span>{r.brandName}</p>
<p><span>品牌:</span>{data?.brand?.name}</p>
</div>
</Col>
{/* <Col span={3}>
......@@ -89,8 +104,9 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
</div>
</Col> */}
</Row>
</div>
})))
</div>)
setTableData([...newData])
}
}
return (<>
......@@ -104,7 +120,7 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
<Table
columns={tableColumn}
expandable={{
expandedRowRender: record => <p style={{ margin: 0 }}>{record.description}</p>,
expandedRowRender: record => <p style={{ margin: 0 }}>{ record.description || <Spin size="small" style={{margin: '15px auto', width: '100%'}} />}</p>,
rowExpandable: record => record.name !== 'Not Expandable',
expandIcon: ({ expanded, onExpand, record }) =>
expanded ? (
......@@ -112,9 +128,18 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
) : (
<CaretRightOutlined onClick={e => onExpand(record, e)} />
),
onExpand: (expand, record) => onExpandRender(expand, record)
onExpand: (expanded, record) => {
console.log('通过商品Id 查询商品信息显示在嵌套中', record, expanded)
if(!record?.commodityId && expanded) {
return message.error('您没有关联商品')
}
if(expanded) {
renderDescription(record)
}
}
}}
dataSource={tableData}
rowKey="id"
pagination={{size: "small"}}
/>
</MellowCard>
......
......@@ -89,32 +89,32 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
]
}
]
// @todo基本信息——投标
// @基本信息——投标
const basicTenderColumnList = [
{
span: 8,
fieldList: [
{ title: '投标编号:', name: 'code', render: () => _data['code'] },
{ title: '投标项目:', name: 'projectName' },
{ title: '外部状态:', name: 'submitTenderOutStatusValue', render: () => _data['submitTenderOutStatusValue']},
{ title: '内部状态:', name: 'submitTenderInStatusValue', render: () => _data['submitTenderInStatusValue']},
{ title: '投标项目:', name: 'projectName' },
]
},
// {
// span: 8,
// fieldList: [
// { title: '投标摘要:', name: 'remark', render: () => _data['submitTender']['remark'] },
// {
// title: '投标文件:',
// name: 'inviteTenderFile',
// render: (t, r) => (<div>
// {
// _data['submitTender']['file'].map((_item, _i) => <p><a key={`submitTenderFile${_i}`} target="_blank" href={_item.url}><FileFilled /> {_item.name}</a></p>)
// }
// </div>)
// },
// ]
// },
{
span: 8,
fieldList: [
{ title: '投标摘要:', name: 'remark', render: () => _data?.submitTender?.remark },
{
title: '投标文件:',
name: 'inviteTenderFile',
render: (t, r) => (<div>
{
_data?.submitTender?.file?.length && _data['submitTender']['file'].map((_item, _i) => <p><a key={`submitTenderFile${_i}`} target="_blank" href={_item.url}><FileFilled /> {_item.name}</a></p>)
}
</div>)
},
]
},
{
span: 8,
fieldList: [
......
......@@ -54,7 +54,7 @@ const RegisterInfoList: React.FC<RegisterInfoListProps> = ({cardTitle, type="reg
<Col>
<p>
{
item?.registerFile?.length ? item.registerFile.map(_item => (<a key={_item.id} href={_item.url}>{_item.name}</a>)) : null
item?.submitTenderRegister?.registerFile?.length ? item?.submitTenderRegister?.registerFile.map(_item => (<a key={_item.id} href={_item.url}>{_item.name}</a>)) : null
}
</p>
</Col>
......
......@@ -292,7 +292,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
<Col span={4}><p className={style['card-list_title']}>附件:</p></Col>
<Col>
{
data?.evaluationFile.length ? data.evaluationFile.map(item => (<p key={item.id}><a href={item.url} target="_blank"><FileFilled /> {item.name}</a></p>)) : null
data?.evaluationTenderFile.length ? data.evaluationTenderFile.map(item => (<p key={item.id}><a href={item.url} target="_blank"><FileFilled /> {item.name}</a></p>)) : null
}
</Col>
</Row>
......
......@@ -80,15 +80,15 @@ const BidTransformRecord:React.FC<BidTransformRecordProps> = ({cardTitle}) => {
},
{
title: '部门',
dataIndex: 'department',
dataIndex: 'userOrgName',
align: 'center',
key: 'department',
key: 'userOrgName',
},
{
title: '职位',
dataIndex: 'position',
dataIndex: 'userJobTitle',
align: 'center',
key: 'position',
key: 'userJobTitle',
},
{
title: '状态',
......
......@@ -148,7 +148,6 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
// 嵌套子表格
const productChildren = {
// expandedRowRender: record => <p style={{ margin: 0 }}>{record.description}</p>,
expandedRowRender: record => <p style={{ margin: 0 }}>{ record.description || <Spin size="small" style={{margin: '15px auto', width: '100%'}} />}</p>,
rowExpandable: record => record.name !== 'Not Expandable',
expandIcon: ({ expanded, onExpand, record }) =>
......
......@@ -53,7 +53,7 @@ const TenderSearch: React.FC<{}> = () => {
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: tableListSchema(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......
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