修复开票管理是否已开票不能筛选的 bug

This commit is contained in:
ryoeiken 2021-01-25 16:17:35 +08:00
parent 0e1564998f
commit 007d0adfb2
4 changed files with 52 additions and 58 deletions

View File

@ -145,19 +145,10 @@ public class FtInvoiceDaoController extends BaseController {
invoiceDao.setInvoiceAmount(invoiceAmount); invoiceDao.setInvoiceAmount(invoiceAmount);
iFtInvoiceDaoService.save(invoiceDao); iFtInvoiceDaoService.save(invoiceDao);
// 跟踪回款
// if (invoiceType == 2) {
// FtReturnDao ftReturnDao = new FtReturnDao();
// ftReturnDao.setInvoiceId(invoiceDao.getId());
// ftReturnDao.setReturnFlag(0);
//
// ftReturnDaoService.save(ftReturnDao);
// }
FtSettlementDao settlementDao = new FtSettlementDao(); FtSettlementDao settlementDao = new FtSettlementDao();
settlementDao.setSettleId(params.getLong("settleId")); settlementDao.setSettleId(params.getLong("settleId"));
settlementDao.setInvoiceId(invoiceDao.getId()); settlementDao.setInvoiceId(invoiceDao.getId());
settlementDao.setInvoiceFlag(true); settlementDao.setInvoiceFlag(1);
settSettlementDaoService.updateById(settlementDao); settSettlementDaoService.updateById(settlementDao);
return AjaxResult.success("已开票"); return AjaxResult.success("已开票");

View File

@ -108,5 +108,5 @@ public class FtSettlementDao implements Serializable {
private Long invoiceId; private Long invoiceId;
private Boolean invoiceFlag; private Integer invoiceFlag;
} }

View File

@ -29,7 +29,7 @@
<if test="beginOfDay != null and beginOfDay !=''">settle_at BETWEEN #{beginOfDay}</if> <if test="beginOfDay != null and beginOfDay !=''">settle_at BETWEEN #{beginOfDay}</if>
<if test="endOfDay != null and endOfDay !=''">AND #{endOfDay}</if> <if test="endOfDay != null and endOfDay !=''">AND #{endOfDay}</if>
<if test="type != null and type !=''">and a.type = #{type}</if> <if test="type != null and type !=''">and a.type = #{type}</if>
<if test="invoiceFlag != null and invoiceFlag !=''">and a.invoice_flag = #{invoiceFlag}</if> <if test="invoiceFlag != 2">and a.invoice_flag = #{invoiceFlag}</if>
</where> </where>
</select> </select>

View File

@ -204,11 +204,14 @@ export default {
label: '开票并跟踪回款' label: '开票并跟踪回款'
}], }],
invoiceFlagOptions: [{ invoiceFlagOptions: [{
value: true, value: 1,
label: '是' label: '是'
}, { }, {
value: false, value: 0,
label: '否' label: '否'
}, {
value: 2,
label: '全部'
}], }],
typeOptions: [{ typeOptions: [{
value: '现金', value: '现金',
@ -262,7 +265,7 @@ export default {
receipts: undefined, receipts: undefined,
type: undefined, type: undefined,
refund: undefined, refund: undefined,
invoiceFlag: undefined, invoiceFlag: 2,
}, },
// //
form: {}, form: {},
@ -334,7 +337,7 @@ export default {
} }
}, },
formatInvoiceFlag(row) { formatInvoiceFlag(row) {
if (row.invoiceFlag === true) { if (row.invoiceFlag === 1 || row.invoiceFlag === '1') {
return '是'; return '是';
} else { } else {
return '否'; return '否';