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
shenshaokai
jinfa-platform
Commits
2e4cdf89
Commit
2e4cdf89
authored
Apr 15, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手工合同
parent
b8d06bef
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
70 deletions
+58
-70
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+9
-14
contractText.tsx
src/pages/contract/manage/add/components/contractText.tsx
+2
-2
information.tsx
src/pages/contract/manage/add/components/information.tsx
+17
-15
contracAdd.tsx
src/pages/contract/manage/add/contracAdd.tsx
+13
-34
index.tsx
src/pages/contract/manage/auction/index.tsx
+1
-1
index.tsx
src/pages/contract/manage/bidding/index.tsx
+1
-1
index.tsx
src/pages/contract/manage/purchase/index.tsx
+12
-1
ytt.config.ts
ytt.config.ts
+3
-2
No files found.
src/pages/contract/manage/add/components/FormList.tsx
View file @
2e4cdf89
...
...
@@ -20,8 +20,9 @@ export interface IProps {
}
const
FormList
=
(
props
:
any
)
=>
{
const
{
currentRef
,
fetchdata
,
sourceType
}
=
props
;
const
{
currentRef
,
fetchdata
,
whether
,
Row
}
=
props
;
const
refs
=
useRef
({});
/* 显示模态框 */
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
...
...
@@ -208,30 +209,24 @@ const FormList = (props: any) => {
};
/* 获取物料信息 */
const
getList
=
()
=>
{
let
fn
;
switch
(
sourceType
)
{
case
'1'
:
fn
=
PublicApi
.
getPurchaseQuotedPriceProductlistListContract
;
break
;
}
const
parmas
=
{
id
:
47
,
memberId
:
8
,
memberRoleId
:
4
,
id
:
Row
.
demandId
,
memberId
:
Row
.
partyBMemberId
,
memberRoleId
:
Row
.
partyBRoleId
,
current
:
'1'
,
pageSize
:
'3'
,
}
fn
(
parmas
).
then
(
res
=>
{
PublicApi
.
getPurchaseQuotedPriceProductlistListContract
(
parmas
).
then
(
res
=>
{
console
.
log
(
res
);
// setData(res.data.data)
})
}
useEffect
(()
=>
{
if
(
sourceType
)
{
if
(
Object
.
keys
(
Row
).
length
!=
0
)
{
getList
()
}
},
[])
},
[
Row
])
/* 回调出来的数据 */
useEffect
(()
=>
{
...
...
@@ -291,7 +286,7 @@ const FormList = (props: any) => {
return
(
<
div
className=
{
styles
.
box
}
>
{
!
sourceType
&&
<
div
style=
{
{
paddingTop
:
12
,
paddingBottom
:
12
,
}
}
onClick=
{
showModal
}
>
Object
.
keys
(
Row
).
length
===
0
&&
<
div
style=
{
{
paddingTop
:
12
,
paddingBottom
:
12
,
}
}
onClick=
{
showModal
}
>
<
Button
block
type=
'dashed'
><
PlusOutlined
/>
选择采购物料
</
Button
>
</
div
>
}
...
...
src/pages/contract/manage/add/components/contractText.tsx
View file @
2e4cdf89
...
...
@@ -19,7 +19,7 @@ const ContractText = (props: any) => {
setCheckNick
(
e
.
target
.
checked
);
};
const
getTemplate
=
(
e
)
=>
{
PublicApi
.
get
Order
ContractTemplateGet
({
id
:
e
}).
then
(
res
=>
{
PublicApi
.
get
Contract
ContractTemplateGet
({
id
:
e
}).
then
(
res
=>
{
setTemplatel
(
res
.
data
)
})
}
...
...
@@ -29,7 +29,7 @@ const ContractText = (props: any) => {
current
:
1
,
pageSize
:
99
}
PublicApi
.
get
Order
ContractTemplatePage
(
data
).
then
(
res
=>
{
PublicApi
.
get
Contract
ContractTemplatePage
(
data
).
then
(
res
=>
{
console
.
log
(
res
);
let
list
=
res
.
data
.
data
.
map
((
item
:
any
)
=>
{
if
(
item
.
state
!=
0
)
{
...
...
src/pages/contract/manage/add/components/information.tsx
View file @
2e4cdf89
...
...
@@ -22,12 +22,11 @@ const { Search } = Input
export
interface
IProps
{
fetchdata
:
any
,
currentRef
:
any
,
fromData
:
any
Row
:
any
}
const
Information
=
(
props
:
any
)
=>
{
const
{
fromData
,
currentRef
,
fetchdata
,
getType
}
=
props
;
const
{
fetchdata
,
currentRef
,
Row
,
getrow
,
sourceType
}
=
props
;
const
refs
=
useRef
({});
/**
* @param {{visible}} 显示选择合同弹出
...
...
@@ -91,16 +90,16 @@ const Information = (props: any) => {
/* 获取传入组建的值 */
useEffect
(()
=>
{
basicsVO
.
contractNo
=
basicsVO
.
contractNo
?
basicsVO
.
contractNo
:
''
;
basicsVO
.
sourceType
=
fromData
.
sourceType
?
fromData
.
sourceType
:
'1'
;
basicsVO
.
contractId
=
fromData
.
contractId
?
fromData
.
contractId
:
0
;
basicsVO
.
partyBName
=
fromData
.
partyBName
?
fromData
.
partyBName
:
''
;
basicsVO
.
sourceNo
=
fromData
.
sourceNo
?
fromData
.
sourceNo
:
''
;
basicsVO
.
totalAmount
=
fromData
.
totalAmount
?
fromData
.
totalAmount
:
''
;
basicsVO
.
sourceType
=
Row
.
sourceType
?
Row
.
sourceType
:
'1'
;
basicsVO
.
contractId
=
Row
.
contractId
?
Row
.
contractId
:
0
;
basicsVO
.
partyBName
=
Row
.
partyBName
?
Row
.
partyBName
:
''
;
basicsVO
.
sourceNo
=
Row
.
sourceNo
?
Row
.
sourceNo
:
''
;
basicsVO
.
totalAmount
=
Row
.
totalAmount
?
Row
.
totalAmount
:
''
;
setbasicsVO
(
basicsVO
)
console
.
log
(
basicsVO
)
console
.
log
(
basicsVO
,
Row
)
attrValueForm
.
setFieldsValue
(
basicsVO
)
setfalg
(
fromData
.
sourceNo
?
true
:
false
)
setmanual
(
fromData
.
partyBName
?
true
:
false
)
setfalg
(
Row
.
sourceNo
?
true
:
false
)
setmanual
(
Row
.
partyBName
?
true
:
false
)
},
[
basicsVO
])
/**
...
...
@@ -142,7 +141,7 @@ const Information = (props: any) => {
console
.
log
(
basicsVO
)
setfalg
(
true
)
attrValueForm
.
setFieldsValue
(
basicsVO
);
getType
(
true
)
//
getType(true)
}
else
{
let
totalAmount
,
sourceId
,
partyBName
,
partyBMemberId
,
sourceNo
,
partyBRoleId
;
const
selectRow
=
RowCtl
.
selectRow
[
0
];
...
...
@@ -174,8 +173,11 @@ const Information = (props: any) => {
basicsVO
.
sourceNo
=
sourceNo
;
setbasicsVO
(
basicsVO
)
setmanual
(
true
)
// getType(false)
attrValueForm
.
setFieldsValue
(
basicsVO
);
selectRow
.
partyBMemberId
=
selectRow
.
awardMemberId
;
selectRow
.
partyBRoleId
=
selectRow
.
awardRoleId
;
getrow
(
selectRow
)
}
Choose
()
}
...
...
@@ -252,7 +254,7 @@ const Information = (props: any) => {
]
}
>
<
Select
onChange=
{
handleChange
}
disabled=
{
basicsVO
.
contractId
&&
basicsVO
.
sourceType
?
true
:
false
}
>
disabled=
{
sourceType
?
true
:
false
}
>
<
Option
value=
"1"
>
采购询价
</
Option
>
<
Option
value=
"2"
>
采购招标
</
Option
>
<
Option
value=
"3"
>
采购竞价
</
Option
>
...
...
@@ -283,7 +285,7 @@ const Information = (props: any) => {
falg
?
<
Input
placeholder=
'最长60个字符,30个汉字'
disabled
/>
:
<
Search
placeholder=
"最长60个字符,30个汉字"
readOnly
enterButton=
{
<
div
onClick=
{
()
=>
Choose
(
fromData
.
sourceType
==
'4'
?
'1'
:
fromData
.
sourceType
)
}
><
LinkOutlined
/>
选择
</
div
>
}
/>
<
Search
placeholder=
"最长60个字符,30个汉字"
readOnly
enterButton=
{
<
div
onClick=
{
()
=>
Choose
(
basicsVO
.
sourceType
==
'4'
?
'1'
:
basicsVO
.
sourceType
)
}
><
LinkOutlined
/>
选择
</
div
>
}
/>
}
</
Form
.
Item
>
<
Form
.
Item
...
...
src/pages/contract/manage/add/contracAdd.tsx
View file @
2e4cdf89
...
...
@@ -6,35 +6,20 @@ import FormList from './components/FormList'
import
Fromtable
from
'./components/fromtable'
import
ContractText
from
'./components/contractText'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SaveOutlined
,
}
from
'@ant-design/icons'
const
{
TabPane
}
=
Tabs
;
const
Add
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
{
location
:
{
query
:
{
contractId
,
// 合同id
sourceType
,
// 寻源类型
sourceNo
,
// 单据
sourceId
,
// 单据id
totalAmount
,
// 合同总金额
partyBMemberId
,
// 授标会员id
partyBName
,
// 授标 会员昵称
memberRoleId
// 授标角色id
}
}
}
=
props
;
const
currentBasic
=
useRef
<
any
>
({});
const
purchaseMate
=
useRef
<
any
>
([])
const
payPlan
=
useRef
<
any
>
([])
const
contractText
=
useRef
<
any
>
({})
console
.
log
(
memberRoleId
,
partyBMemberId
)
const
[
fromData
,
setData
]
=
useState
<
any
>
([]);
/**
* @param name tag标签名
* @param components 显示内容
...
...
@@ -42,12 +27,12 @@ const Add: React.FC<{}> = (props: any) => {
const
[
basic
,
setbasic
]
=
useState
<
any
>
({});
const
[
purchaseMaterielList
,
setpurchaseMaterielList
]
=
useState
<
any
>
({})
const
[
payPlanList
,
setpayPlanList
]
=
useState
<
any
>
([]);
/*
是否是手工单
*/
const
[
whether
,
setwhether
]
=
useState
<
boolean
>
(
false
);
const
get
Type
=
(
e
)
=>
{
console
.
log
(
e
,
'lailai1'
)
set
whether
(
e
)
/*
初始值
*/
const
[
Row
,
setRow
]
=
useState
<
any
>
({})
/* 获取下拉框选中的id 查询物料 */
const
get
row
=
(
row
)
=>
{
console
.
log
(
row
,
1111111111111
)
set
Row
(
row
)
}
const
TabList
=
[
{
...
...
@@ -56,8 +41,9 @@ const Add: React.FC<{}> = (props: any) => {
<
Information
fetchdata=
{
basic
}
currentRef=
{
currentBasic
}
fromData=
{
fromData
?
fromData
:
''
}
getType=
{
getType
}
Row=
{
Row
}
sourceType=
{
sourceType
}
getrow=
{
getrow
}
/>
},
{
...
...
@@ -66,10 +52,7 @@ const Add: React.FC<{}> = (props: any) => {
<
FormList
fetchdata=
{
purchaseMaterielList
}
currentRef=
{
purchaseMate
}
sourceType=
{
sourceType
}
id=
{
sourceId
}
memberId=
{
partyBMemberId
}
memberRoleId=
{
memberRoleId
}
Row=
{
Row
}
/>
},
{
...
...
@@ -123,13 +106,9 @@ const Add: React.FC<{}> = (props: any) => {
}
useEffect
(()
=>
{
setData
({
contractId
,
totalAmount
,
partyBName
,
sourceNo
,
sourceType
,
})
if
(
sourceType
)
{
setRow
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'record'
)))
}
},
[])
return
(
<
PageHeaderWrapper
...
...
src/pages/contract/manage/auction/index.tsx
View file @
2e4cdf89
...
...
@@ -96,7 +96,7 @@ const Auction = () => {
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=3
&sourceId=${record.viePriceId}&sourceNo=${record.viePriceNO}&totalAmount=${record.awardAmount}&partyBMemberId=${record.awardMemberId}&partyBName=${record.awardName}
`
)
}
>
创建采购竞价合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=3`
)
}
>
创建采购竞价合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/Auction/details?contractId=${record.id}`
)
}
>
查看
</
span
>
</
div
>
)
...
...
src/pages/contract/manage/bidding/index.tsx
View file @
2e4cdf89
...
...
@@ -92,7 +92,7 @@ const BiddingList = () => {
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=2
&sourceId=${record.inviteBidId}&sourceNo=${record.inviteBidNO}&totalAmount=${record.bidWinnerAmount}&partyBMemberId=${record.bidWinnerMemberId}&partyBName=${record.bidWinnerName}
`
)
}
>
创建采购招标合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=2`
)
}
>
创建采购招标合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/bidding/details?contractId=${record.id}`
)
}
>
查看
</
span
>
</
div
>
)
...
...
src/pages/contract/manage/purchase/index.tsx
View file @
2e4cdf89
...
...
@@ -101,7 +101,7 @@ const PurchaseList = () => {
render
:
(
_
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=${record.id}&sourceType=1&sourceId=${record.demandId}&sourceNo=${record.demandNO}&totalAmount=${record.awardAmount}&partyBMemberId=${record.awardMemberId}&partyBName=${record.awardName}&memberRoleId=${record.awardRoleId}`
)
}
>
创建采购询价合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
like
(
record
)
}
>
创建采购询价合同
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/manage/purchase/details?contractId=${record.id}`
)
}
>
查看
</
span
>
</
div
>
)
...
...
@@ -114,6 +114,17 @@ const PurchaseList = () => {
setSelectRow
(
selectedRows
)
}
};
const
like
=
(
record
)
=>
{
record
.
sourceId
=
record
.
demandId
;
record
.
sourceNo
=
record
.
demandNO
;
record
.
totalAmount
=
record
.
awardAmount
;
record
.
partyBMemberId
=
record
.
awardMemberId
;
record
.
partyBRoleId
=
record
.
awardRoleId
;
record
.
partyBName
=
record
.
awardName
;
sessionStorage
.
setItem
(
'record'
,
JSON
.
stringify
(
record
));
history
.
push
(
`/memberCenter/contract/manage/add/addList/contracAdd?contractId=
${
record
.
id
}
&sourceType=1`
)
};
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
params
.
startTime
=
params
.
startTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
...
...
ytt.config.ts
View file @
2e4cdf89
...
...
@@ -7,7 +7,7 @@ const tokenList = [
{
name
:
'Template'
,
token
:
'7ec923520215c7e2f771867cb4d29cafbf823daf0fb2d3d9fa70b57a523c8bfb'
,
categoryIds
:
[
0
],
},
// 店铺模板服务
{
name
:
'Pay'
,
token
:
'34608cd33222b1650795459d73b8eb0b260eb92cf5e8d1e646f85a4875e36f05'
,
categoryIds
:
[
0
],
},
// 支付服务
{
name
:
'Search'
,
token
:
'ca19f532efba91f7773cbfbd526b798c6ac83df670071e97d72c50dca1d53a48'
,
categoryIds
:
[
0
],
},
// 搜索服务
{
name
:
'Order'
,
token
:
'
31b93b223421ca52389b088a7457c651fab7c1bf658fc7dd38d0689d09c8e235
'
,
categoryIds
:
[
0
],
},
//订单服务
{
name
:
'Order'
,
token
:
'
fcebd7d4c6b6930790e844725f348280c2227b8044ae8a16bf56ead2720ec1b6
'
,
categoryIds
:
[
0
],
},
//订单服务
{
name
:
'Settle'
,
token
:
'fffbeeaaa198c285955997c606bc279fc6950fea118580c786f2c73eecccaa6a'
,
categoryIds
:
[
0
],
},
//结算服务
{
name
:
'AfterService'
,
token
:
'39db719680bf1b3db21bc1deda933cde16d17559e9676bf848ec96c1320e68df'
,
categoryIds
:
[
0
],
},
// '售后服务'
{
name
:
'Enhance'
,
token
:
'594a7e7ff17f6f40fb9fb726c1da9a3f282a926a8d386eb6cbfd668a3f75f251'
,
categoryIds
:
[
0
],
},
// 加工服务
...
...
@@ -17,7 +17,8 @@ const tokenList = [
{
name
:
'Purchase'
,
token
:
'a09e2b66e00079df9881fc660eb17db0265e33362c13f03f2003ba81d26f49d8'
,
categoryIds
:
[
0
],
},
// 采购服务
{
name
:
'PurchaseV2'
,
token
:
'84c81ef877863ad4e2c0ebb2c3b3e80f9539420f2fc0828ef33f5159e8423b2c'
,
categoryIds
:
[
0
]
},
// 采购服务V2
{
name
:
'TransactionV2'
,
token
:
'3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1'
,
categoryIds
:
[
0
]
},
// 交易服务V2
{
name
:
'ContractV2'
,
token
:
'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4'
,
categoryIds
:
[
0
]
},
// 合同能力V2
{
name
:
'ContractV2'
,
token
:
'b1b7ee2d99434fe0f4d89bfa5c6a05e917c297219653a045b8b2ee5415b37e43'
,
categoryIds
:
[
0
]
},
// 合同能力V2
]
const
getConfigMap
=
(
tokens
)
=>
tokens
.
map
(
v
=>
({
...
...
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