|
@@ -29,6 +29,7 @@
|
|
|
<script setup>
|
|
|
import byTable from "/src/components/byTable/index";
|
|
|
import { flowStatus } from "/src/utils/flowStatus";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const sourceList = ref({
|
|
@@ -107,12 +108,34 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
- width: 80,
|
|
|
+ width: 220,
|
|
|
align: "center",
|
|
|
fixed: "right",
|
|
|
},
|
|
|
renderHTML(row) {
|
|
|
return [
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "下载PDF",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickUpload(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "重新生成",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickRefresh(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
row.flowStatus == "0"
|
|
|
? {
|
|
|
attrs: {
|
|
@@ -188,6 +211,21 @@ const clickUpdate = (item) => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+const clickUpload = (item) => {
|
|
|
+ proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
|
|
|
+ if (fileObj[item.id] && fileObj[item.id].length > 0) {
|
|
|
+ window.open(fileObj[item.id][0].fileUrl);
|
|
|
+ } else {
|
|
|
+ return ElMessage("请重新生成文件");
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+const clickRefresh = (item) => {
|
|
|
+ ElMessage("生成文件中,请勿重复点击");
|
|
|
+ proxy.post("/applyBuy/updateApplyBuyAccessory", { id: item.id }).then(() => {
|
|
|
+ ElMessage({ message: "重新生成成功", type: "success" });
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|