Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5086d102
authored
Jul 04, 2025
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: 优化合同操作按钮逻辑,动态渲染电子签与人工签功能,提升用户体验
parent
3bc97465
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
20 deletions
src/views/OrderTrack/goodsDetail.vue
src/views/OrderTrack/goodsDetail.vue
View file @
5086d102
...
@@ -63,28 +63,33 @@
...
@@ -63,28 +63,33 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"expire_time_val"
label=
"失效时间"
width=
"145"
></el-table-column>
<el-table-column
prop=
"expire_time_val"
label=
"失效时间"
width=
"145"
></el-table-column>
<el-table-column
prop=
"contract_type_val"
label=
"类型"
width=
"120"
></el-table-column>
<el-table-column
prop=
"contract_type_val"
label=
"类型"
width=
"120"
></el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"
20
0"
align=
"center"
>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"
12
0"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-row>
<el-row>
<template
v-if=
"infos.company_id == 2 && infos.status != 4 && infos.status != -3 && scope.row.status == 1"
>
<!-- 电子签 -->
<el-button
v-if=
"scope.row.contractFileUrl"
type=
"primary"
@
click=
"delContract(scope.row)"
>
<template
v-if=
"scope.row.contract_type == 2"
>
<span>
删除
</span>
<!-- 签署状态为待签署+状态为有效 -->
</el-button>
<el-button
type=
"primary"
@
click=
"showSignDialog(scope.row)"
v-if=
"scope.row.status == 1 && scope.row.sign_status == 1"
>
签署合同
</el-button>
<el-upload
v-else-if=
"scope.row.languageType == '中文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="{ supplier_id: supplier_id, contract_id: scope.row.contractId, type: 'upload' }" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button
type=
"primary"
>
上传PI
</el-button>
</el-upload>
<el-upload
v-else-if=
"scope.row.languageType == '英文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="{ supplier_id: supplier_id, contract_id: scope.row.contractId, type: 'upload' }" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button
type=
"primary"
>
上传合同
</el-button>
</el-upload>
</
template
>
</
template
>
<!-- 人工签 -->
<
template
v-else
>
<
template
v-else
>
<el-button
v-if=
"scope.row.contractFileUrl"
type=
"primary"
@
click=
"delContract(scope.row)"
>
<!-- 深贸电子 -->
<span>
删除
</span>
<template
v-if=
"infos.company_id == 2 && infos.status != 4 && infos.status != -3 && scope.row.status == 1"
>
</el-button>
<el-button
v-if=
"scope.row.contractFileUrl"
type=
"primary"
@
click=
"delContract(scope.row)"
>
删除
</el-button>
<el-upload
v-else-if=
"scope.row.languageType == '中文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="{ supplier_id: supplier_id, contract_id: scope.row.contractId, type: 'upload' }" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-upload
v-else-if=
"scope.row.languageType == '中文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="getUploadData(scope.row)" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button
type=
"primary"
>
上传合同
</el-button>
<el-button
type=
"primary"
>
上传PI
</el-button>
</el-upload>
</el-upload>
<el-button
type=
"primary"
@
click=
"showSignDialog(scope.row)"
>
签署合同
</el-button>
<el-upload
v-else-if=
"scope.row.languageType == '英文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="getUploadData(scope.row)" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button
type=
"primary"
>
上传合同
</el-button>
</el-upload>
</
template
>
<!-- 猎芯科技 -->
<
template
v-else-if=
"infos.company_id == 1 && infos.status != 4 && infos.status != -3 && scope.row.status == 1"
>
<el-button
v-if=
"scope.row.contractFileUrl"
type=
"primary"
@
click=
"delContract(scope.row)"
>
删除
</el-button>
<el-upload
v-else-if=
"scope.row.languageType == '中文'"
:headers=
"
{ Authorization: 'Bearer ' + token }" :data="getUploadData(scope.row)" :action="uploadUrl" :on-success="handleUploadSuccess">
<el-button
type=
"primary"
>
上传合同
</el-button>
</el-upload>
</
template
>
</template>
</template>
</el-row>
</el-row>
</template>
</template>
...
@@ -464,7 +469,7 @@ export default {
...
@@ -464,7 +469,7 @@ export default {
// 提交签署合同
// 提交签署合同
submitSignContract
()
{
submitSignContract
()
{
var
confirmMessage
=
''
;
var
confirmMessage
=
''
;
if
(
this
.
signContractData
.
isExistsOldContract
==
1
)
{
if
(
this
.
signContractData
.
isExistsOldContract
==
1
)
{
// 存在已签署+有效+电子签的合同,提示2句话
// 存在已签署+有效+电子签的合同,提示2句话
confirmMessage
=
`
confirmMessage
=
`
...
@@ -487,7 +492,7 @@ export default {
...
@@ -487,7 +492,7 @@ export default {
</div>
</div>
`
;
`
;
}
}
this
.
$confirm
(
confirmMessage
,
'确认签署'
,
{
this
.
$confirm
(
confirmMessage
,
'确认签署'
,
{
confirmButtonText
:
'确定签署'
,
confirmButtonText
:
'确定签署'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -524,6 +529,14 @@ export default {
...
@@ -524,6 +529,14 @@ export default {
if
(
contractContent
.
scrollHeight
-
contractContent
.
scrollTop
===
contractContent
.
clientHeight
)
{
if
(
contractContent
.
scrollHeight
-
contractContent
.
scrollTop
===
contractContent
.
clientHeight
)
{
this
.
disabled
=
false
;
this
.
disabled
=
false
;
}
}
},
// 获取上传数据
getUploadData
(
row
)
{
return
{
supplier_id
:
this
.
supplier_id
,
contract_id
:
row
.
contractId
,
type
:
'upload'
};
}
}
},
},
components
:
{
components
:
{
...
...
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