Browse Source

feat: [模板] 增加修改签名弹窗

lkf
memorylkf 3 months ago
parent
commit
5bd2711cd4
4 changed files with 134 additions and 0 deletions
  1. +8
    -0
      src/api/business/public/public.js
  2. +3
    -0
      src/lang/en.js
  3. +3
    -0
      src/lang/zh.js
  4. +120
    -0
      src/views/business/comps/template/dialog/EditSign.vue

+ 8
- 0
src/api/business/public/public.js View File

@ -7,6 +7,14 @@ export function public_getSn(query) {
params: query
})
}
// 验证密码
export function public_checkPassword(data) {
return request({
url: '/system/business/public/checkPassword',
method: 'post',
data
})
}
// 暂存柜列表
export function public_zcgList(query) {

+ 3
- 0
src/lang/en.js View File

@ -91,6 +91,9 @@ export default {
qmyy: 'Purpose',
signTime: '签名时间',
remark: 'Comment',
reason: 'Reason',
modify: 'Modify',
modifyRecord: 'Change Data',
lengthLimit: '长度不能超过',
notEmpty: '不能为空',

+ 3
- 0
src/lang/zh.js View File

@ -87,6 +87,9 @@ export default {
qmyy: '签名意义',
signTime: '签名时间',
remark: '备注',
reason: '原因',
modify: '修改',
modifyRecord: '修改记录',
lengthLimit: '长度不能超过',
notEmpty: '不能为空',

+ 120
- 0
src/views/business/comps/template/dialog/EditSign.vue View File

@ -0,0 +1,120 @@
<template>
<div>
<!-- 签名弹窗 -->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="formEditSignForm" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" v-model="form.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('form.reason')" prop="remark">
<el-input type="textarea" v-model="form.remark" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="form.qmrMc" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<!-- <el-col :span="24" v-if="$i18n.locale === 'zh_CN'">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="form.qmrMc" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="24" v-else>
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="form.qmrMcEn" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="form.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" show-password />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
<el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { public_checkPassword } from '@/api/business/public/public'
export default {
name: "FormEditSign",
components: { },
data() {
return {
title:this.$t('form.modify'),
open: false,
form: {
qmyy:'',
remark:'',
qmrId:'',
qmrMc:'',
qmrMcEn:'',
qmrmm:'',
},
rules: {
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}],
remark: [{
required: true,
message: ' ',
trigger: 'blur'
}]
}
}
},
computed: {
},
created() {
},
methods: {
show() {
this.form = {
qmyy:this.$t('form.modifyRecord'),
remark:'',
qmrId:this.$store.getters.id,
qmrMc:this.$store.getters.nickName,
qmrMcEn:this.$store.getters.name,
qmrmm:'',
}
this.resetForm("formEditSignForm")
this.open = true
},
cancel() {
this.open = false
},
save() {
this.$refs["formEditSignForm"].validate(valid => {
if (valid) {
this.$modal.loading()
public_checkPassword(this.form).then(response => {
this.$emit('callback',this.form)
this.open = false
}).catch(()=>{
}).finally(()=>{
this.$modal.closeLoading()
})
}
})
}
}
}
</script>

Loading…
Cancel
Save