|
@@ -21,7 +21,11 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #file="{ item }">
|
|
|
- <div style="width: 100%">aa</div>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-button type="primary" text @click="handleOpenFile(item)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</byTable>
|
|
|
</div>
|
|
@@ -231,6 +235,60 @@
|
|
|
>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="关联附件"
|
|
|
+ v-if="openFileDialog"
|
|
|
+ v-model="openFileDialog"
|
|
|
+ width="500"
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="fileConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="fileData.data"
|
|
|
+ >
|
|
|
+ <template #businessFile>
|
|
|
+ <div
|
|
|
+ style="width: 100%"
|
|
|
+ v-if="fileData.data && fileData.data.fileList.length > 0"
|
|
|
+ >
|
|
|
+ <div v-for="(item, index) in fileData.data.fileList" :key="index">
|
|
|
+ <div
|
|
|
+ style="cursor: pointer; color: #409eff"
|
|
|
+ @click="openFile(item)"
|
|
|
+ >
|
|
|
+ {{ item.fileName }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>暂无关联</div>
|
|
|
+ </template>
|
|
|
+ <template #fundsFile>
|
|
|
+ <div
|
|
|
+ style="width: 100%"
|
|
|
+ v-if="fileData.data && fileData.data.fileListOne.length > 0"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in fileData.data.fileListOne"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ style="cursor: pointer; color: #409eff"
|
|
|
+ @click="openFile(item)"
|
|
|
+ >
|
|
|
+ {{ item.fileName }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>暂无关联</div>
|
|
|
+ </template>
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openFileDialog = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -238,7 +296,7 @@
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
-import { computed, ref } from "vue";
|
|
|
+import { computed, reactive, ref } from "vue";
|
|
|
import moment from "moment";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import FundsPDF from "@/components/PDF/fundsPDF.vue";
|
|
@@ -352,14 +410,6 @@ const config = computed(() => {
|
|
|
align: "right",
|
|
|
},
|
|
|
},
|
|
|
- // {
|
|
|
- // attrs: {
|
|
|
- // label: "关联附件",
|
|
|
- // slot: "file",
|
|
|
- // width: 200,
|
|
|
- // align: "left",
|
|
|
- // },
|
|
|
- // },
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "款项说明",
|
|
@@ -369,6 +419,14 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "关联附件",
|
|
|
+ slot: "file",
|
|
|
+ width: 80,
|
|
|
+ align: "left",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "打款状态",
|
|
|
prop: "status",
|
|
|
width: 120,
|
|
@@ -960,6 +1018,55 @@ const clickDetail = () => {
|
|
|
submitType.value = "edit";
|
|
|
getDtl(rowData.value);
|
|
|
};
|
|
|
+const fileData = reactive({
|
|
|
+ data: {},
|
|
|
+});
|
|
|
+const fileConfig = computed(() => [
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "业务附件",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "businessFile",
|
|
|
+ // label: "业务附件",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "打款附件",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "fundsFile",
|
|
|
+ // label: "打款附件",
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const openFileDialog = ref(false);
|
|
|
+const handleOpenFile = (row) => {
|
|
|
+ fileData.data = {
|
|
|
+ fileList: [],
|
|
|
+ fileListOne: [],
|
|
|
+ };
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [row.businessId] })
|
|
|
+ .then((fileObj) => {
|
|
|
+ if (fileObj[row.businessId] && fileObj[row.businessId].length > 0) {
|
|
|
+ fileData.data.fileList = fileObj[row.businessId];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", { businessIdList: [row.id] })
|
|
|
+ .then((fileObj) => {
|
|
|
+ if (fileObj[row.id] && fileObj[row.id].length > 0) {
|
|
|
+ fileData.data.fileListOne = fileObj[row.id];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ openFileDialog.value = true;
|
|
|
+};
|
|
|
+const openFile = (item) => {
|
|
|
+ window.open(item.fileUrl, "_blank");
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|