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

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

parents 5edde62d 303c57c0
...@@ -23,6 +23,8 @@ interface PickUploadProps extends Pick<UploadProps, PickProps> { ...@@ -23,6 +23,8 @@ interface PickUploadProps extends Pick<UploadProps, PickProps> {
fileContainerClassName?: string fileContainerClassName?: string
customizeItemRender?: ((files: UploadFile[], handleRemove: (fileItem: UploadFile) => void) => React.ReactNode) | null, customizeItemRender?: ((files: UploadFile[], handleRemove: (fileItem: UploadFile) => void) => React.ReactNode) | null,
onRemove?: ((fileItem: UploadFile) => void) | null, onRemove?: ((fileItem: UploadFile) => void) | null,
/** 是否显示文件 */
showFiles?: boolean
} }
const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => { const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
...@@ -40,7 +42,8 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => { ...@@ -40,7 +42,8 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
disable, disable,
mode, mode,
buttonText, buttonText,
fileContainerClassName fileContainerClassName,
showFiles
} = props; } = props;
const hasFileListProps = "fileList" in props; const hasFileListProps = "fileList" in props;
const auth = getAuth(); const auth = getAuth();
...@@ -142,10 +145,17 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => { ...@@ -142,10 +145,17 @@ const UploadFiles: React.FC<PickUploadProps> = (props: PickUploadProps) => {
) )
} }
const renderFileContainer = () => {
if (!showFiles) {
return null
}
return !!customizeItemRender ? customizeItemRender(files, handleRemove) : renderFileItem()
}
return ( return (
<div style={containerStyle} > <div style={containerStyle} >
{ {
!!customizeItemRender ? customizeItemRender(files, handleRemove) : renderFileItem() renderFileContainer()
} }
{ {
!disable && ( !disable && (
...@@ -182,7 +192,8 @@ UploadFiles.defaultProps = { ...@@ -182,7 +192,8 @@ UploadFiles.defaultProps = {
disable: false, disable: false,
mode: 'default', mode: 'default',
buttonText: '上传文件', buttonText: '上传文件',
fileContainerClassName: '' fileContainerClassName: '',
showFiles: true
// fileList: [] // fileList: []
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-18 17:36:53 * @Date: 2021-05-18 17:36:53
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-29 16:18:42 * @LastEditTime: 2021-07-03 18:41:39
* @Description: 会员相关常量 * @Description: 会员相关常量
*/ */
...@@ -53,7 +53,7 @@ export const MEMBER_TYPE = { ...@@ -53,7 +53,7 @@ export const MEMBER_TYPE = {
/** /**
* 待提交审核 * 待提交审核
*/ */
export const MEMBER_OUTER_TO_PLATFORM_VERIFY = 1; export const MEMBER_OUTER_STATUS_TO_PLATFORM_VERIFY = 1;
/** /**
* 待平台审核 * 待平台审核
*/ */
......
...@@ -72,29 +72,50 @@ type submitDataType = { ...@@ -72,29 +72,50 @@ type submitDataType = {
commodityId: number, commodityId: number,
/** 附件 */ /** 附件 */
enclosure: [], enclosure: [],
/** 订单商品 唯一id */ /** 订单商品,即下单的商品 唯一id */
id: string, id: string,
/** 是否是 */ /** 是否是 */
isHasTax: 0 | 1 | number | {}, isHasTax: 0 | 1 | number | {},
/** 是否含税、税率,显示用 */ /** 是否含税、税率,显示用 */
isHasTaxAndTaxRate: "是/1%", isHasTaxAndTaxRate: string,
/** 商品图片 */ /** 商品图片 */
mainPic: string, mainPic: string,
/** 商品名 */ /** 商品名 */
name: string, name: string,
/** 定点 */ /** 订单id, 跟上面id 不一样 */
orderId: 17532 orderId: number,
orderNo: "JJDJ21563" orderNo: string,
processNum: "22" /** 加工数量 */
processTotalPrice: "726.00" processNum: string,
processUnitPrice: "33" /** 加工总价 = 加工数量 * 加工单价 */
purchaseCount: 3 processTotalPrice: string,
purchaseCountAndUnit: "3/瓶" /** 加工单价 */
skuid: 511 processUnitPrice: string,
surplusAndProcessNum: -19 /** 采购数量 或者叫订单数量 */
taxRate: "1" purchaseCount: number
unitName: "瓶" /** 采购数量 跟 单位,只做显示用 */
} purchaseCountAndUnit: string,
/** skuid, 这里跟commodityId yizhi */
skuid: number
/** 加工剩余数量 */
surplusAndProcessNum: number,
/** 税率 */
taxRate: string,
/** 单位 */
unitName: string
},
/** 其他说明 */
otherDesc: string,
/** 包装说明 */
packingDesc: string,
/** 付款说明 */
payDesc: string,
/** 税费说明 */
taxDesc: string,
/** 交付说明 */
deliveryDesc: string,
/** 物资说明 */
materialDesc: string,
} }
/** @tofix 临时的,因为后端不返回只能值么临时搞着 */ /** @tofix 临时的,因为后端不返回只能值么临时搞着 */
......
import React, { useReducer } from 'react'; import React, { useCallback, useMemo, useReducer } from 'react';
import styles from './index.less'; import styles from './index.less';
import moment from 'moment'; import moment from 'moment';
import { Badge, Upload, message, Spin } from 'antd'; import { Badge, message, Spin, Tooltip } from 'antd';
import level1 from '@/assets/imgs/level1.png'; import level1 from '@/assets/imgs/level1.png';
import level2 from '@/assets/imgs/level2.png'; import level2 from '@/assets/imgs/level2.png';
import level3 from '@/assets/imgs/level3.png'; import level3 from '@/assets/imgs/level3.png';
...@@ -10,12 +10,12 @@ import { Link } from 'umi'; ...@@ -10,12 +10,12 @@ import { Link } from 'umi';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import StatusTag from '@/components/StatusTag'; import StatusTag from '@/components/StatusTag';
import home_user from '@/assets/imgs/home_user.png'; import home_user from '@/assets/imgs/home_user.png';
import { UPLOAD_TYPE } from '@/constants'
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import {observer, inject} from 'mobx-react'; import {observer, inject} from 'mobx-react';
// import Icon from '@ant-design/icons'; import Icon, { QuestionCircleOutlined } from '@ant-design/icons';
import Icon from '@ant-design/icons';
import { ReactComponent as DefaultAvatar } from '@/assets/imgs/default_avatar.svg'; import { ReactComponent as DefaultAvatar } from '@/assets/imgs/default_avatar.svg';
import UploadFiles from '@/components/UploadFiles/UploadFiles'
import { UploadChangeParam } from 'antd/lib/upload/interface'
interface Iprops {} interface Iprops {}
...@@ -23,7 +23,7 @@ const WEEKDAYS = ["天", "一","二", "三", "四", "五","六"]; ...@@ -23,7 +23,7 @@ const WEEKDAYS = ["天", "一","二", "三", "四", "五","六"];
const LEVEL_IMAGE = [level1, level1, level2, level3, level4]; const LEVEL_IMAGE = [level1, level1, level2, level3, level4];
const EDIT_USER_URL = '/memberCenter/editMySelf'; const EDIT_USER_URL = '/memberCenter/editMySelf';
const USER_CENTER_URL = '/memberCenter/memberAbility/manage/maintain' const USER_CENTER_URL = '/memberCenter/memberAbility/manage/maintain'
const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["default", "processing", "error", "success"] const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["default", "processing", "error", "success", "error"]
function reducer(state, action) { function reducer(state, action) {
switch (action.type) { switch (action.type) {
...@@ -39,49 +39,36 @@ function reducer(state, action) { ...@@ -39,49 +39,36 @@ function reducer(state, action) {
const UserCenter: React.FC<Iprops> = (props) => { const UserCenter: React.FC<Iprops> = (props) => {
const today = moment(); const today = moment();
const userAuth = getAuth(); const userAuth = getAuth();
// const hasChangeMemberAuth = userAuth?.urls.includes(EDIT_USER_URL);
// const hasCenterAuth = userAuth?.urls.includes(USER_CENTER_URL);
const currentRole = userAuth?.roles?.filter((item) => item.memberRoleId === userAuth.memberRoleId) const currentRole = userAuth?.roles?.filter((item) => item.memberRoleId === userAuth.memberRoleId)
const [state, dispatch] = useReducer(reducer, { loading: false, logo: userAuth?.logo}) const [state, dispatch] = useReducer(reducer, { loading: false, logo: userAuth?.logo})
if(!userAuth) { if(!userAuth) {
return null return null
} }
const beforeUpload = useCallback((file) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';
if (!isJpgOrPng) {
message.error('仅支持上传JPEG/JPG/PNG文件!');
}
return isJpgOrPng;
}, [])
const uploadProps = { const onFileChange = async (info: UploadChangeParam) => {
name: 'file', if (info.file.status === 'uploading') {
action: '/api/file/file/upload', dispatch({type: 'uploading'})
headers: {}, return;
data: { }
fileType: UPLOAD_TYPE if(info.file.status === 'done') {
}, const logo = info.file.response.data
disabled: state.loading, const { code } = await PublicApi.postMemberMainpageLogoAdd({logo: logo });
showUploadList: false, if (code === 1000) {
onChange(info) { dispatch({type: 'done', payload: {url: logo}})
if (info.file.status === 'uploading') { props.UserStore.setUserAvatar(logo)
dispatch({type: 'uploading'})
return;
}
if (info.file.status === 'done') {
const { code, data } = info.file.response
if(code === 1000) {
PublicApi.postMemberMainpageLogoAdd({logo: data})
.then((res) => {
if(res.code === 1000) {
dispatch({type: 'done', payload: {url: data}})
props.UserStore.setUserAvatar(data)
}
})
}
}
},
beforeUpload(file){
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';
if (!isJpgOrPng) {
message.error('仅支持上传JPEG/JPG/PNG文件!');
} }
return isJpgOrPng;
} }
} }
const isVerifyFail = useMemo(() => [2, 4].includes(userAuth.validateStatus), [userAuth]);
return ( return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.header}> <div className={styles.header}>
...@@ -98,18 +85,18 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -98,18 +85,18 @@ const UserCenter: React.FC<Iprops> = (props) => {
</div> </div>
</div> </div>
<div className={styles.content}> <div className={styles.content}>
{/* http://10.0.0.25:4000/project/15/interface/api/38926 上传用户头像 */}
<Spin spinning={state.loading}> <Spin spinning={state.loading}>
<div className={styles.userLogo}> <div className={styles.userLogo}>
<div className={styles.randomLogo}> <div className={styles.randomLogo}>
<Upload {...uploadProps}>
<UploadFiles customizeItemRender={null} beforeUpload={beforeUpload} onChange={onFileChange} showFiles={false}>
{ {
state.logo state.logo
? <img src={state.logo || ''} className={styles.logo}/> ? <img src={state.logo || ''} className={styles.logo}/>
: <Icon component={() => <DefaultAvatar className={styles.logo} />} /> : <Icon component={() => <DefaultAvatar className={styles.logo} />} />
} }
<span className={styles.upload}>修改</span> <span className={styles.upload}>修改</span>
</Upload> </UploadFiles>
</div> </div>
</div> </div>
</Spin> </Spin>
...@@ -130,12 +117,21 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -130,12 +117,21 @@ const UserCenter: React.FC<Iprops> = (props) => {
} }
</div> </div>
<div style={{marginTop: '13px'}}> <div style={{marginTop: '13px'}}>
<Badge status={STATUS_COLOR[userAuth.validateStatus]} text={userAuth.validateStatusDesc} /> <Tooltip placement="top" title={userAuth.validateMsg || ''}>
<Badge status={STATUS_COLOR[userAuth.validateStatus]} text={userAuth.validateStatusDesc} />
{
isVerifyFail && (
<span style={{marginLeft: '4px'}}>
<QuestionCircleOutlined style={{color: '#ccc', fontSize: '12px'}} />
</span>
)
}
</Tooltip>
</div> </div>
</div> </div>
</div> </div>
{ {
userAuth.validateStatus === 2 && isVerifyFail &&
<Link to={EDIT_USER_URL} className={styles.link}>修改会员信息</Link> <Link to={EDIT_USER_URL} className={styles.link}>修改会员信息</Link>
} }
</div> </div>
...@@ -147,7 +143,11 @@ const UserCenter: React.FC<Iprops> = (props) => { ...@@ -147,7 +143,11 @@ const UserCenter: React.FC<Iprops> = (props) => {
<div className={styles.score}> <div className={styles.score}>
平台积分: <strong>{userAuth.score}</strong> 平台积分: <strong>{userAuth.score}</strong>
</div> </div>
<Link to={USER_CENTER_URL} className={styles.link}>进入会员中心</Link> {
userAuth.urls.includes(USER_CENTER_URL) && (
<Link to={USER_CENTER_URL} className={styles.link}>进入会员中心</Link>
)
}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-21 18:14:10 * @Date: 2021-05-21 18:14:10
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-21 18:18:11 * @LastEditTime: 2021-07-03 17:24:28
* @Description: 会员变更信息 * @Description: 会员变更信息
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -90,7 +90,7 @@ const MemberChangedInfo: React.FC<IProps> = (props: IProps) => { ...@@ -90,7 +90,7 @@ const MemberChangedInfo: React.FC<IProps> = (props: IProps) => {
const columns: EditableColumns[] = [ const columns: EditableColumns[] = [
{ {
title: '序号', title: '序号',
dataIndex: 'index', dataIndex: 'id',
}, },
{ {
title: '变更日期', title: '变更日期',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-21 17:14:39 * @Date: 2021-05-21 17:14:39
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-07-03 14:57:41 * @LastEditTime: 2021-07-03 17:33:17
* @Description: 会员入库信息 * @Description: 会员入库信息
*/ */
import React from 'react'; import React from 'react';
...@@ -47,11 +47,16 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> { ...@@ -47,11 +47,16 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
fieldType?: string, fieldType?: string,
}[], }[],
}[], }[],
/**
* 是否展示 new
*/
showNew?: boolean,
} }
const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => { const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
const { const {
dataSource = [], dataSource = [],
showNew = false,
...rest ...rest
} = props; } = props;
...@@ -65,13 +70,16 @@ const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => { ...@@ -65,13 +70,16 @@ const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
<div className={styles.changed}> <div className={styles.changed}>
{/* {ele.fieldValue} */} {/* {ele.fieldValue} */}
{renderFieldTypeContent(ele.fieldType, ele.fieldValue)} {renderFieldTypeContent(ele.fieldType, ele.fieldValue)}
{ele.lastValue && ( {showNew && ele.lastValue && ele.lastValue !== ele.fieldValue && (
<Tooltip title={`变更前:${ele.lastValue}`}> <Tooltip title={`变更前:${ele.lastValue}`}>
<span className={styles.new}>NEW</span> <span className={styles.new}>NEW</span>
</Tooltip> </Tooltip>
)} )}
</div> </div>
), ),
columnProps: {
span: 1,
},
}); });
}); });
}); });
......
...@@ -27,6 +27,7 @@ import { ...@@ -27,6 +27,7 @@ import {
MEMBER_INNER_STATUS_MODIFY_PASSED, MEMBER_INNER_STATUS_MODIFY_PASSED,
MEMBER_INNER_STATUS_MODIFY_NOT_PASSED, MEMBER_INNER_STATUS_MODIFY_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_TO_BE_COMMIT,
PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED, PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1, PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED, PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED,
...@@ -36,7 +37,7 @@ import { ...@@ -36,7 +37,7 @@ import {
PLATFORM_MEMBER_INNER_STATUS_VERIFY_NOT_PASSED, PLATFORM_MEMBER_INNER_STATUS_VERIFY_NOT_PASSED,
PLATFORM_MEMBER_INNER_STATUS_VERIFY_PASSED, PLATFORM_MEMBER_INNER_STATUS_VERIFY_PASSED,
MEMBER_OUTER_TO_PLATFORM_VERIFY, MEMBER_OUTER_STATUS_TO_PLATFORM_VERIFY,
MEMBER_OUTER_STATUS_PLATFORM_VERIFYING, MEMBER_OUTER_STATUS_PLATFORM_VERIFYING,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED, MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED,
MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED, MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED,
...@@ -70,7 +71,7 @@ export const MEMBER_STATUS_TAG_MAP = { ...@@ -70,7 +71,7 @@ export const MEMBER_STATUS_TAG_MAP = {
// 会员外部状态 StatusTag map // 会员外部状态 StatusTag map
export const MEMBER_OUTER_STATUS_TYPE = { export const MEMBER_OUTER_STATUS_TYPE = {
[MEMBER_OUTER_TO_PLATFORM_VERIFY]: 'default', [MEMBER_OUTER_STATUS_TO_PLATFORM_VERIFY]: 'default',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFYING]: 'warning', [MEMBER_OUTER_STATUS_PLATFORM_VERIFYING]: 'warning',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED]: 'success', [MEMBER_OUTER_STATUS_PLATFORM_VERIFY_PASSED]: 'success',
[MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED]: 'danger', [MEMBER_OUTER_STATUS_PLATFORM_VERIFY_NOT_PASSED]: 'danger',
...@@ -107,6 +108,7 @@ export const MEMBER_INNER_STATUS_BADGE_COLOR = { ...@@ -107,6 +108,7 @@ export const MEMBER_INNER_STATUS_BADGE_COLOR = {
[MEMBER_INNER_STATUS_MODIFY_PASSED]: 'green', [MEMBER_INNER_STATUS_MODIFY_PASSED]: 'green',
[MEMBER_INNER_STATUS_MODIFY_NOT_PASSED]: 'red', [MEMBER_INNER_STATUS_MODIFY_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_TO_BE_COMMIT]: 'grey',
[PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED]: 'red', [PLATFORM_MEMBER_INNER_STATUS_COMMIT_NOT_PASSED]: 'red',
[PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1]: 'orange', [PLATFORM_MEMBER_INNER_STATUS_TO_BE_VERIFY_STEP1]: 'orange',
[PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED]: 'red', [PLATFORM_MEMBER_INNER_STATUS_VERIFY_STEP1_NOT_PASSED]: 'red',
......
...@@ -70,7 +70,7 @@ export const evaluateAddSchema: ISchema = { ...@@ -70,7 +70,7 @@ export const evaluateAddSchema: ISchema = {
display: false, display: false,
}, },
'[appraisalDayStart, appraisalDayEnd]': { '[appraisalDayStart, appraisalDayEnd]': {
title: "整改时间", title: <div>考评时间 <span style={{color: '#ff4d4f', fontSize: '16px', marginLeft: '4px', fontWeight: 600}}>*</span></div>,
type: 'object', type: 'object',
"x-component": 'FormilyRangeTime', "x-component": 'FormilyRangeTime',
"x-rules": [ "x-rules": [
......
...@@ -191,6 +191,7 @@ const MemberForm: React.FC<MemberFormProps> = ({ ...@@ -191,6 +191,7 @@ const MemberForm: React.FC<MemberFormProps> = ({
memberTypeId, memberTypeId,
roleId, roleId,
level, level,
levelId,
countryCodeId, countryCodeId,
phone, phone,
email, email,
......
...@@ -174,6 +174,7 @@ const MemberPrVerifyChange1Detail: React.FC<{}> = () => { ...@@ -174,6 +174,7 @@ const MemberPrVerifyChange1Detail: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -216,6 +216,7 @@ const MemberPrVerifyChange1Verify: React.FC<{}> = () => { ...@@ -216,6 +216,7 @@ const MemberPrVerifyChange1Verify: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -174,6 +174,7 @@ const MemberPrVerifyChange2Detail: React.FC<{}> = () => { ...@@ -174,6 +174,7 @@ const MemberPrVerifyChange2Detail: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -216,6 +216,7 @@ const MemberPrVerifyChange2Verify: React.FC<{}> = () => { ...@@ -216,6 +216,7 @@ const MemberPrVerifyChange2Verify: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -174,6 +174,7 @@ const MemberPrVerifyChangeConfirmDetail: React.FC<{}> = () => { ...@@ -174,6 +174,7 @@ const MemberPrVerifyChangeConfirmDetail: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-05-26 10:26:37 * @Date: 2021-05-26 10:26:37
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-15 16:24:29 * @LastEditTime: 2021-07-03 18:05:00
* @Description: 确认会员变更 * @Description: 确认会员变更
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -216,6 +216,7 @@ const MemberPrVerifyChangeConfirmVerify: React.FC<{}> = () => { ...@@ -216,6 +216,7 @@ const MemberPrVerifyChangeConfirmVerify: React.FC<{}> = () => {
<MemberDocIncomingInfo <MemberDocIncomingInfo
dataSource={memberInfo?.depositDetails} dataSource={memberInfo?.depositDetails}
id="incomingInfo" id="incomingInfo"
showNew
/> />
</Col> </Col>
) : null} ) : null}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2021-06-04 15:51:19 * @Date: 2021-06-04 15:51:19
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-04 15:51:20 * @LastEditTime: 2021-07-03 17:19:58
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -41,7 +41,7 @@ export const schema = (groups: GroupItem[]): ISchema => { ...@@ -41,7 +41,7 @@ export const schema = (groups: GroupItem[]): ISchema => {
wrapperCol: 8, wrapperCol: 8,
labelAlign: 'left', labelAlign: 'left',
}, },
properties: createMemberSchema(item.elements), properties: createMemberSchema(item.elements, false),
}, },
}, },
}; };
......
...@@ -104,12 +104,15 @@ const RULE_REG_MAP = { ...@@ -104,12 +104,15 @@ const RULE_REG_MAP = {
4: PATTERN_MAPS.tel, 4: PATTERN_MAPS.tel,
}; };
const getFieldType = (field: ElementType) => { const getFieldType = (field: ElementType, editable: boolean = true) => {
const isDisabled = (!editable && field.fieldValue) || !!field.disabled;
// 默认是 输入框 // 默认是 输入框
let description: { [key: string]: any } = { let description: { [key: string]: any } = {
'x-component-props': { 'x-component-props': {
placeholder: field.fieldRemark, placeholder: field.fieldRemark,
disabled: !!field.disabled, disabled: isDisabled,
}, },
}; };
// 公共的属性 // 公共的属性
...@@ -144,7 +147,7 @@ const getFieldType = (field: ElementType) => { ...@@ -144,7 +147,7 @@ const getFieldType = (field: ElementType) => {
'x-component': 'CustomUpload', 'x-component': 'CustomUpload',
'x-component-props': { 'x-component-props': {
showDesc: false, showDesc: false,
disabled: !!field.disabled, disabled: isDisabled,
}, },
}; };
break; break;
...@@ -154,7 +157,7 @@ const getFieldType = (field: ElementType) => { ...@@ -154,7 +157,7 @@ const getFieldType = (field: ElementType) => {
'x-component': 'RadioGroup', 'x-component': 'RadioGroup',
enum: field.fieldEnum, enum: field.fieldEnum,
'x-component-props': { 'x-component-props': {
disabled: !!field.disabled, disabled: isDisabled
}, },
}; };
break; break;
...@@ -163,7 +166,7 @@ const getFieldType = (field: ElementType) => { ...@@ -163,7 +166,7 @@ const getFieldType = (field: ElementType) => {
description = { description = {
enum: field.fieldEnum, enum: field.fieldEnum,
'x-component-props': { 'x-component-props': {
disabled: !!field.disabled, disabled: isDisabled,
}, },
}; };
break; break;
...@@ -173,7 +176,7 @@ const getFieldType = (field: ElementType) => { ...@@ -173,7 +176,7 @@ const getFieldType = (field: ElementType) => {
'x-component': 'CheckboxGroup', 'x-component': 'CheckboxGroup',
enum: field.fieldEnum, enum: field.fieldEnum,
'x-component-props': { 'x-component-props': {
disabled: !!field.disabled, disabled: isDisabled,
}, },
}; };
break; break;
...@@ -182,7 +185,7 @@ const getFieldType = (field: ElementType) => { ...@@ -182,7 +185,7 @@ const getFieldType = (field: ElementType) => {
description = { description = {
'x-component': 'AreaSelect', 'x-component': 'AreaSelect',
'x-component-props': { 'x-component-props': {
disabled: !!field.disabled, disabled: isDisabled,
}, },
}; };
break; break;
...@@ -193,15 +196,20 @@ const getFieldType = (field: ElementType) => { ...@@ -193,15 +196,20 @@ const getFieldType = (field: ElementType) => {
return Object.assign({}, description, common); return Object.assign({}, description, common);
}; };
// 根据后台生成注册资料 schema /**
export function createMemberSchema(elements: ElementType[]) { * 根据后台生成注册资料 schema
* @param elements
* @param editable 有值的元素是否可编辑
* @returns
*/
export function createMemberSchema(elements: ElementType[], editable: boolean = true) {
const components = {}; const components = {};
if (!Array.isArray(elements)) { if (!Array.isArray(elements)) {
return components; return components;
} }
for (let item of elements) { for (let item of elements) {
components[item.fieldName as string] = getFieldType(item); components[item.fieldName as string] = getFieldType(item, editable);
} }
return components; return components;
}; };
......
...@@ -62,6 +62,7 @@ export const selectBidSchema: ISchema = { ...@@ -62,6 +62,7 @@ export const selectBidSchema: ISchema = {
inline: false, inline: false,
rowStyle: { rowStyle: {
justifyContent: 'start', justifyContent: 'start',
rowGap: 20
}, },
colStyle: { colStyle: {
marginRight: 20 marginRight: 20
......
...@@ -95,8 +95,8 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => { ...@@ -95,8 +95,8 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
span: 8, span: 8,
fieldList: [ fieldList: [
{ title: '投标编号:', name: 'code', render: () => _data['code'] }, { title: '投标编号:', name: 'code', render: () => _data['code'] },
{ title: '外部状态:', name: 'submitTenderOutStatus', render: (text) => TenderOutStateTexts[_data['submitTenderOutStatus']]}, { title: '外部状态:', name: 'submitTenderOutStatusValue', render: () => _data['submitTenderOutStatusValue']},
{ title: '内部状态:', name: 'submitTenderInStatus', render: (text) => TenderInStateTexts[_data['submitTenderInStatus']] }, { title: '内部状态:', name: 'submitTenderInStatusValue', render: () => _data['submitTenderInStatusValue']},
{ title: '投标项目:', name: 'projectName' }, { title: '投标项目:', name: 'projectName' },
] ]
}, },
......
...@@ -26,7 +26,7 @@ export const processLogResponses = (resData) => { ...@@ -26,7 +26,7 @@ export const processLogResponses = (resData) => {
id: item.taskStep, id: item.taskStep,
name: item.taskName, name: item.taskName,
operationRole: item.memberRoleName, operationRole: item.memberRoleName,
isActive: item.taskStep < currentOuterStep isActive: currentOuterStep === 0 ? true : (item.taskStep < currentOuterStep)
})) }))
const subTasks = externalTasks.filter(item => item.taskStep === currentOuterStep) const subTasks = externalTasks.filter(item => item.taskStep === currentOuterStep)
const interiorLogs = subTasks.length ? subTasks[0]['subTasks'].map(item => ({ const interiorLogs = subTasks.length ? subTasks[0]['subTasks'].map(item => ({
......
...@@ -131,7 +131,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction ...@@ -131,7 +131,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
</Col> </Col>
<Col span={6}> <Col span={6}>
<div className={style.childrenContent}> <div className={style.childrenContent}>
<p><span>品牌:</span>{data.brand.name}</p> <p><span>品牌:</span>{data?.brand?.name}</p>
</div> </div>
</Col> </Col>
{/* <Col span={3}> {/* <Col span={3}>
......
...@@ -8,7 +8,7 @@ export const tableListSchema: ISchema = { ...@@ -8,7 +8,7 @@ export const tableListSchema: ISchema = {
type: 'string', type: 'string',
"x-component": 'SearchFilter', "x-component": 'SearchFilter',
'x-component-props': { 'x-component-props': {
placeholder: '请输入标编号', placeholder: '请输入标编号',
align: 'flex-end', align: 'flex-end',
}, },
}, },
......
...@@ -31,18 +31,18 @@ const ReadyAddTender:React.FC<ReadyAddTenderProps> = (props) => { ...@@ -31,18 +31,18 @@ const ReadyAddTender:React.FC<ReadyAddTenderProps> = (props) => {
const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable() const { columns, ref, rowSelection, rowSelectionCtl } = useSelfTable()
const handleBitchPush = async () => { const handleBitchPush = async () => {
const canBitch = !rowSelectionCtl.selectRow.some(v => v.submitTenderInStatus !== TenderInsideWorkState.Not_Submitted_Check_Submit_Tender) // const canBitch = !rowSelectionCtl.selectRow.some(v => v.submitTenderInStatus !== TenderInsideWorkState.Not_Submitted_Check_Submit_Tender)
if(!rowSelectionCtl.selectRow.length) return message.error('请先选择投标') if(!rowSelectionCtl.selectRow.length) return message.error('请先选择投标')
if (canBitch) { // if (canBitch) {
const { code } = await run({idList: rowSelectionCtl.selectedRowKeys}) const { code } = await run({idList: rowSelectionCtl.selectedRowKeys})
if (code === 1000) { if (code === 1000) {
ref.current.reload() ref.current.reload()
rowSelectionCtl.setSelectRow([]) rowSelectionCtl.setSelectRow([])
rowSelectionCtl.setSelectedRowKeys([]) rowSelectionCtl.setSelectedRowKeys([])
} }
} else { // } else {
message.error('只能提交待提交审核投标的投标') // message.error('只能提交待提交审核投标的投标')
} // }
} }
return <PageHeaderWrapper> return <PageHeaderWrapper>
......
...@@ -67,7 +67,7 @@ const SecondCheckedTender:React.FC<SecondCheckedTenderProps> = (props) => { ...@@ -67,7 +67,7 @@ const SecondCheckedTender:React.FC<SecondCheckedTenderProps> = (props) => {
useStateFilterSearchLinkageEffect( useStateFilterSearchLinkageEffect(
$, $,
actions, actions,
'orderNo', 'submitTenderCode',
FORM_FILTER_PATH, FORM_FILTER_PATH,
); );
}, },
......
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
// import { OrderTypeMap } from '@/constants/order';
export const tableListSchema: ISchema = { export const tableListSchema: ISchema = {
type: 'object', type: 'object',
properties: { properties: {
orderNo: { submitTenderCode: {
type: 'string', type: 'string',
"x-component": 'SearchFilter', "x-component": 'SearchFilter',
'x-component-props': { 'x-component-props': {
placeholder: '请输入订单编号', placeholder: '请输入投标编号',
align: 'flex-end', align: 'flex-end',
}, },
}, },
...@@ -19,39 +18,35 @@ export const tableListSchema: ISchema = { ...@@ -19,39 +18,35 @@ export const tableListSchema: ISchema = {
'x-component-props': { 'x-component-props': {
inline: true, inline: true,
colStyle: { colStyle: {
marginLeft: 20 marginRight: 20
} },
}, },
properties: { properties: {
orderThe: { inviteTenderCode: {
type: 'string', type: 'string',
'x-component-props': { 'x-component-props': {
placeholder: '请输入订单摘要', placeholder: '请输入招标编号',
} },
}, },
"supplyMembersName": { projectName: {
type: 'string', type: 'string',
"x-component-props": { 'x-component-props': {
placeholder: '请输入供应会员名称' placeholder: '请输入招标项目',
} }
}, },
"type": { "[startTime,endTime]": {
type: 'string',
"x-component-props": {
placeholder: '请选择订单类型'
},
// enum: Object.keys(OrderTypeMap).map(item => ({
// label: OrderTypeMap[item],
// value: item,
// }))
},
"[startCreateTime,endCreateTime]": {
type: 'array', type: 'array',
"x-component": 'DateRangePickerUnix', "x-component": 'DateRangePickerUnix',
'x-component-props': { 'x-component-props': {
placeholder: ['开始时间','结束时间'], placeholder: ['发布开始时间','发布结束时间'],
}, },
}, },
inviteTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标会员',
}
},
submit: { submit: {
'x-component': 'Submit', 'x-component': 'Submit',
'x-component-props': { 'x-component-props': {
......
...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = { ...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = {
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = { ...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = {
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
...@@ -54,7 +54,8 @@ export const evaluateSchema: ISchema = { ...@@ -54,7 +54,8 @@ export const evaluateSchema: ISchema = {
}, },
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = { ...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = {
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = { ...@@ -54,6 +54,7 @@ export const evaluateSchema: ISchema = {
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24 * @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-13 10:16:27 * @LastEditTime: 2021-07-03 18:49:30
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -55,6 +55,7 @@ export const evaluateSchema: ISchema = { ...@@ -55,6 +55,7 @@ export const evaluateSchema: ISchema = {
comment: { comment: {
type: 'string', type: 'string',
title: '评价', title: '评价',
required: true,
'x-component': 'TextArea', 'x-component': 'TextArea',
'x-component-props': { 'x-component-props': {
rows: 4, rows: 4,
......
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