发布差保证金计算
parent
699fd06fd9
commit
d1cf8db0b0
@ -0,0 +1,92 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="打款" :visible.sync="dialogFormVisible" width="500px" @close="close" :close-on-click-modal="false" v-dialogDrag>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="保证金">
|
||||||
|
<el-input v-model.trim="form.guaranteeMoney" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="打款回执" prop="">
|
||||||
|
<el-upload class="avatar-uploader" :limit="10" ref="upload" action="#" :show-file-list="false" :auto-upload="false" :on-change="handleChange">
|
||||||
|
<img v-if="imageUrl" :src="imageUrl" class="avatar">
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="close">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="save">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'pay',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
imageUrl: '',//图片链接
|
||||||
|
form: {},
|
||||||
|
dialogFormVisible: false//弹窗显示
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() { },
|
||||||
|
methods: {
|
||||||
|
// ============================ 弹窗 ============================ //
|
||||||
|
// 显示弹窗
|
||||||
|
show() {
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
},
|
||||||
|
// 关闭弹窗
|
||||||
|
close() {
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// ============================ 操作 ============================ //
|
||||||
|
// 选择图片后形成图片访问路径和将文件流传给edit.vue
|
||||||
|
handleChange(file, fileList) {
|
||||||
|
this.imageUrl = URL.createObjectURL(file.raw);//形成虚拟文件访问路径
|
||||||
|
this.$emit('active-img', file.raw);//raw要上传的文件流
|
||||||
|
},
|
||||||
|
// 发布后清除选择的文件
|
||||||
|
handleClear() {
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
},
|
||||||
|
// 保存
|
||||||
|
save() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.avatar-uploader .el-upload {
|
||||||
|
border: 1px dashed #d9d9d9;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.avatar-uploader .el-upload:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
.avatar-uploader-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
line-height: 150px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue