Commit d0a6b161 authored by 前端-许佳敏's avatar 前端-许佳敏
parents b63e79fb 4dfc68e6
......@@ -15,7 +15,7 @@ const CommonHeader: React.FC<ShopHeaderPropsType> = (props) => {
const { title, logoUrl, type, shopUrlParam } = props
const getLink = () => {
let url: string = ''
let url: string
switch(type) {
case LAYOUT_TYPE.channel:
url = `${GlobalConfig.channelRootRoute}?channelId=${shopUrlParam}`
......
......@@ -5,6 +5,7 @@ import { history } from 'umi'
import { FileTextOutlined, DownOutlined } from '@ant-design/icons'
import isEmpty from 'lodash/isEmpty'
import { PublicApi } from '@/services/api'
import ImageBox from '@/components/ImageBox'
import { getAuth } from '@/utils/auth'
import styles from './index.less'
......@@ -19,7 +20,7 @@ const Header: React.FC<HeaderPropsType> = (props) => {
const [count, setCount] = useState<number>(0)
const { search } = history.location.query
let handleScroll = () => {
const handleScroll = () => {
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
const floatSearch = document.getElementById("floatSearch")
if (floatSearch) {
......@@ -50,7 +51,7 @@ const Header: React.FC<HeaderPropsType> = (props) => {
}, [])
useEffect(() => {
if (!!search) {
if (search) {
setSearchValue(search)
} else {
setSearchValue("")
......@@ -97,7 +98,7 @@ const Header: React.FC<HeaderPropsType> = (props) => {
<div className={styles.header}>
<div className={styles.header_container}>
<div className={styles.logo}>
<img src={logo} />
<ImageBox width={145} height={50} imgUrl={logo} />
</div>
<div className={styles.mall_search}>
<div className={styles.mall_search_tags}>
......
......@@ -41,7 +41,7 @@ const CheckDetail: React.FC<{}> = () => {
const { code, data } = res
setDetails(data)
if(code === 1000) {
let bankRes = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: data.memberId + ''})
let bankRes = await PublicApi.getSettleAccountsCorporateAccountConfig({memberId: data.memberId + '', memberRoleId: data.memberRoleId + ''})
setBankDetail(bankRes.data)
}
}
......@@ -66,7 +66,7 @@ const CheckDetail: React.FC<{}> = () => {
title: '交易时间',
dataIndex: '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: '交易金额(元)',
......@@ -116,7 +116,7 @@ const CheckDetail: React.FC<{}> = () => {
}
const handleCancel = () => {
checkForm.resetFields()
checkForm.resetFields()
setVisibleModal(false)
}
......@@ -126,7 +126,7 @@ const CheckDetail: React.FC<{}> = () => {
onBack={() => history.goBack()}
backIcon={<ReutrnEle />}
extra={ urlParams.preview ? [] : [
<Button
<Button
icon={<CheckSquareOutlined />}
key="1"
type="primary"
......@@ -288,8 +288,8 @@ const CheckDetail: React.FC<{}> = () => {
layout="vertical"
form={checkForm}
>
<Form.Item
name="status"
<Form.Item
name="status"
label=""
rules={[
{
......@@ -305,8 +305,8 @@ const CheckDetail: React.FC<{}> = () => {
</Radio.Group>
</Form.Item>
{
checkStatus===2 && <Form.Item
name="remark"
checkStatus===2 && <Form.Item
name="remark"
label={'审核不通过原因'}
rules={[
{
......
......@@ -186,6 +186,7 @@ const AddBrand: React.FC<{}> = () => {
保存
</Button>,
]}
className={styles.brandBox}
>
<Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="流程进度">
......
.proveBox{
width:175px;
height:120px;
border:1px solid rgba(235,236,240,1);
img {
width: 100%;
height: 100%;
padding: 18px;
}
}
\ No newline at end of file
.proveBox{
width:175px;
height:120px;
border:1px solid rgba(235,236,240,1);
img {
width: 100%;
height: 100%;
padding: 18px;
}
}
.brandBox {
:global {
.ant-form-item {
display: block;
}
}
}
.fontGray {
font-size: 12px;
color: #909399;
margin-bottom: 10px;
}
.bignumber {
font-size: 24px;
color: #303133;
margin-bottom: 10px;
}
.smallnumber {
font-size: 14px;
color: #303133;
line-height: 24px;
}
\ No newline at end of file
.fontGray {
font-size: 12px;
color: #909399;
margin-bottom: 10px;
}
.bignumber {
font-size: 24px;
color: #303133;
margin-bottom: 10px;
}
.smallnumber {
font-size: 14px;
color: #303133;
line-height: 24px;
}
.card-list {
font-size: 12px;
line-height: 20px;
margin-top: 4px;
}
......@@ -4,6 +4,11 @@ import { Tabs, Row, Col } from 'antd'
import { OrderDetailContext } from '../../_public/order/context'
import MellowCard from '@/components/MellowCard'
import StatusColors from '../StatusColors'
import moment from 'moment'
/**
* 展示 支付比例和简单流程的发货信息
*/
export interface OrderPayTabsProps {}
......@@ -35,6 +40,9 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
const { data, payList, ctl } = useContext(OrderDetailContext)
// 简单流程为24
const processEnum = data.processEnum
useEffect(() => {
// 过滤支付信息 取第一个待支付的id
if(data?.paymentInformationResponses?.length) {
......@@ -50,24 +58,53 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
}
return (
<MellowCard style={{marginTop: 24}} bordered={false}>
<Tabs defaultActiveKey='1' onChange={onChange}>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
<Row gutter={24} style={{marginTop: 24}}>
<Col span={processEnum === 24 ? 12 : 24}>
<MellowCard bordered={false} fullHeight>
{/* <Row gutter={24}> */}
<Tabs defaultActiveKey='1' onChange={onChange}>
{ data.paymentInformationResponses && data.paymentInformationResponses.map(v => <TabPane key={v.id} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col>
</Row>
</TabPane>) }
</Tabs>
{/* </Row> */}
</MellowCard>
</Col>
{
processEnum === 24 && data &&
<Col span={12}>
<MellowCard title="发货信息" fullHeight>
<Row className={style['card-list']}>
<Col span={6}><p>发货地址: </p></Col>
<Col><p>{data.name}</p></Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{payTextList[v.payWay]}</Col>
<Row className={style['card-list']}>
<Col span={6}><p>发货时间: </p></Col>
<Col><p>{moment(data.deliverTime).format('YYYY-MM-DD')}</p></Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{payList.find(j => j.id === v.channel)?.way || (v.channel === 0 && '积分支付')}</Col>
<Row className={style['card-list']}>
<Col span={6}><p>物流单号: </p></Col>
<Col><p><a href={`https://www.kuaidi100.com/chaxun?nu=${data.deliverNo}`} target="_blank">{data.deliverNo}</a></p></Col>
</Row>
</TabPane>) }
</Tabs>
</MellowCard>
<Row className={style['card-list']}>
<Col span={6}><p>物流公司: </p></Col>
<Col><p>{data.logisticsCompany}</p></Col>
</Row>
</MellowCard>
</Col>
}
</Row>
)
}
......
......@@ -259,21 +259,23 @@ export const useElectronicContract = (ctx: ISchemaFormActions | ISchemaFormAsync
params['memberId'] = ctx.getFieldValue('supplyMembersId')
params['memberRoleId'] = ctx.getFieldValue('supplyMembersRoleId')
fetchOrderApi.getOrderWorkFlow(params).then(data => {
// 简单流程并使用电子合同 强行启用电子合同
if(data["processEnum"] === 24 && data["isElectronicContract"]) {
ctx.setFieldState("usingElectronicContracts", state => {
state.visible = true
})
ctx.setFieldValue("processEnum", data["processEnum"])
// ctx.setFieldValue("usingElectronicContracts", data["isElectronicContract"] ? 1 : 0)
}
if(data['electronicContractId']) {
fetchOrderApi.createContract({contractTemplateId: data['electronicContractId'], signMemberId: params['memberId'] }).then(_data => {
if(params['memberId'] && params['memberRoleId']) {
fetchOrderApi.getOrderWorkFlow(params).then(data => {
// 简单流程并使用电子合同 强行启用电子合同
if(data["processEnum"] === 24 && data["isElectronicContract"]) {
ctx.setFieldState("usingElectronicContracts", state => {
state.props["x-component-props"].contract = { contractTemplateId: data['electronicContractId'], ..._data, }
state.visible = true
})
})
}
})
ctx.setFieldValue("processEnum", data["processEnum"])
// ctx.setFieldValue("usingElectronicContracts", data["isElectronicContract"] ? 1 : 0)
}
if(data['electronicContractId']) {
fetchOrderApi.createContract({contractTemplateId: data['electronicContractId'], signMemberId: params['memberId'] }).then(_data => {
ctx.setFieldState("usingElectronicContracts", state => {
state.props["x-component-props"].contract = { contractTemplateId: data['electronicContractId'], ..._data, }
})
})
}
})
}
}
......@@ -3,8 +3,6 @@ import { PayInfoCell, EditableRow } from '../components/payInfoTableCell'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { useEffect, useState, useRef, useContext } from 'react'
import { PublicApi } from '@/services/api'
import { ReadyAddOrderDetailContext } from '../../context'
import { message } from 'antd'
export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions, memberId: any, memberRoleId: any, orderProducts: any): any => {
const paywayData = useRef<any>({})
......@@ -148,7 +146,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
if(options.filter(_item => _item.payType === 4).length)
options.filter(_item => _item.payType === 4)[0].disabled = false
}
} , 500)
} , 800)
setTimeout(() => {
if(pros.filter(item => item.deliveryType === 1).length !== pros.length) {
......@@ -161,7 +159,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
}
} , 800)
console.log(newColumns, 'newColumns')
setColumns(newColumns)
}
}
......
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