关联凭证

main
mo 1 year ago
parent 6398f1be98
commit bcec818e9e

@ -134,6 +134,17 @@
>下载元数据</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-document"
size="mini"
:disabled="multiple"
@click="handleGLPZ"
>关联凭证</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -692,6 +703,35 @@
<el-button @click="cancel1"> </el-button>
</div>
</el-dialog>
<!-- 会计凭证选择框-->
<el-dialog
:title="title"
:visible.sync="open2"
width="800px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules1" label-width="140px">
<el-row>
<el-col :span="14">
<el-form-item label="会计凭证" prop="voucherId">
<el-select v-model="form.voucherId" placeholder="请选择会计凭证">
<el-option
v-for="item in kjpzOptions"
:key="item.recordId"
:label="item.voucherNum"
:value="item.flowId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm2"> </el-button>
<el-button @click="cancel2"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -707,6 +747,7 @@ import {
downloadXml,
getInvoicesPageTime,
} from "@/api/accounting/invoices";
import { getVoucherPage } from "@/api/accounting/voucher";
import { listData } from "@/api/system/dict/data";
import { getAccessToken } from "@/utils/auth";
@ -717,6 +758,8 @@ export default {
return {
//
loading: true,
//
multiple: true,
//
exportLoading: false,
downloadLoading: false,
@ -733,6 +776,7 @@ export default {
//
open: false,
open1: false,
open2: false,
accountingType: "in",
fileList: [],
time: null,
@ -820,6 +864,9 @@ export default {
{ required: true, message: "密码不能为空", trigger: "blur" },
],
},
rules1: {
voucherId: [{ required: true, message: "请选择凭证", trigger: "blur" }],
},
//
upload: {
//
@ -843,10 +890,12 @@ export default {
invoiceStateOptions: [], //
inOrOutOptions: [], //
qrCheckCodeOptions: [], //
kjpzOptions: [], //
};
},
created() {
this.getList();
this.getKJPZ();
this.handleInitList();
},
@ -892,7 +941,8 @@ export default {
this.total = response.data.total;
this.loading = false;
});
} /** 查询列表2 */,
},
/** 查询列表2 */
getList2() {
this.loading = true;
//
@ -902,6 +952,7 @@ export default {
this.loading = false;
});
},
handleOneMonth() {
this.time = 1;
this.getList2();
@ -914,6 +965,12 @@ export default {
this.time = 12;
this.getList2();
},
//
getKJPZ() {
getVoucherPage().then((res) => {
this.kjpzOptions = res.data.list || [];
});
},
//
handleInitList() {
//
@ -980,6 +1037,10 @@ export default {
cancel1() {
this.open1 = false;
},
/** 取消按钮 */
cancel2() {
this.open2 = false;
},
/** 表单重置 */
reset() {
this.form = {
@ -1057,8 +1118,14 @@ export default {
},
//
handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.id);
this.multiple = !selection.length;
if (selection.length == 1) {
this.multiple = false;
} else {
this.multiple = true;
}
this.form = selection[0];
},
/** 新增按钮操作 */
handleAdd() {
@ -1130,6 +1197,24 @@ export default {
})
.catch(() => {});
},
//
handleGLPZ() {
this.open2 = true;
this.form.voucherId = null;
},
submitForm2() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
updateInvoices(this.form).then((response) => {
this.$modal.msgSuccess("关联成功");
this.open2 = false;
this.multiple = true;
this.getList();
});
});
},
/** 导出按钮操作 */
handleExport() {
//
@ -1181,19 +1266,25 @@ export default {
submitFileForm() {
this.$refs.upload.submit();
},
//
handleDownloadData() {
this.open1 = true;
this.queryParams.inputPassword = null;
},
submitForm1() {
//
let params = { ...this.queryParams };
downloadXml(params)
.then((response) => {
this.$download.excel(response, "发票元数据.xml");
this.open1 = false;
})
.catch(() => {});
this.$refs["queryForm"].validate((valid) => {
if (!valid) {
return;
}
//
let params = { ...this.queryParams };
downloadXml(params)
.then((response) => {
this.$download.excel(response, "发票元数据.xml");
this.open1 = false;
})
.catch(() => {});
});
},
},
};

@ -88,11 +88,13 @@
</template>
</el-table-column>
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="文件后缀" align="center" prop="suffix" />
<el-table-column label="文件地址" align="center" prop="fileUrl" />
<el-table-column label="绝对路径" align="center" prop="fileAp" />
<el-table-column label="流程号" align="center" prop="flowId" />
<el-table-column label="摘要" align="center" prop="note" />
<el-table-column label="文件地址" align="center" prop="fileUrl">
<template slot-scope="scope">
<el-button type="text" @click="openLink(scope.row.fileUrl)">
{{ scope.row.fileUrl }}
</el-button>
</template>
</el-table-column>
<el-table-column label="归档状态" align="center" prop="archiveState" />
<el-table-column
label="创建时间"
@ -243,11 +245,6 @@
<el-input v-model="form.company" placeholder="请输入业务实体" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="摘要" prop="note">
<el-input v-model="form.note" placeholder="请输入摘要" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input
@ -338,6 +335,16 @@ export default {
this.getList();
},
methods: {
/**
* 文件预览
* @param fileUrl 地址
*/
openLink(fileUrl) {
const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent(
this.base64Encode(fileUrl)
)}`;
window.open(url);
},
/** 查询列表 */
getList() {
this.loading = true;

@ -184,42 +184,55 @@
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="业务实体" prop="company">
<!-- <el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" />
</el-form-item>
<el-form-item label="所属部门" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入所属部门" />
</el-form-item>
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
<el-form-item label="凭证类型" prop="type">
<el-select v-model="form.type" placeholder="请选择凭证类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="凭证日期" prop="voucherTime">
<el-date-picker
clearable
v-model="form.voucherTime"
type="date"
value-format="timestamp"
placeholder="选择凭证日期"
/>
</el-form-item>
<el-form-item label="摘要" prop="digest">
<el-input v-model="form.digest" placeholder="请输入摘要" />
</el-form-item>
<el-form-item label="审核人" prop="audit">
<el-input v-model="form.audit" placeholder="请输入审核人" />
</el-form-item>
<el-form-item label="核准人" prop="checker">
<el-input v-model="form.checker" placeholder="请输入核准人" />
</el-form-item>
<el-form-item label="经办人" prop="handle">
<el-input v-model="form.handle" placeholder="请输入经办人" />
</el-form-item>
<el-form-item label="业务标识" prop="serviceId">
</el-form-item> -->
<el-row>
<el-col :span="8">
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证类型" prop="type">
<el-select v-model="form.type" placeholder="请选择凭证类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证日期" prop="voucherTime">
<el-date-picker
clearable
v-model="form.voucherTime"
type="date"
value-format="timestamp"
placeholder="选择凭证日期"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="审核人" prop="audit">
<el-input v-model="form.audit" placeholder="请输入审核人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="核准人" prop="checker">
<el-input v-model="form.checker" placeholder="请输入核准人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人" prop="handle">
<el-input v-model="form.handle" placeholder="请输入经办人" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-form-item label="业务标识" prop="serviceId">
<el-input v-model="form.serviceId" placeholder="请输入业务标识" />
</el-form-item>
<el-form-item label="业务说明" prop="serviceExplain">
@ -283,6 +296,9 @@
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item> -->
<el-form-item label="摘要" prop="digest">
<el-input v-model="form.digest" placeholder="请输入摘要" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input

Loading…
Cancel
Save