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

fix:

parent 0193fc94
......@@ -145,21 +145,6 @@ export const ORDER_TYPE = ['',
'采购竞价合同',
]
// 订单类型映射-Object形式
export const OrderTypeMap = {
1: "询价采购",
2: "需求采购",
3: "现货采购",
4: "集采",
5: "渠道直采",
6: "渠道现货",
7: "积分兑换",
8: "渠道积分兑换",
9: "采购询价合同下单",
10: "采购招标合同下单",
11: "采购竞价合同下单"
}
// 下单模式 *NEW
export enum OrderModalType {
......@@ -204,87 +189,6 @@ export enum OrderKindType {
}
/** 订单外部显示文案 */
export const PurchaseOrderOutWorkStateTexts = {
"-1": "取消订单",
// 0: '订单完成',
1: '待提交订单',
2: '待确认订单',
3: '待确认电子合同',
4: '订单待支付',
5: '待确认支付结果',
6: '待新增销售发货单',
7: '待新增物流单',
8: '订单发货待确认',
9: '待新增采购入库单',
10: '订单收货待确认',
11: '待确认回单',
12: '待归档',
13: '待归档',
14: '完成订单',
20: '不接受订单',
21: '确认没到账',
22: '待新增销售发货单',
23: '待支付尾款',
24: '待确认支付结果',
25: '确认未到账',
}
/** 采购订单内部 */
export const PurchaseOrderInsideWorkStateTexts = {
"-1": '取消订单',
0: '订单完成',
1: '待新增采购订单',
2: '待审核订单(一级)',
3: '待审核订单(二级)',
4: '待提交订单',
5: '审核通过',
6: '提交审核订单不通过(一级)',
7: '提交审核订单不通过(二级)',
8: '待支付订单',
10: '支付成功',
11: '支付失败',
12: '待确认收货',
14: '订单待入库',
15: '订单待归档',
16: '订单入库待审核',
17: '待手工收货',
18: '已确认收货',
19: '已归档',
20: '待确认电子合同',
}
/** 销售订单内部显示文案 */
export const SaleOrderInsideWorkStateTexts = {
0: '订单完成',
1: '待审核订单',
2: '待审核订单(一级)',
3: '待审核订单(二级)',
4: '待确认订单',
5: '接受订单',
6: '不接受订单',
7: '提交审核订单不通过(一级)',
8: '提交审核订单不通过(二级)',
9: '不接受订单',
10: '待确认支付结果',
16: '支付结果确认到账',
17: '支付结果没到账',
18: '待新增销售发货单',
19: '待新增物流单',
20: '订单发货待确认',
23: '待确认回单',
24: '待归档',
25: '待审核发货单',
26: '待确认物流单',
27: '待手工发货',
28: '不接受物流单',
29: '订单已归档',
30: '已手工发货',
31: '已确认发货',
32: '已确认回单',
33: '已归档',
}
/* 采购订单外部工作流状态 */
......@@ -628,108 +532,3 @@ export enum PayOutWorkState {
CONFIRM_ACCOUNT,
CONFIRM_NOT_ACCOUNT
}
/** 订单流转记录外部状态 */
export const OrderTransformOutWorkStateTexts = {
"-1": '取消订单',
0: '订单完成',
1: '待确认',
2: '待确认电子合同',
3: '待支付',
4: '待确认支付结果',
5: '待新增销售发货单',
6: '待新增物流单',
7: '待确认发货订单',
8: '待新增采购入库单',
9: '待确认收货订单',
10: '待确认收货订单',
11: '待确认回单',
12: '待归档',
13: '待归档',
14: '不接受订单',
15: '确认未到账',
16: '待新增采购入库单',
17: '手工确认发货',
}
/** 采购订单流转记录内部状态 */
export const PurchaseOrderTransformInsideWorkStateTexts = {
"-1": '取消订单',
0: '订单完成',
1: '待提交审核',
2: '提交审核通过',
3: '审核通过(一级)',
4: '审核通过(二级)',
5: '审核通过',
6: '已确认电子合同',
7: '审核不通过(一级)',
8: '审核不通过(二级)',
9: '支付成功',
10: '支付失败',
11: '已审核采购入库单',
12: '已确认收货',
13: '订单归档完成',
14: '修改订单',
15: '手工收货'
}
/** 销售订单流转记录内部状态 */
export const SaleOrderTransformInsideWorkStateTexts = {
"-1": '取消订单',
0: '完成订单',
1: '审核通过',
2: '审核通过(一级)',
3: '审核通过(二级)',
4: '接受订单',
5: '确认到账',
6: '已审核销售发货单',
7: '接受物流单',
8: '已确认发货',
9: '已确认回单',
10: '已归档',
11: '审核不通过(一级)',
12: '审核不通过(二级)',
13: '不接受订单',
14: '确认未到账',
15: '审核不通过',
16: '不接受物流单',
17: '审核不通过',
}
export const PayOutWorkStateTexts = {
1: '待支付',
2: '待确认支付结果',
3: '确认到账',
4: '确认未到账'
}
/** 收货/发货内部状态文案 */
export const DeliverySideStateTexts = {
1: '新增销售发货单',
2: '待确认发货订单',
3: '待新增入库单', // 采购-新增入库单
4: '待确认收货订单',
5: '待回单订单',
6: '已回单',
}
/** 询价外部状态 */
export const InquiryStateTexts = {
1: '待提交',
2: '待确认',
3: '接受报价',
4: '不接受报价',
}
......@@ -53,7 +53,7 @@ const AddDirectChannel:React.FC<{}> = (props) => {
params.parentMemberId = productSelectRowInStore.memberId
params.parentMemberName = productSelectRowInStore.memberName
params.childMemberRoleName = selectedRole?.children || null
params.commodityMemberList = selectChannel.map(item => ({ memberId: item.memberId, memberName: item.name }))
params.commodityMemberList = selectChannel?.length ? selectChannel.map(item => ({ memberId: item.memberId, memberName: item.name })) : []
params.source = productSourceInStore
if(!tableDataInSetPrice.length){
......@@ -73,10 +73,12 @@ const AddDirectChannel:React.FC<{}> = (props) => {
setIsDisabledSave(false)
}
}).catch(_e => {
console.log(_e)
setIsDisabledSave(false)
message.error(_e.errorFields[0].errors[0] || '请完善渠道商品必填信息!')
})
} catch (e) {
console.log(e)
setIsDisabledSave(false)
message.error(e.message || '请完善相关信息!')
}
......
import React from 'react'
import { Tag } from 'antd'
import {
PurchaseOrderInsideWorkStateTexts,
PurchaseOrderOutWorkStateTexts,
SaleOrderInsideWorkStateTexts,
PayOutWorkStateTexts,
DeliverySideStateTexts,
InquiryStateTexts,
OrderTransformOutWorkStateTexts,
PurchaseOrderTransformInsideWorkStateTexts,
SaleOrderTransformInsideWorkStateTexts
} from '@/constants/order'
export interface IStatusColor {
[key: string]: {
......@@ -94,28 +83,12 @@ const matchStatusColor = (status: number): string => {
// 默认返回错误的状态颜色
return maps[status] || StatusColorsMaps.error
}
const typeMaps = {
'out': PurchaseOrderOutWorkStateTexts,
'inside': PurchaseOrderInsideWorkStateTexts,
'saleInside': SaleOrderInsideWorkStateTexts,
'payOut': PayOutWorkStateTexts,
'deliveInside': DeliverySideStateTexts,
'inquiry': InquiryStateTexts,
'transformOut': OrderTransformOutWorkStateTexts,
'transformInside': PurchaseOrderTransformInsideWorkStateTexts,
'transformSaleInside': SaleOrderTransformInsideWorkStateTexts
}
// 订单内部状态显示
const StatusColors:React.FC<StatusColorsProps> = (props) => {
const { status, type, text = null } = props
const statusText = typeMaps[type]
const statusShowColor = matchStatusColor(status)
// 单独处理支付比例 确认到账的状态颜色
if(type === 'payOut' && status === 3) {
return (<Tag color="#41CC9E">{statusText[status]}</Tag>)
}
return (<Tag color={statusShowColor}>{text ? text : statusText[status]}</Tag>)
return (<Tag color={statusShowColor}>{text}</Tag>)
}
StatusColors.defaultProps = {}
......
......@@ -12,7 +12,6 @@ import ModalTable from '@/components/ModalTable'
import { formatTimeString } from '@/utils'
import {
OrderKindType,
SaleOrderInsideWorkStateTexts
} from '@/constants/order'
import { AddressPop } from '../addressPop'
......@@ -308,7 +307,7 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
const warehouseRef = useRef<any>({})
// 判断是否可操作当前表格
const isEditData = SaleOrderInsideWorkStateTexts[data.purchaseOrderInteriorState] === '待审核订单'
const isEditData = false
const productComponents = {
body: {
row: EditableRow,
......
......@@ -102,75 +102,3 @@ export const getPurchaseOrderReadyAddPageSelectOption = () => {
return state
}
// **以下*即将弃用*** //
// **以下*即将弃用*** //
// **以下*即将弃用*** //
// **以下*即将弃用*** //
// **以下*即将弃用*** //
/** 获取订单类型映射 */
export const getOrderType = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getOrderTypeOrderList({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 采购订单内部状态 */
export const getPurchaseOrderInsideWorkState = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getOrderInteriorStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 采购订单外部状态 */
export const getPurchaseOrderOutWorkState = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getOrderExternalStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 销售订单内部状态 */
export const getSaleOrderInsideWorkState = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getOrderSaleInteriorStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import React from 'react'
import { Tag } from 'antd'
import {
PurchaseOrderInsideWorkStateTexts,
PurchaseOrderOutWorkStateTexts,
SaleOrderInsideWorkStateTexts
} from '@/constants/order'
export interface IStatusColor {
[key: string]: {
......@@ -89,19 +84,13 @@ const matchStatusColor = (status: number): string => {
// 默认返回错误的状态颜色
return maps[status] || StatusColorsMaps.error
}
const typeMaps = {
'out': PurchaseOrderOutWorkStateTexts,
'inside': PurchaseOrderInsideWorkStateTexts,
'saleInside': SaleOrderInsideWorkStateTexts
}
// 订单内部状态显示
const StatusColors: React.FC<StatusColorsProps> = (props) => {
const { status, type, text = null } = props
const statusText = typeMaps[type]
const statusShowColor = matchStatusColor(status)
// 优先显示 后端返回的状态文本
return (<Tag color={statusShowColor}>{ text ? text : statusText[status] }</Tag>)
return (<Tag color={statusShowColor}>{ text }</Tag>)
}
StatusColors.defaultProps = {}
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { OrderTypeMap } from '@/constants/order';
import { getOrderType } from '@/pages/transaction/effect';
// import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -48,10 +46,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import React from 'react'
import { formatTimeString } from '@/utils'
import { Row } from 'antd'
import { DELIVERY_TYPE, OrderModalType, PurchaseOrderOutWorkStateTexts } from '@/constants/order'
import { DELIVERY_TYPE, OrderModalType } from '@/constants/order'
import moment from 'moment'
import { GlobalConfig } from '@/global/config';
import { AddressPop } from '@/pages/transaction/components/addressPop'
......@@ -114,14 +114,6 @@ export const orderCombination = {
OrderModalType.CHANNEL_SPOT_PURCHASE_ORDER,
OrderModalType.CHANNEL_SPOT_MANUAL_ORDER
],
// 企业个人会员专属下单类型
individualsMemberOrderModal: [
OrderModalType.PURCHASE_ORDER,
OrderModalType.HAND_ORDER,
OrderModalType.INQUIRY_QUOTATION_ORDER,
OrderModalType.DEMAND_QUOTATION_ORDER,
OrderModalType.CONSOLIDATED_ORDER,
]
}
......@@ -301,7 +293,6 @@ export const paymentInformationColumns: any[] = [
dataIndex: 'externalState',
// align: 'center',
key: 'externalState',
render: text => PurchaseOrderOutWorkStateTexts[text]
},
{
title: '支付比例',
......
import React from 'react'
import { formatTimeString } from '@/utils'
import { Row } from 'antd'
import { DELIVERY_TYPE, OrderModalType, PurchaseOrderOutWorkStateTexts } from '@/constants/order'
import { DELIVERY_TYPE, OrderModalType } from '@/constants/order'
import { AddressPop } from '@/pages/transaction/components/addressPop'
// 简单控制价格区间的组件
......@@ -169,7 +169,6 @@ export const paymentInformationColumns: any[] = [
title: '外部状态',
dataIndex: 'externalState',
key: 'externalState',
render: text => PurchaseOrderOutWorkStateTexts[text]
},
{
title: '支付比例',
......
......@@ -79,7 +79,7 @@ const ContractModalTable:React.FC<ContractModalTableProps> = (props) => {
temp.brand = v.brand;
temp.unit = v.unit;
temp.relevanceProductId = v.associatedDataId;
temp.relevanceProductName = v.associatedGoods;
temp.relevanceProductName = v.associatedMaterielName;
temp.relevanceProductNo = v.associatedMaterielNo;
temp.relevanceProductType = v.associatedType;
temp.relevanceProductCategory = v.associatedCategory;
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
......@@ -48,7 +48,6 @@ const ReadyConfirmContract: React.FC = () => {
</Button>
<div style={{ textAlign: 'right' }}>
<p style={{ marginTop: 12, fontSize: 12, color: '#6B778C' }}>本次需支付</p>
{/* { formContext.data && <p>¥{formContext.data.sumPrice}</p> } */}
{ formContext.data && <p>{ renderPayPrice() }</p> }
</div>
</>
......
......@@ -14,7 +14,6 @@ import {
} from 'bizcharts';
import Interval from 'bizcharts/lib/geometry/Interval'
import DataSet from "@antv/data-set";
import { getOrderType } from '@/pages/transaction/effect'
// 圆形环状金额显示
const CircleChart = props => {
......@@ -51,15 +50,6 @@ const CircleChart = props => {
// 业务hooks, 待支付订单
export const useSelfTable = () => {
const ref = useRef<any>({})
const OrderType = getOrderType()
const handleCancel = (param) => {
PublicApi.postOrderPurchaseOrderCancel({id: param}).then(res => {
if(res.code === 1000) {
ref.current.reload()
}
})
}
const payOrderColumns: any[] = [
{
......@@ -69,7 +59,7 @@ export const useSelfTable = () => {
key: 'orderNo',
render: (text, record) => {
return (
<EyePreview url={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/preview?id=${record.id}`}>
<EyePreview url={`/memberCenter/tranactionAbility/purchaseOrder/readyPayOrder/preview?id=${record.orderId}`}>
{text}
</EyePreview>
)
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +45,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getOrderType } from '@/pages/transaction/effect';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: any = () => {
const OrderType = getOrderType()
// const OrderType = getOrderType()
return {
type: 'object',
......@@ -47,10 +42,11 @@ export const tableListSchema: any = () => {
"x-component-props": {
placeholder: '请选择订单类型'
},
enum: OrderType.map(item => ({
label: item['name'],
value: item['status'],
}))
// enum: OrderType.map(item => ({
// label: item['name'],
// value: item['status'],
// }))
enum: []
},
"[startCreateTime,endCreateTime]": {
type: 'array',
......
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