Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
8ad97887
Commit
8ad97887
authored
Jan 09, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
咨询机构项目详情编辑 对接完毕
parent
b12f74d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
18 deletions
+89
-18
index.js
dsk-operate-ui/src/api/consultingOrgManagement/index.js
+12
-1
consultingAgency.vue
...ent/components/EnterpriseList/detail/consultingAgency.vue
+62
-14
projectDetail.vue
...gement/components/EnterpriseList/detail/projectDetail.vue
+15
-3
No files found.
dsk-operate-ui/src/api/consultingOrgManagement/index.js
View file @
8ad97887
...
...
@@ -38,7 +38,7 @@ export const getConsultingOrgEenterpriseDetailWithSearchApi = (params) => reques
* @param {*} params
* @returns
*/
export
const
get
get
ConsultingOrgProjectDetailApi
=
(
params
)
=>
request
({
export
const
getConsultingOrgProjectDetailApi
=
(
params
)
=>
request
({
url
:
"/advisory/body/getProjectDetail"
,
method
:
"get"
,
params
...
...
@@ -55,4 +55,15 @@ export const searchConsultingApi = (advisoryBodyName) => request({
params
:
{
advisoryBodyName
}
});
/**
* 更新咨询机构结算信息
* @param {*} data
* @returns
*/
export
const
updateConsultingDetailApi
=
(
data
)
=>
request
({
url
:
"/advisory/body/editAdvisoryBody"
,
method
:
"post"
,
data
});
\ No newline at end of file
dsk-operate-ui/src/views/consultingOrgManagement/components/EnterpriseList/detail/consultingAgency.vue
View file @
8ad97887
<
template
>
<div
class=
"consulting-agency-container"
>
<el-form
:model=
"comProjectDetailInfo"
:rules=
"rules"
:show-message=
"false"
class=
"basic-engineering-information-inner"
>
<el-form
:model=
"comProjectDetailInfo"
:rules=
"rules"
:show-message=
"false"
class=
"basic-engineering-information-inner"
ref=
"comProjectDetailForm"
>
<!-- 基础信息 -->
<div
class=
"project-basic-information"
>
<div
class=
"info-module-title"
><span>
基础信息
</span></div>
...
...
@@ -124,8 +125,8 @@
</div>
<el-form-item
label=
""
v-if=
"comIsModify"
prop=
"advisoryBodyProject.isFinalJudgeUnit"
>
<el-radio-group
v-model=
"comProjectDetailInfo.advisoryBodyProject.isFinalJudgeUnit"
>
<el-radio
:label=
"
0
"
>
是
</el-radio>
<el-radio
:label=
"
1
"
>
否
</el-radio>
<el-radio
:label=
"
'0'
"
>
是
</el-radio>
<el-radio
:label=
"
'1'
"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</td>
...
...
@@ -157,8 +158,8 @@ export default {
watch
:
{
projectDetailInfo
:
{
handler
(
newValue
,
oldValue
)
{
this
.
comProjectDetailInfo
=
JSON
.
parse
(
JSON
.
stringify
(
newValue
)
);
this
.
oldComProjectDetailInfo
=
JSON
.
parse
(
JSON
.
stringify
(
oldValue
)
);
this
.
setInitData
(
this
.
comProjectDetailInfo
,
JSON
.
parse
(
JSON
.
stringify
(
newValue
)),
"comProjectDetailInfo"
);
this
.
setInitData
(
this
.
oldComProjectDetailInfo
,
JSON
.
parse
(
JSON
.
stringify
(
oldValue
)),
"oldComProjectDetailInfo"
);
},
deep
:
true
},
...
...
@@ -171,18 +172,18 @@ export default {
data
()
{
const
phoneValidator
=
(
rule
,
value
,
callback
)
=>
{
const
phoneReg
=
/^1
[
3-9
]\d{9}
$/
;
if
(
!
value
&&
!
value
?.
toString
()?.
trim
())
{
return
callback
(
new
Error
(
`请输入项目负责人联系电话`
));
}
//
if (!value && !value?.toString()?.trim()) {
//
return callback(new Error(`请输入项目负责人联系电话`));
//
}
if
(
value
&&
!
phoneReg
.
test
(
value
))
{
return
callback
(
new
Error
(
`请输入正确的
手机号码
`
));
return
callback
(
new
Error
(
`请输入正确的
联系电话
`
));
}
return
callback
();
};
return
{
comIsModify
:
this
.
isModify
,
comProjectDetailInfo
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
projectDetailInfo
))
,
oldComProjectDetailInfo
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
projectDetailInfo
))
,
comProjectDetailInfo
:
{}
,
oldComProjectDetailInfo
:
{}
,
rules
:
{
"advisoryBody.advisoryBodyName"
:
[{
required
:
true
,
trigger
:
[
"blur"
,
"change"
],
message
:
"咨询机构名称不能为空"
}],
"advisoryBodyProject.projectLeaderPhone"
:
[{
required
:
true
,
trigger
:
[
"blur"
,
"change"
],
validator
:
phoneValidator
}],
...
...
@@ -193,6 +194,8 @@ export default {
},
//可访问data属性
created
()
{
this
.
setInitData
(
this
.
comProjectDetailInfo
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
projectDetailInfo
)),
"comProjectDetailInfo"
);
this
.
setInitData
(
this
.
oldComProjectDetailInfo
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
projectDetailInfo
)),
"oldComProjectDetailInfo"
);
this
.
setTableKeyWidth
();
},
//计算集
...
...
@@ -201,6 +204,12 @@ export default {
},
//方法集
methods
:
{
setInitData
(
originData
,
mergeData
,
mergeKey
)
{
if
(
!
mergeData
.
advisoryBody
)
mergeData
.
advisoryBody
=
{};
if
(
!
mergeData
.
advisoryBodyProject
)
mergeData
.
advisoryBodyProject
=
{};
// 响应更新
this
.
$set
(
this
,
mergeKey
,
{
...
this
[
mergeKey
],
...
mergeData
});
},
statusCheck
(
status
)
{
if
(
status
==
"0"
)
{
return
"是"
;
...
...
@@ -233,7 +242,10 @@ export default {
if
((
keywords
||
keywords
==
"0"
)
&&
keywords
?.
toString
()?.
trim
()
&&
keywords
?.
toString
()?.
trim
()?.
length
>=
1
)
{
this
.
clearSearchTimer
();
this
.
searchTimer
=
setTimeout
(
async
()
=>
{
await
this
.
searchConsultingHandle
(
keywords
.
toString
().
trim
());
const
result
=
await
this
.
searchConsultingHandle
(
keywords
.
toString
().
trim
());
if
(
result
)
{
this
.
updateTemplate
(
result
);
}
},
1000
);
}
}
catch
(
error
)
{
...
...
@@ -244,8 +256,7 @@ export default {
try
{
const
searchResult
=
await
searchConsultingApi
(
keywords
);
if
(
searchResult
.
code
==
200
&&
searchResult
.
data
)
{
const
_temp
=
JSON
.
parse
(
JSON
.
stringify
(
searchResult
.
data
));
this
.
updateTemplate
(
_temp
);
return
searchResult
.
data
;
}
}
catch
(
error
)
{
console
.
log
(
error
);
...
...
@@ -261,6 +272,7 @@ export default {
[
"regAddress"
,
"regAddress"
],
]);
this
.
setTemplateData
(
updateMap
,
data
);
console
.
log
(
this
.
comProjectDetailInfo
);
},
setTemplateData
(
mapData
,
data
)
{
/**
...
...
@@ -294,6 +306,41 @@ export default {
clearSearchTimer
()
{
clearTimeout
(
this
.
searchTimer
);
this
.
searchTimer
=
null
;
},
async
updateConsultingDetail
()
{
try
{
const
flag
=
await
this
.
$refs
[
"comProjectDetailForm"
].
validate
();
if
(
flag
)
{
// 通过验证校验咨询机构是否存在
const
result
=
await
this
.
searchConsultingHandle
(
this
.
comProjectDetailInfo
.
advisoryBody
.
advisoryBodyName
);
if
(
result
.
advisoryBodyCid
)
{
const
_temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
comProjectDetailInfo
));
const
paramsData
=
{
isNewAdvisoryBody
:
_temp
.
isNewAdvisoryBody
,
projectKey
:
_temp
.
projectKey
,
advisoryBodyCid
:
_temp
.
advisoryBody
.
advisoryBodyCid
,
advisoryBodyName
:
_temp
.
advisoryBody
.
advisoryBodyName
??
""
,
businessScope
:
_temp
.
advisoryBody
.
businessScope
??
""
,
projectLeader
:
_temp
.
advisoryBodyProject
.
projectLeader
??
""
,
projectLeaderMajor
:
_temp
.
advisoryBodyProject
.
projectLeaderMajor
??
""
,
projectLeaderPhone
:
_temp
.
advisoryBodyProject
.
projectLeaderPhone
??
""
,
projectLeaderPhone
:
_temp
.
advisoryBodyProject
.
projectLeaderPhone
??
""
,
settleStartTime
:
_temp
.
advisoryBodyProject
.
settleStartTime
??
""
,
settleFinishTime
:
_temp
.
advisoryBodyProject
.
settleFinishTime
??
""
,
isFinalJudgeUnit
:
_temp
.
advisoryBodyProject
.
isFinalJudgeUnit
??
""
,
};
this
.
$emit
(
"editComProjectDetailSuccess"
,
paramsData
);
}
}
}
catch
(
error
)
{
if
(
error
)
{
for
(
const
key
in
error
)
{
const
_temp
=
error
[
key
];
_temp
instanceof
Array
?
elementMessageSingleton
(
"error"
,
`
${
_temp
[
0
].
message
}
`
)
:
null
;
break
;
}
}
}
}
},
}
...
...
@@ -415,6 +462,7 @@ export default {
.el-radio-group
{
display
:
flex
;
height
:
100%
;
align-items
:
center
;
padding-left
:
12px
;
box-sizing
:
border-box
;
...
...
dsk-operate-ui/src/views/consultingOrgManagement/components/EnterpriseList/detail/projectDetail.vue
View file @
8ad97887
...
...
@@ -37,7 +37,7 @@
<basic-engineering-information
v-if=
"currentList === 'project'"
:projectDetailInfo=
"projectDetailInfo"
></basic-engineering-information>
<!-- 咨询机构结算信息 -->
<consulting-agency
v-if=
"currentList === 'consultingAgency'"
:projectDetailInfo=
"projectDetailInfo"
:isModify=
"isModify"
ref=
"consultingAgency"
></consulting-agency>
ref=
"consultingAgency"
@
editComProjectDetailSuccess=
"editComProjectDetailSuccess"
></consulting-agency>
</div>
</div>
...
...
@@ -47,7 +47,7 @@
</
template
>
<
script
>
import
DskTabToggle
from
"@/components/DskTabToggle"
;
import
{
get
getConsultingOrgProjectDetailApi
}
from
"@/api/consultingOrgManagement/index
"
;
import
{
get
ConsultingOrgProjectDetailApi
,
updateConsultingDetailApi
}
from
"@/api/consultingOrgManagement
"
;
import
{
v4
}
from
'uuid'
;
import
BasicEngineeringInformation
from
"@/views/consultingOrgManagement/components/EnterpriseList/detail/basicEngineeringInformation"
;
import
consultingAgency
from
"@/views/consultingOrgManagement/components/EnterpriseList/detail/consultingAgency"
;
...
...
@@ -96,7 +96,7 @@ export default {
const
projectKey
=
this
.
$route
.
query
?.
projectKey
;
// if (!advisoryBodyCid) return this.$message.error("缺少咨询机构ID");
if
(
!
projectKey
)
return
this
.
$message
.
error
(
"缺少项目主键"
);
const
detail
=
await
get
get
ConsultingOrgProjectDetailApi
({
const
detail
=
await
getConsultingOrgProjectDetailApi
({
advisoryBodyCid
,
projectKey
});
...
...
@@ -111,7 +111,19 @@ export default {
this
.
isModify
=
true
;
},
saveProjectDetail
()
{
this
.
$refs
[
"consultingAgency"
].
updateConsultingDetail
();
},
// 编辑成功提交信息
async
editComProjectDetailSuccess
(
data
)
{
try
{
const
result
=
await
updateConsultingDetailApi
(
data
);
if
(
result
.
code
)
{
this
.
$message
.
success
(
"更新咨询机构结算信息成功"
);
this
.
isModify
=
false
;
}
}
catch
(
error
)
{
}
},
cancelSave
()
{
this
.
isModify
=
false
;
...
...
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