Commit 49d30985 authored by XieZhiXiong's avatar XieZhiXiong

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

parents 151286eb 60af04f0
......@@ -4,9 +4,9 @@ import moment from 'moment';
interface DatePickerSelectPropsType {
/** 开始时间name */
startTimeName: string,
startTimeName?: string,
/** 结束时间name */
endTimeName: string,
endTimeName?: string,
}
const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
......@@ -83,4 +83,8 @@ const DatePickerSelect: React.FC<DatePickerSelectPropsType> = (props) => {
)
}
DatePickerSelect.displayName = 'DatePicker';
DatePickerSelect.defaultProps = {
startTimeName: '开始时间',
endTimeName: '结束时间',
}
export default DatePickerSelect
......@@ -268,7 +268,10 @@
}
}
}
// 处理因为antd版本不同导致anchor的背景色不同
.ant-anchor-wrapper{
background-color: #fff;
}
}
.ant-descriptions-item-label {
......
......@@ -77,8 +77,9 @@ const Details = (props: any) => {
keyId: index + 1,
}
})
console.log(list)
setdata(list)
} else {
setdata([]);
}
setTotal(res.data.totalCount)
setunApplyAmount(unApplyAmount)
......@@ -294,6 +295,7 @@ const Details = (props: any) => {
setSelectRow(selectedRows)
}
};
const [values, setvalues] = useState('');
/* 搜素 */
const onSearch = (values) => {
const data = {
......@@ -305,6 +307,21 @@ const Details = (props: any) => {
current: 1,
pageSize: 5,
}
setvalues(values)
getContracInfoList(data)
}
/* 重置 */
const Reset = () => {
setvalues('');
const data = {
contractId,
orderNo: '',
orderAbstract: '',
startTime: "",
endTime: "",
current: 1,
pageSize: 5,
}
getContracInfoList(data)
}
/* 查看付款明细回调 */
......@@ -328,11 +345,7 @@ const Details = (props: any) => {
console.log(data)
getContracInfoList(data)
};
/* 非手工单进入请款 */
const like = (sourceType) => {
sessionStorage.setItem('basics', JSON.stringify(basics));
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType)
}
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -398,8 +411,10 @@ const Details = (props: any) => {
placeholder="搜素"
allowClear
onSearch={onSearch}
value={values}
onChange={e => setvalues(e.target.value)}
/>
<Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }}> 重置 </Button>
<Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }} onClick={Reset}> 重置 </Button>
<Button type="primary" onClick={() => onselect()}>批量请款</Button>
</div>
</div>
......
......@@ -74,7 +74,7 @@ const table = (props: any) => {
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{text}</div>
<div>{record.orderType == 2 ? `-${text}` : ''}</div>
</div>
},
......
......@@ -24,11 +24,12 @@ const BiddingList = () => {
const columns: ColumnType<any>[] = [{
title: '招标编号/项目',
dataIndex: 'inviteBidNO',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/procurementAbility/callForBids/tenderSearch/detail?id=${record.bidId}`}
// type=""
>
{text}
</EyePreview>
......@@ -37,17 +38,17 @@ const BiddingList = () => {
}, {
title: '投标编号',
dataIndex: 'bidNo',
align: 'center',
align: 'left',
},
{
title: '中标会员',
dataIndex: 'bidWinnerName',
align: 'center',
align: 'left',
},
{
title: '中标通知时间',
dataIndex: 'bidWinnerNoticeTime',
align: 'center',
align: 'left',
sorter: {
compare: (a, b) => a.bidWinnerNoticeTime - b.bidWinnerNoticeTime,
multiple: 1,
......@@ -56,7 +57,7 @@ const BiddingList = () => {
{
title: '中标金额',
dataIndex: 'bidWinnerAmount',
align: 'center',
align: 'left',
sorter: {
compare: (a, b) => a.bidWinnerAmount - b.bidWinnerAmount,
multiple: 1,
......@@ -65,7 +66,7 @@ const BiddingList = () => {
{
title: '外部状态',
dataIndex: 'outerStatus',
align: 'center',
align: 'left',
render: (text) => {
return (
......@@ -76,7 +77,7 @@ const BiddingList = () => {
{
title: '内部状态',
dataIndex: 'innerStatus',
align: 'center',
align: 'left',
render: (text) => {
return (
<div>
......@@ -88,7 +89,7 @@ const BiddingList = () => {
}, {
title: '操作',
dataIndex: 'state',
align: 'center',
align: 'left',
render: (_, record) => {
return (
<div>
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts } from '@/constants/order';
import moment from 'moment';
/**
* 除了订单必填字段, 默认
*/
......@@ -114,7 +112,7 @@ export const BidListSchema: any = {
"inviteBidAbstract": {
type: 'string',
"x-component-props": {
placeholder: '请输入招标摘要'
placeholder: '请输入项目'
}
},
"bidNo": {
......@@ -128,9 +126,6 @@ export const BidListSchema: any = {
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
disabledDate: current => {
return current && current < moment().startOf('day')
}
},
},
"bidWinnerName": {
......@@ -185,9 +180,9 @@ export const ViePriceListSchema: any = {
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
disabledDate: current => {
return current && current < moment().startOf('day')
}
// disabledDate: current => {
// return current && current < moment().startOf('day')
// }
},
},
"awardName": {
......
import TableModal from '@/pages/member/components/TableModal';
import { PublicApi } from '@/services/api';
import { PlusOutlined } from '@ant-design/icons';
import { ISchema } from '@formily/antd';
import React, { useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import useModal from '../../hooks/useModal';
interface Iprops {
value: any[],
// handleFetch
// onOk: (selectRowKeys: string[] | number[], selectRowRecord: any[]) => void;
fetchData: (params: any) => Promise<any>,
// fetchData: (params: any) => Promise<any>,
mutators: {
change: (params: any[]) => void
},
......@@ -19,17 +21,17 @@ const DEFAULT_RETURN_DATA = {
}
const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops) => {
const { value, mutators, fetchData } = props;
const { value, mutators } = props;
const { visible, toggle } = useModal();
const columns = useMemo(() => [
{
title: '评估项目',
dataIndex: 'project'
dataIndex: 'subMemberId'
},
{
title: '评估内容',
dataIndex: 'content'
dataIndex: 'name'
},
], [])
......@@ -56,12 +58,21 @@ const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props
}), [])
const handleOnOk = (selectRowKeys: string[] | number[], selectRowRecord: any[] ) => {
// const target = selectRowRecord[0];
// onOk?.(selectRowKeys, selectRowRecord);
mutators.change(selectRowRecord)
toggle(false)
}
/**
* 业务组件,未看到复用情况,暂时写死
*/
const handleFetchData = useCallback(async (params: any): Promise<any> => {
const { data, code } = await PublicApi.getMemberInspectMembers(params);
if (code === 1000) {
return data;
}
return DEFAULT_RETURN_DATA as any
}, [])
return (
<div>
<TableModal
......@@ -71,14 +82,29 @@ const EvaluateProject: React.FC<Iprops> & { isFieldComponent: boolean } = (props
columns={columns}
schema={schema}
onOk={handleOnOk}
fetchData={fetchData}
fetchData={handleFetchData}
tableProps={{
rowKey: (record) => `${record.subMemberId}_${record.subRoleId}`,
}}
mode={"checkbox"}
value={value}
/>
<div>选择评估项目</div>
<div
style={{
cursor: 'pointer',
width: '100%',
background: '#fbfbfb',
padding: '8px 0px',
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center"
}}
onClick={() => toggle(true)}
>
<PlusOutlined />
<span style={{marginLeft: "4px"}}>选择评估项目</span>
</div>
</div>
)
}
......
......@@ -3,7 +3,7 @@ import { Card, Button } from 'antd';
import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { LinkOutlined, PlusOutlined, SaveOutlined } from '@ant-design/icons';
import { createFormActions } from '@formily/antd';
import { createFormActions, FormEffectHooks } from '@formily/antd';
import { ArrayTable } from '@formily/antd-components'
import ReutrnEle from '@/components/ReturnEle';
import NiceForm from '@/components/NiceForm';
......@@ -23,6 +23,7 @@ import { PublicApi } from '@/services/api';
import EvaluateProject from '../components/EvaluateProject';
const formActions = createFormActions()
const { onFieldValueChange$ } = FormEffectHooks
const EvaluateAdd = () => {
const { visible, toggle } = useModal()
......@@ -56,6 +57,35 @@ const EvaluateAdd = () => {
toggle(false)
}
const handleEffect = ($, actions) => {
onFieldValueChange$('tabs.tab-2.selectProject').subscribe(({value}) => {
const tempData = value?.map((_item, index) => ({
projectName: _item.name,
projectContent: _item.name + _item.roleName,
id: _item.subMemberId
})) || []
// const withProjectId = new Set(tempData.map((_item) => _item.id));
const dataSource = formActions.getFieldValue('tabs.tab-2.array') || [];
// 对比两个数据, 如果dataSource 中 有 tempData 的值, 那么保留,如果没有择去除(没有id项)
const dataSourceKey = new Set(Array.from(dataSource?.map((_item) => _item.id)).filter(Boolean));
// 获取新增组
const newAddProject = tempData.filter((_item) => !dataSourceKey.has(_item.id));
const tempDataKey = new Set(tempData.map((_row) => _row.id));
// 过滤减少项
const hasRemoveListRes = []
dataSource.forEach((_item) => {
if(typeof _item.id === 'undefined' || tempDataKey.has(_item.id)) {
hasRemoveListRes.push(_item)
}
})
const newDataSource = hasRemoveListRes.concat(newAddProject)
formActions.setFieldValue('tabs.tab-2.array', newDataSource);
})
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
......@@ -64,7 +94,6 @@ const EvaluateAdd = () => {
extra={
(
<Button
key={1}
type="primary"
icon={<SaveOutlined />}
// loading={submitLoading}
......@@ -92,18 +121,15 @@ const EvaluateAdd = () => {
}}
expressionScope={{
renderAddition: renderAddition,
// selectProject: (
// <div style={{background: 'red'}}>123</div>
// ),
connectMember: (
<div onClick={() => toggle(true)}>
<LinkOutlined style={{marginRight: 4}}/>
选择
<LinkOutlined />
<span style={{marginLeft: 4}}>选择</span>
</div>
),
renderListTableRemove,
}}
effects={() => {}}
effects={handleEffect}
/>
</Card>
<TableModal
......
import { FormEffectHooks } from '@formily/antd';
import { useLinkageUtils } from '@/utils/formEffectUtils';
const { onFormMount$ } = FormEffectHooks
export const useBusinessEffects = (externalStatusFetch, interiorStatusFetch ) => {
const linkage = useLinkageUtils();
onFormMount$().subscribe(() => {
externalStatusFetch && externalStatusFetch().then(res => {
const _enum = res.data.map((item) => {return { label: item.name || item.message, value: item.satatus || item.code }})
linkage.enum('externalState',_enum)
linkage.enum('externalStatusList',_enum)
})
interiorStatusFetch && interiorStatusFetch().then(res => {
const _enum = res.data.map((item) => {return { label: item.name || item.message, value: item.satatus || item.code }})
linkage.enum('interiorState',_enum)
linkage.enum('innerStatusList',_enum)
})
})
}
......@@ -117,7 +117,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
<Form.Item
label="交付日期"
name="deliver"
rules={[{ required: true, message: '请选择付日期' }]}
rules={[{ required: true, message: '请选择付日期' }]}
>
<DatePicker style={{ width: '100%' }}
disabledDate={(current) => {
......
......@@ -11,12 +11,21 @@
.rankRowLeft {
flex: 1;
color: #303133;
min-width: 0;
.rankRowLeftEllipsisTitle{
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
}
.rankRowLeftTop {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
min-width: 0;
img {
width: 24px;
margin-right: 8px;
......@@ -31,7 +40,14 @@
background-color: #EBECF0;
font-size: 12px;
color: #909399;
border: 50%;
border-radius: 50%;
}
.rankRowLeftTopRankCalc{
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
max-width: calc(100% - 70px);
}
}
......
import React, { useEffect, useState } from 'react';
import React from 'react';
import { Tooltip } from 'antd';
import level1 from '@/assets/icons/the_first.png';
import level2 from '@/assets/icons/the_second.png';
......@@ -42,7 +43,9 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
<div className={styles.rankRowLeft}>
<div className={styles.rankRowLeftTop}>
{_returnBadge(detail.ranking)}
{detail.memberName}
<Tooltip placement="top" title={detail.memberName}>
<div className={styles.rankRowLeftTopRankCalc}>{detail.memberName}</div>
</Tooltip>
{detail.ranking === 1 && <TriangleTag text='最低价' wrapStyle={{ backgroundColor: '#EA8000', marginLeft: '8px' }} bgcolor='#EA8000' direction='left' />}
</div>
<div className={styles.rankRowLeftBottom}>
......@@ -51,7 +54,7 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
</div>
</div>
<div className={styles.rankRowRight}>
{detail.memberName}
{detail.contacts}
<IMBtn func={() => console.log(1)} />
</div>
</div>
......@@ -60,12 +63,16 @@ const RankRow: React.FC<RankRowProps> = (props: any) => {
return (
<div className={`${styles.rankRow}`}>
<div className={styles.rankRowLeft}>
<div className={styles.rankRowLeftTop}>{detail.memberName}</div>
<Tooltip placement="top" title={detail.memberName}>
<div className={styles.rankRowLeftEllipsisTitle}>{detail.memberName}</div>
</Tooltip>
<div className={styles.rankRowLeftBottomPhone}>{detail.tel.replace(/^(.{3})(.*)(.{4})$/, '$1 $2 $3')}</div>
</div>
<div className={styles.rankRowRight}>
{detail.contacts}
<IMBtn func={() => console.log(1)} />
<div>
<div className={styles.rankRowRight}>
{detail.contacts}
<IMBtn func={() => console.log(1)} />
</div>
</div>
</div>
)
......
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