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
5f1215dd
Commit
5f1215dd
authored
Apr 09, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对接评标模板和专家列表
parent
90cbb452
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
735 additions
and
453 deletions
+735
-453
callForBids.ts
config/routes/procurementRoute/callForBids.ts
+33
-1
CustomAddress.tsx
src/components/NiceForm/components/CustomAddress.tsx
+83
-40
index.ts
src/constants/index.ts
+15
-0
index.tsx
...orBids/addNewBid/components/relevanceGoodDrawer/index.tsx
+4
-4
index.tsx
...ages/procurement/callForBids/addRemarkBidExpert/index.tsx
+75
-44
index.ts
...rocurement/callForBids/addRemarkBidExpert/schema/index.ts
+50
-14
index.tsx
...es/procurement/callForBids/addRemarkBidTemplate/index.tsx
+21
-4
index.ts
...curement/callForBids/addRemarkBidTemplate/schema/index.ts
+15
-7
index.tsx
...urement/callForBids/readyCheckedRegister/detail/index.tsx
+1
-0
useSelfTable.tsx
...ment/callForBids/readyExpertRemark/model/useSelfTable.tsx
+13
-13
index.tsx
src/pages/procurement/callForBids/remarkBidExpert/index.tsx
+2
-3
useSelfTable.tsx
...rement/callForBids/remarkBidExpert/model/useSelfTable.tsx
+51
-45
index.ts
...s/procurement/callForBids/remarkBidExpert/schema/index.ts
+31
-16
index.tsx
...pages/procurement/callForBids/remarkBidTemplate/index.tsx
+26
-22
useSelfTable.tsx
...ment/callForBids/remarkBidTemplate/model/useSelfTable.tsx
+34
-12
index.ts
...procurement/callForBids/remarkBidTemplate/schema/index.ts
+13
-46
constant.tsx
src/pages/procurement/components/bidParticulars/constant.tsx
+1
-1
index.tsx
src/pages/procurement/components/bidParticulars/index.tsx
+15
-2
customTag.tsx
src/pages/procurement/components/customTag.tsx
+7
-0
index.tsx
...tender/addTender/components/relateProductDrawer/index.tsx
+142
-31
index.tsx
src/pages/procurement/tender/addTender/index.tsx
+2
-68
useProductTable.tsx
...es/procurement/tender/addTender/model/useProductTable.tsx
+1
-1
modal.ts
src/pages/procurement/tender/addTender/schema/modal.ts
+100
-79
No files found.
config/routes/procurementRoute/callForBids.ts
View file @
5f1215dd
...
...
@@ -245,7 +245,23 @@ export const callForBidsRoute = [
// 评标模板-新建
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidTemplate/add'
,
name
:
'评标模板'
,
name
:
'新建评标模板'
,
component
:
'@/pages/procurement/callForBids/addRemarkBidTemplate'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 评标模板-编辑
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidTemplate/edit'
,
name
:
'编辑评标模板'
,
component
:
'@/pages/procurement/callForBids/addRemarkBidTemplate'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 评标模板-详情
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidTemplate/detail'
,
name
:
'评标模板详情'
,
component
:
'@/pages/procurement/callForBids/addRemarkBidTemplate'
,
hideInMenu
:
true
,
noMargin
:
true
,
...
...
@@ -264,6 +280,22 @@ export const callForBidsRoute = [
hideInMenu
:
true
,
noMargin
:
true
,
},
// 评标专家库-编辑
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidExpert/edit'
,
name
:
'编辑评标专家库'
,
component
:
'@/pages/procurement/callForBids/addRemarkBidExpert'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 评标专家库-详情
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidExpert/detail'
,
name
:
'评标专家库详情'
,
component
:
'@/pages/procurement/callForBids/addRemarkBidExpert'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 评标委员会
{
path
:
'/memberCenter/procurementAbility/callForBids/remarkBidCommittee'
,
...
...
src/components/NiceForm/components/CustomAddress.tsx
View file @
5f1215dd
import
React
,
{
use
Ref
,
useEffect
,
useState
}
from
'react'
import
{
Input
,
Row
,
Col
,
Select
,
Form
,
Button
,
message
}
from
'antd'
;
import
React
,
{
use
Effect
,
useState
,
useRef
}
from
'react'
import
{
Row
,
Col
,
Select
,
Form
}
from
'antd'
;
import
styled
from
'styled-components'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
MinusOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
/**
* 自定义省市区/县三级联动 地址选择
...
...
@@ -49,17 +48,38 @@ const MultAddress = (props) => {
const
[
city
,
setcity
]
=
useState
<
any
>
([]);
// 市列表
const
[
area
,
setarea
]
=
useState
<
any
>
([]);
// 区/县列表
const
cityAfterRef
=
useRef
<
boolean
>
(
true
)
const
areaAfterRef
=
useRef
<
boolean
>
(
true
)
useEffect
(()
=>
{
getAllAreaData
().
then
(
data
=>
{
setprovince
(
data
)
})
},
[])
useEffect
(()
=>
{
value
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
provinceCode
)
{
renderProvice
([...
value
],
item
[
'provinceCode'
],
index
).
then
(()
=>
{
renderCity
([...
value
],
item
[
'cityCode'
],
index
)
})
}
})
},
[
province
])
useEffect
(()
=>
{
value
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
cityCode
)
{
renderCity
([...
value
],
item
[
'cityCode'
],
index
)
}
})
},
[
city
])
const
getAllAreaData
=
()
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getManageAreaAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
;
resolve
(
res
.
data
)
}
})
})
...
...
@@ -77,51 +97,74 @@ const MultAddress = (props) => {
})
setcode
([...
cityCode
]);
if
(
num
===
1
)
{
await
province
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
province
=
item
.
name
;
city
[
idx
]
=
{
citydata
:
res
.
data
}
// 改变省份 清空市县数据
result
[
idx
].
city
=
null
,
result
[
idx
].
cityCode
=
null
,
result
[
idx
].
area
=
null
,
result
[
idx
].
areaCode
=
null
,
mutators
.
change
(
result
)
setcity
([...
city
])
}
})
}
})
renderProvice
(
result
,
val
,
idx
)
}
else
if
(
num
===
2
)
{
await
city
[
0
].
citydata
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
renderCity
(
result
,
val
,
idx
)
}
else
if
(
num
===
3
)
{
renderArea
(
result
,
val
,
idx
)
}
mutators
.
change
(
result
)
}
// 渲染省份option
const
renderProvice
=
async
(
result
,
val
,
idx
)
=>
{
await
province
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
province
=
item
.
name
;
// @todo 编辑情况下 第一次不清空
if
(
!
cityAfterRef
.
current
)
{
result
[
idx
].
cityCode
=
null
;
result
[
idx
].
city
=
null
;
result
[
idx
].
areaCode
=
null
;
result
[
idx
].
area
=
null
;
}
else
{
cityAfterRef
.
current
=
false
;
}
city
[
idx
]
=
{
citydata
:
res
.
data
}
setcity
([...
city
])
}
})
}
})
}
// 渲染市区option
const
renderCity
=
async
(
result
,
val
,
idx
)
=>
{
await
city
.
forEach
(
item
=>
{
item
.
citydata
.
forEach
(
items
=>
{
if
(
items
.
code
===
val
)
{
PublicApi
.
getManageAreaByPcodeAll
({
pcode
:
val
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
result
[
idx
].
cityCode
=
val
;
result
[
idx
].
city
=
item
.
name
;
result
[
idx
].
city
=
items
.
name
;
// @todo 编辑情况下 第一次不清空
if
(
!
areaAfterRef
.
current
)
{
result
[
idx
].
areaCode
=
null
;
result
[
idx
].
area
=
null
;
}
else
{
areaAfterRef
.
current
=
false
;
}
area
[
idx
]
=
{
areadata
:
res
.
data
}
// 改变市 清空区县
result
[
idx
].
area
=
null
,
result
[
idx
].
areaCode
=
null
,
mutators
.
change
(
result
)
setarea
([...
area
])
}
})
}
})
}
else
if
(
num
===
3
)
{
area
[
0
].
areadata
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
result
[
idx
].
areaCode
=
val
;
result
[
idx
].
area
=
item
.
name
;
}
})
setarea
([...
area
])
}
mutators
.
change
(
result
)
})
}
// 渲染县
const
renderArea
=
(
result
,
val
,
idx
)
=>
{
area
[
0
].
areadata
.
forEach
(
item
=>
{
if
(
item
.
code
===
val
)
{
result
[
idx
].
areaCode
=
val
;
result
[
idx
].
area
=
item
.
name
;
}
})
setarea
([...
area
])
}
// // 触发select下拉调用
...
...
src/constants/index.ts
View file @
5f1215dd
...
...
@@ -1995,6 +1995,21 @@ export const CALLFORBID_TYPE = [
'邀请招标'
,
]
/** 专业类别 专家类型 */
export
const
SpecialityTypeMap
=
{
1
:
'工程类'
,
2
:
'货物类'
,
3
:
'服务类'
,
4
:
'其他类'
,
}
export
const
ExpertTypeMap
=
{
1
:
'招标人代表'
,
2
:
'技术类专家'
,
3
:
'特邀类专家'
,
4
:
'其他类专家'
,
}
// 招标 内部状态工作流状态
export
enum
BidInsideWorkState
{
/** 待提交审核招标 */
...
...
src/pages/procurement/callForBids/addNewBid/components/relevanceGoodDrawer/index.tsx
View file @
5f1215dd
...
...
@@ -148,18 +148,19 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
// 子级抽屉点击确定
const
onConfirm
=
async
()
=>
{
setChildVisible
(
false
)
setSelectRow
([])
setSelectedRowKeys
([])
console
.
log
(
selectRow
[
0
])
await
schemaAction
.
setFieldState
(
'*(code, name, type, brandName, unitId, categoryId, brandName)'
,
state
=>
state
.
props
[
"x-component-props"
].
disabled
=
true
)
await
schemaAction
.
setFieldValue
(
'code'
,
selectRow
[
0
][
'code'
])
await
schemaAction
.
setFieldValue
(
'name'
,
selectRow
[
0
][
'name'
])
await
schemaAction
.
setFieldValue
(
'type'
,
selectRow
[
0
][
'type'
])
await
schemaAction
.
setFieldValue
(
'categoryId'
,
selectRow
[
0
][
'customerCategory'
][
'fullId'
].
split
(
'.'
).
map
(
item
=>
Number
(
item
).
toString
()))
await
schemaAction
.
setFieldValue
(
'categoryName'
,
selectRow
[
0
][
'customerCategory'
][
'name'
])
await
schemaAction
.
setFieldValue
(
'brandName'
,
selectRow
[
0
][
'brand'
]
[
'name'
]
)
await
schemaAction
.
setFieldValue
(
'brandName'
,
selectRow
[
0
][
'brand'
]
?
selectRow
[
0
][
'brand'
][
'name'
]
:
null
)
await
schemaAction
.
setFieldValue
(
'unitId'
,
selectRow
[
0
][
'unitId'
])
await
schemaAction
.
setFieldValue
(
'unitName'
,
selectRow
[
0
][
'unitName'
])
await
schemaAction
.
setFieldValue
(
'has'
,
true
)
setSelectRow
([])
setSelectedRowKeys
([])
}
const
fetchData
=
(
params
:
any
)
=>
{
...
...
@@ -208,7 +209,6 @@ export const RelevanceGoodDrawer:React.FC<RelevanceGoodDrawerProps> = ({
const
commonData
=
await
getCommonData
()
ctx
.
setFieldState
(
'categoryId'
,
state
=>
{
state
.
props
[
'x-component-props'
].
options
=
commonData
[
'categoryData'
]
state
.
props
[
'x-component-props'
].
cacheOptions
=
commonData
[
'categoryData'
]
})
ctx
.
setFieldState
(
'unitId'
,
state
=>
{
state
.
props
[
'enum'
]
=
commonData
[
'unitData'
].
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
id
}))
...
...
src/pages/procurement/callForBids/addRemarkBidExpert/index.tsx
View file @
5f1215dd
import
React
,
{
useState
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
ReutrnEle
from
'@/components/ReturnEle'
...
...
@@ -16,6 +16,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import
Search
from
'@/components/NiceForm/components/Search'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
unixChangeRender
}
from
'../addNewBid/constant'
export
interface
AddRemarkBidExpertProps
{}
...
...
@@ -38,22 +39,52 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
pageStatus
}
=
usePageStatus
()
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getPurchaseExpertGetExpert
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
value
=
{...
res
.
data
}
value
[
'address'
]
=
[{
provinceCode
:
value
.
provinceCode
,
province
:
value
.
provinceName
,
cityCode
:
value
.
cityCode
,
city
:
value
.
cityName
,
areaCode
:
value
.
areaCode
,
area
:
value
.
areaName
,
}]
value
.
createTime
=
unixChangeRender
(
value
.
createTime
),
value
.
updateTime
=
unixChangeRender
(
value
.
updateTime
)
setInitFormValue
(
value
)
}
})
}
},
[
id
])
const
handleSubmit
=
async
(
value
)
=>
{
console
.
log
(
value
)
setBtnLoading
(
true
)
PublicApi
.
postPurchaseExpertSaveOrUpdateExpert
({
...
value
,
...
value
[
'address'
][
0
],
provinceName
:
value
[
'address'
][
0
][
'province'
],
cityName
:
value
[
'address'
][
0
][
'city'
],
areaName
:
value
[
'address'
][
0
][
'area'
],
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
}).
finally
(()
=>
setBtnLoading
(
false
))
}
const
handleSelectExpert
=
()
=>
{
setVisible
(
true
)
console
.
log
(
'选择专家'
)
}
const
selectButton
=
pageStatus
===
PageStatus
.
ADD
&&
<
div
className=
'connectBtn'
onClick=
{
handleSelectExpert
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
selectButton
=
pageStatus
!==
PageStatus
.
PREVIEW
&&
<
div
className=
'connectBtn'
onClick=
{
handleSelectExpert
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
选择
</
div
>
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
//@ts-ignore
PublicApi
.
getProductPlatformGetAttributeList
({
...
params
,
name
:
params
.
name
||
''
,
groupName
:
params
.
groupName
||
''
,
isEnable
:
true
}).
then
(
res
=>
{
PublicApi
.
getMemberUserPage
({
...
params
,
status
:
1
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
...
...
@@ -61,35 +92,31 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
const
columns
:
any
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'id'
,
key
:
'id'
,
title
:
'序号'
,
dataIndex
:
'userId'
,
key
:
'userId'
,
render
:
(
t
,
r
,
i
)
=>
++
i
},
{
title
:
'
属性名称
'
,
title
:
'
姓名
'
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
'
属性组名
'
,
dataIndex
:
'
groupNam
e'
,
key
:
'
groupNam
e'
,
title
:
'
手机号
'
,
dataIndex
:
'
phon
e'
,
key
:
'
phon
e'
,
},
{
title
:
'展示方式'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
:
number
)
=>
{
let
txt
=
new
Map
([[
1
,
'单选'
],
[
2
,
'多选'
],
[
3
,
'输入'
]])
return
txt
.
get
(
text
)
}
title
:
'所属机构'
,
dataIndex
:
'orgName'
,
key
:
'orgName'
,
},
{
title
:
'是否必填'
,
dataIndex
:
'isEmpty'
,
key
:
'isEmpty'
,
render
:
(
text
:
boolean
)
=>
text
?
'是'
:
'否'
}
title
:
'职位'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
},
]
const
rowSelection
:
any
=
{
...
...
@@ -103,7 +130,10 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
const
onConfirm
=
()
=>
{
setVisible
(
false
)
console
.
log
(
'确定'
)
addSchemaAction
.
setFieldValue
(
'name'
,
selectRow
[
0
][
'name'
])
addSchemaAction
.
setFieldValue
(
'userOrgName'
,
selectRow
[
0
][
'orgName'
])
addSchemaAction
.
setFieldValue
(
'userJobTitle'
,
selectRow
[
0
][
'roleName'
])
addSchemaAction
.
setFieldValue
(
'phone'
,
selectRow
[
0
][
'phone'
])
}
return
(
...
...
@@ -111,18 +141,13 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
style=
{
{
margin
:
0
}
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
"新建评标专家"
// extra={[
// <Button key="1" onClick={() => addSchemaAction.submit()} loading={btnLoading} type="primary" icon={<SaveOutlined />}>
// 保存
// </Button>,
// ]}
title=
{
pageStatus
===
PageStatus
.
ADD
?
'新建评标专家'
:
(
pageStatus
===
PageStatus
.
EDIT
?
'编辑评标专家'
:
'查看评标专家'
)
}
>
<
Card
>
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
//
editable={pageStatus !== PageStatus.PREVIEW}
editable=
{
pageStatus
!==
PageStatus
.
PREVIEW
}
value=
{
initFormValue
}
actions=
{
addSchemaAction
}
schema=
{
formSchema
}
...
...
@@ -142,8 +167,8 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
<
Row
>
<
Col
span=
{
8
}
offset=
{
4
}
>
<
Space
size=
{
[
16
,
0
]
}
>
<
Button
type=
"primary"
>
保存
</
Button
>
<
Button
>
取消
</
Button
>
<
Button
type=
"primary"
loading=
{
btnLoading
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>
<
Button
onClick=
{
()
=>
history
.
goBack
()
}
>
取消
</
Button
>
</
Space
>
</
Col
>
</
Row
>
...
...
@@ -163,11 +188,11 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
schema
:
{
type
:
'object'
,
properties
:
{
groupN
ame
:
{
n
ame
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'
属性组名称
'
,
placeholder
:
'
请输入姓名
'
,
align
:
'flex-left'
,
},
},
...
...
@@ -188,10 +213,16 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
},
},
properties
:
{
name
:
{
orgName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入所属机构'
},
},
roleName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'
属性名称
'
placeholder
:
'
请输入职位
'
},
},
submit
:
{
...
...
@@ -213,18 +244,18 @@ const AddRemarkBidExpert:React.FC<AddRemarkBidExpertProps> = (props) => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
groupN
ame'
,
'
n
ame'
,
FORM_FILTER_PATH
,
);
}
}
}
}
//
resetDrawer={{
//
destroyOnClose: true
//
}}
resetDrawer=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'
i
d'
,
rowKey
:
'
userI
d'
,
}
}
/>
</
PageHeaderWrapper
>
...
...
src/pages/procurement/callForBids/addRemarkBidExpert/schema/index.ts
View file @
5f1215dd
import
React
from
'react'
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ExpertTypeMap
,
SpecialityTypeMap
}
from
'@/constants'
;
export
const
formSchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -15,7 +15,7 @@ export const formSchema: ISchema = {
labelAlign
:
'left'
},
properties
:
{
expertN
ame
:
{
n
ame
:
{
type
:
'string'
,
title
:
'专家名称'
,
"x-mega-props"
:
{
...
...
@@ -27,20 +27,37 @@ export const formSchema: ISchema = {
},
required
:
true
},
institution
:
{
userOrgName
:
{
type
:
'string'
,
title
:
'所属机构'
,
readOnly
:
true
,
},
post
:
{
userJobTitle
:
{
type
:
'string'
,
title
:
'职位'
,
readOnly
:
true
,
},
major
:
{
phone
:
{
type
:
'string'
,
title
:
'联系电话'
,
"x-component-props"
:
{
placeholder
:
'请输入联系电话'
},
required
:
true
,
},
speciality
:
{
type
:
'number'
,
title
:
'专业类别'
,
enum
:
[
'搬砖'
,
'和水泥'
,
'拉网线'
],
// enum: Object.keys(SpecialityTypeMap).map(item => ({
// label: SpecialityTypeMap[item],
// value: item,
// })),
enum
:
[
{
label
:
'工程类'
,
value
:
1
},
{
label
:
'货物类'
,
value
:
2
},
{
label
:
'服务类'
,
value
:
3
},
{
label
:
'其他类'
,
value
:
4
},
],
"x-component-props"
:
{
placeholder
:
'请选择专业类别'
},
...
...
@@ -54,7 +71,7 @@ export const formSchema: ISchema = {
},
required
:
true
,
},
qualificationNo
:
{
code
:
{
type
:
'string'
,
title
:
'证书编号'
,
"x-component-props"
:
{
...
...
@@ -62,7 +79,7 @@ export const formSchema: ISchema = {
},
required
:
true
,
},
postT
itle
:
{
t
itle
:
{
type
:
'string'
,
title
:
'专业职称'
,
"x-component-props"
:
{
...
...
@@ -70,15 +87,16 @@ export const formSchema: ISchema = {
},
required
:
true
,
},
timeLine
:
{
type
:
'
string
'
,
years
:
{
type
:
'
number
'
,
title
:
'从事年限'
,
"x-component-props"
:
{
placeholder
:
'请输入从事年限'
placeholder
:
'请输入从事年限'
,
style
:
{
width
:
'100%'
},
},
required
:
true
,
},
industry
:
{
trade
:
{
type
:
'string'
,
title
:
'所属行业'
,
"x-component-props"
:
{
...
...
@@ -105,6 +123,24 @@ export const formSchema: ISchema = {
},
required
:
true
,
},
type
:
{
type
:
'number'
,
title
:
'专家类型'
,
// enum: Object.keys(ExpertTypeMap).map(item => ({
// label: ExpertTypeMap[item],
// value: item,
// })),
enum
:
[
{
label
:
'招标人代表'
,
value
:
1
},
{
label
:
'技术类专家'
,
value
:
2
},
{
label
:
'特邀类专家'
,
value
:
3
},
{
label
:
'其他类专家'
,
value
:
4
},
],
"x-component-props"
:
{
placeholder
:
'请输入所属行业'
},
required
:
true
,
},
remark
:
{
type
:
'textarea'
,
title
:
'备注说明'
,
...
...
@@ -118,12 +154,12 @@ export const formSchema: ISchema = {
},
]
},
join
Time
:
{
create
Time
:
{
type
:
'string'
,
title
:
'加入日期'
,
readOnly
:
true
,
},
remov
eTime
:
{
updat
eTime
:
{
type
:
'string'
,
title
:
'移除日期'
,
readOnly
:
true
,
...
...
src/pages/procurement/callForBids/addRemarkBidTemplate/index.tsx
View file @
5f1215dd
...
...
@@ -10,6 +10,7 @@ import NiceForm from '@/components/NiceForm'
import
styles
from
'./index.less'
import
{
formSchema
}
from
'./schema'
import
{
Input
,
ArrayTable
}
from
'@formily/antd-components'
import
{
PublicApi
}
from
'@/services/api'
export
interface
AddRemarkBidTemplateProps
{}
...
...
@@ -22,9 +23,25 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
const
[
btnLoading
,
setBtnLoading
]
=
useState
(
false
)
const
[
initFormValue
,
setInitFormValue
]
=
useState
<
any
>
({})
const
{
pageStatus
,
id
}
=
usePageStatus
()
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getPurchaseTemplateGetTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setInitFormValue
(
res
.
data
)
}
})
}
},
[
id
])
const
handleSubmit
=
async
(
value
)
=>
{
console
.
log
(
value
)
setBtnLoading
(
true
)
PublicApi
.
postPurchaseTemplateSaveOrUpdateTemplate
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
}).
finally
(()
=>
setBtnLoading
(
false
))
}
const
addd
=
(<
span
>
添加评标内容
</
span
>)
...
...
@@ -34,9 +51,9 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
style=
{
{
margin
:
0
}
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
"新建评标模板"
title=
{
pageStatus
===
PageStatus
.
ADD
?
'新建评标模板'
:
(
pageStatus
===
PageStatus
.
EDIT
?
'编辑评标模板'
:
'查看评标模板'
)
}
extra=
{
[
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
pageStatus
!==
PageStatus
.
PREVIEW
&&
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>,
]
}
...
...
@@ -45,7 +62,7 @@ const AddRemarkBidTemplate:React.FC<AddRemarkBidTemplateProps> = (props) => {
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
//
editable={pageStatus !== PageStatus.PREVIEW}
editable=
{
pageStatus
!==
PageStatus
.
PREVIEW
}
value=
{
initFormValue
}
actions=
{
addSchemaAction
}
schema=
{
formSchema
}
...
...
src/pages/procurement/callForBids/addRemarkBidTemplate/schema/index.ts
View file @
5f1215dd
...
...
@@ -46,7 +46,7 @@ export const formSchema: ISchema = {
},
]
},
productName
:
{
version
:
{
type
:
'string'
,
title
:
'版本号'
,
"x-component-props"
:
{
...
...
@@ -63,7 +63,7 @@ export const formSchema: ISchema = {
},
]
},
templateDesc
:
{
remark
:
{
type
:
'textarea'
,
title
:
'模板说明'
,
"x-component-props"
:
{
...
...
@@ -95,7 +95,7 @@ export const formSchema: ISchema = {
labelAlign
:
'left'
},
properties
:
{
contentLists
:
{
templateContentList
:
{
title
:
""
,
type
:
"array"
,
"x-component"
:
"ArrayTable"
,
...
...
@@ -109,28 +109,36 @@ export const formSchema: ISchema = {
items
:
{
type
:
'object'
,
properties
:
{
classify
:
{
// id: {
// title: "内容项ID",
// type: 'number',
// 'x-component-props': {
// },
// visible: false,
// },
sort
:
{
title
:
"评标分类"
,
type
:
'string'
,
'x-component-props'
:
{
},
},
ite
m
:
{
ter
m
:
{
title
:
"评分项"
,
type
:
'string'
,
'x-component-props'
:
{
},
},
condition
:
{
standard
:
{
title
:
"评分标准"
,
type
:
'string'
,
'x-component-props'
:
{
},
},
score
:
{
s
tandardS
core
:
{
title
:
"标准分"
,
type
:
'string'
,
'x-component-props'
:
{
...
...
src/pages/procurement/callForBids/readyCheckedRegister/detail/index.tsx
View file @
5f1215dd
...
...
@@ -47,6 +47,7 @@ const ReadyCheckedRegisterDetail: React.FC = () => {
{
title
:
'招标物料'
,
id
:
'bidMaterial'
,
componentName
:
"BidMaterial"
},
{
title
:
'招标要求'
,
id
:
'bidNeed'
,
type
:
"bidNeed"
},
{
title
:
'报名要求'
,
id
:
'registerNeed'
,
type
:
"registerNeed"
},
{
title
:
'报名信息'
,
id
:
'registerInfo'
,
type
:
'registerInfo'
},
{
title
:
'资格预审要求'
,
id
:
'checkNeed'
,
type
:
"checkNeed"
},
{
title
:
'评标要求'
,
id
:
'remarkNeed'
,
type
:
"remarkNeed"
},
{
title
:
'其他要求'
,
id
:
'otherNeed'
,
type
:
"otherNeed"
},
...
...
src/pages/procurement/callForBids/readyExpertRemark/model/useSelfTable.tsx
View file @
5f1215dd
...
...
@@ -20,13 +20,13 @@ const baseBidListColumns: any[] = [
{
title
:
'招标编号/项目'
,
align
:
'center'
,
dataIndex
:
'
orderNo
'
,
key
:
'
orderNo
'
,
dataIndex
:
'
code
'
,
key
:
'
code
'
,
render
:
(
text
,
record
)
=>
<>
<
EyePreview
url=
{
`${history.location.pathname}/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
<
div
>
{
text
}
</
div
>
<
div
>
{
record
.
projectName
}
</
div
>
</>
},
{
...
...
@@ -35,12 +35,12 @@ const baseBidListColumns: any[] = [
dataIndex
:
'type'
,
key
:
'type'
,
},
{
title
:
'评标人'
,
align
:
'center'
,
dataIndex
:
'supplyMembersName'
,
key
:
'supplyMembersName'
,
},
//
{
//
title: '评标人',
//
align: 'center',
//
dataIndex: 'supplyMembersName',
//
key: 'supplyMembersName',
//
},
{
title
:
'评标开始/评标时间'
,
align
:
'center'
,
...
...
@@ -55,15 +55,15 @@ const baseBidListColumns: any[] = [
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'
externalState
'
,
key
:
'
externalState
'
,
dataIndex
:
'
tenderOutStatus
'
,
key
:
'
tenderOutStatus
'
,
render
:
text
=>
<
CustomTag
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'in
teriorState
'
,
key
:
'in
teriorState
'
,
dataIndex
:
'in
viteTenderInStatus
'
,
key
:
'in
viteTenderInStatus
'
,
render
:
(
text
)
=>
<
CustomBadge
status=
{
text
}
type=
'inside'
/>
},
]
...
...
src/pages/procurement/callForBids/remarkBidExpert/index.tsx
View file @
5f1215dd
...
...
@@ -17,7 +17,7 @@ import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePicke
export
interface
RemarkBidExpertProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
get
OrderProcurementReviewedListOne
(
params
)
const
{
data
}
=
await
PublicApi
.
get
PurchaseExpertGetExpertList
(
params
)
return
data
}
...
...
@@ -27,7 +27,6 @@ const RemarkBidExpert:React.FC<RemarkBidExpertProps> = (props) => {
ref
,
}
=
useSelfTable
()
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
...
...
@@ -46,7 +45,7 @@ const RemarkBidExpert:React.FC<RemarkBidExpertProps> = (props) => {
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'
orderNo
'
,
'
name
'
,
FORM_FILTER_PATH
,
);
},
...
...
src/pages/procurement/callForBids/remarkBidExpert/model/useSelfTable.tsx
View file @
5f1215dd
import
React
,
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
{
Button
,
Popconfirm
}
from
'antd'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
ExpertTypeMap
,
SpecialityTypeMap
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
// 评标专家库 招标
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
// id: 1418
// interiorState: 2
// invoiceNumber: null
// isDefault: 1
// logisticsId: null
// memberId: null
// memberName: "昊嘉网络有限公司"
// memberRoleId: null
// orderDeliveryDetailsId: null
// orderNo: "CGRJ96524"
// orderThe: "白搞了"
// phone: "13615020201"
// procurementEevaluateState: 0
// purchaseEevaluateState: 0
// purchaseOrderInteriorState: null
// receiverName: "菜鸡驿站"
// receivingTimes: null
// shipmentBatch: 0
// signatureLogId: null
// sum: 2
// sumPrice: 0
const
baseBidListColumns
:
any
[]
=
[
{
title
:
'序号'
,
...
...
@@ -39,61 +20,63 @@ export const useSelfTable = () => {
{
title
:
'专家'
,
align
:
'center'
,
dataIndex
:
'
orderNo
'
,
key
:
'
orderNo
'
,
dataIndex
:
'
name
'
,
key
:
'
name
'
,
},
{
title
:
'所属机构'
,
align
:
'center'
,
dataIndex
:
'
typ
e'
,
key
:
'
typ
e'
,
dataIndex
:
'
userOrgNam
e'
,
key
:
'
userOrgNam
e'
,
},
{
title
:
'职位'
,
align
:
'center'
,
dataIndex
:
'
supplyMembersNam
e'
,
key
:
'
supplyMembersNam
e'
,
dataIndex
:
'
userJobTitl
e'
,
key
:
'
userJobTitl
e'
,
},
{
title
:
'专业类别'
,
align
:
'center'
,
dataIndex
:
'receiverName'
,
key
:
'receiverName'
,
dataIndex
:
'speciality'
,
key
:
'speciality'
,
render
:
(
t
,
r
)
=>
SpecialityTypeMap
[
t
]
},
{
title
:
'资格证书'
,
align
:
'center'
,
dataIndex
:
'
purchaseEevaluateState
'
,
key
:
'
purchaseEevaluateState
'
,
dataIndex
:
'
qualification
'
,
key
:
'
qualification
'
,
},
{
title
:
'专业职称'
,
align
:
'center'
,
dataIndex
:
'
shipmentBatch
'
,
key
:
'
shipmentBatch
'
,
dataIndex
:
'
title
'
,
key
:
'
title
'
,
},
{
title
:
'从事年限'
,
align
:
'center'
,
dataIndex
:
'
invoiceNumber
'
,
key
:
'
invoiceNumber
'
,
dataIndex
:
'
years
'
,
key
:
'
years
'
,
},
{
title
:
'专家类型'
,
align
:
'center'
,
dataIndex
:
'sum'
,
key
:
'sum'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
t
,
r
)
=>
ExpertTypeMap
[
t
]
},
{
title
:
'状态'
,
align
:
'center'
,
dataIndex
:
'
externalState
'
,
key
:
'
externalState
'
,
dataIndex
:
'
status
'
,
key
:
'
status
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
handleConfirm=
{
()
=>
handleUpdateState
(
record
)
}
record=
{
record
}
fieldNames=
"
isEnable
"
fieldNames=
"
status
"
expectTrueValue=
{
true
}
/>
),
...
...
@@ -101,9 +84,22 @@ export const useSelfTable = () => {
]
const
handleUpdateState
=
(
record
)
=>
{
console
.
log
(
record
,
'update'
)
PublicApi
.
postPurchaseExpertUpdateExpertStatus
({
id
:
record
.
id
,
status
:
!
record
.
status
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
}
const
handleEdit
=
(
id
)
=>
{
history
.
push
(
`/memberCenter/procurementAbility/callForBids/remarkBidExpert/edit?id=
${
id
}
`
)
}
const
handleDelete
=
(
id
)
=>
{
PublicApi
.
postPurchaseExpertDeleteBatchExpert
({
idList
:
[
id
]
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
}
const
secondColumns
:
any
[]
=
baseBidListColumns
.
concat
([
{
...
...
@@ -112,8 +108,18 @@ export const useSelfTable = () => {
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
<
Button
type=
'link'
>
编辑
</
Button
>
<
Button
type=
'link'
>
删除
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleEdit
(
record
.
id
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要执行该操作?"
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
'link'
// onClick={() => handleDelete(record.id)}
>
删除
</
Button
>
</
Popconfirm
>
</>
}
])
...
...
src/pages/procurement/callForBids/remarkBidExpert/schema/index.ts
View file @
5f1215dd
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
OrderTypeMap
,
PurchaseOrderInsideWorkStateTexts
,
PurchaseOrderOutWorkStateTexts
}
from
'@/constants'
;
import
{
ExpertTypeMap
,
SpecialityTypeMap
}
from
'@/constants'
;
/**
* 除了订单必填字段, 默认
...
...
@@ -8,11 +8,11 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
orderNo
:
{
name
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入
订单编号
'
,
placeholder
:
'请输入
专家名称
'
,
align
:
'flex-end'
,
},
},
...
...
@@ -26,34 +26,49 @@ export const tableListSchema: ISchema = {
}
},
properties
:
{
orderTh
e
:
{
userOrgNam
e
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入
订单摘要
'
,
placeholder
:
'请输入
所属机构
'
,
}
},
"supplyMembersName"
:
{
userJobTitle
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入
供应会员名称
'
placeholder
:
'请输入
职位
'
}
},
"type"
:
{
speciality
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择
订单类型
'
placeholder
:
'请选择
专业类别
'
},
enum
:
Object
.
keys
(
Order
TypeMap
).
map
(
item
=>
({
label
:
Order
TypeMap
[
item
],
enum
:
Object
.
keys
(
Speciality
TypeMap
).
map
(
item
=>
({
label
:
Speciality
TypeMap
[
item
],
value
:
item
,
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
qualification
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入资格证书'
}
},
title
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入专业职称'
}
},
type
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择专家类型'
},
enum
:
Object
.
keys
(
ExpertTypeMap
).
map
(
item
=>
({
label
:
ExpertTypeMap
[
item
],
value
:
item
,
}))
},
submit
:
{
'x-component'
:
'Submit'
,
...
...
src/pages/procurement/callForBids/remarkBidTemplate/index.tsx
View file @
5f1215dd
...
...
@@ -6,18 +6,13 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
PlusCircleOutlined
}
from
'@ant-design/icons'
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
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
// 评标模板 招标
export
interface
RemarkBidTemplateProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
PublicApi
.
get
OrderProcurementReviewedListOne
(
params
)
const
{
data
}
=
await
PublicApi
.
get
PurchaseTemplateGetTemplateList
(
params
)
return
data
}
...
...
@@ -41,24 +36,33 @@ const RemarkBidTemplate:React.FC<RemarkBidTemplateProps> = (props) => {
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
schema
:
{
type
:
'object'
,
properties
:
{
megaLayout0
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
grid
:
true
,
columns
:
2
,
},
properties
:
{
name
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'模板名称'
,
},
'x-component'
:
'Search'
}
}
}
}
},
components
:
{
DateRangePickerUnix
,
Submit
}
},
layouts
:
{
order
:
2
,
span
:
24
}
order
:
1
,
span
:
4
,
}
,
}
}
formilyChilds=
{
{
children
:
<
Space
>
...
...
@@ -71,7 +75,7 @@ const RemarkBidTemplate:React.FC<RemarkBidTemplateProps> = (props) => {
</
Button
>
</
Space
>,
layouts
:
{
span
:
8
order
:
0
}
}
}
/>
...
...
src/pages/procurement/callForBids/remarkBidTemplate/model/useSelfTable.tsx
View file @
5f1215dd
import
React
,
{
useRef
}
from
'react'
import
{
Button
}
from
'antd'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
history
}
from
'umi'
// 评标模板 招标
export
const
useSelfTable
=
()
=>
{
...
...
@@ -17,31 +20,38 @@ export const useSelfTable = () => {
{
title
:
'模板名称'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/procurementAbility/callForBids/remarkBidTemplate/detail?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
),
},
{
title
:
'版本号'
,
align
:
'center'
,
dataIndex
:
'
type
'
,
key
:
'
type
'
,
dataIndex
:
'
version
'
,
key
:
'
version
'
,
},
{
title
:
'模板说明'
,
align
:
'center'
,
dataIndex
:
'
supplyMembersName
'
,
key
:
'
supplyMembersName
'
,
dataIndex
:
'
remark
'
,
key
:
'
remark
'
,
},
{
title
:
'状态'
,
align
:
'center'
,
dataIndex
:
'
externalState
'
,
key
:
'
externalState
'
,
dataIndex
:
'
status
'
,
key
:
'
status
'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
handleConfirm=
{
()
=>
handleUpdateState
(
record
)
}
record=
{
record
}
fieldNames=
"
isEnable
"
fieldNames=
"
status
"
expectTrueValue=
{
true
}
/>
),
...
...
@@ -49,7 +59,19 @@ export const useSelfTable = () => {
]
const
handleUpdateState
=
(
record
)
=>
{
console
.
log
(
record
,
'update'
)
PublicApi
.
postPurchaseTemplateUpdateTemplateStatus
({
id
:
record
.
id
,
status
:
!
record
.
status
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
})
}
const
handleDelete
=
(
id
)
=>
{
PublicApi
.
postPurchaseTemplateDeleteBatchTemplate
({
idList
:
[
id
]
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
})
}
...
...
@@ -60,8 +82,8 @@ export const useSelfTable = () => {
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
<
Button
type=
'link'
>
编辑
</
Button
>
<
Button
type=
'link'
>
删除
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/procurementAbility/callForBids/remarkBidTemplate/edit?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
handleDelete
(
record
.
id
)
}
>
删除
</
Button
>
</>
}
])
...
...
src/pages/procurement/callForBids/remarkBidTemplate/schema/index.ts
View file @
5f1215dd
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
OrderTypeMap
,
PurchaseOrderInsideWorkStateTexts
,
PurchaseOrderOutWorkStateTexts
}
from
'@/constants'
;
/**
* 除了订单必填字段, 默认
...
...
@@ -8,60 +6,29 @@ import { OrderTypeMap, PurchaseOrderInsideWorkStateTexts, PurchaseOrderOutWorkSt
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
},
[
FORM_FILTER_PATH
]:
{
searchWrap
:
{
type
:
'object'
,
'x-component'
:
'
flex-l
ayout'
,
'x-component'
:
'
Mega-L
ayout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginLeft
:
20
}
grid
:
true
,
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"supplyMembersName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入供应会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
Object
.
keys
(
OrderTypeMap
).
map
(
item
=>
({
label
:
OrderTypeMap
[
item
],
value
:
item
,
}))
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
actions
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
]
,
children
:
'{{Actions}}'
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
children
:
'查询'
,
placeholder
:
'模板名称'
,
advanced
:
false
,
},
},
},
},
}
}
,
}
src/pages/procurement/components/bidParticulars/constant.tsx
View file @
5f1215dd
...
...
@@ -40,7 +40,7 @@ export const columns = [
key
:
'price'
},
{
title
:
<
span
>
金额(含税)
<
br
/>
合计: ¥152,000.00
</
span
>
,
title
:
'金额(含税)'
,
dataIndex
:
'money'
,
key
:
'money'
,
render
:
(
t
,
r
)
=>
Number
((
r
.
price
*
r
.
count
).
toFixed
(
2
))
...
...
src/pages/procurement/components/bidParticulars/index.tsx
View file @
5f1215dd
...
...
@@ -38,7 +38,20 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
}))
})
console
.
log
(
data
,
'bidconfirm data'
)
const
[
tableColumn
,
setTableColumn
]
=
useState
<
any
>
(()
=>
{
let
totalMoney
=
0
;
data
.
submitTender
.
submitTenderMateriel
.
map
(
item
=>
{
totalMoney
+=
item
.
price
*
item
.
inviteTenderMateriel
.
count
})
let
tempCol
:
any
=
[...
columns
]
tempCol
[
tempCol
.
length
]
=
{
title
:
<
span
>
金额(含税)
<
br
/>
合计: ¥
{
totalMoney
}
</
span
>,
dataIndex
:
'money'
,
key
:
'money'
,
render
:
(
t
,
r
)
=>
Number
((
r
.
price
*
r
.
count
).
toFixed
(
2
))
}
return
tempCol
})
const
dataSource
=
[
{
...
...
@@ -108,7 +121,7 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
style=
{
{
marginTop
:
24
}
}
>
<
Table
columns=
{
columns
}
columns=
{
tableColumn
}
expandable=
{
{
expandedRowRender
:
record
=>
<
p
style=
{
{
margin
:
0
}
}
>
{
record
.
description
}
</
p
>,
rowExpandable
:
record
=>
record
.
name
!==
'Not Expandable'
,
...
...
src/pages/procurement/components/customTag.tsx
View file @
5f1215dd
...
...
@@ -24,6 +24,13 @@ const mapColor = [
"rgb(101, 84, 192)"
,
// 紫
"rgb(230, 63, 59)"
,
// 红
"rgb(0, 179, 122)"
,
// 绿
"rgb(96, 98, 102)"
,
// 灰
"rgb(255, 153, 31)"
,
// 黄
"rgb(63, 126, 210)"
,
// 蓝
"rgb(101, 84, 192)"
,
// 紫
"rgb(230, 63, 59)"
,
// 红
"rgb(0, 179, 122)"
,
// 绿
]
// 订单内部状态显示
...
...
src/pages/procurement/tender/addTender/components/relateProductDrawer/index.tsx
View file @
5f1215dd
This diff is collapsed.
Click to expand it.
src/pages/procurement/tender/addTender/index.tsx
View file @
5f1215dd
...
...
@@ -55,38 +55,6 @@ const tableChild = (<div className={style.childrenWrap}>
</
Row
>
</
div
>)
// mock数据
const
testData
=
[
{
id
:
1
,
code
:
'10001356'
,
name
:
'进口头层牛皮荔枝纹'
,
categoryName
:
'红色/XL/厚1.5mm'
,
brandName
:
'PELLE'
,
count
:
2000
,
unitName
:
'个'
,
hasTax
:
1
,
tax
:
6
,
// unitPrice: "¥18.00",
// money: "¥38,000.00",
description
:
tableChild
,
},
{
id
:
2
,
code
:
'10005856'
,
name
:
'进座谈会通用荔枝纹'
,
categoryName
:
'红色/XL/厚1.5mm'
,
brandName
:
'PELLE'
,
count
:
100
,
unitName
:
'个'
,
hasTax
:
1
,
tax
:
8
,
// unitPrice: "¥20.00",
// money: "¥40,000.00",
description
:
tableChild
,
},
]
// 新增投标 包含新增和编辑
const
AddTender
:
React
.
FC
<
AddTenderProps
>
=
(
props
)
=>
{
const
update
=
useUpdate
()
...
...
@@ -107,13 +75,10 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
pageStatus
}
=
usePageStatus
()
console
.
log
(
id
,
preview
,
pageStatus
)
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getPurchaseSubmitTenderGetSubmitTender
({
submitTenderId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
.
data
)
const
pocessedData
=
processTenderData
(
res
.
data
)
setInitFormValue
(
pocessedData
)
}
...
...
@@ -121,34 +86,6 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
}
},
[
id
])
const
dataIdList
=
[
{
title
:
'基本信息'
,
idName
:
'basicInfo'
,
},
{
title
:
'产地'
,
idName
:
'produceAddress'
,
},
{
title
:
'外观尺寸'
,
idName
:
'appearanceSize'
,
},
{
title
:
'工艺'
,
idName
:
'technology'
,
},
{
title
:
'特殊说明'
,
idName
:
'specificInfo'
,
},
{
title
:
'附件'
,
idName
:
'file'
,
}
]
const
handleSubmit
=
async
(
value
)
=>
{
console
.
log
(
value
)
if
(
value
&&
JSON
.
stringify
(
value
)
!==
'{}'
)
{
...
...
@@ -167,21 +104,19 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
let
param
=
{
...
item
,
inviteTenderMateriel
:
{
id
:
item
.
id
},
// @todo 由于v2商品故障 先行写死
commodityId
:
1
,
}
if
(
!
value
?.
id
)
delete
param
.
id
return
param
})
}
if
(
value
?.
id
)
params
.
id
=
value
.
id
console
.
log
(
params
,
'ppp'
)
const
res
=
await
PublicApi
.
postPurchaseSubmitTenderSaveSubmitTender
(
params
)
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
()
setBtnLoading
(
false
)
},
800
)
}
else
{
setBtnLoading
(
false
)
}
}
}
...
...
@@ -251,7 +186,6 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
title=
"关联投标商品"
currentRef=
{
productRef
}
schemaAction=
{
addSchemaAction
}
dataIdList=
{
dataIdList
}
/>
</
PageHeaderWrapper
>
)
...
...
src/pages/procurement/tender/addTender/model/useProductTable.tsx
View file @
5f1215dd
...
...
@@ -37,7 +37,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const
[
productColumns
,
setProductColumns
]
=
useState
(()
=>
{
productInfoColumns
[
productInfoColumns
.
length
-
1
].
render
=
(
t
,
r
)
=>
{
return
<
Button
type=
'link'
onClick=
{
(
r
)
=>
clickRelevance
(
r
)
}
>
关联投标商品
</
Button
>
return
<
Button
type=
'link'
onClick=
{
()
=>
clickRelevance
(
r
)
}
>
关联投标商品
</
Button
>
}
return
productInfoColumns
...
...
src/pages/procurement/tender/addTender/schema/modal.ts
View file @
5f1215dd
...
...
@@ -5,7 +5,7 @@ import { ISchema } from "@formily/antd";
export
const
relevanceSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
Text_
1
:
{
Text_
0
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
...
...
@@ -39,84 +39,84 @@ export const relevanceSchema: ISchema = {
headerColor
:
'#3877FF'
,
whetherSelect
:
true
},
// default: {a: 1, b: 25, c: 'er'},
}
},
}
}
}
},
Text_2
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
text
:
"产地"
},
properties
:
{
chan
:
{
title
:
'产地'
,
type
:
'string'
,
readOnly
:
true
,
}
}
},
Text_3
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
text
:
"外观尺寸"
},
properties
:
{
mian
:
{
title
:
'面料'
,
type
:
'string'
,
readOnly
:
true
,
},
yan
:
{
title
:
'颜色'
,
type
:
'string'
,
readOnly
:
true
,
},
ci
:
{
title
:
'尺码'
,
type
:
'string'
,
readOnly
:
true
,
}
}
},
Text_4
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
text
:
"工艺"
},
properties
:
{
hua
:
{
title
:
'化学处理'
,
type
:
'string'
,
readOnly
:
true
,
},
biao
:
{
title
:
'表批量化'
,
type
:
'string'
,
readOnly
:
true
,
}
}
},
Text_5
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
text
:
"特殊说明"
},
properties
:
{
specificInfo
:
{
title
:
'特殊说明'
,
type
:
'string'
,
readOnly
:
true
,
}
}
},
Text_6
:
{
// @todo 动态拼接这里的属性schema
// Text_2: {
// type: "object",
// "x-component": "CustomTitle",
// "x-component-props": {
// text: "产地"
// },
// properties: {
// chan: {
// title: '产地',
// type: 'string',
// readOnly: true,
// }
// }
// },
// Text_3: {
// type: "object",
// "x-component": "CustomTitle",
// "x-component-props": {
// text: "外观尺寸"
// },
// properties: {
// mian: {
// title: '面料',
// type: 'string',
// readOnly: true,
// },
// yan: {
// title: '颜色',
// type: 'string',
// readOnly: true,
// },
// ci: {
// title: '尺码',
// type: 'string',
// readOnly: true,
// }
// }
// },
// Text_4: {
// type: "object",
// "x-component": "CustomTitle",
// "x-component-props": {
// text: "工艺"
// },
// properties: {
// hua: {
// title: '化学处理',
// type: 'string',
// readOnly: true,
// },
// biao: {
// title: '表批量化',
// type: 'string',
// readOnly: true,
// }
// }
// },
// Text_5: {
// type: "object",
// "x-component": "CustomTitle",
// "x-component-props": {
// text: "特殊说明"
// },
// properties: {
// specificInfo: {
// title: '特殊说明',
// type: 'string',
// readOnly: true,
// }
// }
// },
Text_99
:
{
type
:
"object"
,
"x-component"
:
"CustomTitle"
,
"x-component-props"
:
{
...
...
@@ -152,11 +152,11 @@ export const relevanceSchema: ISchema = {
export
const
productSearch
:
ISchema
=
{
type
:
'object'
,
properties
:
{
groupN
ame
:
{
n
ame
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'
属性组
名称'
,
placeholder
:
'
商品
名称'
,
align
:
'flex-left'
,
},
},
...
...
@@ -177,10 +177,31 @@ export const productSearch: ISchema = {
},
},
properties
:
{
name
:
{
brandId
:
{
type
:
'string'
,
'x-component'
:
'CustomInputSearch'
,
'x-component-props'
:
{
placeholder
:
'商品品牌'
,
showSearch
:
true
,
showArrow
:
true
,
defaultActiveFirstOption
:
false
,
filterOption
:
false
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
searchValue
:
null
,
dataoption
:
[],
},
},
customerCategoryId
:
{
type
:
'string'
,
'x-component'
:
'CustomCategorySearch'
,
'x-component-props'
:
{
placeholder
:
'属性名称'
placeholder
:
'商品品类'
,
showSearch
:
true
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
dataoption
:
[],
fieldNames
:
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
},
},
},
submit
:
{
...
...
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