|
@@ -17,13 +17,9 @@
|
|
|
@moreSearch="moreSearch"
|
|
|
@get-list="getList"
|
|
|
>
|
|
|
- <template #total="{ item }">
|
|
|
- <div style="width: 100%">
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer"
|
|
|
- @click="pushProcessApproval(item)"
|
|
|
- >{{ item.currency }}{{ item.total }}</a
|
|
|
- >
|
|
|
+ <template #content="{ item }">
|
|
|
+ <div v-if="item.content">
|
|
|
+ <div v-html="getHtml(item.content)"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byTable>
|
|
@@ -42,10 +38,10 @@
|
|
|
:rules="rules"
|
|
|
ref="byform"
|
|
|
>
|
|
|
- <template #remark>
|
|
|
+ <template #content>
|
|
|
<div style="width: 100%">
|
|
|
<Editor
|
|
|
- :value="formData.data.remark"
|
|
|
+ :value="formData.data.content"
|
|
|
@updateValue="updateHandover"
|
|
|
/>
|
|
|
</div>
|
|
@@ -71,11 +67,13 @@
|
|
|
>
|
|
|
<div style="width: 100%" class="main">
|
|
|
<img src="@/assets/images/mail-preview.png" alt="" class="img" />
|
|
|
- <div class="body">签名</div>
|
|
|
+ <div class="body">
|
|
|
+ <div v-html="getHtml(selectRowData.content)"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div style="display: flex; align-items: center; margin-top: 20px">
|
|
|
<div style="margin-right: 5px">选择签名</div>
|
|
|
- <el-select disabled v-model="selectRowData"> </el-select>
|
|
|
+ <el-select disabled v-model="selectRowData.templateName"> </el-select>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<el-button @click="previewDialog = false" size="large">取 消</el-button>
|
|
@@ -110,29 +108,28 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "模板名称",
|
|
|
- prop: "corporationName",
|
|
|
+ prop: "templateName",
|
|
|
width: 180,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "签名内容",
|
|
|
- prop: "deptName",
|
|
|
- slot: "deptName",
|
|
|
+ prop: "content",
|
|
|
+ slot: "content",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "创建时间",
|
|
|
- prop: "type",
|
|
|
+ prop: "createTime",
|
|
|
width: 155,
|
|
|
},
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
- width: "180",
|
|
|
+ width: "160",
|
|
|
align: "center",
|
|
|
fixed: "right",
|
|
|
},
|
|
@@ -180,7 +177,7 @@ const config = computed(() => {
|
|
|
).then(() => {
|
|
|
// 删除
|
|
|
proxy
|
|
|
- .post("/warehouse/delete", {
|
|
|
+ .post("/mailSignature/delete", {
|
|
|
id: row.id,
|
|
|
})
|
|
|
.then((res) => {
|
|
@@ -202,7 +199,7 @@ const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
- .post("/accountRequestFunds/page", sourceList.value.pagination)
|
|
|
+ .post("/mailSignature/page", sourceList.value.pagination)
|
|
|
.then((message) => {
|
|
|
sourceList.value.data = message.rows;
|
|
|
sourceList.value.pagination.total = message.total;
|
|
@@ -225,22 +222,22 @@ const formConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "corporationId",
|
|
|
+ prop: "templateName",
|
|
|
label: "模板名称",
|
|
|
},
|
|
|
{
|
|
|
type: "slot",
|
|
|
- prop: "remark",
|
|
|
+ prop: "content",
|
|
|
label: "签名内容",
|
|
|
- slotName: "remark",
|
|
|
+ slotName: "content",
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
-let rules = ref({
|
|
|
- productClassifyId: [
|
|
|
- { required: true, message: "请选择物料分类", trigger: "change" },
|
|
|
+const rules = ref({
|
|
|
+ templateName: [
|
|
|
+ { required: true, message: "请输入模板名称", trigger: "blur" },
|
|
|
],
|
|
|
- remark: [{ required: true, message: "请输入签名内容", trigger: "blur" }],
|
|
|
+ content: [{ required: true, message: "请输入签名内容", trigger: "blur" }],
|
|
|
});
|
|
|
const submitType = ref("add");
|
|
|
const addDialog = ref(false);
|
|
@@ -249,24 +246,23 @@ const byform = ref(null);
|
|
|
const openModal = () => {
|
|
|
submitType.value = "add";
|
|
|
formData.data = {
|
|
|
- remark: "",
|
|
|
+ content: "",
|
|
|
};
|
|
|
addDialog.value = true;
|
|
|
};
|
|
|
-
|
|
|
const updateHandover = (val) => {
|
|
|
- formData.data.remark = val;
|
|
|
+ formData.data.content = val;
|
|
|
};
|
|
|
const submitForm = () => {
|
|
|
byform.value.handleSubmit(() => {
|
|
|
submitLoading.value = true;
|
|
|
- proxy.post("/accountPayment/add", formData.data).then(
|
|
|
+ proxy.post("/mailSignature/" + submitType.value, formData.data).then(
|
|
|
() => {
|
|
|
ElMessage({
|
|
|
- message: "打款成功",
|
|
|
+ message: "操作成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
- dialogVisible.value = false;
|
|
|
+ addDialog.value = false;
|
|
|
submitLoading.value = false;
|
|
|
getList();
|
|
|
},
|
|
@@ -277,16 +273,24 @@ const submitForm = () => {
|
|
|
});
|
|
|
};
|
|
|
const getDtl = (row) => {
|
|
|
- modalType.value = "edit";
|
|
|
- proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
|
|
|
- res.type = res.type + "";
|
|
|
- dialogVisible.value = true;
|
|
|
+ submitType.value = "edit";
|
|
|
+ proxy.post("/mailSignature/detail", { id: row.id }).then((res) => {
|
|
|
+ addDialog.value = true;
|
|
|
formData.data = res;
|
|
|
});
|
|
|
};
|
|
|
-const selectRowData = ref("ceshi");
|
|
|
+
|
|
|
+const getHtml = (str) => {
|
|
|
+ if (str) {
|
|
|
+ let newStr = str.replace(/<p\b/gi, "<div"); // 使用正则表达式替换<p>为<div
|
|
|
+ return newStr.replace(/<\/p>/gi, "</div>"); // 使用正则表达式替换</p>为</div>
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectRowData = ref({});
|
|
|
const previewDialog = ref(false);
|
|
|
const openModalOne = (row) => {
|
|
|
+ selectRowData.value = row;
|
|
|
previewDialog.value = true;
|
|
|
};
|
|
|
</script>
|
|
@@ -314,6 +318,7 @@ const openModalOne = (row) => {
|
|
|
left: 6%;
|
|
|
bottom: 16px;
|
|
|
min-width: 50%;
|
|
|
+ overflow: auto;
|
|
|
}
|
|
|
}
|
|
|
</style>
|