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

fix:新增采购订单查询内部工作流添加memberRoleId和orderModel字段,处理添加发票弹框提交无校验问题

parent 1109e1c7
...@@ -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