|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div>
|
|
|
3
|
+ <el-dialog title="邮件内容" :visible="emailVidable" @close="cancel" center
|
|
|
4
|
+ :distroy-on-close="true">
|
|
|
5
|
+ <div>
|
|
|
6
|
+ <el-form>
|
|
|
7
|
+ <el-col :span="24">
|
|
|
8
|
+ <el-form-item label="邮件主题:" label-width="100px">
|
|
|
9
|
+ <div>主题</div>
|
|
|
10
|
+ </el-form-item>
|
|
|
11
|
+ </el-col>
|
|
|
12
|
+ <el-col :span="12">
|
|
|
13
|
+ <el-form-item label="收件人:" label-width="100px">
|
|
|
14
|
+ <div>收件人</div>
|
|
|
15
|
+ </el-form-item>
|
|
|
16
|
+ </el-col>
|
|
|
17
|
+ <el-col :span="12">
|
|
|
18
|
+ <el-form-item label="发件人:" label-width="100px">
|
|
|
19
|
+ <div>发件人</div>
|
|
|
20
|
+ </el-form-item>
|
|
|
21
|
+ </el-col>
|
|
|
22
|
+ <el-col :span="24">
|
|
|
23
|
+ <el-form-item label="邮件附件:" label-width="100px">
|
|
|
24
|
+ <div style="color: blue; cursor: pointer" @click="viewAttachments">附件</div>
|
|
|
25
|
+ </el-form-item>
|
|
|
26
|
+ </el-col>
|
|
|
27
|
+ <el-col :span="24">
|
|
|
28
|
+ <el-form-item label="邮件正文:" label-width="100px">
|
|
|
29
|
+ <el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="sendData"></el-input>
|
|
|
30
|
+ </el-form-item>
|
|
|
31
|
+ </el-col>
|
|
|
32
|
+ </el-form>
|
|
|
33
|
+
|
|
|
34
|
+ </div>
|
|
|
35
|
+ <div slot="footer" class="dialog-footer">
|
|
|
36
|
+ <el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
|
|
|
37
|
+ <el-button @click="submitSend" class="endbutton1" type="primary" round><span>确 认</span></el-button>
|
|
|
38
|
+ </div>
|
|
|
39
|
+ </el-dialog>
|
|
|
40
|
+ </div>
|
|
|
41
|
+</template>
|
|
|
42
|
+
|
|
|
43
|
+<script>
|
|
|
44
|
+import {
|
|
|
45
|
+ updateSendContent,update
|
|
|
46
|
+} from "@/api/deliveryRecord/deliveryRecord.js";
|
|
|
47
|
+export default {
|
|
|
48
|
+ props: ["emailVidable", "emailRow","queryParams"],
|
|
|
49
|
+ data() {
|
|
|
50
|
+ return {
|
|
|
51
|
+ sendData:'',
|
|
|
52
|
+ fileURL: window.location.origin + "/API",
|
|
|
53
|
+ };
|
|
|
54
|
+ },
|
|
|
55
|
+ watch: {
|
|
|
56
|
+ emailVidable(val){
|
|
|
57
|
+ if(val){
|
|
|
58
|
+ this.sendData = this.emailRow.mailContent;
|
|
|
59
|
+ }
|
|
|
60
|
+ }
|
|
|
61
|
+ },
|
|
|
62
|
+ methods: {
|
|
|
63
|
+ cancel() {
|
|
|
64
|
+ this.$emit("cancelEmail");
|
|
|
65
|
+ },
|
|
|
66
|
+ submitSend() {
|
|
|
67
|
+ console.log(this.emailRow.mailContent)
|
|
|
68
|
+ this.updateSendContentFn({
|
|
|
69
|
+ id:this.emailRow.id,
|
|
|
70
|
+ mailContent:this.sendData
|
|
|
71
|
+ })
|
|
|
72
|
+ },
|
|
|
73
|
+ updateSendContentFn(data){
|
|
|
74
|
+ update(data).then(res=>{
|
|
|
75
|
+ this.$message.success('更新成功');
|
|
|
76
|
+ this.$emit("cancelEmail");
|
|
|
77
|
+ this.$emit('getList',this.queryParams);
|
|
|
78
|
+ })
|
|
|
79
|
+ },
|
|
|
80
|
+ // 查看附件下载附件
|
|
|
81
|
+ viewAttachments(val){
|
|
|
82
|
+ window.open(this.fileURL + val);
|
|
|
83
|
+ }
|
|
|
84
|
+ },
|
|
|
85
|
+};
|
|
|
86
|
+</script>
|
|
|
87
|
+
|
|
|
88
|
+<style lang="scss" scoped></style>
|