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
89410adf
Commit
89410adf
authored
May 21, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽离详情组件
parent
c36aa1fb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
850 additions
and
45 deletions
+850
-45
utils.ts
src/pages/contract/constants/utils.ts
+5
-0
crossSellProducts.tsx
...tract/coordination/components/modal/crossSellProducts.tsx
+0
-1
selectProduct.tsx
.../contract/coordination/components/modal/selectProduct.tsx
+0
-2
circulationList.tsx
src/pages/contract/coordination/details/circulationList.tsx
+90
-0
detailedList.tsx
src/pages/contract/coordination/details/detailedList.tsx
+104
-0
index.css
src/pages/contract/coordination/details/index.css
+1
-0
index.less
src/pages/contract/coordination/details/index.less
+1
-0
index.tsx
src/pages/contract/coordination/details/index.tsx
+0
-0
purchaseList.tsx
src/pages/contract/coordination/details/purchaseList.tsx
+240
-0
record.tsx
src/pages/contract/coordination/details/record.tsx
+67
-0
situationList.tsx
src/pages/contract/coordination/details/situationList.tsx
+243
-0
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+12
-7
table.tsx
src/pages/contract/funds/addbill/components/table.tsx
+16
-10
materials.tsx
src/pages/contract/funds/details/components/materials.tsx
+1
-2
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+13
-3
contractText.tsx
src/pages/contract/manage/add/components/contractText.tsx
+33
-10
information.tsx
src/pages/contract/manage/add/components/information.tsx
+4
-6
contracAdd.tsx
src/pages/contract/manage/add/contracAdd.tsx
+10
-2
index.css
src/pages/contract/manage/add/index.css
+1
-0
index.less
src/pages/contract/manage/add/index.less
+1
-0
FormList.tsx
src/pages/contract/manage/editing/components/FormList.tsx
+5
-0
information.tsx
src/pages/contract/manage/editing/components/information.tsx
+3
-2
No files found.
src/pages/contract/constants/utils.ts
0 → 100644
View file @
89410adf
/* 下载合同 */
export
const
Download
=
(
name
,
contractUrl
)
=>
{
window
.
location
.
href
=
`/api/contract/contractTemplate/downloadContract?contractName=
${
name
}
&contractUrl=
${
contractUrl
}
`
}
src/pages/contract/coordination/components/modal/crossSellProducts.tsx
View file @
89410adf
...
...
@@ -41,7 +41,6 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
onClose
,
onClick
}
=
props
;
console
.
log
(
record
)
const
[
flag
,
setFlag
]
=
useState
<
boolean
>
(
false
);
const
[
product
,
setProduct
]
=
useState
<
any
>
({});
const
[
attribute
,
setAttribute
]
=
useState
<
any
>
([]);
...
...
src/pages/contract/coordination/components/modal/selectProduct.tsx
View file @
89410adf
...
...
@@ -64,8 +64,6 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
RowCtl
.
setSelectRow
([]);
RowCtl
.
setSelectedRowKeys
([]);
}
console
.
log
(
rowSelection
,
RowCtl
)
return
(
<
Drawer
visible=
{
visible
}
...
...
src/pages/contract/coordination/details/circulationList.tsx
0 → 100644
View file @
89410adf
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Radio
,
Table
,
Typography
}
from
'antd'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
import
{
PublicApi
}
from
'@/services/api'
;
const
{
Text
}
=
Typography
;
import
{
StandardTable
}
from
'god'
;
export
interface
Iprops
extends
IAntdSchemaFormProps
{
/* 显示隐藏 */
contractId
,
}
const
circulation
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
[
listIndex
,
setlistIndex
]
=
useState
(
'1'
);
const
ref
=
useRef
({});
/* 流转列表 */
const
CirculationList
:
any
=
[
{
title
:
'序号'
,
dataIndex
:
'name'
,
align
:
'center'
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'operate'
,
align
:
'center'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
},
{
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
},
]
/* 内部 */
const
fetchDataListcolumns
:
any
=
[
{
title
:
'操作人'
,
dataIndex
:
'name'
,
align
:
'center'
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
},
{
title
:
'部门'
,
dataIndex
:
'department'
,
align
:
'center'
,
},
{
title
:
'职位'
,
dataIndex
:
'jobTitle'
,
align
:
'center'
,
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'operate'
,
align
:
'center'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
},
{
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
},
]
const
handleBatchChange
=
(
e
)
=>
{
setlistIndex
(
e
.
target
.
value
)
setTimeout
(()
=>
{
ref
.
current
.
reload
();
},
300
);
};
/* 流转记录内部 */
const
fetchData
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
fn
;
fn
=
listIndex
==
'1'
?
PublicApi
.
getContractCoordinationPageOuterRecordList
:
PublicApi
.
getContractCoordinationPageInnerRecordList
;
fn
({
...
params
,
contractId
:
contractId
}).
then
(
res
=>
{
console
.
log
(
res
.
data
,
listIndex
)
resolve
(
res
.
data
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
})
}
return
(
<
div
id=
'record'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
>
流转记录
</
div
>
<
div
className=
'ant-card-extra'
>
<
Radio
.
Group
defaultValue=
{
listIndex
}
onChange=
{
(
e
)
=>
handleBatchChange
(
e
)
}
>
<
Radio
.
Button
value=
"1"
>
外部流转
</
Radio
.
Button
>
<
Radio
.
Button
value=
"2"
>
内部流转
</
Radio
.
Button
>
</
Radio
.
Group
>
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
currentRef=
{
ref
}
columns=
{
listIndex
===
'1'
?
CirculationList
:
fetchDataListcolumns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
</
div
>
</
div
>
)
}
export
default
circulation
;
src/pages/contract/coordination/details/detailedList.tsx
0 → 100644
View file @
89410adf
import
React
,
{
useRef
}
from
'react'
;
import
{
StandardTable
}
from
'god'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PublicApi
}
from
'@/services/api'
;
export
interface
Iprops
extends
IAntdSchemaFormProps
{
/* 显示隐藏 */
contractId
:
any
,
}
const
DetailedList
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
ref
=
useRef
({});
const
columnsList
:
any
=
[
{
title
:
'请款次数'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
{
index
+
1
}
</
span
>
)
},
},
{
title
:
'请款单号/摘要'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=pageDetailList`
}
>
{
text
}
</
EyePreview
>
<
p
>
{
record
.
applyAbstract
}
</
p
>
</
div
>
);
}
},
{
title
:
'请款时间'
,
dataIndex
:
'applyTime'
,
align
:
'center'
,
},
{
title
:
'请款金额'
,
dataIndex
:
'applyAmount'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
¥
{
text
}
</
span
>
)
},
},
{
title
:
'付款时间'
,
dataIndex
:
'payTime'
,
align
:
'center'
,
},
{
title
:
'付款金额'
,
dataIndex
:
'payAmount'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
¥
{
text
}
</
span
>
)
},
},
{
title
:
'付款方式'
,
dataIndex
:
'payWayName'
,
align
:
'center'
,
},
];
/* 请款统计 */
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getContractExecutePageListForSummaryByPartyA
({
...
params
,
contractId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
,
'这个是什么玩意'
)
resolve
(
res
.
data
)
}
else
{
}
})
})
}
return
(
<
div
id=
'record'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
>
请款统计
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
currentRef=
{
ref
}
columns=
{
columnsList
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
/>
</
div
>
</
div
>
)
}
export
default
DetailedList
;
src/pages/contract/coordination/details/index.css
View file @
89410adf
...
...
@@ -144,6 +144,7 @@
align-items
:
center
;
color
:
#303133
;
background-color
:
#fafbfc
;
cursor
:
pointer
;
}
.upload_item
.upload_left
:global
.anticon-file-word
{
color
:
#4279df
;
...
...
src/pages/contract/coordination/details/index.less
View file @
89410adf
...
...
@@ -157,6 +157,7 @@
align-items: center;
color: #303133;
background-color: #fafbfc;
cursor: pointer;
:global {
.anticon-file-word {
color: #4279df;
...
...
src/pages/contract/coordination/details/index.tsx
View file @
89410adf
This diff is collapsed.
Click to expand it.
src/pages/contract/coordination/details/purchaseList.tsx
0 → 100644
View file @
89410adf
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Table
,
Typography
,
message
,
}
from
'antd'
;
import
style
from
'./index.less'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
import
{
PublicApi
}
from
'@/services/api'
;
import
CrossSellProducts
from
'../components/modal/crossSellProducts'
;
const
{
Text
}
=
Typography
;
export
interface
Iprops
extends
IAntdSchemaFormProps
{
/* 显示隐藏 */
contractId
,
type
,
Refresh
:
Function
,
}
const
purchaseList
:
React
.
FC
<
Iprops
>
=
({
contractId
,
type
,
Refresh
,
})
=>
{
const
[
columns
,
setcolumns
]
=
useState
<
any
>
([]);
const
[
ListData
,
setListData
]
=
useState
<
any
>
([]);
const
[
Totalamount
,
setTotalamount
]
=
useState
(
0
)
const
[
Numberamount
,
setNumberamount
]
=
useState
(
0
)
const
[
listLoading
,
setListLoading
]
=
useState
(
false
);
const
[
size
,
setSize
]
=
useState
(
8
);
const
[
index
,
setIndex
]
=
useState
<
number
>
();
const
[
record
,
setRecord
]
=
useState
<
any
>
({});
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
columnsTab
=
(
Numberamount
,
Totalamount
)
=>
{
const
columns
:
any
=
[
{
title
:
'物料编号/名称'
,
dataIndex
:
'materielNo'
,
align
:
'center'
,
render
:
(
text
,
item
,
index
)
=>
{
return
(
<
div
>
<
div
>
{
text
}
</
div
>
<
div
>
{
item
.
materielName
}
</
div
>
</
div
>
)
}
},
{
title
:
'规格型号'
,
dataIndex
:
'type'
,
align
:
'center'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'采购数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
},
{
title
:
'含税'
,
dataIndex
:
'isHasTaxName'
,
align
:
'center'
,
},
{
title
:
'税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
},
{
title
:
'单价(含税)'
,
dataIndex
:
'price'
,
align
:
'center'
,
},
{
dataIndex
:
'bidCount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
授标数量
</
Text
>
<
Text
>
合计:
{
Numberamount
}
</
Text
>
</
Space
>
),
},
{
dataIndex
:
'bidAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
金额(不含税)
</
Text
>
<
Text
>
合计: ¥
{
Totalamount
}
</
Text
>
</
Space
>
),
},
];
setcolumns
(
columns
)
}
/* 下拉的子元素 */
const
listItem
=
(
record
,
index
)
=>
(
<
div
className=
{
style
.
listItem
}
>
<
div
className=
{
style
.
label
}
>
<
p
>
关联
</
p
>
<
p
>
报价商品
</
p
>
</
div
>
<
div
className=
{
style
.
text
}
>
<
p
>
商品编号:
{
record
.
associatedMaterielNo
}
</
p
>
<
p
>
商品名称:
{
record
.
associatedGoods
}
</
p
>
</
div
>
<
div
className=
{
style
.
text
}
>
<
p
>
规格型号:
{
record
.
associatedType
}
</
p
>
<
p
>
品类:
{
record
.
associatedCategory
}
</
p
>
</
div
>
<
div
className=
{
style
.
text
}
>
<
p
>
品牌:
{
record
.
associatedBrand
}
</
p
>
</
div
>
{
type
==
'submitExamine'
&&
<
div
className=
{
style
.
text
}
>
<
p
style=
{
{
color
:
'#00B37A'
,
textAlign
:
'right'
,
lineHeight
:
'35px'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
{
setIndex
(
index
);
setRecord
(
record
);
setVisible
(
true
)
}
}
>
关联报价商品
</
p
>
</
div
>
}
</
div
>
)
const
fetchListData
=
(
params
)
=>
{
setListLoading
(
true
);
PublicApi
.
getContractCoordinationPagePurchaseMaterielList
({
...
params
,
contractId
}).
then
(
res
=>
{
let
Totalamount
=
0
,
Numberamount
=
0
;
res
.
data
.
data
.
map
(
item
=>
{
Totalamount
+=
item
.
bidAmount
;
Numberamount
+=
item
.
bidCount
})
setTotalamount
(
Totalamount
)
setNumberamount
(
Numberamount
)
columnsTab
(
Totalamount
,
Numberamount
)
setListData
(
res
.
data
.
data
)
Refresh
(
res
.
data
.
data
)
setTotal
(
res
.
data
.
totalCount
)
}).
finally
(()
=>
{
setListLoading
(
false
);
});
}
/** 确定关联商品 */
const
handleConfirm
=
(
params
:
any
)
=>
{
const
data
=
[...
ListData
];
data
[
index
].
associatedCategory
=
params
.
product
.
customerCategoryName
;
data
[
index
].
associatedBrand
=
params
.
product
.
brandName
;
data
[
index
].
associatedGoods
=
params
.
product
.
name
;
const
purchaseMaterielId
=
data
[
index
].
id
;
const
associatedMaterielNo
=
data
[
index
].
associatedMaterielNo
?
data
[
index
].
associatedMaterielNo
:
params
.
product
.
code
const
associatedMaterielName
=
data
[
index
].
materielName
;
const
associatedType
=
data
[
index
].
associatedType
;
const
associatedCategory
=
data
[
index
].
associatedCategory
const
associatedBrand
=
data
[
index
].
associatedBrand
const
res_data
=
{
contractId
,
purchaseMaterielId
,
associatedGoods
:
params
.
product
.
name
,
associatedDataId
:
params
.
product
.
id
,
associatedMaterielNo
,
associatedMaterielName
,
associatedType
,
associatedCategory
,
associatedBrand
}
console
.
log
(
params
,
10086
,
res_data
)
let
msg
=
message
.
loading
({
content
:
'正在操作'
,
duration
:
0
,
});
PublicApi
.
postContractCoordinationAssociatedOfferGoods
(
res_data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
data
=
{
current
:
1
,
pageSize
:
10
}
fetchListData
(
data
)
}
}).
finally
(()
=>
{
msg
();
})
setListData
(
data
)
setVisible
(
false
);
setRecord
({})
}
useEffect
(()
=>
{
if
(
contractId
)
{
let
data
=
{
current
:
1
,
pageSize
:
8
}
fetchListData
(
data
)
}
},
[
contractId
])
// 展开/收起的回调
const
onExpand
=
expandedKeys
=>
{
};
const
handlePaginationChange
=
(
current
:
number
,
pageSize
:
number
)
=>
{
let
data
=
{
current
:
current
,
pageSize
:
8
}
fetchListData
(
data
)
};
return
(
<
div
id=
'materials'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
>
采购材料
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
div
className=
{
style
.
box
}
>
<
Table
columns=
{
columns
}
rowKey=
'id'
expandable=
{
{
expandedRowRender
:
(
record
,
index
)
=>
listItem
(
record
,
index
),
onExpand
:
record
=>
onExpand
(
record
)
}
}
loading=
{
listLoading
}
dataSource=
{
ListData
}
pagination=
{
{
pageSize
:
size
,
total
,
onChange
:
handlePaginationChange
}
}
style=
{
{
width
:
"100%"
}
}
/>
</
div
>
</
div
>
<
CrossSellProducts
visible=
{
visible
}
record=
{
record
}
onClose=
{
()
=>
setVisible
(
false
)
}
onClick=
{
handleConfirm
}
/>
</
div
>
)
}
export
default
purchaseList
;
src/pages/contract/coordination/details/record.tsx
0 → 100644
View file @
89410adf
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
export
interface
Iprops
extends
IAntdSchemaFormProps
{
/* 显示隐藏 */
outerTaskStepList
?:
any
,
innerTaskStepList
?:
any
,
}
const
{
Step
}
=
Steps
;
const
Record
:
React
.
FC
<
Iprops
>
=
({
outerTaskStepList
,
innerTaskStepList
,
})
=>
{
const
[
currentBatch
,
setCurrentBatch
]
=
useState
(
'1'
);
const
[
StepList
,
setStepList
]
=
useState
<
any
>
([]);
/**
* 流转进度点击
*/
const
handleBatchChange
=
(
e
)
=>
{
let
StepList
=
e
.
target
.
value
==
1
?
outerTaskStepList
:
innerTaskStepList
;
setStepList
(
StepList
)
setCurrentBatch
(
e
.
target
.
value
)
};
useEffect
(()
=>
{
let
StepList
=
currentBatch
===
'1'
?
outerTaskStepList
:
innerTaskStepList
;
setStepList
(
StepList
)
},
[
outerTaskStepList
])
return
(
<
div
id=
'progress'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
>
<
div
className=
'ant-card-head-wrapper'
>
流转进度
</
div
>
<
div
className=
'ant-card-extra'
>
<
Radio
.
Group
defaultValue=
{
currentBatch
}
onChange=
{
(
e
)
=>
handleBatchChange
(
e
)
}
>
<
Radio
.
Button
value=
"1"
>
外部流转
</
Radio
.
Button
>
<
Radio
.
Button
value=
"2"
>
内部流转
</
Radio
.
Button
>
</
Radio
.
Group
>
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
Steps
progressDot
>
{
StepList
.
map
((
item
:
any
)
=>
(
<
Step
title=
{
item
.
taskName
}
description=
{
item
.
roleName
}
key=
{
item
.
step
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
}
</
Steps
>
</
div
>
</
div
>
)
}
export
default
Record
;
src/pages/contract/coordination/details/situationList.tsx
0 → 100644
View file @
89410adf
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Input
,
Table
,
Typography
,
Space
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
;
export
interface
Iprops
extends
IAntdSchemaFormProps
{
contractId
:
any
}
const
{
Text
}
=
Typography
;
const
situationList
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
size
,
setSize
]
=
useState
(
8
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
listLoading
,
setListLoading
]
=
useState
(
false
);
/* 单据总金额 */
const
[
orderAmount
,
setorderAmount
]
=
useState
<
number
>
(
0
);
/* 已付款 */
const
[
payAmount
,
setpayAmount
]
=
useState
<
number
>
(
0
);
/* 已请款待付款 */
const
[
unPayApplyAmount
,
setunPayApplyAmount
]
=
useState
<
number
>
(
0
)
/* 待请款 */
const
[
unApplyAmount
,
setunApplyAmount
]
=
useState
<
number
>
(
0
)
const
[
data
,
setdata
]
=
useState
<
any
>
([])
/* 执行请款的选中 */
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
/* 搜素 */
const
onSearch
=
(
values
)
=>
{
const
data
=
{
contractId
,
orderNo
:
values
,
orderAbstract
:
''
,
startTime
:
""
,
endTime
:
""
,
current
:
1
,
pageSize
:
5
,
}
getContracInfoList
(
data
)
}
/* 执行情况分页 */
const
getContracInfoList
=
(
data
)
=>
{
setListLoading
(
true
);
PublicApi
.
getContractExecutePageExecuteInfoList
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
orderAmount
=
0
,
payAmount
=
0
,
unPayApplyAmount
=
0
,
unApplyAmount
=
0
;
if
(
res
.
data
.
data
)
{
let
list
=
res
.
data
.
data
.
map
((
item
:
any
,
index
:
number
)
=>
{
orderAmount
+=
item
.
orderAmount
;
payAmount
+=
item
.
payAmount
;
unApplyAmount
+=
item
.
unApplyAmount
;
unPayApplyAmount
+=
item
.
unPayApplyAmount
;
return
{
...
item
,
keyId
:
index
+
1
,
}
})
console
.
log
(
list
)
setdata
(
list
)
}
setTotal
(
res
.
data
.
totalCount
)
setunApplyAmount
(
unApplyAmount
)
setunPayApplyAmount
(
unPayApplyAmount
)
setpayAmount
(
payAmount
)
setorderAmount
(
orderAmount
)
}
}).
finally
(()
=>
{
setListLoading
(
false
);
});
}
const
rowSelection
:
any
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
console
.
log
(
selectedRowKeys
,
selectedRows
)
setSelectedRowKeys
(
selectedRowKeys
)
setSelectRow
(
selectedRows
)
}
};
/* 查看付款明细 */
const
columns
:
any
=
[
{
title
:
'单据号/摘要'
,
dataIndex
:
'orderNO'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/preview?id=${record.orderId}`
}
>
{
text
}
</
EyePreview
>
<
p
>
{
record
.
orderAbstract
}
</
p
>
</
div
>
);
},
},
{
title
:
'单据类型'
,
dataIndex
:
'orderTypeName'
,
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'orderStatusName'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'orderTime'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Text
>
{
moment
(
Number
(
text
)).
format
(
'YYYY-MM-DD'
)
}
</
Text
>
)
}
},
{
dataIndex
:
'orderAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
单据金额
</
Text
>
<
Text
>
合计: ¥
{
orderAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'含税/税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
>
{
record
.
isHasTax
==
1
?
'是'
:
'否'
}
</
Text
>
<
Text
>
%
{
text
}
</
Text
>
</
Space
>
)
},
{
dataIndex
:
'payAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已付款
</
Text
>
<
Text
>
合计: ¥
{
payAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已请款待付款
</
Text
>
<
Text
>
合计: ¥
{
unPayApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'unPayApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
待请款
</
Text
>
<
Text
>
合计: ¥
{
unApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'unApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'操作'
,
dataIndex
:
'type'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
{
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return
(
<
div
>
{
// onClick =
{()
=>
getPayment
(
record
.
id
)}
record
.
payAmount
>
0
||
record
.
unPayApplyAmount
>
0
&&
<
a
className=
{
style
.
gesture
}
>
查看付款明细
</
a
>
}
</
div
>
)
}
},
];
const
handlePaginationChange
=
(
current
:
number
,
pageSize
:
number
)
=>
{
const
data
=
{
contractId
,
orderNo
:
''
,
orderAbstract
:
''
,
startTime
:
""
,
endTime
:
""
,
current
:
current
,
pageSize
:
size
,
}
console
.
log
(
data
)
getContracInfoList
(
data
)
};
return
(
<
div
id=
'docking'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
div
className=
'ant-card-head-wrapper'
>
执行情况
</
div
>
<
div
className=
{
style
.
wrapper
}
>
<
Input
.
Search
style=
{
{
width
:
240
}
}
placeholder=
"搜素"
allowClear
onSearch=
{
onSearch
}
/>
<
Button
style=
{
{
paddingLeft
:
10
,
paddingRight
:
10
,
marginLeft
:
10
,
marginRight
:
10
}
}
>
重置
</
Button
>
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
Table
rowKey=
'keyId'
rowSelection=
{
rowSelection
}
columns=
{
columns
}
dataSource=
{
data
}
loading=
{
listLoading
}
pagination=
{
{
pageSize
:
size
,
total
,
onChange
:
handlePaginationChange
}
}
style=
{
{
width
:
"100%"
}
}
/>
</
div
>
</
div
>
)
}
export
default
situationList
;
src/pages/contract/funds/addbill/components/info.tsx
View file @
89410adf
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Card
,
Tabs
,
Table
,
Input
,
Form
,
Select
,
Drawer
,
DatePicker
,
Modal
,
InputNumber
}
from
'antd'
import
{
Button
,
Tabs
,
Table
,
Input
,
Form
,
Select
,
Drawer
,
DatePicker
,
}
from
'antd'
import
styles
from
'./index.less'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
...
...
@@ -15,6 +15,7 @@ import { StandardTable } from 'god';
import
{
PublicApi
}
from
'@/services/api'
;
const
{
Option
}
=
Select
;
import
{
Schema
}
from
"./schema"
import
style
from
'../../../constants/styles.less'
const
AddInfo
=
(
props
:
any
)
=>
{
const
{
currentRef
,
getcontractId
,
sourceType
}
=
props
;
...
...
@@ -40,8 +41,8 @@ const AddInfo = (props: any) => {
expectPayTime
:
''
,
//预计付款时间(yyyy-MM-dd)
payWay
:
''
,
//付款方式,1.现结,2.账期,3.月结
payParam
:
''
,
// 付款参数(账期天数请款日)
moneyPayWay
:
''
,
//支付方式:2.线下支付
moneyPayChannel
:
''
,
//支付渠道:5.线下支付线上确认
moneyPayWay
:
'
2
'
,
//支付方式:2.线下支付
moneyPayChannel
:
'
5
'
,
//支付渠道:5.线下支付线上确认
remark
:
''
,
//备注
})
const
[
Info
,
setInfo
]
=
useState
<
any
>
({
...
...
@@ -153,6 +154,7 @@ const AddInfo = (props: any) => {
name
:
item
.
payWay
==
1
?
'账期'
:
item
.
payWay
==
2
?
'月结'
:
'现结'
,
payParam
:
item
.
payParam
,
Index
:
index
+
1
,
payWay
:
item
.
payWay
,
id
:
item
.
id
,
})
})
...
...
@@ -232,7 +234,7 @@ const AddInfo = (props: any) => {
}
return
(
<
div
>
<
div
className=
{
style
.
revise_info
}
>
<
Form
form=
{
attrValueForm
}
name=
"edit_infomation"
...
...
@@ -305,7 +307,7 @@ const AddInfo = (props: any) => {
>
{
payPlanList
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
>
{
item
.
payStage
}
</
Option
>
<
Option
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
payStage
}
</
Option
>
))
}
</
Select
>
...
...
@@ -355,13 +357,14 @@ const AddInfo = (props: any) => {
{
tag
.
map
((
item
:
any
)
=>
{
return
(
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
setBasicsKey
(
item
.
id
)
}
>
{
item
.
name
}
</
span
>
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
setBasicsKey
(
item
.
id
)
}
key=
{
item
.
Index
}
>
{
item
.
name
}
</
span
>
)
})
}
</
Form
.
Item
>
<
Form
.
Item
label=
" "
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
Input
addonAfter=
{
Index
===
1
?
'天'
:
Index
===
3
?
'号'
:
null
}
value=
{
tag
[
Index
-
1
].
name
===
'现结'
?
''
:
tag
[
Index
-
1
].
payParam
}
disabled=
{
tag
[
Index
-
1
].
name
===
'现结'
?
true
:
false
}
/>
{
/* * payWay 1 账期 2 月结 3 现结 */
}
<
Input
addonAfter=
{
Index
===
2
?
'天'
:
Index
===
3
?
'号'
:
null
}
value=
{
tag
[
Index
-
1
].
name
===
'现结'
?
''
:
tag
[
Index
-
1
].
payParam
}
disabled=
{
tag
[
Index
-
1
].
name
===
'现结'
?
true
:
false
}
/>
</
Form
.
Item
>
</>
}
...
...
@@ -375,6 +378,7 @@ const AddInfo = (props: any) => {
>
<
Select
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'moneyPayWay'
)
}
value=
{
basics
.
moneyPayWay
}
style=
{
{
width
:
'290px'
,
// marginRight: 20,
...
...
@@ -385,6 +389,7 @@ const AddInfo = (props: any) => {
<
Select
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'moneyPayChannel'
)
}
value=
{
basics
.
moneyPayChannel
}
style=
{
{
width
:
'290px'
}
}
...
...
src/pages/contract/funds/addbill/components/table.tsx
View file @
89410adf
...
...
@@ -29,7 +29,7 @@ const table = (props: any) => {
* @param tabcolumns 单据表格
*/
const
[
visible
,
setvisible
]
=
useState
<
boolean
>
(
false
);
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'orderId'
,
type
:
'radio
'
});
// const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'orderId
' });
const
[
toorderAmount
,
settoorderAmount
]
=
useState
<
number
>
(
0
);
const
[
topayAmount
,
settopayAmount
]
=
useState
<
number
>
(
0
);
const
[
tounPayApplyAmount
,
settounPayApplyAmount
]
=
useState
<
number
>
(
0
);
...
...
@@ -140,8 +140,17 @@ const table = (props: any) => {
render
:
(
_
,
item
,
index
)
=>
<
a
onClick=
{
()
=>
Delete
(
item
,
index
)
}
>
删除
</
a
>,
}
];
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
rowSelection
:
any
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
setSelectRow
(
selectedRows
)
setSelectedRowKeys
(
selectedRowKeys
)
console
.
log
(
selectedRowKeys
,
selectedRows
,
'rowSelection'
)
}
};
const
onSelectChange
=
(
e
,
name
,
idx
)
=>
{
let
item
=
[...
PlanList
];
...
...
@@ -245,19 +254,16 @@ const table = (props: any) => {
params
.
contractId
=
id
;
return
new
Promise
(
resolve
=>
{
PublicApi
.
getContractApplyAmountContractOrderPageList
({
...
params
}).
then
(
res
=>
{
console
.
log
(
res
)
res
.
data
.
data
.
find
(
item
=>
{
res
.
data
.
data
.
findIndex
((
item
,
index
)
=>
{
item
.
orderTime
=
item
.
orderTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
item
.
keyId
=
index
+
1
;
})
resolve
(
res
.
data
)
})
})
}
const
Confirm
=
()
=>
{
let
PlanList
=
[];
PlanList
.
push
(
RowCtl
.
selectRow
[
0
])
setPlanList
(
PlanList
)
console
.
log
(
PlanList
,
RowCtl
.
selectRow
[
0
])
setPlanList
(
selectRow
)
setvisible
(
false
)
Amount
()
}
...
...
@@ -306,7 +312,7 @@ const table = (props: any) => {
<
Table
columns=
{
tabcolumns
}
dataSource=
{
PlanList
}
rowKey=
"
i
d"
rowKey=
"
keyI
d"
style=
{
{
width
:
"100%"
}
}
...
...
@@ -337,7 +343,7 @@ const table = (props: any) => {
>
<
StandardTable
tableProps=
{
{
rowKey
:
'
order
Id'
,
rowKey
:
'
key
Id'
,
}
}
columns=
{
columnsList
}
currentRef=
{
refs
}
...
...
src/pages/contract/funds/details/components/materials.tsx
View file @
89410adf
...
...
@@ -27,7 +27,6 @@ const Materials = (props: any) => {
totalpayAmount
:
0
,
totalunPayApplyAmount
:
0
,
totalapplyAmount
:
0
,
})
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
...
...
@@ -76,7 +75,7 @@ const Materials = (props: any) => {
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'
orderType
Name'
,
dataIndex
:
'
status
Name'
,
align
:
'center'
,
},
{
...
...
src/pages/contract/manage/add/components/FormList.tsx
View file @
89410adf
...
...
@@ -41,7 +41,10 @@ const FormList = (props: any) => {
const
getGoodsList
=
(
params
)
=>
{
return
new
Promise
(
resolve
=>
{
PublicApi
.
getProductGoodsGetGoodsList
(
params
).
then
(
res
=>
{
resolve
(
res
.
data
)
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
.
data
,
1231321
)
resolve
(
res
.
data
)
}
})
})
}
...
...
@@ -63,6 +66,7 @@ const FormList = (props: any) => {
current
:
'1'
,
pageSize
:
'3'
,
}
PublicApi
.
getPurchaseQuotedPriceProductlistListContract
(
parmas
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
.
map
(
item
=>
{
return
{
...
...
@@ -76,12 +80,13 @@ const FormList = (props: any) => {
isHasTax
:
item
.
isTax
,
taxRate
:
item
.
taxProbability
,
price
:
item
.
taxUnitPrice
,
bidCount
:
item
.
award
Count
,
bidAmount
:
item
.
awardPrice
,
bidCount
:
item
.
award
TaxProbability
*
item
.
purchaseCount
/
100
,
bidAmount
:
item
.
award
TaxProbability
*
item
.
purchaseCount
/
100
*
item
.
taxUnit
Price
,
associatedDataId
:
item
.
productId
,
associatedMaterielNo
:
item
.
number
,
associatedMaterielName
:
item
.
productName
,
associatedGoods
:
item
.
productAttributeJson
}
})
setData
(
data
)
...
...
@@ -126,6 +131,7 @@ const FormList = (props: any) => {
placeholder=
""
onChange=
{
(
e
)
=>
setInput
(
e
,
'purchaseCount'
,
index
)
}
defaultValue=
{
record
.
purchaseCount
}
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
/>
</
Form
.
Item
>
},
...
...
@@ -141,6 +147,7 @@ const FormList = (props: any) => {
style=
{
{
width
:
80
}
}
defaultValue=
{
text
===
0
||
text
===
1
?
text
.
toString
()
:
''
}
onChange=
{
(
e
)
=>
setInput
(
e
,
'isHasTax'
,
index
)
}
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
>
<
Option
value=
"0"
key=
{
0
}
>
否
</
Option
>
<
Option
value=
"1"
key=
{
1
}
>
是
</
Option
>
...
...
@@ -161,6 +168,7 @@ const FormList = (props: any) => {
defaultValue=
{
text
}
onChange=
{
(
e
)
=>
setInput
(
e
,
'taxRate'
,
index
)
}
addonAfter=
"%"
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
/>
</
Form
.
Item
>
},
...
...
@@ -179,6 +187,7 @@ const FormList = (props: any) => {
onChange=
{
(
e
)
=>
setInput
(
e
,
'price'
,
index
)
}
addonBefore=
"¥"
defaultValue=
{
text
}
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
/>
</
Form
.
Item
>
},
...
...
@@ -196,6 +205,7 @@ const FormList = (props: any) => {
onChange=
{
(
e
)
=>
setInput
(
e
,
'bidCount'
,
index
)
}
addonBefore=
"¥"
defaultValue=
{
text
?
text
:
''
}
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
/>
</
Form
.
Item
>
},
...
...
src/pages/contract/manage/add/components/contractText.tsx
View file @
89410adf
import
React
,
{
useRef
,
useState
,
useEffect
,
useImperativeHandle
,
forwardRef
}
from
'react'
;
import
{
Button
,
Card
,
Tabs
,
Table
,
Input
,
Select
,
DatePicker
,
Popconfirm
,
Form
,
Checkbox
,
Drawer
,
Typography
,
Modal
,
InputNumber
}
from
'antd'
import
styles
from
'../index.less'
import
React
,
{
useState
,
useEffect
,
forwardRef
}
from
'react'
;
import
{
Button
,
Select
,
Form
,
Checkbox
,
message
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
;
import
styles
from
'../index.less'
import
{
FileWordFilled
,
}
from
'@ant-design/icons'
const
ContractText
=
(
props
:
any
)
=>
{
const
{
currentRef
}
=
props
;
const
{
currentRef
,
memberId
}
=
props
;
const
[
TemplatePage
,
setTemplatePage
]
=
useState
<
any
>
([]);
const
[
Templatel
,
setTemplatel
]
=
useState
<
any
>
({});
const
[
checkNick
,
setCheckNick
]
=
useState
(
true
);
const
[
contractFlag
,
setcontractFlag
]
=
useState
<
boolean
>
(
false
);
/* 第四个tab */
const
onCheckboxChange
=
(
e
:
{
target
:
{
checked
:
boolean
}
})
=>
{
setCheckNick
(
e
.
target
.
checked
);
...
...
@@ -44,7 +43,6 @@ const ContractText = (props: any) => {
})
}
})
// console.log(list, res.data.data);
setTemplatePage
(
list
)
})
...
...
@@ -66,6 +64,29 @@ const ContractText = (props: any) => {
useEffect
(()
=>
{
contractTemplate
();
},
[])
/* 生成电子合同 */
const
generate
=
()
=>
{
if
(
!
Templatel
.
id
)
{
message
.
info
(
'请先选择合同模版'
)
}
else
{
const
param
=
{
contractTemplateId
:
Templatel
.
id
,
memberId
,
}
// console.log(Templatel)
PublicApi
.
postContractSignatureContractCreate
(
param
).
then
(
res
=>
{
console
.
log
(
res
);
Templatel
.
name
=
res
.
data
.
contractName
Templatel
.
fileUrl
=
res
.
data
.
contractUrl
setTemplatel
(
Templatel
)
setcontractFlag
(
true
)
})
}
}
/**下载 */
const
onDownload
=
()
=>
{
window
.
location
.
href
=
`/api/contract/contractTemplate/downloadContract?contractName=
${
Templatel
.
name
}
&contractUrl=
${
Templatel
.
contractUrl
}
`
}
return
(
<
div
style=
{
{
...
...
@@ -80,13 +101,15 @@ const ContractText = (props: any) => {
onChange=
{
(
e
)
=>
getTemplate
(
e
)
}
>
</
Select
>
<
Button
type=
'link'
>
生成合同
</
Button
>
{
checkNick
&&
<
Button
type=
'link'
onClick=
{
()
=>
generate
()
}
>
生成合同
</
Button
>
}
</
Form
.
Item
>
{
Object
.
keys
(
Templatel
).
length
!=
0
&&
contractFlag
&&
<
Form
.
Item
label=
"合同文本"
labelAlign=
"left"
labelCol=
{
{
span
:
2
}
}
>
<
div
className=
{
styles
.
upload_item
}
style=
{
{
width
:
680
}
}
>
<
div
className=
{
styles
.
upload_left
}
style=
{
{
width
:
600
}
}
>
<
div
className=
{
styles
.
upload_left
}
style=
{
{
width
:
600
}
}
onClick=
{
()
=>
onDownload
()
}
>
<
FileWordFilled
/>
<
span
>
{
Templatel
.
name
}
</
span
>
</
div
>
...
...
src/pages/contract/manage/add/components/information.tsx
View file @
89410adf
...
...
@@ -28,7 +28,7 @@ export interface IProps {
}
const
Information
=
(
props
:
any
)
=>
{
const
{
fetchdata
,
currentRef
,
Row
,
getrow
,
sourceType
}
=
props
;
const
{
fetchdata
,
currentRef
,
Row
,
getrow
,
getmemberId
,
sourceType
}
=
props
;
const
refs
=
useRef
({});
/**
* @param {{visible}} 显示选择合同弹出
...
...
@@ -105,7 +105,6 @@ const Information = (props: any) => {
basicsVO
.
partyBMemberId
=
Row
.
awardRoleId
?
Row
.
awardMemberId
:
''
;
basicsVO
.
partyBRoleId
=
Row
.
awardRoleId
?
Row
.
awardRoleId
:
''
;
setbasicsVO
(
basicsVO
)
console
.
log
(
Row
,
1111111111111111111
)
attrValueForm
.
setFieldsValue
(
basicsVO
)
setfalg
(
Row
.
sourceNo
?
true
:
false
)
setmanual
(
Row
.
partyBName
?
true
:
false
)
...
...
@@ -147,10 +146,10 @@ const Information = (props: any) => {
basicsVO
.
partyBMemberId
=
RowCtl
.
selectRow
[
0
].
memberId
;
basicsVO
.
partyBRoleId
=
RowCtl
.
selectRow
[
0
].
roleId
basicsVO
.
sourceType
=
Change
;
console
.
log
(
basicsVO
)
setfalg
(
true
)
attrValueForm
.
setFieldsValue
(
basicsVO
);
// getType(true
)
getmemberId
(
basicsVO
.
partyBMemberId
)
}
else
{
let
totalAmount
,
sourceId
,
partyBName
,
partyBMemberId
,
sourceNo
,
partyBRoleId
;
const
selectRow
=
RowCtl
.
selectRow
[
0
];
...
...
@@ -174,7 +173,6 @@ const Information = (props: any) => {
default
:
break
;
}
console
.
log
(
totalAmount
,
sourceId
,
partyBName
,
totalAmount
,
partyBMemberId
,
sourceNo
)
basicsVO
.
totalAmount
=
totalAmount
;
basicsVO
.
sourceId
=
sourceId
;
basicsVO
.
partyBName
=
partyBName
;
...
...
@@ -183,10 +181,10 @@ const Information = (props: any) => {
basicsVO
.
partyBRoleId
=
partyBRoleId
;
setbasicsVO
(
basicsVO
)
setmanual
(
true
)
// getType(false)
attrValueForm
.
setFieldsValue
(
basicsVO
);
selectRow
.
partyBMemberId
=
selectRow
.
awardMemberId
;
selectRow
.
partyBRoleId
=
selectRow
.
awardRoleId
;
getmemberId
(
selectRow
.
partyBMemberId
)
getrow
(
selectRow
)
}
Choose
()
...
...
src/pages/contract/manage/add/contracAdd.tsx
View file @
89410adf
...
...
@@ -30,11 +30,16 @@ const Add: React.FC<{}> = (props: any) => {
const
[
payPlanList
,
setpayPlanList
]
=
useState
<
any
>
([]);
/* 初始值 */
const
[
Row
,
setRow
]
=
useState
<
any
>
({})
const
[
memberId
,
setmemberId
]
=
useState
<
string
>
(
''
)
/* 获取下拉框选中的id 查询物料 */
const
getrow
=
(
row
)
=>
{
// console.log(row, 1111111111111)
setRow
(
row
)
}
/* 获取供应商角色id */
const
getmemberId
=
(
memberId
)
=>
{
setmemberId
(
memberId
)
}
const
TabList
=
[
{
name
:
'基本信息'
,
...
...
@@ -45,6 +50,7 @@ const Add: React.FC<{}> = (props: any) => {
Row=
{
Row
}
sourceType=
{
sourceType
}
getrow=
{
getrow
}
getmemberId=
{
getmemberId
}
/>
},
{
...
...
@@ -64,7 +70,7 @@ const Add: React.FC<{}> = (props: any) => {
currentRef=
{
payPlan
}
/>
},
{
name
:
'合同文本'
,
components
:
<
ContractText
currentRef=
{
contractText
}
/>
},
{
name
:
'合同文本'
,
components
:
<
ContractText
currentRef=
{
contractText
}
memberId=
{
memberId
}
/>
},
]
/* 提交*/
...
...
@@ -110,6 +116,8 @@ const Add: React.FC<{}> = (props: any) => {
useEffect
(()
=>
{
if
(
sourceType
)
{
setRow
(
JSON
.
parse
(
sessionStorage
.
getItem
(
'record'
)))
const
memberId
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'record'
)).
partyBMemberId
;
setmemberId
(
memberId
)
}
},
[])
return
(
...
...
src/pages/contract/manage/add/index.css
View file @
89410adf
...
...
@@ -44,6 +44,7 @@
display
:
flex
;
align-items
:
center
;
color
:
#303133
;
cursor
:
pointer
;
background-color
:
#fafbfc
;
}
.upload_item
.upload_left
:global
.anticon-file-word
{
...
...
src/pages/contract/manage/add/index.less
View file @
89410adf
...
...
@@ -48,6 +48,7 @@
display: flex;
align-items: center;
color: #303133;
cursor: pointer;
background-color: #fafbfc;
:global {
.anticon-file-word {
...
...
src/pages/contract/manage/editing/components/FormList.tsx
View file @
89410adf
...
...
@@ -49,6 +49,7 @@ const FormList = (props: any) => {
placeholder=
""
onChange=
{
(
e
)
=>
setInput
(
e
,
'purchaseCount'
,
index
)
}
defaultValue=
{
record
.
purchaseCount
}
disabled
/>
</
Form
.
Item
>
},
...
...
@@ -65,6 +66,7 @@ const FormList = (props: any) => {
style=
{
{
width
:
80
}
}
defaultValue=
{
text
===
0
||
text
===
1
?
text
.
toString
()
:
''
}
onChange=
{
(
e
)
=>
setInput
(
e
,
'isHasTax'
,
index
)
}
disabled
>
<
Option
value=
"0"
key=
{
0
}
>
否
</
Option
>
<
Option
value=
"1"
key=
{
1
}
>
是
</
Option
>
...
...
@@ -85,6 +87,7 @@ const FormList = (props: any) => {
defaultValue=
{
text
}
onChange=
{
(
e
)
=>
setInput
(
e
,
'taxRate'
,
index
)
}
addonAfter=
"%"
disabled
/>
</
Form
.
Item
>
},
...
...
@@ -103,6 +106,7 @@ const FormList = (props: any) => {
onChange=
{
(
e
)
=>
setInput
(
e
,
'price'
,
index
)
}
addonBefore=
"¥"
defaultValue=
{
text
}
disabled
/>
</
Form
.
Item
>
},
...
...
@@ -120,6 +124,7 @@ const FormList = (props: any) => {
onChange=
{
(
e
)
=>
setInput
(
e
,
'bidCount'
,
index
)
}
addonBefore=
"¥"
defaultValue=
{
text
?
text
:
''
}
disabled
/>
</
Form
.
Item
>
},
...
...
src/pages/contract/manage/editing/components/information.tsx
View file @
89410adf
...
...
@@ -19,6 +19,7 @@ const Information = (props: any) => {
* */
useEffect
(()
=>
{
basic
.
sourceType
=
String
(
basic
.
sourceType
);
console
.
log
(
basic
)
if
(
basic
.
contractNo
)
{
if
(
oldContractId
)
{
let
data
=
{
oldContractNo
:
basic
.
contractNo
}
...
...
@@ -30,9 +31,9 @@ const Information = (props: any) => {
attrValueForm
.
setFieldsValue
(
basic
)
}
})
}
else
{
attrValueForm
.
setFieldsValue
(
basic
)
}
}
else
{
attrValueForm
.
setFieldsValue
(
basic
)
}
},
[
basic
])
...
...
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