Commit d4f29d06 by chenwq

fix(签名管理): 统一日期格式并添加加载状态处理

- 将签名时间显示格式从'YYYY/MM/DD'改为'YYYY-MM-DD'以保持统一
- 在签名弹窗中添加loading状态防止重复提交
- 为操作按钮添加加载状态禁用效果
1 parent 50a90400
<template>
<GLDialog v-if="dialogShow" bigTitle="签名预设" mode="big" :visible.sync="dialogShow" :close-on-click-modal="false" @onCancel="handleDetailClose">
<div class="table-wrap">
<div class="table-wrap" v-loading="btnLoading || loading">
<div class="sign-box">
<div class="red-txt">*空白区域内写下名字</div>
<div class="background-text">签字区</div>
......@@ -11,9 +11,9 @@
</div>
<template slot="footer">
<span class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="clear">重写</el-button>
<el-button plain size="small" class="btn-three" @click="undo">撤销</el-button>
<el-button type="primary" size="small" @click="save">确定</el-button>
<el-button plain size="small" class="btn-three" @click="clear" :loading="btnLoading || loading">重写</el-button>
<el-button plain size="small" class="btn-three" @click="undo" :loading="btnLoading || loading">撤销</el-button>
<el-button type="primary" size="small" @click="save" :loading="btnLoading || loading">确定</el-button>
</span>
</template>
</GLDialog>
......@@ -53,6 +53,7 @@ export default {
velocityFilterWeight: 0.7,
backgroundColor: 'rgba(255, 255, 255, 0.0)'
},
loading: false,
btnLoading: false,
dayjs: dayjs,
detailInfo: {}
......@@ -72,7 +73,7 @@ export default {
// return
// }
const { isEmpty, data } = this.$refs.signaturePad.saveSignature()
if (this.btnLoading) {
if (this.loading) {
return
}
if (isEmpty) {
......@@ -94,6 +95,9 @@ export default {
})
},
deliverySign(url) {
if (this.btnLoading) {
return true
}
const params = {
id: this.info.orderDeliveryId,
signFileUrl: url
......
......@@ -71,7 +71,7 @@ export default {
label: '签名时间',
prop: 'createdDate',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY/MM/DD HH:mm:ss') : '--'
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
}
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!