Commit 3ab6693c authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents 53d3b1cb d0a6b161
......@@ -220,6 +220,7 @@ const TabTree: React.FC<TabTreeProps> = props => {
handleCheck,
customExpandkeys,
enableSearch = false,
checkStrictly = false
} = props;
const selfActions = useTreeActions(actions)
......@@ -352,6 +353,7 @@ const TabTree: React.FC<TabTreeProps> = props => {
checkedKeys={selected}
expandedKeys={expandkeys}
autoExpandParent={autoExpandParent}
checkStrictly={checkStrictly}
onExpand={onExpand}
onCheck={(keys, nodes) => {
const { node, checked, checkedNodes } = nodes;
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-29 11:32:18
* @LastEditTime: 2020-12-31 14:29:36
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -472,7 +472,15 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payList:
product.payInfoList ?
product.payInfoList.map(item => {
const { payPrice, payTime, payWay, channel, ...rest } = item;
const {
payPrice,
payTime,
payWay,
channel,
payCode,
ruleConfigurationId,
...rest
} = item;
return {
payAmount: payPrice,
payTime: moment(payTime).format('YYYY-MM-DD HH:mm:ss'),
......@@ -480,6 +488,8 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
channel,
payWayName: PAYWAY[payWay],
channelName: PAY_CHANNEL[channel],
transactionPayId: payCode,
payRuleId: ruleConfigurationId,
...rest,
}
}) :
......
......@@ -86,6 +86,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
title: '下单时间',
dataIndex: 'createTime',
align: 'center',
render: text => moment(text).format('YYYY-MM-DD HH:mm:ss'),
},
{
title: '订单状态',
......
......@@ -210,6 +210,7 @@ const MemberDetail: React.FC<{}> = () => {
actions={treeActions}
treeData={treeData}
handleSelect={handleSelect}
checkStrictly={true}
customKey='id'
disabled={pageStatus === PageStatus.PREVIEW}
/>
......
......@@ -178,7 +178,7 @@
}
.goods_price {
color: var(--mall_main_color);
color: #D32F2F;
line-height: 16px;
display: flex;
font-weight: bold;
......@@ -202,4 +202,4 @@
}
}
}
\ No newline at end of file
}
......@@ -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}>
......
......@@ -39,8 +39,7 @@
&.active {
&>a {
color: #D32F2F;
// color: @mall_main_color;
color: @mall_main_color;
}
}
}
......@@ -66,4 +65,4 @@
}
}
}
}
\ No newline at end of file
}
.mall_index {
background-color: #F4F5F7;
padding-bottom: 52px;
}
\ No newline at end of file
}
......@@ -124,7 +124,7 @@ const LXShopLayout: React.FC<LXMallLayoutPropsType> = (props) => {
updateShopInfo: () => handleUpdate()
},
);
}) : <SearchShopResult search={shopInfo.memberName} /> : null
}) : <SearchShopResult search={shopInfo ? shopInfo.memberName : ''} /> : null
}
</div>
<Footer />
......
......@@ -83,7 +83,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
</div>
<div className={styles.shop_list_goods}>
{
item.commodityList && item.commodityList.map((commodityItem, commodityIndex) => commodityIndex < 2 && (
item.productList && item.productList.map((commodityItem, commodityIndex) => commodityIndex < 2 && (
<Link to={`/shop/commodity/detail?id=${commodityItem.id}&shopId=${btoa(JSON.stringify({ shopId: item.id, memberId: item.memberId }))}`} key={commodityItem.id} target="_blank">
<div className={styles.shop_list_goods_item}>
<div className={styles.shop_list_goods_item_imgbox}>
......
......@@ -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={[
{
......
......@@ -264,6 +264,8 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
});
this.payRecordId = `${res.data.recordId}`;
this.handleWxPayVisible(true);
break;
}
default: {
......
......@@ -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)
}
}
......
// science下的全局变量在此定义
// 企业商城科技模板
.theme-mall-science {
font-size: 14px;
--mall_main_color: #D32F2F;
--mall_main_color_opacity_2: rgba(211, 47, 47, .2);
--mall_sub_color: rgba(211, 47, 47, 0.1);
--category_content_bg: #FFFFFF;
--category_content_title_text: #303133;
--category_content_sub_title_text: #606266;
}
// 渠道科技类模板
.theme-channel-science {
font-size: 14px;
--mall_main_color: #464552;
--mall_sub_color: #FFFFFF;
--category_content_bg: #464552;
--category_content_title_text: #FFFFFF;
--category_content_sub_title_text: rgba(255, 255, 255, 0.45);
}
// 店铺科技类模板颜色配置
.theme-shop-science {
font-size: 14px;
--mall_main_color: #D32F2F;
--mall_sub_color: rgba(211, 47, 47, 0.1);
--category_content_bg: #FFFFFF;
--category_content_title_text: #303133;
--category_content_sub_title_text: #606266;
}
\ No newline at end of file
// science下的全局变量在此定义
// 企业商城科技模板
.theme-mall-science {
font-size: 14px;
--mall_main_color: #00B37A;
--mall_main_color_opacity_2: rgba(211, 47, 47, .2);
--mall_sub_color: rgba(211, 47, 47, 0.1);
--category_content_bg: #FFFFFF;
--category_content_title_text: #303133;
--category_content_sub_title_text: #606266;
}
// 渠道科技类模板
.theme-channel-science {
font-size: 14px;
--mall_main_color: #464552;
--mall_sub_color: #FFFFFF;
--category_content_bg: #464552;
--category_content_title_text: #FFFFFF;
--category_content_sub_title_text: rgba(255, 255, 255, 0.45);
}
// 店铺科技类模板颜色配置
.theme-shop-science {
font-size: 14px;
--mall_main_color: #D32F2F;
--mall_sub_color: rgba(211, 47, 47, 0.1);
--category_content_bg: #FFFFFF;
--category_content_title_text: #303133;
--category_content_sub_title_text: #606266;
}
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