todo:开票,回款

This commit is contained in:
ryoeiken 2021-01-04 17:32:07 +08:00
parent 150676a9ad
commit 64e943b681
5 changed files with 670 additions and 163 deletions

View File

@ -35,7 +35,7 @@ import java.util.List;
public class FtInvoiceDaoController extends BaseController {
private final IFtInvoiceDaoService iFtInvoiceDaoService;
private final IFtReturnDaoService iFtReturnDaoService;
/**
@ -46,6 +46,11 @@ public class FtInvoiceDaoController extends BaseController {
public TableDataInfo list(FtInvoiceDao ftInvoiceDao) {
startPage();
LambdaQueryWrapper<FtInvoiceDao> lqw = Wrappers.lambdaQuery(ftInvoiceDao);
if (ftInvoiceDao.getInvoiceType() != null) {
lqw.eq(FtInvoiceDao::getInvoiceType, ftInvoiceDao.getInvoiceType());
}
List<FtInvoiceDao> list = iFtInvoiceDaoService.list(lqw);
return getDataTable(list);
}
@ -132,12 +137,12 @@ public class FtInvoiceDaoController extends BaseController {
invoiceDao.setTaxId(taxId);
invoiceDao.setInvoiceType(invoiceType);
iFtInvoiceDaoService.save(invoiceDao);
if (invoiceType == 2) {
FtReturnDao ftReturnDao = new FtReturnDao();
ftReturnDao.setInvoiceId(invoiceDao.getId());
iFtReturnDaoService.save(ftReturnDao);
}
//
// if (invoiceType == 2) {
// FtReturnDao ftReturnDao = new FtReturnDao();
// ftReturnDao.setInvoiceId(invoiceDao.getId());
// iFtReturnDaoService.save(ftReturnDao);
// }
return AjaxResult.success("已开票");
}

View File

@ -136,7 +136,7 @@ public class FtSettleDaoController extends BaseController {
prepaymentDao.setPrepaid(balance);
iFtPrepaymentDaoService.updateById(prepaymentDao);
ftSettleDao.setType("预付款");
ftSettleDao.setType("预付款冲减");
break;
case 3:

View File

@ -0,0 +1,248 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['fantang:invoice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['fantang:invoice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['fantang:invoice:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['fantang:invoice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="invoiceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['fantang:invoice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['fantang:invoice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改财务收费开票对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInvoice, getInvoice, delInvoice, addInvoice, updateInvoice, exportInvoice } from "@/api/fantang/invoice";
export default {
name: "Invoice",
components: {
},
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
invoiceList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询财务收费开票列表 */
getList() {
this.loading = true;
listInvoice(this.queryParams).then(response => {
this.invoiceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: undefined,
invoiceUnit: undefined,
invoiceId: undefined,
createAt: undefined,
drawer: undefined,
collectionType: undefined,
payable: undefined,
receipts: undefined,
voucherList: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加财务收费开票";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInvoice(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改财务收费开票";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInvoice(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInvoice(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除财务收费开票编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInvoice(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有财务收费开票数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportInvoice(queryParams);
}).then(response => {
this.download(response.msg);
})
}
}
};
</script>

View File

@ -1,68 +1,359 @@
<!--<template>-->
<!-- <div class="app-container">-->
<!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">-->
<!-- <el-form-item label="对应发票id" prop="invoiceId">-->
<!-- <el-input-->
<!-- v-model="queryParams.invoiceId"-->
<!-- placeholder="请输入对应发票id"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="回款日期" prop="returnAt">-->
<!-- <el-date-picker clearable size="small"-->
<!-- v-model="queryParams.returnAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择回款日期">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="回款金额" prop="returnPrice">-->
<!-- <el-input-->
<!-- v-model="queryParams.returnPrice"-->
<!-- placeholder="请输入回款金额"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="余额" prop="balancePrice">-->
<!-- <el-input-->
<!-- v-model="queryParams.balancePrice"-->
<!-- placeholder="请输入余额"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="操作员" prop="opera">-->
<!-- <el-input-->
<!-- v-model="queryParams.opera"-->
<!-- placeholder="请输入操作员"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="凭证的图片url" prop="voucherUrl">-->
<!-- <el-input-->
<!-- v-model="queryParams.voucherUrl"-->
<!-- placeholder="请输入凭证的图片url"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否完成回款标志" prop="returnFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.returnFlag"-->
<!-- placeholder="请输入是否完成回款标志"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['fantang:invoiceReturn:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['fantang:invoiceReturn:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['fantang:invoiceReturn:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['fantang:invoiceReturn:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<!-- <el-table v-loading="loading" :data="invoiceReturnList" @selection-change="handleSelectionChange">-->
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="id" align="center" prop="id" v-if="false"/>-->
<!-- <el-table-column label="对应发票id" align="center" prop="invoiceId" />-->
<!-- <el-table-column label="回款日期" align="center" prop="returnAt" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.returnAt, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="回款金额" align="center" prop="returnPrice" />-->
<!-- <el-table-column label="余额" align="center" prop="balancePrice" />-->
<!-- <el-table-column label="操作员" align="center" prop="opera" />-->
<!-- <el-table-column label="凭证的图片url" align="center" prop="voucherUrl" />-->
<!-- <el-table-column label="是否完成回款标志" align="center" prop="returnFlag" />-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['fantang:invoiceReturn:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['fantang:invoiceReturn:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- -->
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<!-- &lt;!&ndash; 添加或修改回款登记对话框 &ndash;&gt;-->
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<!-- <el-form-item label="对应发票id" prop="invoiceId">-->
<!-- <el-input v-model="form.invoiceId" placeholder="请输入对应发票id" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="回款日期" prop="returnAt">-->
<!-- <el-date-picker clearable size="small"-->
<!-- v-model="form.returnAt"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择回款日期">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="回款金额" prop="returnPrice">-->
<!-- <el-input v-model="form.returnPrice" placeholder="请输入回款金额" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="余额" prop="balancePrice">-->
<!-- <el-input v-model="form.balancePrice" placeholder="请输入余额" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="操作员" prop="opera">-->
<!-- <el-input v-model="form.opera" placeholder="请输入操作员" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="凭证的图片url" prop="voucherUrl">-->
<!-- <el-input v-model="form.voucherUrl" placeholder="请输入凭证的图片url" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="是否完成回款标志" prop="returnFlag">-->
<!-- <el-input v-model="form.returnFlag" placeholder="请输入是否完成回款标志" />-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- <el-button @click="cancel"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- </div>-->
<!--</template>-->
<!--<script>-->
<!--import { listInvoiceReturn, getInvoiceReturn, delInvoiceReturn, addInvoiceReturn, updateInvoiceReturn, exportInvoiceReturn } from "@/api/fantang/invoiceReturn";-->
<!--export default {-->
<!-- name: "InvoiceReturn",-->
<!-- components: {-->
<!-- },-->
<!-- data() {-->
<!-- return {-->
<!-- // -->
<!-- loading: true,-->
<!-- // -->
<!-- ids: [],-->
<!-- // -->
<!-- single: true,-->
<!-- // -->
<!-- multiple: true,-->
<!-- // -->
<!-- showSearch: true,-->
<!-- // -->
<!-- total: 0,-->
<!-- // -->
<!-- invoiceReturnList: [],-->
<!-- // -->
<!-- title: "",-->
<!-- // -->
<!-- open: false,-->
<!-- // -->
<!-- queryParams: {-->
<!-- pageNum: 1,-->
<!-- pageSize: 10,-->
<!-- invoiceId: undefined,-->
<!-- returnAt: undefined,-->
<!-- returnPrice: undefined,-->
<!-- balancePrice: undefined,-->
<!-- opera: undefined,-->
<!-- voucherUrl: undefined,-->
<!-- returnFlag: undefined-->
<!-- },-->
<!-- // -->
<!-- form: {},-->
<!-- // -->
<!-- rules: {-->
<!-- }-->
<!-- };-->
<!-- },-->
<!-- created() {-->
<!-- this.getList();-->
<!-- },-->
<!-- methods: {-->
<!-- /** 查询回款登记列表 */-->
<!-- getList() {-->
<!-- this.loading = true;-->
<!-- listInvoiceReturn(this.queryParams).then(response => {-->
<!-- this.invoiceReturnList = response.rows;-->
<!-- this.total = response.total;-->
<!-- this.loading = false;-->
<!-- });-->
<!-- },-->
<!-- // -->
<!-- cancel() {-->
<!-- this.open = false;-->
<!-- this.reset();-->
<!-- },-->
<!-- // -->
<!-- reset() {-->
<!-- this.form = {-->
<!-- id: undefined,-->
<!-- invoiceId: undefined,-->
<!-- returnAt: undefined,-->
<!-- returnPrice: undefined,-->
<!-- balancePrice: undefined,-->
<!-- opera: undefined,-->
<!-- voucherUrl: undefined,-->
<!-- returnFlag: undefined-->
<!-- };-->
<!-- this.resetForm("form");-->
<!-- },-->
<!-- /** 搜索按钮操作 */-->
<!-- handleQuery() {-->
<!-- this.queryParams.pageNum = 1;-->
<!-- this.getList();-->
<!-- },-->
<!-- /** 重置按钮操作 */-->
<!-- resetQuery() {-->
<!-- this.resetForm("queryForm");-->
<!-- this.handleQuery();-->
<!-- },-->
<!-- // -->
<!-- handleSelectionChange(selection) {-->
<!-- this.ids = selection.map(item => item.id)-->
<!-- this.single = selection.length!==1-->
<!-- this.multiple = !selection.length-->
<!-- },-->
<!-- /** 新增按钮操作 */-->
<!-- handleAdd() {-->
<!-- this.reset();-->
<!-- this.open = true;-->
<!-- this.title = "添加回款登记";-->
<!-- },-->
<!-- /** 修改按钮操作 */-->
<!-- handleUpdate(row) {-->
<!-- this.reset();-->
<!-- const id = row.id || this.ids-->
<!-- getInvoiceReturn(id).then(response => {-->
<!-- this.form = response.data;-->
<!-- this.open = true;-->
<!-- this.title = "修改回款登记";-->
<!-- });-->
<!-- },-->
<!-- /** 提交按钮 */-->
<!-- submitForm() {-->
<!-- this.$refs["form"].validate(valid => {-->
<!-- if (valid) {-->
<!-- if (this.form.id != null) {-->
<!-- updateInvoiceReturn(this.form).then(response => {-->
<!-- this.msgSuccess("修改成功");-->
<!-- this.open = false;-->
<!-- this.getList();-->
<!-- });-->
<!-- } else {-->
<!-- addInvoiceReturn(this.form).then(response => {-->
<!-- this.msgSuccess("新增成功");-->
<!-- this.open = false;-->
<!-- this.getList();-->
<!-- });-->
<!-- }-->
<!-- }-->
<!-- });-->
<!-- },-->
<!-- /** 删除按钮操作 */-->
<!-- handleDelete(row) {-->
<!-- const ids = row.id || this.ids;-->
<!-- this.$confirm('是否确认删除回款登记编号为"' + ids + '"的数据项?', "警告", {-->
<!-- confirmButtonText: "确定",-->
<!-- cancelButtonText: "取消",-->
<!-- type: "warning"-->
<!-- }).then(function() {-->
<!-- return delInvoiceReturn(ids);-->
<!-- }).then(() => {-->
<!-- this.getList();-->
<!-- this.msgSuccess("删除成功");-->
<!-- })-->
<!-- },-->
<!-- /** 导出按钮操作 */-->
<!-- handleExport() {-->
<!-- const queryParams = this.queryParams;-->
<!-- this.$confirm('是否确认导出所有回款登记数据项?', "警告", {-->
<!-- confirmButtonText: "确定",-->
<!-- cancelButtonText: "取消",-->
<!-- type: "warning"-->
<!-- }).then(function() {-->
<!-- return exportInvoiceReturn(queryParams);-->
<!-- }).then(response => {-->
<!-- this.download(response.msg);-->
<!-- })-->
<!-- }-->
<!-- }-->
<!--};-->
<!--</script>-->
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="对应发票id" prop="invoiceId">
<el-input
v-model="queryParams.invoiceId"
placeholder="请输入对应发票id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="回款日期" prop="returnAt">
<el-date-picker clearable size="small"
v-model="queryParams.returnAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择回款日期">
</el-date-picker>
</el-form-item>
<el-form-item label="回款金额" prop="returnPrice">
<el-input
v-model="queryParams.returnPrice"
placeholder="请输入回款金额"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="余额" prop="balancePrice">
<el-input
v-model="queryParams.balancePrice"
placeholder="请输入余额"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作员" prop="opera">
<el-input
v-model="queryParams.opera"
placeholder="请输入操作员"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="凭证的图片url" prop="voucherUrl">
<el-input
v-model="queryParams.voucherUrl"
placeholder="请输入凭证的图片url"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否完成回款标志" prop="returnFlag">
<el-input
v-model="queryParams.returnFlag"
placeholder="请输入是否完成回款标志"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -76,7 +367,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['fantang:invoiceReturn:add']"
v-hasPermi="['fantang:invoice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
@ -86,8 +377,8 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['fantang:invoiceReturn:edit']"
>修改</el-button>
v-hasPermi="['fantang:invoice:edit']"
>回款登记</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -96,7 +387,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['fantang:invoiceReturn:remove']"
v-hasPermi="['fantang:invoice:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
@ -105,26 +396,19 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['fantang:invoiceReturn:export']"
v-hasPermi="['fantang:invoice:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="invoiceReturnList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="invoiceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="对应发票id" align="center" prop="invoiceId" />
<el-table-column label="回款日期" align="center" prop="returnAt" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.returnAt, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="回款金额" align="center" prop="returnPrice" />
<el-table-column label="余额" align="center" prop="balancePrice" />
<el-table-column label="操作员" align="center" prop="opera" />
<el-table-column label="凭证的图片url" align="center" prop="voucherUrl" />
<el-table-column label="是否完成回款标志" align="center" prop="returnFlag" />
<el-table-column label="发票名" align="center" prop="invoiceName"/>
<el-table-column label="发票号" align="center" prop="invoiceNum"/>
<el-table-column label="税号" align="center" prop="taxId"/>
<el-table-column label="开票类型" align="center" prop="invoiceType"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -132,19 +416,19 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['fantang:invoiceReturn:edit']"
>修改</el-button>
v-hasPermi="['fantang:invoice:edit']"
>回款登记</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['fantang:invoiceReturn:remove']"
v-hasPermi="['fantang:invoice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -153,35 +437,9 @@
@pagination="getList"
/>
<!-- 添加或修改回款登记对话框 -->
<!-- 添加或修改财务收费开票对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="对应发票id" prop="invoiceId">
<el-input v-model="form.invoiceId" placeholder="请输入对应发票id" />
</el-form-item>
<el-form-item label="回款日期" prop="returnAt">
<el-date-picker clearable size="small"
v-model="form.returnAt"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择回款日期">
</el-date-picker>
</el-form-item>
<el-form-item label="回款金额" prop="returnPrice">
<el-input v-model="form.returnPrice" placeholder="请输入回款金额" />
</el-form-item>
<el-form-item label="余额" prop="balancePrice">
<el-input v-model="form.balancePrice" placeholder="请输入余额" />
</el-form-item>
<el-form-item label="操作员" prop="opera">
<el-input v-model="form.opera" placeholder="请输入操作员" />
</el-form-item>
<el-form-item label="凭证的图片url" prop="voucherUrl">
<el-input v-model="form.voucherUrl" placeholder="请输入凭证的图片url" />
</el-form-item>
<el-form-item label="是否完成回款标志" prop="returnFlag">
<el-input v-model="form.returnFlag" placeholder="请输入是否完成回款标志" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -192,10 +450,10 @@
</template>
<script>
import { listInvoiceReturn, getInvoiceReturn, delInvoiceReturn, addInvoiceReturn, updateInvoiceReturn, exportInvoiceReturn } from "@/api/fantang/invoiceReturn";
import {addInvoice, delInvoice, exportInvoice, getInvoice, listInvoice, updateInvoice} from "@/api/fantang/invoice";
export default {
name: "InvoiceReturn",
name: "Invoice",
components: {
},
data() {
@ -212,8 +470,8 @@ export default {
showSearch: true,
//
total: 0,
//
invoiceReturnList: [],
//
invoiceList: [],
//
title: "",
//
@ -222,13 +480,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
invoiceId: undefined,
returnAt: undefined,
returnPrice: undefined,
balancePrice: undefined,
opera: undefined,
voucherUrl: undefined,
returnFlag: undefined
invoiceType:2,
},
//
form: {},
@ -241,13 +493,14 @@ export default {
this.getList();
},
methods: {
/** 查询回款登记列表 */
/** 查询财务收费开票列表 */
getList() {
this.loading = true;
listInvoiceReturn(this.queryParams).then(response => {
this.invoiceReturnList = response.rows;
listInvoice(this.queryParams).then(response => {
this.invoiceList = response.rows;
this.total = response.total;
this.loading = false;
console.log(response.rows);
});
},
//
@ -259,13 +512,14 @@ export default {
reset() {
this.form = {
id: undefined,
invoiceUnit: undefined,
invoiceId: undefined,
returnAt: undefined,
returnPrice: undefined,
balancePrice: undefined,
opera: undefined,
voucherUrl: undefined,
returnFlag: undefined
createAt: undefined,
drawer: undefined,
collectionType: undefined,
payable: undefined,
receipts: undefined,
voucherList: undefined
};
this.resetForm("form");
},
@ -289,16 +543,16 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加回款登记";
this.title = "添加财务收费开票";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInvoiceReturn(id).then(response => {
getInvoice(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改回款登记";
this.title = "修改财务收费开票";
});
},
/** 提交按钮 */
@ -306,13 +560,13 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInvoiceReturn(this.form).then(response => {
updateInvoice(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInvoiceReturn(this.form).then(response => {
addInvoice(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -324,29 +578,29 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除回款登记编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInvoiceReturn(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
this.$confirm('是否确认删除财务收费开票编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInvoice(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有回款登记数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportInvoiceReturn(queryParams);
}).then(response => {
this.download(response.msg);
})
this.$confirm('是否确认导出所有财务收费开票数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportInvoice(queryParams);
}).then(response => {
this.download(response.msg);
})
}
}
};

View File

@ -325,7 +325,7 @@ export default {
label: '现金'
}, {
value: 2,
label: '预付款'
label: '预付款冲减'
}, {
value: 3,
label: '在线支付'