页面修改,元数据密码校验

main
mo 1 year ago
parent eff22791d1
commit f923d0f561

@ -779,7 +779,7 @@ export default {
this.$modal.msgError("密码错误"); this.$modal.msgError("密码错误");
return false; return false;
} else { } else {
this.$download.excel(response, "发票元数据.xml"); this.$download.excel(response, "银行回单元数据.xml");
this.open1 = false; this.open1 = false;
} }
}) })

@ -451,8 +451,14 @@ export default {
let params = { ...this.queryParams }; let params = { ...this.queryParams };
downloadXml(params) downloadXml(params)
.then((response) => { .then((response) => {
console.log(response.size);
if (response.size == 39) {
this.$modal.msgError("密码错误");
return false;
} else {
this.$download.excel(response, "会计账簿元数据.xml"); this.$download.excel(response, "会计账簿元数据.xml");
this.open1 = false; this.open1 = false;
}
}) })
.catch(() => {}); .catch(() => {});
}); });

@ -148,7 +148,28 @@
width="1000px" width="1000px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> <el-upload
class="upload-demo"
drag
:limit="1"
:action="uploadUrl"
:file-list="fileList"
:headers="headers"
:on-success="handleSuccess"
name="multipartFile"
:multiple="false"
:accept="imgType"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="130px"
style="margin-top: 20px"
>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="OA/ERP流程编号" prop="flowCode"> <el-form-item label="OA/ERP流程编号" prop="flowCode">
@ -184,11 +205,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="文件地址" prop="fileUrl"> <el-form-item label="文件地址" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件地址" /> <el-input v-model="form.fileUrl" placeholder="请输入文件地址" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="流程号" prop="flowId"> <el-form-item label="流程号" prop="flowId">
<el-input v-model="form.flowId" placeholder="请输入流程号" /> <el-input v-model="form.flowId" placeholder="请输入流程号" />
@ -248,6 +269,7 @@ import {
exportFlowExcel, exportFlowExcel,
downloadXml, downloadXml,
} from "@/api/accounting/flow"; } from "@/api/accounting/flow";
import { getAccessToken, getTenantId } from "@/utils/auth";
export default { export default {
name: "Flow", name: "Flow",
@ -269,6 +291,8 @@ export default {
// //
open: false, open: false,
open1: false, open1: false,
fileList: [],
imgType: ".jpeg, .jpg, .png",
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
@ -297,6 +321,13 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
fileList: [], //
uploadUrl:
process.env.VUE_APP_BASE_API + "/admin-api//archives/flow/upload", //
headers: {
Authorization: "Bearer " + getAccessToken(),
"tenant-id": getTenantId(),
}, //
}; };
}, },
created() { created() {
@ -363,6 +394,7 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.fileList = [];
this.open = true; this.open = true;
this.title = "添加审批流程"; this.title = "添加审批流程";
}, },
@ -399,6 +431,11 @@ export default {
}); });
}); });
}, },
//
handleSuccess(res) {
console.log(res);
this.form.fileUrl = res.data.url;
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;

@ -435,8 +435,14 @@ export default {
let params = { ...this.queryParams }; let params = { ...this.queryParams };
downloadXml(params) downloadXml(params)
.then((response) => { .then((response) => {
this.$download.excel(response, "会计账簿元数据.xml"); console.log(response.size);
if (response.size == 39) {
this.$modal.msgError("密码错误");
return false;
} else {
this.$download.excel(response, "会计报表元数据.xml");
this.open1 = false; this.open1 = false;
}
}) })
.catch(() => {}); .catch(() => {});
}); });

Loading…
Cancel
Save