Commit 1565e7ae by 李伟康

style(salesManagement): 调整店铺销售合同对话框样式和交互优化

- 增加对话框宽度从30%到40%并禁用ESC键关闭
- 添加警告和成功图标提升用户体验
- 实现失败模板下载功能
- 优化成功对话框布局和样式
- 调整对话框内容对齐方式为左对齐
- 添加下载失败模板的点击事件处理
- 优化对话框整体视觉效果和间距
- 调整按钮和文字颜色以符合设计规范
1 parent 98d9aef9
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
:show-close="false" :show-close="false"
title="提示" title="提示"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="40%"
:close-on-press-escape="false"
> >
<template v-if="!updateStatus"> <template v-if="!updateStatus">
<div class="dialog-content"> <div class="dialog-content">
...@@ -61,25 +62,30 @@ ...@@ -61,25 +62,30 @@
<template v-else> <template v-else>
<div <div
v-if="errorFileUrl" v-if="errorFileUrl"
class="dialog-content" class="dialog-content left"
> >
<div class="dialog-tips-big"> <div class="dialog-tips-big">
处理失败。可点击 <span>下载失败模版</span> 查看失败原因。 <i class="el-icon-warning"></i>
处理失败。可点击 <span @click="downloadError">下载失败模版</span> 查看失败原因。
</div> </div>
</div> </div>
<div <div
v-else v-else
class="dialog-content" class="dialog-content left"
> >
<div class="dialog-tips-big"> <div class="dialog-tips-big">
<i class="el-icon-success"></i>
处理成功,可返回列表查看。 处理成功,可返回列表查看。
</div> </div>
</div> </div>
</template> </template>
<template #footer> <template
v-if="updateStatus"
#footer
>
<template>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button <el-button
v-if="updateStatus"
type="primary" type="primary"
@click="nextStep" @click="nextStep"
> >
...@@ -87,6 +93,7 @@ ...@@ -87,6 +93,7 @@
</el-button> </el-button>
</span> </span>
</template> </template>
</template>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
...@@ -94,14 +101,18 @@ ...@@ -94,14 +101,18 @@
:show-close="false" :show-close="false"
title="提示" title="提示"
:visible.sync="successDialogVisible" :visible.sync="successDialogVisible"
width="30%" width="40%"
:close-on-press-escape="false"
> >
<div class="dialog-content"> <div class="dialog-content success-dialog-content">
<i class="el-icon-success"></i>
<div class="dialog-info">
<div class="dialog-tips-big"> <div class="dialog-tips-big">
提交成功 提交成功。
</div> </div>
<div class="dialog-tips-small"> <div class="dialog-tips-small">
因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。处理完成后,系统将自动为您提交至OA审核, 因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。处理完成后,系统将自动为您提交至OA审核。
</div>
</div> </div>
</div> </div>
<template #footer> <template #footer>
...@@ -359,6 +370,15 @@ export default { ...@@ -359,6 +370,15 @@ export default {
this.errorFileUrl = "" this.errorFileUrl = ""
this.updateStatus = false this.updateStatus = false
}, },
downloadError () {
const link = document.createElement("a");
link.href = this.errorFileUrl
link.download = '失败模板';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}
} }
} }
</script> </script>
...@@ -396,20 +416,76 @@ export default { ...@@ -396,20 +416,76 @@ export default {
.fixed-btn-box { .fixed-btn-box {
height: 86px; height: 86px;
} }
::v-deep.el-dialog__wrapper {
display: flex;
align-items: center;
justify-content: center;
.el-dialog__header {
padding: 11.5px 16px;
color: rgba(51, 51, 51, 1);
font-size: 18px;
font-weight: 500;
line-height: 21px;
}
.el-dialog {
margin: 0 auto !important;
border-radius: 8px !important;
}
.el-dialog__body {
padding: 16px 20px;
}
}
.dialog-content { .dialog-content {
text-align: center; text-align: center;
i {
font-size: 24px;
margin-right: 10px;
}
.el-icon-warning {
color: rgba(245, 150, 25, 1);
}
.el-icon-success {
color: rgba(44, 202, 116, 1);
}
.dialog-tips-big { .dialog-tips-big {
font-size: 16px; font-size: 14px;
color: #333333; color: rgba(51, 51, 51, 1);
margin-bottom: 20px; display: flex;
align-items: center;
justify-content: center;
span { span {
cursor: pointer; cursor: pointer;
color: rgba(42, 88, 173, 1); color: rgba(42, 88, 173, 1);
} }
} }
.dialog-tips-small { .dialog-tips-small {
max-width: 318px;
margin: 10px auto 12px;
font-size: 12px; font-size: 12px;
color: #666666; color: rgba(153, 153, 153, 1);
}
}
.left {
text-align: left;
.dialog-tips-big {
justify-content: flex-start;
}
}
.success-dialog-content {
display: flex;
.dialog-tips-big {
justify-content: flex-start;
}
.dialog-tips-small {
max-width: 100%;
margin: 0 auto;
}
.dialog-tips-big,
.dialog-tips-small {
color: rgba(51, 51, 51, 1);
line-height: 20px;
font-size: 14px;
text-align: left;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!