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
b660ccbf
Commit
b660ccbf
authored
Nov 04, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
静态开发中...
parent
1e22e1bb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
644 additions
and
68 deletions
+644
-68
index.tsx
src/components/TableDrawer/index.tsx
+93
-54
index.less
...lication/repairPrSubmit/components/GoodsDrawer/index.less
+14
-0
index.tsx
...plication/repairPrSubmit/components/GoodsDrawer/index.tsx
+338
-0
index.ts
...ion/repairPrSubmit/components/GoodsDrawer/schema/index.ts
+94
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+8
-1
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+88
-6
index.tsx
...action/purchaserEvaluation/unevaluated/evaluate/index.tsx
+2
-1
index.tsx
...saction/supplierEvaluation/unevaluated/evaluate/index.tsx
+7
-6
No files found.
src/components/TableDrawer/index.tsx
View file @
b660ccbf
import
React
,
{
ReactText
,
useRef
,
useEffect
}
from
'react'
import
{
StandardTable
}
from
'god'
import
{
StandardTable
}
from
'god'
import
NestTable
from
'@/components/NestTable'
import
{
IStandardTableProps
}
from
'god/dist/src/standard-table'
import
{
Row
,
Col
,
Drawer
,
Button
,
Input
}
from
'antd'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
}
from
'./schema'
import
{
productModalSchema
,
productModalByMemberSchema
,
memberModalSchema
,
inquirySchema
,
demandSchema
,
enquirySchema
,
mergeOrderSchema
,
}
from
'./schema'
import
Search
from
'../NiceForm/components/Search'
import
SearchSelect
from
'../NiceForm/components/SearchSelect'
import
Submit
from
'../NiceForm/components/Submit'
...
...
@@ -19,7 +27,6 @@ import {
import
{
setup
}
from
'@formily/antd-components'
;
import
styles
from
'./index.less'
export
interface
TableDrawerProps
extends
IStandardTableProps
<
any
>
{
width
?:
number
,
modalTitle
?:
ReactText
,
...
...
@@ -27,7 +34,7 @@ export interface TableDrawerProps extends IStandardTableProps<any> {
cancel
?(),
visible
?:
boolean
,
resetModal
?:
object
,
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'none'
,
modalType
?:
'productByDefault'
|
'productByMember'
|
'memberByDefault'
|
'inquiryByDefault'
|
'demandByDefault'
|
'enquiryModel'
|
'MergeOrderByDefault'
|
'none'
,
useNestTable
?:
boolean
,
// 是否使用嵌套表格
nestColumns
?:
any
[],
nestTableProps
?:
any
,
...
...
@@ -53,52 +60,72 @@ const SearchComponent = props => {
SearchComponent
.
isFieldComponent
=
true
;
setup
();
const
TableDrawer
:
React
.
FC
<
TableDrawerProps
>
=
(
props
)
=>
{
const
{
width
=
704
,
modalTitle
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
modalType
=
'none'
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
nestPagination
,
nestForm
=
false
,
...
resetTable
}
=
props
const
selfRef
=
currentRef
||
useRef
<
any
>
({})
const
TableDrawer
:
React
.
FC
<
TableDrawerProps
>
=
(
props
)
=>
{
const
{
width
=
704
,
modalTitle
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
modalType
=
'none'
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
=
{},
nestPagination
,
nestForm
=
false
,
...
resetTable
}
=
props
;
const
selfRef
=
currentRef
||
useRef
<
any
>
({});
useEffect
(()
=>
{
if
(
visible
)
{
// 重新开启时需reload接口
selfRef
.
current
.
reload
&&
selfRef
.
current
.
reload
()
selfRef
.
current
.
reload
&&
selfRef
.
current
.
reload
()
;
}
else
{
selfRef
.
current
.
resetField
&&
selfRef
.
current
.
resetField
({
validate
:
false
})
validate
:
false
,
})
;
}
},
[
visible
,
selfRef
.
current
])
},
[
visible
,
selfRef
.
current
]);
const
modelSchemaRender
=
()
=>
{
switch
(
modalType
)
{
case
'productByDefault'
:
{
return
productModalSchema
return
productModalSchema
;
}
case
'productByMember'
:
{
return
productModalByMemberSchema
return
productModalByMemberSchema
;
}
case
'memberByDefault'
:
{
return
memberModalSchema
return
memberModalSchema
;
}
case
'inquiryByDefault'
:
{
return
inquirySchema
return
inquirySchema
;
}
case
'enquiryModel'
:{
return
enquirySchema
case
'enquiryModel'
:
{
return
enquirySchema
;
}
case
'demandByDefault'
:
{
return
demandSchema
return
demandSchema
;
}
case
'MergeOrderByDefault'
:
{
return
mergeOrderSchema
return
mergeOrderSchema
;
}
case
'none'
:
{
return
{}
return
{}
;
}
}
}
}
;
const
defaultSchemaProps
=
{
inline
:
true
,
...
...
@@ -107,7 +134,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
const
handleSubmit
=
()
=>
{
}
}
;
return
(
<
Drawer
...
...
@@ -136,13 +163,19 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
<
div
className=
{
styles
.
drawer_wrap
}
>
{
nestForm
&&
(
<
Row
justify=
'space-between'
style=
{
{
marginBottom
:
16
}
}
>
<
Row
justify=
"space-between"
style=
{
{
marginBottom
:
16
}
}
>
<
Col
span=
{
12
}
style=
{
{
zIndex
:
99
}
}
>
<
SchemaForm
className=
"god-schema-form"
{
...
defaultSchemaProps
}
schema=
{
modelSchemaRender
()
}
components=
{
{
Search
:
SearchComponent
,
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
}
}
components=
{
{
Search
:
SearchComponent
,
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
,
}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
...
...
@@ -150,8 +183,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
'name'
,
FORM_FILTER_PATH
,
);
}
}
}
}
actions=
{
schemaAction
}
/>
</
Col
>
...
...
@@ -162,7 +194,7 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
<
NestTable
NestColumns=
{
nestColumns
}
className=
"common_tb"
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
"tb_bg"
}
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
'tb_bg'
}
{
...
nestTableProps
}
/>
</
div
>
...
...
@@ -174,38 +206,45 @@ const TableDrawer:React.FC<TableDrawerProps> = (props) => {
)
}
</
div
>
)
:
(
<
StandardTable
tableType=
'small'
currentRef=
{
selfRef
}
formRender=
{
(
child
,
ps
)
=>
<
Row
justify=
'space-between'
>
)
:
(
<
StandardTable
tableType=
'small'
currentRef=
{
selfRef
}
formRender=
{
(
child
,
ps
)
=>
(
<
Row
justify=
'space-between'
>
<
Col
span=
{
18
}
style=
{
{
zIndex
:
99
}
}
>
{
child
}
</
Col
>
<
Col
style=
{
{
marginTop
:
4
}
}
>
{
ps
}
</
Col
>
</
Row
>
}
formilyProps=
{
modalType
===
'none'
?
null
:
{
ctx
:
{
schema
:
modelSchemaRender
(),
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
</
Row
>
)
}
formilyProps=
{
modalType
===
'none'
?
null
:
{
ctx
:
{
schema
:
modelSchemaRender
(),
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
,
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
}
{
...
resetTable
}
/>
)
}
{
...
resetTable
}
/>
)
}
</
Drawer
>
)
}
}
;
TableDrawer
.
defaultProps
=
{}
TableDrawer
.
defaultProps
=
{}
;
export
default
TableDrawer
\ No newline at end of file
export
default
TableDrawer
;
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/components/GoodsDrawer/index.less
0 → 100644
View file @
b660ccbf
.goods {
&-head {
}
&-body {
}
&-foot {
}
}
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/components/GoodsDrawer/index.tsx
0 → 100644
View file @
b660ccbf
/*
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 16:36:32
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
mockData
=
[
{
id
:
1
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
11
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
12
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
2
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
23
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
24
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
3
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
35
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
36
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
4
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
47
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
48
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
]
interface
GoodsDrawer
{
// 是否可见的
visible
:
boolean
;
// 关闭事件
onClose
:
()
=>
void
;
};
const
GoodsDrawer
:
React
.
FC
<
GoodsDrawer
>
=
({
visible
=
false
,
onClose
,
})
=>
{
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
childSelectedRowKeys
,
setChildSelectedRowKeys
]
=
useState
<
any
>
([])
const
tableColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
align
:
'center'
,
},
{
title
:
'订单摘要'
,
dataIndex
:
'applyAbstract'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplierName'
,
align
:
'center'
,
},
{
title
:
'下单时间'
,
dataIndex
:
'createTime'
,
align
:
'center'
,
},
{
title
:
'订单状态'
,
dataIndex
:
'orderStatus'
,
align
:
'center'
,
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
,
align
:
'center'
,
},
]
const
childTableColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'订单数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
},
]
const
handleClose
=
()
=>
{
if
(
onClose
)
{
onClose
();
}
};
// 子表格选中行
const
handleChildSelectChange
=
()
=>
{
};
// 子表格选中所有行
const
handleChildSelectAll
=
()
=>
{
};
// 表格选中行
const
handleParentSelectChange
=
()
=>
{
};
// 表格选中所有行
const
hanldeParentSelectAll
=
()
=>
{
};
return
(
<
Drawer
title=
"选择维修商品"
width=
{
1200
}
onClose=
{
handleClose
}
visible=
{
visible
}
bodyStyle=
{
{
paddingBottom
:
80
}
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
handleClose
}
type=
"primary"
>
确定
</
Button
>
</
div
>
}
>
<
div
className=
{
styles
.
goods
}
>
<
div
className=
{
styles
[
'goods-head'
]
}
>
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
{}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
);
}
}
schema=
{
listSearchSchema
}
/>
</
div
>
<
div
>
<
NestTable
NestColumns=
{
[
tableColumn
,
childTableColumn
]
}
className=
"common_tb"
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
'tb_bg'
}
rowKey=
"id"
childrenDataKey=
"childData"
dataSource=
{
mockData
}
childRowSelection=
{
{
selectedRowKeys
:
childSelectedRowKeys
,
onSelect
:
handleChildSelectChange
,
onSelectAll
:
handleChildSelectAll
,
}
}
rowSelection=
{
{
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleParentSelectChange
,
onSelectAll
:
hanldeParentSelectAll
,
}
}
/>
</
div
>
</
div
>
</
Drawer
>
);
};
export
default
GoodsDrawer
;
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/components/GoodsDrawer/schema/index.ts
0 → 100644
View file @
b660ccbf
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-02 13:47:58
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入 申请单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
abstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
supplier
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'供应会员(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
b660ccbf
...
...
@@ -9,6 +9,7 @@ import { createFormActions, FormEffectHooks } from '@formily/antd';
import
{
PublicApi
}
from
'@/services/api'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
GoodsDrawer
from
'../GoodsDrawer'
;
import
{
addBillSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
...
...
@@ -31,6 +32,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
visibleDrawer
,
setVisibleDrawer
]
=
useState
(
false
);
useEffect
(()
=>
{
...
...
@@ -46,7 +48,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleAdd
}
onClick=
{
()
=>
setVisibleDrawer
(
true
)
}
type=
"dashed"
>
选择维修商品
...
...
@@ -141,6 +143,11 @@ const RepairForm: React.FC<BillsFormProps> = ({
/>
</
Card
>
<
GoodsDrawer
visible=
{
visibleDrawer
}
onClose=
{
()
=>
setVisibleDrawer
(
false
)
}
/>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</
PageHeaderWrapper
>
</
Spin
>
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
b660ccbf
...
...
@@ -9,6 +9,88 @@ import {
}
from
'@/constants'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
// 供应会员列表列
const
supplierColumns
=
[
{
title
:
'会员ID'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'memberName'
,
align
:
'center'
,
},
{
title
:
'会员类型'
,
dataIndex
:
'memberType'
,
align
:
'center'
,
},
{
title
:
'会员角色'
,
dataIndex
:
'memberRole'
,
align
:
'center'
,
},
{
title
:
'会员等级'
,
dataIndex
:
'memberLevel'
,
align
:
'center'
,
},
];
// 获取供应会员
const
getSupplier
=
()
=>
{
return
Promise
.
resolve
({
data
:
[
{
memberId
:
1
,
memberName
:
'会员1'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
{
memberId
:
2
,
memberName
:
'会员2'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
{
memberId
:
3
,
memberName
:
'会员3'
,
memberType
:
'企业会员'
,
memberRole
:
'青铜会员'
,
memberLevel
:
'会员等级'
,
},
],
total
:
20
,
});
};
const
supplierSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-start'
,
advanced
:
false
,
},
},
},
},
},
};
export
const
addBillSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -58,11 +140,11 @@ export const addBillSchema: ISchema = {
modalProps
:
{
title
:
'标题'
,
},
columns
:
[]
,
fetchTableData
:
undefined
,
columns
:
supplierColumns
,
fetchTableData
:
getSupplier
,
formilyProps
:
{
ctx
:
{
schema
:
{}
,
schema
:
supplierSchema
,
components
:
{
Search
,
Submit
,
...
...
@@ -80,8 +162,8 @@ export const addBillSchema: ISchema = {
}
},
tableProps
:
{
rowKey
:
'
orderNo
'
,
lableKey
:
''
,
rowKey
:
'
memberId
'
,
lableKey
:
'
memberName
'
,
},
},
'x-mega-props'
:
{
...
...
@@ -114,7 +196,7 @@ export const addBillSchema: ISchema = {
innerStatus
:
{
type
:
'string'
,
title
:
'内部状态'
,
default
:
''
,
'x-component'
:
'Text'
,
},
},
},
...
...
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/index.tsx
View file @
b660ccbf
...
...
@@ -87,6 +87,7 @@ const EvaluateOrder: React.FC = () => {
star
,
}
=
item
;
// 被评价方是 销售会员(订单提供者数据)
return
{
memberId
:
orderInfo
.
supplyMembersId
,
roleId
:
orderInfo
.
supplyMembersRoleId
,
...
...
@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => {
};
});
PublicApi
.
postMemberComment
Consumer
OrderTradeSubmit
({
PublicApi
.
postMemberComment
Supply
OrderTradeSubmit
({
commentSubmitDetailList
:
payload
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/index.tsx
View file @
b660ccbf
...
...
@@ -86,17 +86,18 @@ const EvaluateOrder: React.FC = () => {
picture
,
star
,
}
=
item
;
// 被评价方是 采购会员(订单创建者数据)
return
{
memberId
:
orderInfo
.
supplyMembers
Id
,
roleId
:
orderInfo
.
supplyMembers
RoleId
,
memberName
:
orderInfo
.
supplyMembers
Name
||
''
,
memberId
:
orderInfo
.
createMember
Id
,
roleId
:
orderInfo
.
create
RoleId
,
memberName
:
orderInfo
.
createMember
Name
||
''
,
star
,
comment
,
product
:
JSON
.
stringify
(
good
),
remark
:
orderInfo
.
orderNo
,
productId
:
good
.
productId
,
i
d
:
orderInfo
.
id
,
orderI
d
:
orderInfo
.
id
,
productImgUrl
:
good
.
pic
,
dealTime
:
orderInfo
.
createTime
,
dealCount
:
good
.
purchaseCount
,
...
...
@@ -106,7 +107,7 @@ const EvaluateOrder: React.FC = () => {
};
});
PublicApi
.
postMemberComment
Consumer
OrderTradeSubmit
({
PublicApi
.
postMemberComment
Supply
OrderTradeSubmit
({
commentSubmitDetailList
:
payload
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
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