Commit 078b4121 authored by xiexiuxing's avatar xiexiuxing

请购单bug修复

parent 141091fa
# btnCode 是pass 平台配置唯一表示 # btnCode 是pass 平台配置唯一表示
...@@ -675,7 +675,7 @@ ...@@ -675,7 +675,7 @@
submitpayment.submit 待提交请款单-提交 待提交请款单-提交-按钮 submitpayment.submit 待提交请款单-提交 待提交请款单-提交-按钮
submitpayment.see 待提交请款单-查看 待提交请款单-查看-按钮 submitpayment.see 待提交请款单-查看 待提交请款单-查看-按钮
# 交易能力 -tranactionAbility (90%)[采购订单,销售订单改不动] # 交易能力 -tranactionAbility (100%)
- 1.进销存 - 1.进销存
1.1 仓库 1.1 仓库
warehouse.see 仓库-查看 仓库-查看-按钮 warehouse.see 仓库-查看 仓库-查看-按钮
......
...@@ -13,51 +13,58 @@ ...@@ -13,51 +13,58 @@
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 20px; margin-top: 20px;
row-gap: 10px; row-gap: 10px;
.listItem{ .listWarp{
width: 139px; width: 158px;
margin-right: 17px; display: flex;
cursor:pointer; justify-content: center;
.Imgbox{ .listItem{
height: 139px; width: 139px;
border: 1px solid #ccc;
border-radius: 5px; // margin-right: 17px;
position: relative; cursor:pointer;
img{ .Imgbox{
width: 100%; height: 139px;
height: 100%; border: 1px solid #ccc;
border-radius: 5px;
position: relative;
img{
width: 100%;
height: 100%;
}
video{
width: 100%;
height: 100%;
}
.cheboxUrl{
position: absolute;
right: 10px;
top: 10px;
width: 20px;
height: 20px;
}
} }
video{ .ImgboxAtive{
width: 100%; border: 1px solid #00A98F;
height: 100%;
} }
.cheboxUrl{ .Imgbox :hover{
position: absolute; border: 1px solid #00A98F;
right: 10px; border-radius: 5px;
top: 10px; }
width: 20px; .ImgText{
height: 20px; width: 139px;
padding: 4px 0;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
}
.ImgboxAtive{
border: 1px solid #00A98F;
}
.Imgbox :hover{
border: 1px solid #00A98F;
border-radius: 5px;
}
.ImgText{
width: 139px;
padding: 4px 0;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.listItem:nth-child(10n) { // .listItem:nth-child(10n) {
margin-right: 0px; // margin-right: 0px;
} // }
} }
.noData{ .noData{
text-align: center; text-align: center;
......
...@@ -263,18 +263,20 @@ const Materialmanagement = () => { ...@@ -263,18 +263,20 @@ const Materialmanagement = () => {
<div className={styles.list}> <div className={styles.list}>
{ {
dataSource.map((item: any, index: number) => ( dataSource.map((item: any, index: number) => (
<div className={styles.listItem} > <div className={styles.listWarp}>
<div className={styles.listItem} >
<div onClick={() => setfalg(item, index)} className={[styles['Imgbox'], item.cheboxUrl ? styles['ImgboxAtive'] : ''].join(' ')} > <div onClick={() => setfalg(item, index)} className={[styles['Imgbox'], item.cheboxUrl ? styles['ImgboxAtive'] : ''].join(' ')} >
{fileTypeDom(item.fileType, item)} {fileTypeDom(item.fileType, item)}
{ {
item.cheboxUrl && item.cheboxUrl &&
<img className={styles.cheboxUrl} src={item.cheboxUrl} alt="" /> <img className={styles.cheboxUrl} src={item.cheboxUrl} alt="" />
} }
</div>
<div className={styles.ImgText}>{item.fileName}</div>
<div style={{ color: '#00A98F' }} onClick={() => download(item.fileUrl, item.fileName)}>下载</div>
</div> </div>
<div className={styles.ImgText}>{item.fileName}</div>
<div style={{ color: '#00A98F' }} onClick={() => download(item.fileUrl, item.fileName)}>下载</div>
</div> </div>
)) ))
} }
......
...@@ -21,7 +21,7 @@ export interface BasicInfoProps { ...@@ -21,7 +21,7 @@ export interface BasicInfoProps {
styles?: React.CSSProperties, styles?: React.CSSProperties,
} }
const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) => { const DescriptionsInfo: React.FC<BasicInfoProps> = ({ cardTitle, type, styles }) => {
const bidDetailContext = useContext(BillDetailContext) const bidDetailContext = useContext(BillDetailContext)
const { data: _data } = bidDetailContext const { data: _data } = bidDetailContext
const intl = useIntl() const intl = useIntl()
...@@ -34,17 +34,18 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) = ...@@ -34,17 +34,18 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) =
fieldList: [ fieldList: [
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao:', defaultMessage: '请购单号:' }), name: 'requisitionNo' }, { title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanhao:', defaultMessage: '请购单号:' }), name: 'requisitionNo' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要:' }), name: 'digest' }, { title: intl.formatMessage({ id: 'purchaseRequisition.qinggoudanzhaiyao', defaultMessage: '请购单摘要:' }), name: 'digest' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.chuangjianren:', defaultMessage: '创建人:' }), name: 'creator' }, { title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen:', defaultMessage: '请购部门:' }), name: 'department' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian:', defaultMessage: '单据时间:' }), name: 'createTime' }, { title: "请购人", name: 'requisitioner' },
] ]
}, },
{ {
span: 8, span: 8,
fieldList: [ fieldList: [
{ title: intl.formatMessage({ id: 'purchaseRequisition.yujiaoriqi:', defaultMessage: '预交日期:' }), name: 'deliverTime' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggoubumen:', defaultMessage: '请购部门:' }), name: 'department' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu:', defaultMessage: '请购用途:' }), name: 'purpose' }, { title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu:', defaultMessage: '请购用途:' }), name: 'purpose' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan:', defaultMessage: '供应会员:' }), name: 'vendorMemberName' }, { title: intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan:', defaultMessage: '供应会员:' }), name: 'vendorMemberName' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.chuangjianren:', defaultMessage: '创建人:' }), name: 'creator' },
{ title: intl.formatMessage({ id: 'purchaseRequisition.danjushijian:', defaultMessage: '单据时间:' }), name: 'createTime' },
] ]
} }
] ]
...@@ -56,11 +57,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) = ...@@ -56,11 +57,11 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) =
const RenderBasicInfoColumns = ({ infoList = [], dataSource }) => <Row> const RenderBasicInfoColumns = ({ infoList = [], dataSource }) => <Row>
{ {
infoList.map(({span, fieldList = []}, index) => (<Col key={index} span={span}> infoList.map(({ span, fieldList = [] }, index) => (<Col key={index} span={span}>
{ {
fieldList.length ? fieldList.map((_v, _i) => <Row key={_v.name} className={style['card-list']} style={_v.rowStyle}> fieldList.length ? fieldList.map((_v, _i) => <Row key={_v.name} className={style['card-list']} style={_v.rowStyle}>
{_v?.noTitle ? null : <Col span={6} className={style['card-list_title']}>{_v.title}</Col>} {_v?.noTitle ? null : <Col span={6} className={style['card-list_title']}>{_v.title}</Col>}
<Col><p style={{paddingRight: 20}}>{_v.render ? _v.render(dataSource[_v.name], dataSource) : dataSource[_v.name]}</p></Col> <Col><p style={{ paddingRight: 20 }}>{_v.render ? _v.render(dataSource[_v.name], dataSource) : dataSource[_v.name]}</p></Col>
</Row>) : null </Row>) : null
} }
</Col>)) </Col>))
...@@ -70,7 +71,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) = ...@@ -70,7 +71,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type, styles}) =
return ( return (
<MellowCard <MellowCard
title={cardTitle} title={cardTitle}
style={{ marginTop: 24, ...styles}} style={{ marginTop: 24, ...styles }}
bordered={false} bordered={false}
fullHeight fullHeight
> >
......
...@@ -338,6 +338,12 @@ export const baseOrderListColumns: any = () => { ...@@ -338,6 +338,12 @@ export const baseOrderListColumns: any = () => {
key: 'department', key: 'department',
}, },
{ {
title: "请购人",
align: 'center',
dataIndex: 'requisitioner',
key: 'requisitioner',
},
{
title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }), title: intl.formatMessage({ id: 'purchaseRequisition.qinggouyongtu', defaultMessage: '请购用途' }),
align: 'center', align: 'center',
dataIndex: 'purpose', dataIndex: 'purpose',
......
...@@ -12,11 +12,12 @@ export interface MemberModalTableProps extends ModalTableProps { ...@@ -12,11 +12,12 @@ export interface MemberModalTableProps extends ModalTableProps {
currentRef?: any, currentRef?: any,
confirmModal?(), confirmModal?(),
productRef?: any, productRef?: any,
setLik: any,
} }
const MemberModalTable:React.FC<MemberModalTableProps> = (props) => { const MemberModalTable: React.FC<MemberModalTableProps> = (props) => {
const { type = 'radio', schemaAction, confirmModal, currentRef, ...restProps } = props const { type = 'radio', setLik, schemaAction, confirmModal, currentRef, ...restProps } = props
const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({type, customKey: 'memberId'}) const { visible, setVisible, rowSelection, rowSelectionCtl } = useModalTable({ type, customKey: 'memberId' })
const intl = useIntl() const intl = useIntl()
useEffect(() => { useEffect(() => {
if (currentRef) { if (currentRef) {
...@@ -29,7 +30,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => { ...@@ -29,7 +30,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
if(visible) { if (visible) {
const memberId = schemaAction.getFieldValue('vendorMemberId') const memberId = schemaAction.getFieldValue('vendorMemberId')
rowSelectionCtl.setSelectedRowKeys([memberId]) rowSelectionCtl.setSelectedRowKeys([memberId])
} }
...@@ -44,6 +45,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => { ...@@ -44,6 +45,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
schemaAction.setFieldValue('vendorMemberName', rowItem.name) schemaAction.setFieldValue('vendorMemberName', rowItem.name)
} }
confirmModal && confirmModal() confirmModal && confirmModal()
setLik(rowItem)
setVisible(false) setVisible(false)
} }
return ( return (
...@@ -53,7 +55,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => { ...@@ -53,7 +55,7 @@ const MemberModalTable:React.FC<MemberModalTableProps> = (props) => {
visible={visible} visible={visible}
confirm={handleConfirm} confirm={handleConfirm}
cancel={() => setVisible(false)} cancel={() => setVisible(false)}
fetchTableData={(params) => fetchOrderApi.getMemberListByMemberName({...params})} fetchTableData={(params) => fetchOrderApi.getMemberListByMemberName({ ...params })}
rowSelection={rowSelection} rowSelection={rowSelection}
modalType='memberByDefault' modalType='memberByDefault'
tableProps={{ tableProps={{
......
...@@ -24,7 +24,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; ...@@ -24,7 +24,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { getPurchaseRequisitionDeliveryMethodItems, getPurchaseRequisitionDetail, postPurchaseRequisitionCreate, postPurchaseRequisitionUpdate } from '@/services/PurchaseV2Api' import { getPurchaseRequisitionDeliveryMethodItems, getPurchaseRequisitionDetail, postPurchaseRequisitionCreate, postPurchaseRequisitionUpdate } from '@/services/PurchaseV2Api'
import { UPLOAD_TYPE } from '@/constants' import { UPLOAD_TYPE } from '@/constants'
import styles from './index.less' import styles from './index.less'
import { getAuth } from '@/utils/auth'
const addSchemaAction = createFormActions() const addSchemaAction = createFormActions()
const { Option } = Select; const { Option } = Select;
...@@ -70,6 +70,7 @@ const IncreaseRequisition: React.FC<{}> = () => { ...@@ -70,6 +70,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
const { id } = usePageStatus() const { id } = usePageStatus()
const [initFormValue, setInitFormValue] = useState<any>({}) const [initFormValue, setInitFormValue] = useState<any>({})
const { formContext } = useFormDetail() const { formContext } = useFormDetail()
const rowvendorMemberInfoRef = useRef<any>({});
const intl = useIntl() const intl = useIntl()
// 请购单物料 // 请购单物料
...@@ -96,10 +97,27 @@ const IncreaseRequisition: React.FC<{}> = () => { ...@@ -96,10 +97,27 @@ const IncreaseRequisition: React.FC<{}> = () => {
}, 500) }, 500)
setFormLoading(false) setFormLoading(false)
}) })
} else {
const userInfo = getAuth();
addSchemaAction.setFieldValue('requisitioner', userInfo.name)
addSchemaAction.setFieldValue('requisitionerId', userInfo.userId)
} }
}, []) }, [])
const setLik = (row) => {
console.log(row)
rowvendorMemberInfoRef.current = row;
}
const Jump = () => {
if (Object.keys(rowvendorMemberInfoRef.current).length) {
history.push(`/memberAbility/manage/maintain/detail/basicInfo?id=${rowvendorMemberInfoRef.current.memberId}&validateId=${rowvendorMemberInfoRef.current.id}`)
}
}
// 供应会员
const vendorMemberNameNode = <div className='connectBtn' onClick={Jump} style={{ cursor: 'pointer' }}>{intl.formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' })}</div>
const handleSubmit = async (value) => { const handleSubmit = async (value) => {
try { try {
let fnResult = null let fnResult = null
...@@ -361,6 +379,7 @@ const IncreaseRequisition: React.FC<{}> = () => { ...@@ -361,6 +379,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
help, help,
enclosureColumns, enclosureColumns,
enclosureColumnsButton, enclosureColumnsButton,
vendorMemberNameNode,
}} }}
/> />
...@@ -372,7 +391,7 @@ const IncreaseRequisition: React.FC<{}> = () => { ...@@ -372,7 +391,7 @@ const IncreaseRequisition: React.FC<{}> = () => {
{/* 选择采购物料 */} {/* 选择采购物料 */}
<MaterialModalTable currentRef={materialRef} schemaAction={addSchemaAction} sectionProps={surplusProps} /> <MaterialModalTable currentRef={materialRef} schemaAction={addSchemaAction} sectionProps={surplusProps} />
{/* 选择供应会员 */} {/* 选择供应会员 */}
<MemberModalTable currentRef={memberRef} schemaAction={addSchemaAction} /> <MemberModalTable currentRef={memberRef} schemaAction={addSchemaAction} setLik={setLik} />
{/* 请购人选择会员 */} {/* 请购人选择会员 */}
<RequisitionerTable currentRef={RequisRef} schemaAction={addSchemaAction} /> <RequisitionerTable currentRef={RequisRef} schemaAction={addSchemaAction} />
......
...@@ -85,7 +85,7 @@ const basicInfo: ISchema = { ...@@ -85,7 +85,7 @@ const basicInfo: ISchema = {
}, },
vendorMemberName: { vendorMemberName: {
type: 'string', type: 'string',
title: getIntl().formatMessage({ id: 'purchaseRequisition.gongyinghuiyuan', defaultMessage: '供应会员' }), title: "{{vendorMemberNameNode}}",
"x-component-props": { "x-component-props": {
disabled: true, disabled: true,
addonAfter: "{{memberBtn}}" addonAfter: "{{memberBtn}}"
......
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