Commit 58cf7e14 authored by GuanHua's avatar GuanHua

feat:修改积分商品详情链接问题

parent f1feab42
/*
* 售后能力
* @Author: ghua
* @Date: 2020-10-09 14:26:12
* @Last Modified by: ghua
* @Last Modified time: 2020-10-12 16:23:41
*/
const AfterServiceRoute = {
path: '/memberCenter/afterService',
name: 'afterService',
icon: 'smile',
routes: [
{
// 换货申请
path: '/memberCenter/afterService/exchange',
name: 'exchange',
routes: [
{
// 换货申请单查询
path: '/memberCenter/afterService/exchange/orderList',
name: 'orderList',
component: '@/pages/afterService/exchangeGoods/orderList'
},
{
// 换货申请单查询
path: '/memberCenter/afterService/exchange/orderPreview',
name: 'orderList',
hideInMenu: true,
noMargin: true,
component: '@/pages/afterService/exchangeGoods/orderList/detail'
},
{
// 待提交换货申请单
path: '/memberCenter/afterService/exchange/waitSubmitOrderList',
name: 'waitSubmitOrderList',
component: '@/pages/afterService/exchangeGoods/waitSubmitOrderList'
},
{
// 待新增退货发货单
path: '/memberCenter/afterService/exchange/waitAddReturnOrder',
name: 'waitAddReturnOrder',
},
{
// 待新增物流单
path: '/memberCenter/afterService/exchange/waitAddLogisticsOrder',
name: 'waitAddLogisticsOrder',
},
{
// 待退货发货
path: '/memberCenter/afterService/exchange/returnOrder',
name: 'returnOrder',
},
{
// 待确认退货回单
path: '/memberCenter/afterService/exchange/returnConfirmOrder',
name: 'returnConfirmOrder',
},
{
// 待新增换货入库单
path: '/memberCenter/afterService/exchange/waitAddStorageOrder',
name: 'waitAddStorageOrder',
},
{
// 待换货收货
path: '/memberCenter/afterService/exchange/waitReceiving',
name: 'waitReceiving',
},
{
// 待确认售后完成
path: '/memberCenter/afterService/exchange/waitComfirm',
name: 'waitComfirm',
},
]
},
{
// 换货处理
path: '/memberCenter/afterService/handleExchange',
name: 'handleExchange',
routes: [
{
// 换货申请单查询
path: '/memberCenter/afterService/handleExchange/orderList',
name: 'orderList',
},
{
// 待提交审核换货申请单
path: '/memberCenter/afterService/handleExchange/waitAddExamineOrder',
name: 'waitAddExamineOrder',
},
{
// 待审核换货申请单(一级)
path: '/memberCenter/afterService/handleExchange/waitExamineLevelOne',
name: 'waitExamineLevelOne',
},
{
// 待审核换货申请单(二级)
path: '/memberCenter/afterService/handleExchange/waitExamineLevelTwo',
name: 'waitExamineLevelTwo',
},
{
// 待确认换货申请单
path: '/memberCenter/afterService/handleExchange/waitConfirmExchangeOrder',
name: 'waitConfirmExchangeOrder'
},
{
// 待新增退货入库单
path: '/memberCenter/afterService/handleExchange/waitAddReturnOrder',
name: 'waitAddReturnOrder',
},
{
// 待退货收货
path: '/memberCenter/afterService/handleExchange/waitReturnReceivingOrder',
name: 'waitReturnReceivingOrder',
},
{
// 待新增换货发货单
path: '/memberCenter/afterService/handleExchange/waitSendOutOrder',
name: 'waitSendOutOrder',
},
{
// 待新增物流单
path: '/memberCenter/afterService/handleExchange/waitAddLogisticsOrder',
name: 'waitAddLogisticsOrder',
},
{
// 待换货发货
path: '/memberCenter/afterService/handleExchange/waitSendOut',
name: 'waitSendOut',
},
{
// 待确认换货回单
path: '/memberCenter/afterService/handleExchange/exchangeConfirmOrder',
name: 'exchangeConfirmOrder',
},
]
},
{
// 退货申请
path: '/memberCenter/afterService/return',
name: 'return',
routes: [
{
// 退申请单查询
path: '/memberCenter/afterService/return/orderList',
name: 'orderList',
},
{
// 待提交退货申请单
path: '/memberCenter/afterService/return/waitSubmitOrder',
name: 'waitSubmitOrder',
},
{
// 待退货发货
path: '/memberCenter/afterService/return/waitReturnAndSendOut',
name: 'waitReturnAndSendOut',
},
{
// 待确认退货回单
path: '/memberCenter/afterService/return/waitConfirmOrder',
name: 'waitConfirmOrder',
},
{
// 待确认退款结果
path: '/memberCenter/afterService/return/waitConfirmRefundResult',
name: 'waitConfirmRefundResult',
},
{
// 待确认售后完成
path: '/memberCenter/afterService/return/waitConfirmFinsh',
name: 'waitConfirmFinsh',
},
]
},
{
// 退货处理
path: '/memberCenter/afterService/handleReturn',
name: 'handleReturn',
routes: [
{
// 退申请单查询
path: '/memberCenter/afterService/handleReturn/orderList',
name: 'orderList',
},
{
// 待提交审核退货申请单
path: '/memberCenter/afterService/handleReturn/waitSubmitExamineOrder',
name: 'waitSubmitExamineOrder',
},
{
// 待审核退货申请单(一级)
path: '/memberCenter/afterService/handleReturn/waitExamineLevelOne',
name: 'waitExamineLevelOne',
},
{
// 待审核退货申请单(二级)
path: '/memberCenter/afterService/handleReturn/waitExamineLevelTwo',
name: 'waitExamineLevelTwo',
},
{
// 待确认退货申请单
path: '/memberCenter/afterService/handleReturn/waitConfirmReturn',
name: 'waitConfirmReturn',
},
{
// 待退货收货
path: '/memberCenter/afterService/handleReturn/waitReturnAndReceiving',
name: 'waitReturnAndReceiving',
},
{
// 待退款
path: '/memberCenter/afterService/handleReturn/waitRefund',
name: 'waitRefund',
},
]
},
{
// 维修申请
path: '/memberCenter/afterService/repair',
name: 'repair',
routes: [
{
// 维修申请单查询
path: '/memberCenter/afterService/repair/orderList',
name: 'orderList',
},
{
// 待提交维修申请单
path: '/memberCenter/afterService/repair/waitSubmitOrder',
name: 'waitSubmitOrder',
},
{
// 待确认售后完成
path: '/memberCenter/afterService/repair/waitConfirmFinsh',
name: 'waitConfirmFinsh',
},
]
},
{
// 维修处理
path: '/memberCenter/afterService/handleRepair',
name: 'handleRepair',
routes: [
{
// 维修申请单查询
path: '/memberCenter/afterService/handleRepair/orderList',
name: 'orderList',
},
{
// 待提交审核维修申请单
path: '/memberCenter/afterService/handleRepair/waitSubmitExamineOrder',
name: 'waitSubmitExamineOrder',
},
{
// 待审核维修申请单(一级)
path: '/memberCenter/afterService/handleRepair/waitExamineLevelOne',
name: 'waitExamineLevelOne',
},
{
// 待审核维修申请单(二级)
path: '/memberCenter/afterService/handleRepair/waitExamineLevelTwo',
name: 'waitExamineLevelTwo',
},
{
// 待确认维修申请单
path: '/memberCenter/afterService/handleRepair/waitConfirmOrder',
name: 'waitConfirmOrder',
},
]
},
]
}
export default AfterServiceRoute
\ No newline at end of file
......@@ -12,8 +12,9 @@ import TranactionRoute from './tranactionRoute' // 交易能力路由
import LogisticsRoute from './logisticsRoutes' // 物流能力路由
import PayandSettleRoute from './payandSettle' //支付与结算
import AuthConfigRoute from './authConfigRoute'
import AfterService from './afterServiceRoute' // 售后
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute,PayandSettleRoute ,LogisticsRoute, AuthConfigRoute]
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute]
const memberCenterRoute = {
path: '/memberCenter',
......
......@@ -183,7 +183,7 @@ export default {
'menu.tranactionAbility.saleOrder.readyConfirmDelevedOrder': '待确认发货订单',
'menu.tranactionAbility.saleOrder.readyConfirmReturnOrder': '待确认回单',
'menu.tranactionAbility.saleOrder.readyReturnDocument': '待确认归档',
//需求报价
'menu.tranactionAbility.enquiryOffer': '需求报价',
......@@ -202,10 +202,10 @@ export default {
'menu.tranactionAbility.enquiryOfferConfirm.toSubmit': '待提交审核报价单',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryOne': '待审核报价单(一级)',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryTwo': '待审核报价单(二级)',
'menu.tranactionAbility.enquiryOfferConfirm.viewEnquiryDetail':'报价单详情',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryOfferComfirmSearch':'待确认报价单',
'menu.tranactionAbility.enquiryOfferConfirm.viewEnquiryDetail': '报价单详情',
'menu.tranactionAbility.enquiryOfferConfirm.enquiryOfferComfirmSearch': '待确认报价单',
// 供应商评价
'menu.tranactionAbility.supplierEvaluation': '供应会员评价管理',
'menu.tranactionAbility.supplierEvaluation.unevaluated': '待评价订单',
......@@ -213,7 +213,7 @@ export default {
'menu.tranactionAbility.supplierEvaluation.analysis': '评价统计',
'menu.tranactionAbility.supplierEvaluation.received': '收到的评价',
'menu.tranactionAbility.supplierEvaluation.sent': '发出的评价',
// 采购商评价
'menu.tranactionAbility.purchaserEvaluation': '采购会员评价管理',
'menu.tranactionAbility.purchaserEvaluation.unevaluated': '待评价订单',
......@@ -222,6 +222,61 @@ export default {
'menu.tranactionAbility.purchaserEvaluation.received': '收到的评价',
'menu.tranactionAbility.purchaserEvaluation.sent': '发出的评价',
// 售后能力
'menu.afterService': '售后',
'menu.afterService.exchange': '换货申请',
'menu.afterService.exchange.orderList': '换货申请单查询',
'menu.afterService.exchange.waitSubmitOrderList': '待提交换货申请单',
'menu.afterService.exchange.waitAddReturnOrder': '待新增退货发货单',
'menu.afterService.exchange.waitAddLogisticsOrder': '待新增物流单',
'menu.afterService.exchange.returnOrder': '待退货发货',
'menu.afterService.exchange.returnConfirmOrder': '待确认退货回单',
'menu.afterService.exchange.waitAddStorageOrder': '待新增换货入库单',
'menu.afterService.exchange.waitReceiving': '待换货收货',
'menu.afterService.exchange.waitComfirm': '待确认售后完成',
'menu.afterService.handleExchange': '换货处理',
'menu.afterService.handleExchange.orderList': '换货申请单查询',
'menu.afterService.handleExchange.waitAddExamineOrder': '待提交审核换货申请单',
'menu.afterService.handleExchange.waitExamineLevelOne': '待审核换货申请单(一级)',
'menu.afterService.handleExchange.waitExamineLevelTwo': '待审核换货申请单(二级)',
'menu.afterService.handleExchange.waitConfirmExchangeOrder': '待确认换货申请单',
'menu.afterService.handleExchange.waitAddReturnOrder': '待新增退货入库单',
'menu.afterService.handleExchange.waitReturnReceivingOrder': '待退货收货',
'menu.afterService.handleExchange.waitSendOutOrder': '待新增换货发货单',
'menu.afterService.handleExchange.waitAddLogisticsOrder': '待新增物流单',
'menu.afterService.handleExchange.waitSendOut': '待换货发货',
'menu.afterService.handleExchange.exchangeConfirmOrder': '待确认换货回单',
'menu.afterService.return': '退货申请',
'menu.afterService.return.orderList': '退申请单查询',
'menu.afterService.return.waitSubmitOrder': '待提交退货申请单',
'menu.afterService.return.waitReturnAndSendOut': '待退货发货',
'menu.afterService.return.waitConfirmOrder': '待确认退货回单',
'menu.afterService.return.waitConfirmRefundResult': '待确认退款结果',
'menu.afterService.return.waitConfirmFinsh': '待确认售后完成',
'menu.afterService.handleReturn': '退货处理',
'menu.afterService.handleReturn.orderList': '退申请单查询',
'menu.afterService.handleReturn.waitSubmitExamineOrder': '待提交审核退货申请单',
'menu.afterService.handleReturn.waitExamineLevelOne': '待审核退货申请单(一级)',
'menu.afterService.handleReturn.waitExamineLevelTwo': '待审核退货申请单(二级)',
'menu.afterService.handleReturn.waitConfirmReturn': '待确认退货申请单',
'menu.afterService.handleReturn.waitReturnAndReceiving': '待退货收货',
'menu.afterService.handleReturn.waitRefund': '待退款',
'menu.afterService.repair': '维修申请',
'menu.afterService.repair.orderList': '维修申请单查询',
'menu.afterService.repair.waitSubmitOrder': '待提交维修申请单',
'menu.afterService.repair.waitConfirmFinsh': '待确认售后完成',
'menu.afterService.handleRepair': '维修处理',
'menu.afterService.handleRepair.orderList': '维修申请单查询',
'menu.afterService.handleRepair.waitSubmitExamineOrder': '待提交审核维修申请单',
'menu.afterService.handleRepair.waitExamineLevelOne': '待审核维修申请单(一级)',
'menu.afterService.handleRepair.waitExamineLevelTwo': '待审核维修申请单(二级)',
'menu.afterService.handleRepair.waitConfirmOrder': '待确认维修申请单',
//物流能力
'menu.logisticsAbility': '物流',
'menu.logisticsAbility.logistics': '物流管理',
......@@ -254,7 +309,7 @@ export default {
'menu.payandSettle.creditApplication.quotaFormQuery': '授信申请单查询',
'menu.payandSettle.creditApplication.quotaFormQueryDetail': '授信申请单详情',
'menu.payandSettle.creditApplication.quotaPrSubmit': '待提交授信申请单',
'menu.payandSettle.creditApplication.quotaPrSubmitDetail': '待提交授信申请单详情',
'menu.payandSettle.creditApplication.quotaPrSubmitDetail': '待提交授信申请单详情',
'menu.payandSettle.creditManage': '授信处理',
'menu.payandSettle.creditManage.quotaMenage': '授信额度管理',
'menu.payandSettle.creditManage.quotaMenageDetail': '授信额度管理',
......
import React from 'react'
import { formatTimeString } from '@/utils'
import { ORDER_TYPE } from '@/constants'
import StatusColors from '../components/StatusColors'
import EyePreview from '@/components/EyePreview'
export const baseOrderListColumns: any[] = [
{
title: '申请单号',
align: 'center',
dataIndex: 'applyNo',
key: 'applyNo',
render: (text, record) => {
// 查看订单, 需根据状态显示不同schema
return <EyePreview url={`/`}>
{text}
</EyePreview>
},
ellipsis: true,
},
{
title: '申请单摘要',
align: 'center',
dataIndex: 'applyAbstract',
key: 'applyAbstract',
ellipsis: true,
},
{
title: '供应会员',
align: 'center',
dataIndex: 'supplierName',
key: 'supplierName',
ellipsis: true,
},
{
title: '单据时间',
align: 'center',
dataIndex: 'applyTime',
key: 'applyTime',
render: (text) => formatTimeString(text)
},
{
title: '外部状态',
align: 'center',
dataIndex: 'outerStatus',
key: 'outerStatus',
render: text => <StatusColors status={text} type='out' />
},
{
title: '内部状态',
align: 'center',
dataIndex: 'innerStatus',
key: 'innerStatus',
render: (text) => <StatusColors status={text} type='inside' />
},
]
\ No newline at end of file
:global {
.god-table-control {
margin-bottom: 0;
}
}
\ No newline at end of file
import React from 'react'
const DetailPreView: React.FC = () => {
return (
<div>
</div>
)
}
export default DetailPreView
\ No newline at end of file
.titleAvator {
width: 48px;
height: 48px;
background: rgba(135, 119, 217, 1);
border-radius: 4px;
border: 1px solid rgba(223, 225, 230, 1);
line-height: 48px;
text-align: center;
color: #fff;
font-size: 24px;
margin: 0 24px;
}
.titleAvatorText {
color: #303133;
font-size: 18px;
line-height: 20px;
}
.detailHeader {
background: #fff;
padding: 24px;
}
.detailCol {
display: flex;
margin-top: 20px;
color: #303133;
}
.colLabel {
color: #909399;
margin-right: 16px;
}
\ No newline at end of file
import React, { ReactNode } from 'react'
import { Row, Col } from 'antd'
import { history } from 'umi'
import { ArrowLeftOutlined } from '@ant-design/icons'
import style from './index.less'
export interface OrderDetailHeaderProps {
headerTitle: {
// 图标显示的文字
titleLabel: string,
titleValue: ReactNode,
picName?: string,
} | null,
extraRight?: ReactNode,
detailList?: { label: string, name: string, render?(text, record?), [key: string]: any }[],
detailData?: any
}
/**
* 订单详情头部
*/
const OrderDetailHeader: React.FC<OrderDetailHeaderProps> = ({ headerTitle, extraRight, detailList = [], detailData = {} }) => {
return (
<div className={style.detailHeader}>
<Row>
{
headerTitle &&
<Col>
<Row align='middle'>
<Col>
<ArrowLeftOutlined onClick={() => history.goBack()} />
</Col>
<Col className={style.titleAvator}>{headerTitle.picName}</Col>
</Row>
</Col>
}
<Col style={{ flex: 1 }}>
<Row justify='space-between' align='middle' style={{ paddingTop: 14 }}>
<Col style={{ flex: 1 }}>
<div className={style.titleAvatorText}>{headerTitle.titleLabel}{headerTitle.titleValue}</div>
<Row>
{detailList.map(v => {
const { label, render, name, ...colProps } = v
return <Col key={label} {...colProps} className={style.detailCol}>
<span className={style.colLabel}>{label}:</span>
{render ? render(detailData[name], detailData) : <span>{detailData[name]}</span>}
</Col>
})}
</Row>
</Col>
<Col>{extraRight}</Col>
</Row>
</Col>
</Row>
</div>
)
}
OrderDetailHeader.defaultProps = {}
export default OrderDetailHeader
\ No newline at end of file
.wrapper {
padding: 24px;
}
\ No newline at end of file
import React from 'react'
import style from './index.less'
export interface OrderDetailWrapperProps {}
const OrderDetailWrapper:React.FC<OrderDetailWrapperProps> = (props) => {
return (
<div className={style.wrapper}>{props.children}</div>
)
}
OrderDetailWrapper.defaultProps = {}
export default OrderDetailWrapper
\ No newline at end of file
import React from 'react'
import { Tag } from 'antd'
import { PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkStateTexts, PurchaseOrderInsideWorkState, PurchaseOrderOutWorkState, SaleOrderInsideWorkState, SaleOrderInsideWorkStateTexts } from '@/constants'
export interface IStatusColor {
[key: string]: {
value: string | number,
color: string
}
}
// 用于标签状态控制
export interface StatusColorsProps {
status: number,
type: 'out' | 'inside' | 'saleInside'
}
export enum ORDER_EXAMINE_ENUM {
/**
* 新增订单
*/
ADD_ORDER = 1,
/**
* 一级审核
*/
ONE_LEVEL_VALIDATE,
/**
* 二级审核
*/
TWO_LEVEL_VALIDATE,
/**
* 提交订单中
*/
SUBMIT_ORDER_PROCESS,
/**
* 提交订单成功
*/
SUBMIT_ORDER_SUCCESS,
/**
* 一级审核失败
*/
ONE_LEVEL_VALIDATE_ERROR,
/**
* 二级审核失败
*/
TWO_LEVEL_VALIDATE_ERROR
}
export const ORDER_EXAMINE_LIST = ['',
'新增订单',
'一级审核中',
'二级审核中',
'提交订单',
'提交成功',
'一级审核不通过',
'二级审核不通过'
]
// 状态颜色映射
export const StatusColorsMaps = {
ready: '#C0C4CC',
process: '#FFC400',
submit: '#6C9CEB',
success: '#41CC9E',
error: '#EF6260'
}
const matchStatusColor = (status: number): string => {
const maps = {
[ORDER_EXAMINE_ENUM.ADD_ORDER]: StatusColorsMaps.ready,
[ORDER_EXAMINE_ENUM.ONE_LEVEL_VALIDATE]: StatusColorsMaps.process,
[ORDER_EXAMINE_ENUM.TWO_LEVEL_VALIDATE]: StatusColorsMaps.process,
[ORDER_EXAMINE_ENUM.SUBMIT_ORDER_PROCESS]: StatusColorsMaps.submit,
[ORDER_EXAMINE_ENUM.SUBMIT_ORDER_SUCCESS]: StatusColorsMaps.success
}
const READY_LISTS = [
PurchaseOrderInsideWorkState.CANCEL_ORDER,
PurchaseOrderOutWorkState.CANCEL_ORDER
]
// 默认返回错误的状态颜色
return maps[status] || StatusColorsMaps.error
}
const typeMaps = {
'out': PurchaseOrderOutWorkStateTexts,
'inside': PurchaseOrderInsideWorkStateTexts,
'saleInside': SaleOrderInsideWorkStateTexts
}
// 订单内部状态显示
const StatusColors:React.FC<StatusColorsProps> = (props) => {
const { status, type } = props
const statusText = typeMaps[type]
const statusShowColor = matchStatusColor(status)
return (<Tag color={statusShowColor}>{statusText[status]}</Tag>)
}
StatusColors.defaultProps = {}
export default StatusColors
\ No newline at end of file
import React, { useState } from 'react'
import OrderDetailHeader from '../../components/OrderDetailHeader'
import OrderDetailWrapper from '../../components/OrderDetailWrapper'
const OrderDetail: React.FC = () => {
const [formData, setFormData] = useState<any>({})
const headerTiTle = {
picName: '单',
titleLabel: '申请单号:',
titleValue: 'FPTY12'
}
const detailList = [
{ label: '申请单摘要', name: 'orderThe', span: 8, render: text => '进口头层黄牛皮荔枝纹' },
{ label: '供应会员', name: 'supplyMembersName', span: 8, render: text => '温州隆昌手袋有限公司' },
{ label: '单据时间', name: 'orderModel', span: 8, render: text => '2020-09-09 12:58:25' },
{ label: '外部状态', name: 'type', span: 8, render: text => '售后完成' },
{ label: '内部状态', name: 'createTime', span: 8, render: text => '已确认售后完成' },
]
return (
<div>
<OrderDetailHeader headerTitle={headerTiTle} detailList={detailList} detailData={formData} />
<OrderDetailWrapper>
111
</OrderDetailWrapper>
</div>
)
}
export default OrderDetail
/*
* 换货申请单列表
* @Author: ghua
* @Date: 2020-10-12 11:03:30
* @Last Modified by: ghua
* @Last Modified time: 2020-10-12 14:49:16
*/
import React, { useRef } from 'react'
import { Card, Select, message } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { PurchaseOrderInsideWorkState } from '@/constants'
import styles from '../../common/styles.less'
// 一级待审核订单
export interface ExchangeOrderListProps { }
const fetchTableData = async (params) => {
const { data } = await PublicApi.getAsReplaceGoodsPageByConsumer(params)
return data
}
const ExchangeOrderList: React.FC<ExchangeOrderListProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER)
if (canBitch) {
await PublicApi.postOrderProcurementOrderReviewedAll({ ids: rowSelectionCtl.selectedRowKeys })
ref.current.reload()
} else {
message.error('只能批量提交内部状态为审核中的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
className={styles.noMarBottom}
fetchTableData={params => fetchTableData(params)}
// rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'start'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePicker: DatePicker.RangePicker,
Select,
Submit
}
},
layouts: {
// order: 1,
// span: 16
}
}}
// formilyChilds={{
// children: <Space>
// <Button onClick={handleSubmitBatch}>批量提交审核</Button>
// </Space>,
// layouts: {
// span: 8
// }
// }}
/>
</Card>
</PageHeaderWrapper>
}
ExchangeOrderList.defaultProps = {}
export default ExchangeOrderList
\ No newline at end of file
import React, { useRef } from 'react'
import { baseOrderListColumns } from '../../../common/columns'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
// 业务hooks
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' })
const secondColumns: any[] = baseOrderListColumns
return {
columns: secondColumns,
ref,
rowSelection,
rowSelectionCtl
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
applyNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入申请单号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
"applyAbstract": {
type: 'string',
'x-component-props': {
placeholder: '请输入申请单摘要',
}
},
"supplierName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'daterangepicker',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
},
},
"outerStatus": {
type: 'string',
"x-component": 'Select',
'x-component-props': {
options: [],
style: { width: '180px' },
placeholder: '请选择外部状态'
},
},
"innerStatus": {
type: 'string',
"x-component": 'Select',
'x-component-props': {
options: [],
style: { width: '180px' },
placeholder: '请选择内部状态'
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
\ No newline at end of file
/*
* 待提交换货申请单
* @Author: ghua
* @Date: 2020-10-12 15:03:51
* @Last Modified by: ghua
* @Last Modified time: 2020-10-12 15:04:52
*/
import React, { useRef } from 'react'
import { Card, Select, message, Space, Button } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PublicApi } from '@/services/api'
import { useSelfTable } from './model/useSelfTable'
import { PlusOutlined } from '@ant-design/icons'
import DropDeleteDown from '@/components/DropDeleteDown'
import { tableListSchema } from './schema'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import Submit from '@/components/NiceForm/components/Submit'
import { DatePicker } from '@formily/antd-components'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { PurchaseOrderInsideWorkState } from '@/constants'
import styles from '../../common/styles.less'
// 一级待审核订单
export interface WaitSubmitOrderListProps { }
const fetchTableData = async (params) => {
const { data } = await PublicApi.getAsReplaceGoodsPageToBeSubmitByConsumer(params)
return data
}
const WaitSubmitOrderList: React.FC<WaitSubmitOrderListProps> = (props) => {
const {
columns,
ref,
rowSelection,
rowSelectionCtl
} = useSelfTable()
const handleSubmitBatch = async () => {
if (rowSelectionCtl.selectRow.length === 0) {
message.error('请先勾选订单')
return;
}
const canBitch = !rowSelectionCtl.selectRow.some(v => v.interiorState !== PurchaseOrderInsideWorkState.ONE_LEVEL_AUDIT_ORDER)
if (canBitch) {
await PublicApi.postOrderProcurementOrderReviewedAll({ ids: rowSelectionCtl.selectedRowKeys })
ref.current.reload()
} else {
message.error('只能批量提交内部状态为审核中的订单')
}
}
return <PageHeaderWrapper>
<Card>
<StandardTable
className={styles.noMarBottom}
fetchTableData={params => fetchTableData(params)}
// rowSelection={rowSelection}
columns={columns}
currentRef={ref}
rowKey={'id'}
formilyLayouts={{
justify: 'space-between'
}}
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'applyNo',
FORM_FILTER_PATH,
);
},
components: {
DateRangePicker: DatePicker.RangePicker,
Select,
Submit
}
},
layouts: {
order: 1,
span: 16
}
}}
formilyChilds={{
children: <Space>
<Button onClick={handleSubmitBatch} type="primary" icon={<PlusOutlined />} style={{ width: 112 }}>新建</Button>
</Space>,
layouts: {
span: 8
}
}}
/>
</Card>
</PageHeaderWrapper>
}
WaitSubmitOrderList.defaultProps = {}
export default WaitSubmitOrderList
\ No newline at end of file
import React, { useRef } from 'react'
import { baseOrderListColumns } from '../../../common/columns'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
// 业务hooks
export const useSelfTable = () => {
const ref = useRef<any>({})
const [rowSelection, rowSelectionCtl] = useRowSelectionTable({ customKey: 'id' })
const secondColumns: any[] = baseOrderListColumns.concat([
{
title: '操作',
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <></>
}
])
return {
columns: secondColumns,
ref,
rowSelection,
rowSelectionCtl
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
applyNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入申请单号',
align: 'flex-end',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginLeft: 20
}
},
properties: {
"applyAbstract": {
type: 'string',
'x-component-props': {
placeholder: '请输入申请单摘要',
}
},
"supplierName": {
type: 'string',
"x-component-props": {
placeholder: '请输入供应会员名称'
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'daterangepicker',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
\ No newline at end of file
......@@ -86,6 +86,7 @@ const CommodityDetail = (props) => {
commodityId: id
}
let headers = {}
switch (layoutType) {
case LAYOUT_TYPE.channel:
headers = {
......
......@@ -149,41 +149,46 @@ const Information: React.FC<InformationPropsType> = (props) => {
<div className={styles.information}>
<div className={styles.information_container}>
<BreadCrumbs {...props} />
<div className={styles.information_focus}>
<div className={styles.information_focus_left}>
<Carousel
className={styles.information_focus_carousel}
autoplay={true}
pauseOnDotsHover
autoplaySpeed={3000}
>
{
carouselNews && carouselNews.map((item: any) => (
<div className={styles.information_focus_carousel_item} key={`information_focus_carousel_item_${item.id}`}>
<div className={styles.information_focus_imgbox_main}>
{
(carouselNews.length > 0 || photoNews.length > 0) && (
<div className={styles.information_focus}>
<div className={styles.information_focus_left}>
<Carousel
className={styles.information_focus_carousel}
autoplay={true}
pauseOnDotsHover
autoplaySpeed={3000}
>
{
carouselNews && carouselNews.map((item: any) => (
<div className={styles.information_focus_carousel_item} key={`information_focus_carousel_item_${item.id}`}>
<div className={styles.information_focus_imgbox_main}>
<a href={toDetailLink(item.id)}>
<div className={styles.information_focus_imgbox_main_img} style={{ backgroundImage: `url(${item.imageUrl})` }} />
</a>
<p className={styles.information_focus_imgbox_main_title}>{item.title}</p>
</div>
</div>
))
}
</Carousel>
</div>
<div className={styles.information_focus_right}>
{
photoNews && photoNews.map((item: any, index) => index < 3 && (
<div key={`information_focus_imgbox_sub_${item.id}`} className={index === 0 ? styles.information_focus_imgbox_sub_1 : styles.information_focus_imgbox_sub_2}>
<a href={toDetailLink(item.id)}>
<div className={styles.information_focus_imgbox_main_img} style={{ backgroundImage: `url(${item.imageUrl})` }} />
<div className={index === 0 ? styles.information_focus_imgbox_sub_1_img : styles.information_focus_imgbox_sub_2_img} style={{ backgroundImage: `url(${item.imageUrl})` }} />
</a>
<p className={styles.information_focus_imgbox_main_title}>{item.title}</p>
<p className={styles.information_focus_imgbox_sub_title}>{item.title}</p>
</div>
</div>
))
}
</Carousel>
</div>
<div className={styles.information_focus_right}>
{
photoNews && photoNews.map((item: any, index) => index < 3 && (
<div key={`information_focus_imgbox_sub_${item.id}`} className={index === 0 ? styles.information_focus_imgbox_sub_1 : styles.information_focus_imgbox_sub_2}>
<a href={toDetailLink(item.id)}>
<div className={index === 0 ? styles.information_focus_imgbox_sub_1_img : styles.information_focus_imgbox_sub_2_img} style={{ backgroundImage: `url(${item.imageUrl})` }} />
</a>
<p className={styles.information_focus_imgbox_sub_title}>{item.title}</p>
</div>
))
}
</div>
</div>
))
}
</div>
</div>
)
}
<div className={styles.information_wrap}>
<div className={styles.information_left}>
<div className={styles.information_tabs}>
......
......@@ -14,15 +14,17 @@ interface CommodityListPropsType {
const CommodityList: React.FC<CommodityListPropsType> = (props) => {
const { showType, commodityList = [], layoutType = LAYOUT_TYPE.mall } = props
const getCommodityDetailUrl = () => {
const getCommodityDetailUrl = (item) => {
switch (layoutType) {
case LAYOUT_TYPE.channel:
return "/channelmall"
return `/channelmall/commodity/detail?id=${item.id}&type=${item.priceType}&channelId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`
case LAYOUT_TYPE.ichannel:
return `/ichannelmall/commodity/detail?id=${item.id}&type=${item.priceType}&channelId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`
case LAYOUT_TYPE.mall:
case LAYOUT_TYPE.shop:
return "/shop"
return `/shop/commodity/detail?id=${item.id}&type=${item.priceType}&shopId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`
default:
return ""
return `/commodity/detail?id=${item.id}&type=${item.priceType}&shopId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`
}
}
......@@ -31,7 +33,7 @@ const CommodityList: React.FC<CommodityListPropsType> = (props) => {
{
commodityList.map((item, index) => (
<div key={item.id} className={cx(styles.point_commodity_list_item, styles.row)}>
<a href={`${getCommodityDetailUrl()}/commodity/detail?id=${item.id}&type=${item.priceType}&shopId=${btoa(JSON.stringify({ shopId: item.storeId, memberId: item.memberId }))}`} target="_blank">
<a href={getCommodityDetailUrl(item)} target="_blank">
<div className={styles.goods_img}>
{
item.mainPic ? <img src={item.mainPic} /> : <Skeleton.Image style={{ width: 220, height: 220 }} />
......
......@@ -94,7 +94,7 @@ const typeMaps = {
}
// 订单内部状态显示
const StatusColors:React.FC<StatusColorsProps> = (props) => {
const StatusColors: React.FC<StatusColorsProps> = (props) => {
const { status, type } = props
const statusText = typeMaps[type]
const statusShowColor = matchStatusColor(status)
......
......@@ -14,7 +14,7 @@ export const baseOrderListColumns: any[] = [
render: (text, record) => {
// 查看订单, 需根据状态显示不同schema
return <EyePreview url={`/memberCenter/tranactionAbility/purchaseOrder/orderPreview?page_type=-1&id=${record.id}&preview=1`}>
{text}
{text}
</EyePreview>
},
ellipsis: true,
......@@ -59,13 +59,13 @@ export const baseOrderListColumns: any[] = [
align: 'center',
dataIndex: 'externalState',
key: 'externalState',
render: text => <StatusColors status={text} type='out'/>
render: text => <StatusColors status={text} type='out' />
},
{
title: '内部状态',
align: 'center',
dataIndex: 'interiorState',
key: 'interiorState',
render: (text) => <StatusColors status={text} type='inside'/>
render: (text) => <StatusColors status={text} type='inside' />
},
]
\ No newline at end of file
......@@ -8,6 +8,7 @@ import * as PayApi from './PayApi'
import * as SearchApi from './SearchApi'
import * as OrderApi from './OrderApi'
import * as SettleApi from './SettleApi'
import * as AfterService from './AfterServiceApi'
/**
* 可在这里写入自定义的接口
......@@ -27,5 +28,6 @@ export const PublicApi = {
...PayApi,
...SearchApi,
...OrderApi,
...SettleApi
...SettleApi,
...AfterService
}
......@@ -9,6 +9,7 @@ const tokenList = [
{ name: 'Search', token: 'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48' }, // 搜索服务
{ name: 'Order', token: '31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235' }, //订单服务
{ name: 'Settle', token: 'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a' }, //结算服务
{ name: 'AfterService', token: '39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df' }, // '售后服务'
// { name: '', token: 'c0e920f071595a73ba234b6fa6cfe42192d3d740d59f030caa2c7f0f08777d78' } // 商户会员管理服务
]
......
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