Commit 692ce8ea authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

Merge branch 'dev' into test

parents a88682d7 cf6eff75
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
"chalk": "^4.1.0", "chalk": "^4.1.0",
"clone": "^2.1.2", "clone": "^2.1.2",
"connect-history-api-fallback": "^1.6.0", "connect-history-api-fallback": "^1.6.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.3",
"events": "^3.2.0", "events": "^3.2.0",
"express": "^4.17.1", "express": "^4.17.1",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",
......
import React, { useRef, useEffect, useState } from 'react' import React, { useRef, useEffect, useState } from 'react'
import { Input } from 'antd'; import { Input } from 'antd';
import styled from 'styled-components' import styled from 'styled-components'
/** /**
* 自定义数值范围控件 * 自定义数值范围控件
*/ */
const RowStyleLayout = styled(props => <div {...props} />)` const RowStyleLayout = styled(props => <div {...props} />)`
.site-input-split { .site-input-split {
background-color: #fff; background-color: #fff;
} }
.site-input-right { .site-input-right {
border-left-width: 0; border-left-width: 0;
} }
.site-input-right:hover, .site-input-right:hover,
.site-input-right:focus { .site-input-right:focus {
border-left-width: 1px; border-left-width: 1px;
} }
.ant-input-rtl.site-input-right { .ant-input-rtl.site-input-right {
border-right-width: 0; border-right-width: 0;
} }
.ant-input-rtl.site-input-right:hover, .ant-input-rtl.site-input-right:hover,
.ant-input-rtl.site-input-right:focus { .ant-input-rtl.site-input-right:focus {
border-right-width: 1px; border-right-width: 1px;
} }
` `
const NumberRange = (props) => { const NumberRange = (props) => {
const { value, mutators } = props const { value, mutators } = props
const { placeholder = [], ...rest } = props.props["x-component-props"] || {} const { placeholder = [], ...rest } = props.props["x-component-props"] || {}
const [rangeValue, setrangeValue] = useState([]) const [rangeValue, setrangeValue] = useState([])
useEffect(() => { useEffect(() => {
if(rangeValue.length) { if(rangeValue.length) {
mutators.change(rangeValue); mutators.change(rangeValue);
} }
}, [rangeValue]) }, [rangeValue])
const loseBlur = (e, index) => { const loseBlur = (e, index) => {
setrangeValue(() => { setrangeValue(() => {
let newValue = [...rangeValue] let newValue = [...rangeValue]
newValue[index] = e.target.value newValue[index] = e.target.value
return newValue return newValue
}) })
} }
return ( return (
<RowStyleLayout> <RowStyleLayout>
<Input.Group compact {...rest}> <Input.Group compact {...rest}>
<Input <Input
style={{ style={{
width: 100, width: 100,
textAlign: 'center' textAlign: 'center'
}} }}
placeholder={placeholder[0] || '最小值'} placeholder={placeholder[0] || '最小值'}
onBlur={(e) => loseBlur(e, 0)} onBlur={(e) => loseBlur(e, 0)}
/> />
<Input <Input
className="site-input-split" className="site-input-split"
style={{ style={{
width: 30, width: 30,
borderLeft: 0, borderLeft: 0,
borderRight: 0, borderRight: 0,
pointerEvents: 'none', pointerEvents: 'none',
}} background: '#fff',
placeholder="~" }}
disabled placeholder="~"
/> disabled
<Input />
className="site-input-right" <Input
style={{ className="site-input-right"
width: 100, style={{
textAlign: 'center', width: 100,
}} textAlign: 'center',
placeholder={placeholder[1] || '最大值'} }}
onBlur={(e) => loseBlur(e, 1)} placeholder={placeholder[1] || '最大值'}
/> onBlur={(e) => loseBlur(e, 1)}
</Input.Group> />
</RowStyleLayout> </Input.Group>
) </RowStyleLayout>
} )
}
NumberRange.defaultProps = {}
NumberRange.defaultProps = {}
NumberRange.isFieldComponent = true;
NumberRange.isFieldComponent = true;
export default NumberRange
\ No newline at end of file export default NumberRange
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// background-color: #fff; // background-color: #fff;
// border-radius: 8px; // border-radius: 8px;
// .header { // .header {
// margin-bottom: 24px; // margin-bottom: 24px;
// .title { // .title {
// font-size: 18px; // font-size: 18px;
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
// } // }
// } // }
.advertisementSpace { .advertisementSpace {
width: 386px; margin-bottom: 16px;
height: 217px; height: 217px;
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
\ No newline at end of file
...@@ -32,9 +32,9 @@ const AdvertisementContainer = () => { ...@@ -32,9 +32,9 @@ const AdvertisementContainer = () => {
{ {
data.map((item, key) => { data.map((item, key) => {
return ( return (
<AdvertisementSpace <AdvertisementSpace
urlLink={item.link} urlLink={item.link}
imageUrl={item.imageUrl} imageUrl={item.imageUrl}
key={key} key={key}
/> />
) )
...@@ -53,4 +53,4 @@ const AdvertisementSpace: React.FC<Iprops> = (props) => { ...@@ -53,4 +53,4 @@ const AdvertisementSpace: React.FC<Iprops> = (props) => {
</div> </div>
) )
} }
export default AdvertisementContainer export default AdvertisementContainer
\ No newline at end of file
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
padding: 24px; padding: 24px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
height: 361px;
.header { .header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
.title { .title {
color: #303133; color: #303133;
font-size: 16px; font-size: 16px;
} }
.nextOrPreview { .nextOrPreview {
...@@ -25,6 +26,10 @@ ...@@ -25,6 +26,10 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
&:last-of-type {
margin-bottom: 0px;
}
.date { .date {
margin-right: 16px; margin-right: 16px;
padding: 2px 6px; padding: 2px 6px;
...@@ -42,6 +47,13 @@ ...@@ -42,6 +47,13 @@
} }
.content { .content {
cursor: pointer; cursor: pointer;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
} }
} }
} }
...@@ -59,7 +71,7 @@ ...@@ -59,7 +71,7 @@
.title { .title {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
font-weight: 500; font-weight: 500;
color: #303133; color: #303133;
} }
...@@ -83,4 +95,4 @@ ...@@ -83,4 +95,4 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
} }
\ No newline at end of file
...@@ -17,7 +17,7 @@ const LatestAnnouces: React.FC = () => { ...@@ -17,7 +17,7 @@ const LatestAnnouces: React.FC = () => {
current: 1, current: 1,
pageSize: 5 pageSize: 5
}) })
const getList = (params) => { const getList = (params) => {
setLoading(true); setLoading(true);
PublicApi.getManageContentNoticeFindNewestNotice(params) PublicApi.getManageContentNoticeFindNewestNotice(params)
...@@ -29,7 +29,7 @@ const LatestAnnouces: React.FC = () => { ...@@ -29,7 +29,7 @@ const LatestAnnouces: React.FC = () => {
} }
}) })
} }
useEffect(() => { useEffect(() => {
getList(pagination); getList(pagination);
}, []) }, [])
...@@ -86,7 +86,7 @@ const LatestAnnouces: React.FC = () => { ...@@ -86,7 +86,7 @@ const LatestAnnouces: React.FC = () => {
}) })
} }
</div> </div>
<Modal <Modal
width={800} width={800}
visible={visible} visible={visible}
footer={false} footer={false}
...@@ -106,10 +106,10 @@ const LatestAnnouces: React.FC = () => { ...@@ -106,10 +106,10 @@ const LatestAnnouces: React.FC = () => {
<Button onClick={() => setVisible(false)} type={"primary"}>我知道了</Button> <Button onClick={() => setVisible(false)} type={"primary"}>我知道了</Button>
</div> </div>
</div> </div>
</Modal> </Modal>
</div> </div>
) )
} }
export default LatestAnnouces export default LatestAnnouces
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
background-color: #fff; background-color: #fff;
padding: 24px; padding: 24px;
border-radius: 8px; border-radius: 8px;
height: 235px;
.header { .header {
.title { .title {
......
.userGuaid { .grid_container {
margin-bottom: 24px; display: grid;
} }
.ability {
margin-top: 16px;
}
.controller {
background-color: @main-color;
height: 48px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 8px;
color: #fff;
display: flex;
flex-direction: row;
margin-left: auto;
cursor: pointer;
.main { .icon {
// display: flex; font-size: 22px;
// flex-direction: row;
.mainSide {
// flex: 1;
// display: flex;
// flex-direction: column;
.ability {
margin-top: 24px;
}
} }
.text {
margin-left: 8px;
}
}
.advertise {
margin-top: 16px;
}
.rightSide { @media (min-width: 1600px) {
.actions { .grid_container {
display: flex; // display: grid;
} // grid-template-columns: 75% 25%;
// grid-template-columns: repeat(24, 1fr);
// grid-auto-flow: column dense;
// grid-column-gap: 16px;
.announce { .top {
margin-top: 24px; display: grid;
} grid-template-columns: repeat(24, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
.controller { .userCenter {
background-color: @main-color; grid-column-start: 1;
height: 48px; grid-column-end: 19;
display: flex; grid-row-start: 1;
justify-content: center; }
align-items: center; .actions {
border-radius: 8px; grid-column-start: 19;
color: #fff; grid-column-end: 25;
display: flex; grid-row-start: 1;
flex-direction: row;
margin-left: auto;
cursor: pointer;
.icon {
font-size: 22px;
} }
.text { .announce {
margin-left: 8px; grid-column-start: 19;
grid-column-end: 25;
margin-top: -200px;
} }
.recentVisit {
grid-column-start: 19;
grid-column-end: 25;
}
}
}
.bottom {
display: grid;
grid-template-columns: repeat(24, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
.otherCenter {
grid-column-start: 1;
grid-column-end: 19;
grid-row-start: 1;
margin-top: -425px;
}
.anyQuestion {
grid-column-start: 19;
grid-column-end: 25;
margin-top: 16px;
}
.advertise {
grid-column-start: 19;
grid-column-end: 25;
} }
} }
} }
@media (max-width: 1599px) {
.userCenter {
margin: 16px 0;
}
.recentVisit {
margin-top: 16px;
}
}
...@@ -57,31 +57,9 @@ const Home: React.FC<{}> = () => { ...@@ -57,31 +57,9 @@ const Home: React.FC<{}> = () => {
<div className={styles.userGuaid} style={{display: visible ? 'none': 'none'}}> <div className={styles.userGuaid} style={{display: visible ? 'none': 'none'}}>
<UseGuaid/> <UseGuaid/>
</div> </div>
<div className={styles.main}> <div className={styles.grid_container}>
<Row gutter={[16,16]}> <div className={styles.top}>
<Col className={styles.mainSide} sm={24} md={24} lg={24} xl={16} xxl={18}> <div className={styles.actions}>
<div>
<UserCenter />
</div>
{
layout.map((item) => {
const RenderComponent = ComponentSelect[item.name]
return (
<div
className={styles.ability}
style={{order: item.sort, display: (item.isShow ? 'block' : 'none')}}
key={item.code}
>
{
RenderComponent &&
<RenderComponent />
}
</div>
)
})
}
</Col>
<Col className={styles.rightSide} sm={24} md={24} lg={24} xl={8} xxl={6}>
<Row gutter={24}> <Row gutter={24}>
<Col span={12}> <Col span={12}>
<CustomWorkBench <CustomWorkBench
...@@ -95,21 +73,46 @@ const Home: React.FC<{}> = () => { ...@@ -95,21 +73,46 @@ const Home: React.FC<{}> = () => {
</div> </div>
</Col> </Col>
</Row> </Row>
<div className={styles.announce}> </div>
<LatestAnnounce /> <div className={styles.userCenter}>
</div> <UserCenter />
<div className={styles.announce}> </div>
<RecentVisit /> <div className={styles.announce}>
</div> <LatestAnnounce />
<div className={styles.announce}> </div>
<AnyQuestion /> <div className={styles.recentVisit}>
</div> <RecentVisit />
<div className={styles.announce}> </div>
<AdvertisementContainer /> </div>
</div> <div className={styles.bottom}>
</Col> <div className={styles.otherCenter}>
</Row> {
layout.map((item) => {
const RenderComponent = ComponentSelect[item.name]
return (
<div
className={styles.ability}
style={{order: item.sort, display: (item.isShow ? 'block' : 'none')}}
key={item.code}
>
{
RenderComponent &&
<RenderComponent />
}
</div>
)
})
}
</div>
<div className={styles.anyQuestion}>
<AnyQuestion />
</div>
<div className={styles.advertise}>
<AdvertisementContainer />
</div>
</div>
</div> </div>
</> </>
</PageHeaderWrapper> </PageHeaderWrapper>
) )
......
...@@ -364,13 +364,13 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -364,13 +364,13 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
idList = [...idList, ...item.checkedList] idList = [...idList, ...item.checkedList]
} }
if (idList.length <= 0) { if (idList.length <= 0) {
message.info("请选择要移动的商品") message.info("请选择要删除的商品")
return false return false
} }
Modal.confirm({ Modal.confirm({
centered: true, centered: true,
className: styles.mallComfirm, className: styles.mallComfirm,
content: `是否从进货单中除选中的商品?`, content: `是否从进货单中除选中的商品?`,
onOk: () => { onOk: () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.postSearchShopPurchaseDeletePurchase({ idList: idList }).then(res => { PublicApi.postSearchShopPurchaseDeletePurchase({ idList: idList }).then(res => {
...@@ -393,16 +393,21 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -393,16 +393,21 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* @param ids * @param ids
*/ */
const deleteListItems = (ids: number[]) => { const deleteListItems = (ids: number[]) => {
console.log(ids, "ids")
const newOrderList = JSON.parse(JSON.stringify(orderList)) const newOrderList = JSON.parse(JSON.stringify(orderList))
const result = [] const result = []
for (const item of newOrderList) { for (const item of newOrderList) {
const newItem = item const newItem = item
newItem.checkedList = newItem.checkedList.filter(checkItem => !ids.includes(checkItem))
newItem.orderList = newItem.orderList.filter(orderItem => !ids.includes(orderItem.id)) newItem.orderList = newItem.orderList.filter(orderItem => !ids.includes(orderItem.id))
if (newItem.orderList.length > 0) { if (newItem.orderList.length > 0) {
result.push(newItem) result.push(newItem)
} }
} }
setOrderList(result) setOrderList(result)
if(result.every(resItem => resItem.checkedList.length === 0)){
setIndeterminate(false)
}
} }
/** /**
...@@ -750,7 +755,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -750,7 +755,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
<Checkbox <Checkbox
value={item.id} value={item.id}
className="common_checkbox" className="common_checkbox"
indeterminate={!!item.checkedList.length && item.checkedList.length < item.defaultCheckedList.length} indeterminate={!!item.checkedList.length && item.checkedList.length < item.defaultCheckedList.length && item.checkedList.length > 0}
onChange={(e) => onCheckChildAllChange(e, item.id)} onChange={(e) => onCheckChildAllChange(e, item.id)}
></Checkbox> ></Checkbox>
<label>{item.shopname}</label> <label>{item.shopname}</label>
......
...@@ -60,7 +60,7 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -60,7 +60,7 @@ const AccountDetail: React.FC<{}> = () => {
title: '交易时间', title: '交易时间',
dataIndex: 'tradeTime', dataIndex: 'tradeTime',
key: 'tradeTime', key: 'tradeTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss") render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
}, },
{ {
title: '交易金额(元)', title: '交易金额(元)',
...@@ -91,7 +91,7 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -91,7 +91,7 @@ const AccountDetail: React.FC<{}> = () => {
let amount = (details.accountBalance*100 - details.lockBalance*100)/100 let amount = (details.accountBalance*100 - details.lockBalance*100)/100
setWidthdrawAmount(amount) setWidthdrawAmount(amount)
} }
// 提交提现申请 // 提交提现申请
const handleSubmitApply = () => { const handleSubmitApply = () => {
setBtnLoading(true) setBtnLoading(true)
...@@ -135,8 +135,8 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -135,8 +135,8 @@ const AccountDetail: React.FC<{}> = () => {
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="账户提现"> <Card headStyle={{borderBottom:'none'}} title="账户提现">
<Row gutter={100}> <Row gutter={100}>
<Col <Col
// span={8} // span={8}
xxl={8} xxl={8}
xl={12} xl={12}
lg={12} lg={12}
...@@ -157,8 +157,8 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -157,8 +157,8 @@ const AccountDetail: React.FC<{}> = () => {
min={0} min={0}
/> />
<Button <Button
type="text" type="text"
size="small" size="small"
style={{marginLeft:24, color:'#fff'}} style={{marginLeft:24, color:'#fff'}}
onClick={handleAllCharge} onClick={handleAllCharge}
> >
...@@ -173,28 +173,28 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -173,28 +173,28 @@ const AccountDetail: React.FC<{}> = () => {
</div> </div>
</div> </div>
<div className={styles['repayment-right']}> <div className={styles['repayment-right']}>
<Button ghost onClick={handleSubmitApply} loading={btnLoading}>提交</Button> <Button ghost onClick={handleSubmitApply} loading={btnLoading} disabled={bankDetail ? false: true}>提交</Button>
</div> </div>
</div> </div>
</Col> </Col>
<Col <Col
// span={16} // span={16}
xxl={16} xxl={16}
xl={12} xl={12}
lg={12} lg={12}
> >
<div className={styles.infoRight}> <div className={styles.infoRight}>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>账户归属:</p> <p className={styles.rightTitle}>账户归属:</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -203,16 +203,16 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -203,16 +203,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>银行账号:</p> <p className={styles.rightTitle}>银行账号:</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -221,16 +221,16 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -221,16 +221,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>开户行:</p> <p className={styles.rightTitle}>开户行:</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -246,8 +246,8 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -246,8 +246,8 @@ const AccountDetail: React.FC<{}> = () => {
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="账户信息"> <Card headStyle={{borderBottom:'none'}} title="账户信息">
<Row gutter={100}> <Row gutter={100}>
<Col <Col
// span={8} // span={8}
xxl={8} xxl={8}
xl={12} xl={12}
lg={12} lg={12}
...@@ -268,24 +268,24 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -268,24 +268,24 @@ const AccountDetail: React.FC<{}> = () => {
</div> </div>
</div> </div>
</Col> </Col>
<Col <Col
// span={16} // span={16}
xxl={16} xxl={16}
xl={12} xl={12}
lg={12} lg={12}
> >
<div className={styles.infoRight}> <div className={styles.infoRight}>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>账户归属:</p> <p className={styles.rightTitle}>账户归属:</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -294,16 +294,16 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -294,16 +294,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>账户余额(元):</p> <p className={styles.rightTitle}>账户余额(元):</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -312,16 +312,16 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -312,16 +312,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>锁定金额(元):</p> <p className={styles.rightTitle}>锁定金额(元):</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
...@@ -330,16 +330,16 @@ const AccountDetail: React.FC<{}> = () => { ...@@ -330,16 +330,16 @@ const AccountDetail: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col <Col
// span={4} // span={4}
xxl={4} xxl={4}
xl={10} xl={10}
lg={10} lg={10}
> >
<p className={styles.rightTitle}>账户状态:</p> <p className={styles.rightTitle}>账户状态:</p>
</Col> </Col>
<Col <Col
// span={20} // span={20}
xxl={20} xxl={20}
xl={14} xl={14}
lg={14} lg={14}
......
...@@ -22,7 +22,7 @@ const modelTitle = { ...@@ -22,7 +22,7 @@ const modelTitle = {
const InvoiceModal:React.FC<InvoiceModalProps> = (props) => { const InvoiceModal:React.FC<InvoiceModalProps> = (props) => {
const { mode, formInitValue } = props const { mode, formInitValue } = props
const selfInitValue = useMemo(() => mode === 'add' ? null : formInitValue, [mode, formInitValue]) const selfInitValue = useMemo(() => mode === 'add' ? null : formInitValue, [mode, formInitValue])
// 由于默认是number类型, 但switch组件只接收boolean // 由于默认是number类型, 但switch组件只接收boolean
if (selfInitValue) { if (selfInitValue) {
selfInitValue.isDefault = !!selfInitValue.isDefault selfInitValue.isDefault = !!selfInitValue.isDefault
...@@ -72,4 +72,4 @@ const InvoiceModal:React.FC<InvoiceModalProps> = (props) => { ...@@ -72,4 +72,4 @@ const InvoiceModal:React.FC<InvoiceModalProps> = (props) => {
InvoiceModal.defaultProps = {} InvoiceModal.defaultProps = {}
export default InvoiceModal export default InvoiceModal
\ No newline at end of file
...@@ -12,11 +12,12 @@ const addressSchema: ISchema = { ...@@ -12,11 +12,12 @@ const addressSchema: ISchema = {
labelAlign: 'left', labelAlign: 'left',
labelCol: 4, labelCol: 4,
wrapperCol: 20, wrapperCol: 20,
full: true full: true,
}, },
properties: { properties: {
type: { type: {
type: 'radio', type: 'radio',
required: true,
title: '开具类型', title: '开具类型',
enum: [ enum: [
{ {
...@@ -29,12 +30,6 @@ const addressSchema: ISchema = { ...@@ -29,12 +30,6 @@ const addressSchema: ISchema = {
} }
], ],
default: 1, default: 1,
"x-rules": [
{
required: true,
message: '请选择开具类型'
},
],
"x-linkages": [ "x-linkages": [
{ {
type: 'value:visible', type: 'value:visible',
...@@ -45,6 +40,7 @@ const addressSchema: ISchema = { ...@@ -45,6 +40,7 @@ const addressSchema: ISchema = {
}, },
kind: { kind: {
type: 'radio', type: 'radio',
required: true,
title: '发票种类', title: '发票种类',
enum: [ enum: [
{ {
...@@ -57,39 +53,35 @@ const addressSchema: ISchema = { ...@@ -57,39 +53,35 @@ const addressSchema: ISchema = {
} }
], ],
default: 1, default: 1,
"x-rules": [
{
required: true,
message: '请选择开具类型'
}
]
}, },
invoiceTitle: { invoiceTitle: {
type: 'string', type: 'string',
required: true,
title: '发票抬头', title: '发票抬头',
"x-rules": [ "x-rules": [
{ {
required: true,
message: '请输入发票抬头'
},
{
limitByte: true, limitByte: true,
maxByte: 40 maxByte: 40
}, },
{
required: true,
message: '请输入发票抬头'
}
] ]
}, },
taxNo: { taxNo: {
type: 'string', type: 'string',
required: true,
title: '纳税号', title: '纳税号',
"x-rules": [ "x-rules": [
{
required: true,
message: '请输入纳税号'
},
{ {
limitByte: true, limitByte: true,
maxByte: 20 maxByte: 20
}, },
{
required: true,
message: '请输入纳税号'
}
] ]
}, },
bankOfDeposit: { bankOfDeposit: {
...@@ -139,4 +131,4 @@ const addressSchema: ISchema = { ...@@ -139,4 +131,4 @@ const addressSchema: ISchema = {
} }
} }
export default addressSchema export default addressSchema
\ No newline at end of file
...@@ -92,7 +92,7 @@ export const filterProductDataById = (data, targetData) => { ...@@ -92,7 +92,7 @@ export const filterProductDataById = (data, targetData) => {
next.category = next.category || next.customerCategoryName next.category = next.category || next.customerCategoryName
next.unit = next.unit || next.unitName next.unit = next.unit || next.unitName
next.productName = next.productName || next.name next.productName = next.productName || next.name
if (logistics.deliveryType === 2) { if (logistics.deliveryType === 2) {
const { code, data } = await PublicApi.getLogisticsShipperAddressGet({ const { code, data } = await PublicApi.getLogisticsShipperAddressGet({
id: logistics.sendAddress id: logistics.sendAddress
...@@ -118,7 +118,7 @@ export const filterProductDataById = (data, targetData) => { ...@@ -118,7 +118,7 @@ export const filterProductDataById = (data, targetData) => {
prev.push(next) prev.push(next)
} }
return prev return prev
}, []) }, [])
} }
...@@ -138,7 +138,12 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => { ...@@ -138,7 +138,12 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
const handleConfirmProduct = async () => { const handleConfirmProduct = async () => {
// 判断所选择的商品是否属于同一个工作流 // 判断所选择的商品是否属于同一个工作流
const res = await PublicApi.postOrderIsWorkFlow({memberId: rowSelectionCtl.selectRow[0].memberId, productIds: rowSelectionCtl.selectedRowKeys}, { ctlType: 'none' }) const res = await PublicApi.postOrderIsWorkFlow({
memberId: rowSelectionCtl.selectRow[0].memberId,
memberRoleId: rowSelectionCtl.selectRow[0].memberRoleId,
productIds: rowSelectionCtl.selectedRowKeys,
orderModel: schemaAction.getFieldValue('orderModel')
}, { ctlType: 'none' })
if (res.code === 1000) { if (res.code === 1000) {
const productData = schemaAction.getFieldValue('orderProductRequests') const productData = schemaAction.getFieldValue('orderProductRequests')
...@@ -192,4 +197,4 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => { ...@@ -192,4 +197,4 @@ const ProductModalTable:React.FC<ProductModalTableProps> = (props) => {
ProductModalTable.defaultProps = {} ProductModalTable.defaultProps = {}
export default ProductModalTable export default ProductModalTable
\ No newline at end of file
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