Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
1d55dffe
Commit
1d55dffe
authored
Nov 09, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代客下单样式变更
parent
9ef24f6f
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
200 additions
and
462 deletions
+200
-462
index.ts
src/components/ModalTable/schema/index.ts
+1
-1
constant.ts
src/pages/transaction/_public/order/constant.ts
+8
-33
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+0
-32
index.ts
...transaction/purchaseOrder/orderCollectB2b/schema/index.ts
+1
-0
index.tsx
...saction/purchaseOrder/orderCollectCash/constant/index.tsx
+0
-64
index.tsx
...ages/transaction/purchaseOrder/orderCollectCash/index.tsx
+1
-2
index.ts
...ransaction/purchaseOrder/orderCollectCash/schema/index.ts
+2
-0
index.tsx
...ollectRequisition/components/contractModalTable/index.tsx
+0
-1
index.tsx
.../purchaseOrder/orderCollectRequisition/constant/index.tsx
+2
-56
index.tsx
...ansaction/purchaseOrder/orderCollectRequisition/index.tsx
+1
-2
useMaterialTable.tsx
...eOrder/orderCollectRequisition/model/useMaterialTable.tsx
+3
-3
index.tsx
...nsaction/purchaseOrder/orderCollectSrm/constant/index.tsx
+0
-31
index.ts
...transaction/purchaseOrder/orderCollectSrm/schema/index.ts
+1
-0
index.tsx
...n/saleOrder/agentOrder/components/selectAddress/index.tsx
+21
-12
index.less
...saleOrder/agentOrder/components/theInvoiceList/index.less
+15
-3
index.tsx
.../saleOrder/agentOrder/components/theInvoiceList/index.tsx
+17
-7
index.tsx
...pages/transaction/saleOrder/agentOrder/constant/index.tsx
+0
-64
index.tsx
src/pages/transaction/saleOrder/agentOrder/index.tsx
+28
-33
index.ts
src/pages/transaction/saleOrder/agentOrder/schema/index.ts
+98
-117
index.tsx
src/pages/transaction/saleOrder/index.tsx
+1
-1
No files found.
src/components/ModalTable/schema/index.ts
View file @
1d55dffe
...
...
@@ -1125,7 +1125,7 @@ export const requisitionSchema: ISchema = {
}
},
},
"[start
Time, endTim
e]"
:
{
"[start
Date, endDat
e]"
:
{
type
:
'daterange'
,
'x-component-props'
:
{
placeholder
:
[
'预交开始时间'
,
'预交结束时间'
],
...
...
src/pages/transaction/_public/order/constant.ts
View file @
1d55dffe
import
{
getPurchaseOrderSelectOption
,
getSaleOrderSelectOption
}
from
'./../../effect/index'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
export
const
orderTypeLabel
=
[
''
,
'询价采购'
,
'需求采购'
,
'现货采购'
,
'集采'
,
'渠道直采'
,
'渠道现货'
,
'积分兑换'
,
'渠道积分兑换'
,
'采购询价合同下单'
,
'采购招标合同下单'
,
'采购竞价合同下单'
,
]
/**
* 销售订单状态枚举
*/
export
enum
SALE_ORDER_STATUS
{
PREVIEW_ORDER
=
-
1
,
READY_APPROVED_ORDER
,
ONE_LEVEL_APPROVED_ORDER
,
TWO_LEVEL_APPROVED_ORDER
,
CONFIRM_ORDER
,
CONFIRM_PAY_RESULT_ORDER
,
ADD_SALE_ORDER
,
ADD_LOG_ORDER
,
CONFIRM_DELIVE_GOODS_ORDER
,
CONFIRM_RETURN_ORDER
,
RETURN_DOCUMENT_ORDER
}
/**
* 采购订单高级筛选 公用
*/
...
...
@@ -156,7 +124,7 @@ export const tableListSchema: any = () => {
/**
* 销售订单高级筛选
公用
* 销售订单高级筛选
销售订单查询
*/
export
const
saleTableListSchema
:
any
=
()
=>
{
...
...
@@ -183,6 +151,13 @@ export const tableListSchema: any = () => {
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
1d55dffe
...
...
@@ -137,38 +137,6 @@ export const orderTypeLabelMap = {
'14'
:
'采购招标合同'
,
}
// 支付方式
export
const
payTypeLabel
=
[
{
label
:
'线上支付'
,
value
:
1
},
{
label
:
'线下支付'
,
value
:
2
},
{
label
:
'授信支付'
,
value
:
3
},
{
label
:
'货到付款'
,
value
:
4
},
{
label
:
'账期'
,
value
:
5
},
{
label
:
'月结'
,
value
:
6
},
{
label
:
'合同内清算'
,
value
:
7
},
]
export
const
memberColumns
:
any
[]
=
[
{
title
:
'会员ID'
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/schema/index.ts
View file @
1d55dffe
...
...
@@ -188,6 +188,7 @@ export const orderProduct: ISchema = {
products
:
{
type
:
'array'
,
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'id'
,
columns
:
"{{productColumns}}"
,
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/constant/index.tsx
View file @
1d55dffe
import
React
from
'react'
import
{
formatTimeString
}
from
'@/utils'
import
{
Row
}
from
'antd'
import
{
OrderModalType
}
from
'@/constants/order'
import
{
AddressPop
}
from
'@/pages/transaction/components/addressPop'
// 简单控制价格区间的组件
...
...
@@ -119,69 +118,6 @@ export const procurementProcessField = (value) => {
}
/***********控制订单模式联动其他字段的数组集合 *******/
export
const
orderCombination
=
{
// 是否显示报价单字段
showQuotationField
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示报价单按钮
showQuotationSelectBtn
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示采购合同字段
showPurchaseContractField
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
// 是否显示选择采购合同按钮
showPurchaseContractBtn
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
}
export
const
orderTypeLabelMap
=
{
'3'
:
'询价采购'
,
'12'
:
'采购询价合同'
,
'13'
:
'采购竞价合同'
,
'14'
:
'采购招标合同'
,
}
// 支付方式
export
const
payTypeLabel
=
[
{
label
:
'线上支付'
,
value
:
1
},
{
label
:
'线下支付'
,
value
:
2
},
{
label
:
'授信支付'
,
value
:
3
},
{
label
:
'货到付款'
,
value
:
4
},
{
label
:
'账期'
,
value
:
5
},
{
label
:
'月结'
,
value
:
6
},
{
label
:
'合同内清算'
,
value
:
7
},
]
export
const
memberColumns
:
any
[]
=
[
{
title
:
'会员ID'
,
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/index.tsx
View file @
1d55dffe
...
...
@@ -7,7 +7,7 @@ import { SaveOutlined, PlusOutlined, LinkOutlined } from '@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
{
mergeAllSchemas
}
from
'./schema'
import
{
useEditHideField
,
useOrderDeliverTimeEffect
,
useOrderFormInitEffect
,
useProductTableChangeForPay
}
from
'./effects'
import
{
orderCombination
,
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
{
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
ProductModalTable
from
'./components/productModalTable'
import
CirculationRecord
from
'../components/circulationRecord'
import
SelectAddress
from
'./components/selectAddress'
...
...
@@ -458,7 +458,6 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = () => {
productAddButton
,
productComponents
,
couponAddButton
,
orderCombination
,
addNewAddress
,
CirculationRecord
:
<
CirculationRecord
/>,
help
,
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/schema/index.ts
View file @
1d55dffe
...
...
@@ -130,6 +130,7 @@ const basicInfo: ISchema = {
}
}
// 订单商品
export
const
orderProduct
:
ISchema
=
{
"x-index"
:
2
,
...
...
@@ -143,6 +144,7 @@ export const orderProduct: ISchema = {
products
:
{
type
:
'array'
,
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'id'
,
columns
:
"{{productColumns}}"
,
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/components/contractModalTable/index.tsx
View file @
1d55dffe
...
...
@@ -19,7 +19,6 @@ const RequisitionModalTable:React.FC<RequisitionModalTableProps> = (props) => {
const
{
type
=
'radio'
,
schemaAction
,
confirmModal
,
currentRef
,
...
restProps
}
=
props
const
{
visible
,
setVisible
,
rowSelection
,
rowSelectionCtl
}
=
useModalTable
({
type
})
useEffect
(()
=>
{
if
(
currentRef
)
{
currentRef
.
current
=
{
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/constant/index.tsx
View file @
1d55dffe
...
...
@@ -46,7 +46,7 @@ export const procurmentRenderInit = (initValue: any) => {
}
}
/** 修改
采购合同
下单 回显商品字段转换 */
/** 修改
请购单
下单 回显商品字段转换 */
export
const
procurementRenderField
=
(
data
)
=>
{
const
_orderProductRequests
=
data
.
product
.
products
return
_orderProductRequests
.
map
(
item
=>
{
...
...
@@ -71,29 +71,7 @@ export const procurementProcessField = (value) => {
return
value
}
/***********控制订单模式联动其他字段的数组集合 *******/
export
const
orderCombination
=
{
// 是否显示报价单字段
showQuotationField
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示报价单按钮
showQuotationSelectBtn
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示采购合同字段
showPurchaseContractField
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
// 是否显示选择采购合同按钮
showPurchaseContractBtn
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
}
export
const
orderTypeLabelMap
=
{
...
...
@@ -103,38 +81,6 @@ export const orderTypeLabelMap = {
'14'
:
'采购招标合同'
,
}
// 支付方式
export
const
payTypeLabel
=
[
{
label
:
'线上支付'
,
value
:
1
},
{
label
:
'线下支付'
,
value
:
2
},
{
label
:
'授信支付'
,
value
:
3
},
{
label
:
'货到付款'
,
value
:
4
},
{
label
:
'账期'
,
value
:
5
},
{
label
:
'月结'
,
value
:
6
},
{
label
:
'合同内清算'
,
value
:
7
},
]
export
const
memberColumns
:
any
[]
=
[
{
title
:
'会员ID'
,
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/index.tsx
View file @
1d55dffe
...
...
@@ -7,7 +7,7 @@ import { SaveOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
{
orderAddSchema
}
from
'./schema'
import
{
useModelTypeChange
,
useEditHideField
,
useOrderFormInitEffect
,
useProductTableChangeForPay
}
from
'./effects'
import
{
order
Combination
,
order
TypeLabelMap
,
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
{
orderTypeLabelMap
,
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
CirculationRecord
from
'../components/circulationRecord'
import
SelectAddress
from
'./components/selectAddress'
import
TheInvoiceList
from
'./components/theInvoiceList'
...
...
@@ -354,7 +354,6 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
materialColumns
,
materialAddButton
,
materialComponents
,
orderCombination
,
addNewAddress
,
CirculationRecord
:
<
CirculationRecord
/>,
help
,
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/model/useMaterialTable.tsx
View file @
1d55dffe
...
...
@@ -60,13 +60,13 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
return
tempColumn
})
const
handleShowMaterial
=
()
=>
{
const
supplyMembersId
=
ctx
.
getFieldValue
(
'vendorMember
Id'
)
const
requisitionId
=
ctx
.
getFieldValue
(
'requisition
Id'
)
const
products
=
ctx
.
getFieldValue
(
'products'
)
if
(
supplyMembers
Id
)
{
if
(
requisition
Id
)
{
materialRef
.
current
.
setVisible
(
true
)
materialRef
.
current
.
rowSelectionCtl
.
setSelectedRowKeys
(()
=>
products
.
map
(
item
=>
item
.
productId
))
}
else
{
message
.
error
(
'请先选择
采购询价合同
'
)
message
.
error
(
'请先选择
请购单
'
)
}
}
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/constant/index.tsx
View file @
1d55dffe
...
...
@@ -122,37 +122,6 @@ export const orderTypeLabelMap = {
'14'
:
'采购招标合同'
,
}
// 支付方式
export
const
payTypeLabel
=
[
{
label
:
'线上支付'
,
value
:
1
},
{
label
:
'线下支付'
,
value
:
2
},
{
label
:
'授信支付'
,
value
:
3
},
{
label
:
'货到付款'
,
value
:
4
},
{
label
:
'账期'
,
value
:
5
},
{
label
:
'月结'
,
value
:
6
},
{
label
:
'合同内清算'
,
value
:
7
},
]
export
const
memberColumns
:
any
[]
=
[
{
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/schema/index.ts
View file @
1d55dffe
...
...
@@ -167,6 +167,7 @@ export const orderMaterial: ISchema = {
products
:
{
type
:
'array'
,
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'materialId'
,
columns
:
"{{materialColumns}}"
,
...
...
src/pages/transaction/saleOrder/agentOrder/components/selectAddress/index.tsx
View file @
1d55dffe
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useRef
}
from
'react'
import
styled
from
'styled-components'
import
{
ISchemaF
ormProps
,
ISchemaFieldProps
,
ISchemaFieldComponentProps
,
createFormAction
s
,
useFieldState
}
from
'@formily/antd'
import
{
ISchemaF
ieldComponentProp
s
,
useFieldState
}
from
'@formily/antd'
import
{
Button
,
Space
,
Row
,
Col
,
Tag
}
from
'antd'
import
{
PlusOutlined
,
DeleteColumnOutlined
,
EditOutlined
,
DeleteOutlined
,
CaretUpOutlined
,
CaretDownOutlined
,
EyeOutlined
}
from
'@ant-design/icons'
import
{
PlusOutlined
,
EditOutlined
,
DeleteOutlined
,
CaretUpOutlined
,
CaretDownOutlined
,
EyeOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
AddressModal
from
'../addressModal'
import
{
fetchOrderApi
}
from
'../../apis'
...
...
@@ -11,7 +11,7 @@ import { PublicApi } from '@/services/api'
const
SelectStyles
=
styled
((
props
)
=>
<
div
className=
'select-list'
{
...
props
}
></
div
>)
`
.select_style_border {
border: 1px solid #EEF0F3;
margin-top: 20px;
//
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
...
...
@@ -115,11 +115,11 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
}
return
(
<
div
style=
{
{
width
:
'100%'
}
}
>
{
editable
&&
<
Button
block
onClick=
{
handleAdd
}
icon=
{
<
PlusOutlined
/>
}
>
新建地址
</
Button
>
}
<
SelectStyles
>
<
div
style=
{
{
width
:
'100%'
}
}
>
{
/* {editable && <Button block onClick={handleAdd} icon={<PlusOutlined />}>新建地址</Button>} */
}
<
SelectStyles
>
<
Row
gutter=
{
[
16
,
16
]
}
style=
{
{
width
:
'100%'
}
}
>
{
showDataSource
.
map
(
v
=>
<
div
key=
{
v
.
id
}
onClick=
{
()
=>
handleCheck
(
v
)
}
className=
{
cx
(
'select_style_border'
,
checkedId
===
v
.
id
?
'active'
:
''
)
}
>
showDataSource
.
map
(
v
=>
<
Col
span=
{
12
}
><
div
key=
{
v
.
id
}
onClick=
{
()
=>
handleCheck
(
v
)
}
className=
{
cx
(
'select_style_border'
,
checkedId
===
v
.
id
?
'active'
:
''
)
}
>
<
div
>
<
Row
style=
{
{
color
:
'#303133'
}
}
>
<
Col
>
{
v
.
receiverName
}
</
Col
>
...
...
@@ -139,11 +139,20 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
<
EyeOutlined
onClick=
{
(
e
)
=>
handleEdit
(
v
,
e
,
'preview'
)
}
/>
}
</
Space
>
</
div
>)
}
</
SelectStyles
>
</
div
></
Col
>)
}
{
editable
&&
<
Col
span=
{
12
}
>
<
div
className=
'select_style_border'
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
borderStyle
:
"dashed"
}
}
onClick=
{
handleAdd
}
>
<
p
style=
{
{
width
:
'100%'
,
textAlign
:
'center'
}
}
><
PlusOutlined
/>
新增地址
</
p
>
</
div
>
</
Col
>
}
</
Row
></
SelectStyles
>
{
transformData
.
length
>
3
&&
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
}
}
>
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
,
color
:
'#00b37a'
}
}
>
显示更多
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
div
>
}
...
...
src/pages/transaction/saleOrder/agentOrder/components/theInvoiceList/index.less
View file @
1d55dffe
...
...
@@ -13,9 +13,9 @@
.invoice_list {
position: relative;
display: flex;
//
display: flex;
margin: 0 -10px;
flex-wrap: wrap;
//
flex-wrap: wrap;
.invoice_list_item {
display: flex;
...
...
@@ -70,6 +70,18 @@
}
}
.select_style_border {
border: 1px solid #EEF0F3;
// display: flex;
// align-items: center;
// justify-content: space-between;
// padding: 8px 14px;
// flex: 1;
// cursor: pointer;
// line-height: 28px;
// position:relative;
}
:global {
span.ant-radio+* {
display: block;
...
...
@@ -82,7 +94,7 @@
align-items: center;
height: 72px;
background-color: #FAFAFA;
margin: 10px;
//
margin: 10px;
padding-left: 16px;
}
...
...
src/pages/transaction/saleOrder/agentOrder/components/theInvoiceList/index.tsx
View file @
1d55dffe
import
React
,
{
useState
,
useRef
}
from
'react'
import
{
ISchemaFieldComponentProps
,
useFieldState
}
from
'@formily/antd'
import
{
Button
,
Radio
}
from
'antd'
import
{
Col
,
Radio
,
Row
}
from
'antd'
import
{
PlusOutlined
,
CaretUpOutlined
,
CaretDownOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
fetchOrderApi
}
from
'../../apis'
...
...
@@ -153,11 +153,12 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
return
(
<
div
style=
{
{
width
:
'100%'
}
}
className=
{
styles
.
invoice
}
>
{
editable
&&
<
Button
block
onClick=
{
handleAdd
}
icon=
{
<
PlusOutlined
/>
}
>
新增发票
</
Button
>
}
{
/* { editable && <Button block onClick={handleAdd} icon={<PlusOutlined/>}>新增发票</Button> } */
}
<
Radio
.
Group
className=
{
styles
.
raido_group
}
value=
{
useValue
}
onChange=
{
e
=>
handleCheck
(
e
)
}
>
<
div
className=
{
styles
.
invoice_list
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
showDataSource
.
map
((
item
,
index
)
=>
(
showDataSource
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
12
}
>
<
Radio
className=
{
styles
.
list_radio
}
value=
{
item
}
key=
{
`address_list_radio_${item?.id}`
}
>
<
div
className=
{
styles
.
invoice_list_item
}
key=
{
`invoice_list_item_${index}`
}
>
<
div
className=
{
styles
.
invoice_list_item_content
}
>
...
...
@@ -186,13 +187,22 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
}
</
div
>
</
Radio
>
))
}
</
Col
>))
}
{
editable
&&
<
Col
span=
{
12
}
>
<
div
className=
{
styles
.
select_style_border
}
style=
{
{
width
:
'100%'
,
height
:
'100%'
,
borderStyle
:
"dashed"
}
}
onClick=
{
handleAdd
}
>
<
p
style=
{
{
width
:
'100%'
,
textAlign
:
'center'
,
fontSize
:
12
,
marginTop
:
14
}
}
><
PlusOutlined
/>
新增发票
</
p
>
</
div
>
</
Col
>
}
</
Row
>
</
div
>
</
Radio
.
Group
>
{
transformData
.
length
>
3
&&
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
}
}
>
<
div
onClick=
{
toogleMore
}
style=
{
{
textAlign
:
'center'
,
cursor
:
'pointer'
,
color
:
'#00b37a'
}
}
>
显示更多
{
showMore
?
<
CaretDownOutlined
/>
:
<
CaretUpOutlined
/>
}
</
div
>
}
...
...
src/pages/transaction/saleOrder/agentOrder/constant/index.tsx
View file @
1d55dffe
import
React
from
'react'
import
{
formatTimeString
}
from
'@/utils'
import
{
Row
}
from
'antd'
import
{
DELIVERY_TYPE
,
OrderModalType
}
from
'@/constants/order'
import
{
AddressPop
}
from
'@/pages/transaction/components/addressPop'
// 简单控制价格区间的组件
...
...
@@ -110,69 +109,6 @@ export const procurementProcessField = (value) => {
}
/***********控制订单模式联动其他字段的数组集合 *******/
export
const
orderCombination
=
{
// 是否显示报价单字段
showQuotationField
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示报价单按钮
showQuotationSelectBtn
:
[
OrderModalType
.
INQUIRY_QUOTATION_ORDER
,
],
// 是否显示采购合同字段
showPurchaseContractField
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
// 是否显示选择采购合同按钮
showPurchaseContractBtn
:
[
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
],
}
export
const
orderTypeLabelMap
=
{
'3'
:
'询价采购'
,
'12'
:
'采购询价合同'
,
'13'
:
'采购竞价合同'
,
'14'
:
'采购招标合同'
,
}
// 支付方式
export
const
payTypeLabel
=
[
{
label
:
'线上支付'
,
value
:
1
},
{
label
:
'线下支付'
,
value
:
2
},
{
label
:
'授信支付'
,
value
:
3
},
{
label
:
'货到付款'
,
value
:
4
},
{
label
:
'账期'
,
value
:
5
},
{
label
:
'月结'
,
value
:
6
},
{
label
:
'合同内清算'
,
value
:
7
},
]
export
const
memberColumns
:
any
[]
=
[
{
title
:
'会员ID'
,
...
...
src/pages/transaction/saleOrder/agentOrder/index.tsx
View file @
1d55dffe
...
...
@@ -9,7 +9,7 @@ import { SaveOutlined, PlusOutlined } from '@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
{
mergeAllSchemas
}
from
'./schema'
import
{
useEditHideField
,
useOrderDeliverTimeEffect
,
useOrderFormInitEffect
,
useProductTableChangeForPay
}
from
'./effects'
import
{
orderCombination
,
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
{
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
ProductModalTable
from
'./components/productModalTable'
import
CirculationRecord
from
'../components/circulationRecord'
import
SelectAddress
from
'./components/selectAddress'
...
...
@@ -29,6 +29,10 @@ import { fectchShopListsSource } from '@/utils/type'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
import
{
fetchOrderApi
}
from
'./apis'
import
{
debounce
}
from
'lodash'
import
{
FormDetailContext
}
from
'@/formSchema/context'
import
FormDetailHeader
from
'@/components/FormDetailHeader'
import
FormDetailWrapper
from
'@/components/FormDetailWrapper'
import
{
useFormDetail
}
from
'@/formSchema/effects/useFormDetail'
export
interface
AgentOrderDetailProps
{}
...
...
@@ -125,10 +129,9 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
const
{
pageStatus
,
id
,
page_type
=
'0'
,
modelType
,
}
=
usePageStatus
()
const
[
initFormSchema
,
setInitFormSchema
]
=
useState
<
any
>
(()
=>
({...
mergeAllSchemas
[
page_type
]
}))
const
[
initFormSchema
,
setInitFormSchema
]
=
useState
<
any
>
(()
=>
({...
mergeAllSchemas
}))
const
[
initFormValue
,
setInitFormValue
]
=
useState
<
any
>
(()
=>
{
let
resultState
=
{}
if
(
modelType
)
{
...
...
@@ -138,6 +141,9 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
}
return
resultState
})
const
{
formContext
}
=
useFormDetail
()
const
[
products
,
setProducts
]
=
useState
<
any
>
([])
const
[
paymentColumns
,
paymentComponents
,
paymentSave
]
=
usePaymentInfo
(
addSchemaAction
,
...
...
@@ -177,7 +183,9 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
const
params
=
{
...
value
}
delete
params
.
product
console
.
log
(
value
,
'value'
)
if
(
formContext
.
innerFormErrors
)
{
throw
new
Error
(
'请完善订单商品数据'
)
}
// 校验是否选择支付渠道/支付比例
if
(
params
.
payments
?.
length
)
{
const
judgementByPay
=
params
.
payments
?.
length
&&
params
.
payments
.
map
(
item
=>
{
...
...
@@ -353,24 +361,11 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
})
const
providerValue
=
{
detailData
:
initFormValue
,
//
detailData: initFormValue,
schemaActions
:
addSchemaAction
,
formContext
,
}
// const handleMemberSearch = (value) => {
// if(value) {
// fetchOrderApi.getMemberConsumeLists({ name: value }).then(data => {
// addSchemaAction.setFieldState('buyerMemberId', state => {
// state.props.enum = data.map(item => ({
// ...item,
// label: `${item.name}/${item.memberTypeName}/${item.roleName}`,
// value: item.memberId,
// }))
// })
// })
// }
// }
const
handleMemberSearch
=
useMemo
(()
=>
{
addSchemaAction
.
setFieldState
(
'buyerMemberMajorId'
,
state
=>
{
state
.
props
[
'x-component-props'
].
notFoundContent
=
<
Spin
size=
"small"
/>
...
...
@@ -392,19 +387,18 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
return
debounce
(
loadOptions
,
800
);
},
[
800
])
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
changeRouterTitleByStatus
()
}
extra
=
{
[
return
(
<
div
style=
{
{
margin
:
-
24
}
}
>
<
FormDetailContext
.
Provider
value=
{
providerValue
}
>
<
FormDetailHeader
title=
{
id
?
"编辑"
:
"新增"
}
schema=
{
initFormSchema
}
extraRight
=
{
[
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>,
]
}
>
<
ReadyAddOrderDetailContext
.
Provider
value=
{
providerValue
}
>
<
Card
className=
{
styles
.
orderCollectCard
}
style=
{
{
marginTop
:
24
}
}
>
/>
<
FormDetailWrapper
>
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
...
...
@@ -463,6 +457,9 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
})
})
// 注入表单完成进度
formContext
.
useAttachmentChangeForContext
(
ctx
)
}
}
expressionScope=
{
{
paymentColumns
:
paymentEditColumns
,
...
...
@@ -471,19 +468,17 @@ const AgentOrderDetail:React.FC<AgentOrderDetailProps> = (props) => {
productAddButton
,
productComponents
,
couponAddButton
,
orderCombination
,
addNewAddress
,
CirculationRecord
:
<
CirculationRecord
/>,
help
,
handleMemberSearch
}
}
/>
</
Card
>
</
FormDetailWrapper
>
</
FormDetailContext
.
Provider
>
<
ProductModalTable
currentRef=
{
productRef
}
schemaAction=
{
addSchemaAction
}
sectionProps=
{
sectionProps
}
forceRender
/>
</
ReadyAddOrderDetailContext
.
Provider
>
</
PageHeaderWrapper
>
)
</
div
>)
}
AgentOrderDetail
.
defaultProps
=
{}
...
...
src/pages/transaction/saleOrder/agentOrder/schema/index.ts
View file @
1d55dffe
...
...
@@ -5,10 +5,10 @@ import styles from '../index.less'
const
basicInfo
:
ISchema
=
{
"x-index"
:
0
,
type
:
'object'
,
"x-component"
:
'
tabpane
'
,
"x-component"
:
'
MellowCard
'
,
"x-component-props"
:
{
t
ab
:
'基本信息'
,
className
:
'useConnectBtnWrapper
'
t
itle
:
'基本信息'
,
id
:
'basicInfo
'
},
properties
:
{
NO_SUBMIT_LAYOUT
:
{
...
...
@@ -16,8 +16,12 @@ const basicInfo: ISchema = {
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
labelAlign
:
'left'
,
wrapperCol
:
10
wrapperCol
:
18
,
labelAlign
:
"left"
,
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
},
properties
:
{
orderModeName
:
{
...
...
@@ -144,18 +148,21 @@ const basicInfo: ISchema = {
}
}
// 订单商品
export
const
orderProduct
:
ISchema
=
{
"x-index"
:
2
,
type
:
'object'
,
"x-component"
:
'
tabpane
'
,
"x-component"
:
'
MellowCard
'
,
"x-component-props"
:
{
tab
:
'订单商品'
title
:
'订单商品'
,
id
:
'orderProducts'
},
properties
:
{
products
:
{
type
:
'array'
,
"x-component"
:
'MultTable'
,
required
:
true
,
"x-component-props"
:
{
rowKey
:
'id'
,
columns
:
"{{productColumns}}"
,
...
...
@@ -174,9 +181,10 @@ export const orderProduct: ISchema = {
export
const
payInfo
:
ISchema
=
{
"x-index"
:
3
,
type
:
'object'
,
"x-component"
:
'
tabpane
'
,
"x-component"
:
'
MellowCard
'
,
"x-component-props"
:
{
tab
:
'支付信息'
,
title
:
'支付信息'
,
id
:
'payInfo'
},
properties
:
{
payments
:
{
...
...
@@ -187,35 +195,31 @@ export const payInfo: ISchema = {
columns
:
"{{paymentColumns}}"
,
components
:
"{{paymentComponents}}"
},
// default: [
// {
// payCount: 1,
// id: 1,
// payRatio: 123
// }
// ]
}
}
}
//
交付
信息
//
送货
信息
const
submitInfo
:
ISchema
=
{
"x-index"
:
1
,
type
:
'object'
,
"x-component"
:
'
tabpane
'
,
"x-component"
:
'
MellowCard
'
,
"x-component-props"
:
{
tab
:
'送货信息'
title
:
'送货信息'
,
id
:
'deliveryInfo'
},
properties
:
{
NO_SUBMIT_LAYOUT_2
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
6
,
labelAlign
:
'left'
,
labelCol
:
2
,
wrapperCol
:
9
,
labelAlign
:
"left"
,
grid
:
true
,
columns
:
2
,
// full: true
full
:
true
,
autoRow
:
true
,
columns
:
1
,
},
properties
:
{
FLEX_LAYOUT_LEFT
:
{
...
...
@@ -228,11 +232,6 @@ const submitInfo: ISchema = {
title
:
'送货时间'
,
required
:
true
,
"x-component-props"
:
{
// disabledDate: current => {
// return current && current < moment().startOf('day')
// },
// showTime: true,
// format: 'YYYY-MM-DD HH:mm',
style
:
{
width
:
400
}
}
},
...
...
@@ -248,14 +247,22 @@ const submitInfo: ISchema = {
},
}
},
FLEX_LAYOUT_RIGHT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
2
,
wrapperCol
:
22
,
},
properties
:
{
deliveryAddresId
:
{
type
:
'string'
,
"x-component"
:
'SelectAddress'
,
//
"x-mega-props": {
//
style: {
//
full: true
//
}
//
},
"x-mega-props"
:
{
style
:
{
full
:
true
}
},
"x-component-props"
:
{
dataSource
:
[],
times
:
0
,
...
...
@@ -269,26 +276,33 @@ const submitInfo: ISchema = {
title
:
'送货地址'
}
}
},
}
}
}
}
//
其他
信息
const
orther
Info
:
ISchema
=
{
//
发票
信息
const
invoice
Info
:
ISchema
=
{
"x-index"
:
4
,
type
:
'object'
,
"x-component"
:
'
tabpane
'
,
"x-component"
:
'
MellowCard
'
,
"x-component-props"
:
{
tab
:
'其他信息'
title
:
'发票信息'
,
id
:
'invoiceInfo'
},
properties
:
{
NO_SUBMIT_LAYOUT_ORTHER
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelAlign
:
'left'
,
labelCol
:
4
,
wrapperCol
:
10
labelCol
:
2
,
wrapperCol
:
9
,
labelAlign
:
"left"
,
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
1
,
},
properties
:
{
hasInvoice
:
{
...
...
@@ -306,10 +320,18 @@ const ortherInfo: ISchema = {
{
type
:
'value:visible'
,
target
:
'theInvoiceId'
,
condition
:
"{{
!!
$value}}"
condition
:
"{{$value}}"
}
]
},
FLEX_LAYOUT_RIGHT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
2
,
wrapperCol
:
22
,
},
properties
:
{
theInvoiceId
:
{
type
:
'number'
,
title
:
' '
,
...
...
@@ -318,11 +340,41 @@ const ortherInfo: ISchema = {
times
:
0
,
}
},
}
},
}
}
}
}
// 其他信息
const
otherInfo
:
ISchema
=
{
"x-index"
:
5
,
type
:
'object'
,
"x-component"
:
'MellowCard'
,
"x-component-props"
:
{
title
:
'其他信息'
,
id
:
'otherInfo'
},
properties
:
{
NO_SUBMIT_LAYOUT_ORTHER
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelCol
:
4
,
wrapperCol
:
18
,
labelAlign
:
"left"
,
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
},
properties
:
{
pack
:
{
type
:
'string'
,
"x-component"
:
'textarea'
,
"x-component-props"
:
{
rows
:
4
rows
:
1
},
title
:
'包装要求'
,
"x-rules"
:
[
...
...
@@ -336,7 +388,7 @@ const ortherInfo: ISchema = {
type
:
'string'
,
"x-component"
:
'textarea'
,
"x-component-props"
:
{
rows
:
4
rows
:
1
},
title
:
'其他要求'
,
"x-rules"
:
[
...
...
@@ -352,91 +404,20 @@ const ortherInfo: ISchema = {
}
// 新增订单详情
export
const
orderDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 一级审核详情
export
const
auditOneSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 新增时使用的schema
export
const
orderAddSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
invoiceInfo
,
otherInfo
,
}
}
// 确认电子合同
export
const
orderElectronicSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
NO_SUBMIT_TABS
:
{
type
:
'object'
,
"x-component"
:
'tab'
,
properties
:
{
basicInfo
,
submitInfo
,
orderProduct
,
payInfo
,
ortherInfo
,
}
}
}
}
// 根据传入的query参数 判断当前使用哪个schema
export
const
mergeAllSchemas
=
{
// 新增订单详情
"-1"
:
orderDetailSchema
,
0
:
orderAddSchema
,
// 一级审核详情
1
:
auditOneSchema
,
// 二级审核详情
2
:
auditOneSchema
,
// 待提交订单详情
3
:
orderDetailSchema
,
// 电子合同详情
4
:
orderElectronicSchema
,
// 订单支付
5
:
orderDetailSchema
...
orderAddSchema
,
}
src/pages/transaction/saleOrder/index.tsx
View file @
1d55dffe
...
...
@@ -43,7 +43,7 @@ const SaleOrder: React.FC<SaleOrderProps> = () => {
const
{
transformRef
,
orderColumns
}
=
useTransformOrderTable
(
transformActions
)
const
{
roles
}
=
getAuth
()
||
{}
const
serversRoles
=
roles
.
filter
(
item
=>
item
[
'roleType'
]
===
MEMBER_ROLE_TYPE_SERVICE_CONSUMER
)
const
{
token
,
memberId
,
memberRoleId
}
=
(
getAuth
()
||
{})
const
{
token
}
=
(
getAuth
()
||
{})
const
fetchParams
=
useRef
<
any
>
({})
const
loadingTableData
=
(
params
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment