Commit 078b4121 authored by xiexiuxing's avatar xiexiuxing

请购单bug修复

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