Commit cd961ec1 authored by XieZhiXiong's avatar XieZhiXiong
parents d6f215a5 43e733cf
...@@ -143,16 +143,16 @@ export const upperCommodityColumns: ColumnType<any>[] = [ ...@@ -143,16 +143,16 @@ export const upperCommodityColumns: ColumnType<any>[] = [
title: '商品名称', title: '商品名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 240, width: 180,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '商品品类', title: '品类',
dataIndex: ['customerCategory', 'name'], dataIndex: ['customerCategory', 'name'],
key: 'customerCategory.name', key: 'customerCategory.name',
}, },
{ {
title: '商品品牌', title: '品牌',
dataIndex: ['brand', 'name'], dataIndex: ['brand', 'name'],
key: 'brand.name', key: 'brand.name',
}, },
......
...@@ -84,9 +84,9 @@ export const useOrderDetail = (options: OrderDetailHookProps) => { ...@@ -84,9 +84,9 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
if(type === 'p_readyPayOrder') { if(type === 'p_readyPayOrder') {
reloadPayList(id) reloadPayList(id)
} }
if(data.payments.length > 0){ // if(data.payments.length > 0){
setCurrentPayInfoId(data.payments[0].paymentId) // setCurrentPayInfoId(data.payments[0].paymentId)
} // }
} else { } else {
message.error(msg) message.error(msg)
} }
......
...@@ -211,9 +211,9 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -211,9 +211,9 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
// 开始提交线下支付数据 // 开始提交线下支付数据
if(current === 1) { if(current === 1) {
const payOrderUrls = formRef.current.urlList const vouchers = formRef.current.urlList
const checkedId = checked.id const checkedId = checked.id
if (!payOrderUrls || payOrderUrls.length === 0 || payOrderUrls.includes('')) { if (!vouchers || vouchers.length === 0 || vouchers.includes('')) {
message.error('请先上传凭证') message.error('请先上传凭证')
return; return;
} }
...@@ -267,7 +267,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -267,7 +267,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
} }
const handleSubmitPay = async () => { const handleSubmitPay = async () => {
const payOrderUrls = formRef.current.urlList const vouchers = formRef.current.urlList
// 当前选中的支付信息 // 当前选中的支付信息
let payInfoObj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0] let payInfoObj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0]
let params: any = { let params: any = {
...@@ -283,8 +283,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => { ...@@ -283,8 +283,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
} }
params.payPassword = encryptedByAES(code) params.payPassword = encryptedByAES(code)
} else if(current === 1) { } else if(current === 1) {
// params.payOrderUrls = payOrderUrls.join(',') params.vouchers = vouchers
params.payOrderUrls = payOrderUrls
} }
if(!settleAccountsError) { if(!settleAccountsError) {
......
...@@ -27,18 +27,14 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => { ...@@ -27,18 +27,14 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => {
useEffect(() => { useEffect(() => {
// 过滤支付信息 取第一个待支付或者未到账的id // 过滤支付信息 取第一个待支付或者未到账的id
if(data?.payments?.length) { if(data?.payments?.length) {
let payments = data.payments.filter(item => item.showPayment) let payments = data.payments.sort((a, b) => a.batchNo - b.batchNo).filter(item => item.showPayment)
console.log(data.payments.sort((a, b) => a.batchNo - b.batchNo), payments, 'lo')
if(payments.length) { if(payments.length) {
ctl.setPayId(payments[0].paymentId) ctl.setPayId(payments[0].paymentId)
} }
} }
}, []) }, [])
const onChange = (activeKey) => {
// ctl.setPayId(activeKey)
}
const TabHeader = ({dataSource}) => { const TabHeader = ({dataSource}) => {
return <Row justify='space-between' style={{minWidth: 216}}> return <Row justify='space-between' style={{minWidth: 216}}>
<Col> <Col>
...@@ -58,35 +54,43 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => { ...@@ -58,35 +54,43 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => {
</Col> </Col>
<Col> <Col>
<StatusColors status={dataSource.outerStatus} text={dataSource.outerStatusName} type='payOut'/> <StatusColors status={dataSource.outerStatus} text={dataSource.outerStatusName} type='payOut'/>
{ dataSource.externalState === PayOutWorkState.CONFIRM_ACCOUNT && dataSource.payChannel === 5 && dataSource.payWay === 2 && { dataSource.vouchers.length ? <p className={style.look} onClick={()=>setVisible(true)}>查看 &gt;</p> : null}
<p className={style.look} onClick={()=>setVisible(true)}>查看 &gt;</p>
}
</Col> </Col>
</Row> </Row>
} }
const urlsDatas = data.payments.filter(item => item['payChannel'] === 5 && item['payWay'] === 2).map(_item => _item['voucher']).filter(__item => __item.length)
// const canCtlData = data.payments.find(v => v.showView) || {} //@todo 需后端提供showView字段支持
const canCtlData = data.payments.find(v => v.vouchers.length) || {}
const urlsDatas = canCtlData.vouchers || []
return ( return (
<> <>
<Row gutter={24} style={{marginTop: 24}}> <Row gutter={24} style={{marginTop: 24}}>
<Col span={processEnum === 24 ? 12 : 24}> <Col span={processEnum === 24 ? 12 : 24}>
<MellowCard bordered={false} fullHeight> <MellowCard bordered={false} fullHeight>
<Tabs defaultActiveKey='1' onChange={onChange}> <Tabs defaultActiveKey='1'>
{ data.payments && data.payments.map(v => <TabPane key={v.paymentId} tab={<TabHeader dataSource={v}/>}> {
<Row> data.payments.length
<Col className={style.fontGray} span={4}>支付环节: </Col> ?
<Col>{v.payNode}</Col> data.payments.map(v => <TabPane key={v.paymentId} tab={<TabHeader dataSource={v}/>}>
</Row> <Row>
<Row> <Col className={style.fontGray} span={4}>支付环节: </Col>
<Col className={style.fontGray} span={4}>支付方式: </Col> <Col>{v.payNode}</Col>
<Col>{v.payTypeName}</Col> </Row>
</Row> <Row>
<Row> <Col className={style.fontGray} span={4}>支付方式: </Col>
<Col className={style.fontGray} span={4}>支付渠道: </Col> <Col>{v.payTypeName}</Col>
<Col>{v.payChannelName}</Col> </Row>
</Row> <Row>
</TabPane>) } <Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{v.payChannelName}</Col>
</Row>
</TabPane>)
:
null
}
</Tabs> </Tabs>
</MellowCard> </MellowCard>
</Col> </Col>
......
...@@ -66,13 +66,16 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => { ...@@ -66,13 +66,16 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
visible={visible} visible={visible}
confirm={handleConfirm} confirm={handleConfirm}
cancel={() => setVisible(false)} cancel={() => setVisible(false)}
fetchTableData={async (params) => (await PublicApi.getTransactionNotarizeEnquiryProductQuotationList({...params, externalState: 4}, {useCache: true, ttl: 10 * 1000})).data} fetchTableData={async (params) => (await PublicApi.getTransactionNotarizeEnquiryProductQuotationList({...params, externalState: 4, shopId: schemaAction.getFieldValue('shopId')})).data}
rowSelection={rowSelection} rowSelection={rowSelection}
modalType='inquiryByDefault' modalType='inquiryByDefault'
searchName="quotationNo" searchName="quotationNo"
tableProps={{ tableProps={{
rowKey: 'id' rowKey: 'id'
}} }}
resetModal={{
destroyOnClose: true
}}
{...restProps} {...restProps}
/> />
) )
......
...@@ -38,15 +38,12 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions ...@@ -38,15 +38,12 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
} }
const getPayLists = (memberId, memberRoleId) => { const getPayLists = (memberId, memberRoleId) => {
const shopId = ctx.getFieldValue('shopId')
const products = ctx.getFieldValue('products').map(item => ({ productId: item.commodityId, skuId: item.productId }))
if(shopId && products?.lenght)
PublicApi.postOrderBuyerCreateB2bPaymentFind({ PublicApi.postOrderBuyerCreateB2bPaymentFind({
memberId, memberId,
roleId: memberRoleId, roleId: memberRoleId,
shopId: shopId, shopId: ctx.getFieldValue('shopId'),
orderMode: ctx.getFieldValue('orderMode'), orderMode: ctx.getFieldValue('orderMode'),
products: products products: orderProducts.map(item => ({ productId: item.commodityId, skuId: item.productId }))
}, { ctlType: 'none' }).then(res => { }, { ctlType: 'none' }).then(res => {
const { code, data } = res const { code, data } = res
if (code === 1000) { if (code === 1000) {
......
...@@ -25,12 +25,14 @@ const ReadyConfirmContract: React.FC = () => { ...@@ -25,12 +25,14 @@ const ReadyConfirmContract: React.FC = () => {
// } // }
} }
} }
console.log(currentPayInfoId)
}, [data, currentPayInfoId]) }, [data, currentPayInfoId])
const renderPayPrice = () => { const renderPayPrice = () => {
if(data){ if(data){
if(data.payments.length > 0){ if(data.payments.length > 0){
let obj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0] let obj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0]
console.log(obj, 'obj')
if(obj) if(obj)
return obj.payAmount return obj.payAmount
} }
......
...@@ -18,7 +18,6 @@ import DataSet from "@antv/data-set"; ...@@ -18,7 +18,6 @@ import DataSet from "@antv/data-set";
const CircleChart = props => { const CircleChart = props => {
const { sumPrice = 100, alreadyPay = 10 } = props const { sumPrice = 100, alreadyPay = 10 } = props
const { DataView } = DataSet; const { DataView } = DataSet;
const dv = new DataView();
const userData = [ const userData = [
{ type: '总金额', value: sumPrice - alreadyPay }, { type: '总金额', value: sumPrice - alreadyPay },
......
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