关联凭证

main
mo 1 year ago
parent 6398f1be98
commit bcec818e9e

@ -134,6 +134,17 @@
>下载元数据</el-button >下载元数据</el-button
> >
</el-col> </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 <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -692,6 +703,35 @@
<el-button @click="cancel1"> </el-button> <el-button @click="cancel1"> </el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
@ -707,6 +747,7 @@ import {
downloadXml, downloadXml,
getInvoicesPageTime, getInvoicesPageTime,
} from "@/api/accounting/invoices"; } from "@/api/accounting/invoices";
import { getVoucherPage } from "@/api/accounting/voucher";
import { listData } from "@/api/system/dict/data"; import { listData } from "@/api/system/dict/data";
import { getAccessToken } from "@/utils/auth"; import { getAccessToken } from "@/utils/auth";
@ -717,6 +758,8 @@ export default {
return { return {
// //
loading: true, loading: true,
//
multiple: true,
// //
exportLoading: false, exportLoading: false,
downloadLoading: false, downloadLoading: false,
@ -733,6 +776,7 @@ export default {
// //
open: false, open: false,
open1: false, open1: false,
open2: false,
accountingType: "in", accountingType: "in",
fileList: [], fileList: [],
time: null, time: null,
@ -820,6 +864,9 @@ export default {
{ required: true, message: "密码不能为空", trigger: "blur" }, { required: true, message: "密码不能为空", trigger: "blur" },
], ],
}, },
rules1: {
voucherId: [{ required: true, message: "请选择凭证", trigger: "blur" }],
},
// //
upload: { upload: {
// //
@ -843,10 +890,12 @@ export default {
invoiceStateOptions: [], // invoiceStateOptions: [], //
inOrOutOptions: [], // inOrOutOptions: [], //
qrCheckCodeOptions: [], // qrCheckCodeOptions: [], //
kjpzOptions: [], //
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getKJPZ();
this.handleInitList(); this.handleInitList();
}, },
@ -892,7 +941,8 @@ export default {
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
} /** 查询列表2 */, },
/** 查询列表2 */
getList2() { getList2() {
this.loading = true; this.loading = true;
// //
@ -902,6 +952,7 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
handleOneMonth() { handleOneMonth() {
this.time = 1; this.time = 1;
this.getList2(); this.getList2();
@ -914,6 +965,12 @@ export default {
this.time = 12; this.time = 12;
this.getList2(); this.getList2();
}, },
//
getKJPZ() {
getVoucherPage().then((res) => {
this.kjpzOptions = res.data.list || [];
});
},
// //
handleInitList() { handleInitList() {
// //
@ -980,6 +1037,10 @@ export default {
cancel1() { cancel1() {
this.open1 = false; this.open1 = false;
}, },
/** 取消按钮 */
cancel2() {
this.open2 = false;
},
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
@ -1057,8 +1118,14 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.id); 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() { handleAdd() {
@ -1130,6 +1197,24 @@ export default {
}) })
.catch(() => {}); .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() { handleExport() {
// //
@ -1181,11 +1266,16 @@ export default {
submitFileForm() { submitFileForm() {
this.$refs.upload.submit(); this.$refs.upload.submit();
}, },
//
handleDownloadData() { handleDownloadData() {
this.open1 = true; this.open1 = true;
this.queryParams.inputPassword = null; this.queryParams.inputPassword = null;
}, },
submitForm1() { submitForm1() {
this.$refs["queryForm"].validate((valid) => {
if (!valid) {
return;
}
// //
let params = { ...this.queryParams }; let params = { ...this.queryParams };
downloadXml(params) downloadXml(params)
@ -1194,6 +1284,7 @@ export default {
this.open1 = false; this.open1 = false;
}) })
.catch(() => {}); .catch(() => {});
});
}, },
}, },
}; };

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

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

Loading…
Cancel
Save