基本完成开票,回款登记 CRUD
This commit is contained in:
parent
b96b7bbf41
commit
629e81c177
@ -1,52 +1,49 @@
|
||||
package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.fantang.domain.FtInvoiceDao;
|
||||
import com.ruoyi.system.fantang.service.IFtInvoiceDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.fantang.domain.FtInvoiceDao;
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.ruoyi.system.fantang.service.IFtInvoiceDaoService;
|
||||
import com.ruoyi.system.fantang.service.IFtReturnDaoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 财务收费开票Controller
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-08
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/invoice" )
|
||||
@RequestMapping("/fantang/invoice")
|
||||
public class FtInvoiceDaoController extends BaseController {
|
||||
|
||||
private final IFtInvoiceDaoService iFtInvoiceDaoService;
|
||||
|
||||
private final IFtReturnDaoService iFtReturnDaoService;
|
||||
|
||||
/**
|
||||
* 查询财务收费开票列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtInvoiceDao ftInvoiceDao)
|
||||
{
|
||||
public TableDataInfo list(FtInvoiceDao ftInvoiceDao) {
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtInvoiceDao> lqw = Wrappers.lambdaQuery(ftInvoiceDao);
|
||||
List<FtInvoiceDao> list = iFtInvoiceDaoService.list(lqw);
|
||||
@ -56,30 +53,30 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
/**
|
||||
* 导出财务收费开票列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:export')" )
|
||||
@Log(title = "财务收费开票" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:export')")
|
||||
@Log(title = "财务收费开票", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(FtInvoiceDao ftInvoiceDao) {
|
||||
LambdaQueryWrapper<FtInvoiceDao> lqw = new LambdaQueryWrapper<FtInvoiceDao>(ftInvoiceDao);
|
||||
List<FtInvoiceDao> list = iFtInvoiceDaoService.list(lqw);
|
||||
ExcelUtil<FtInvoiceDao> util = new ExcelUtil<FtInvoiceDao>(FtInvoiceDao. class);
|
||||
return util.exportExcel(list, "invoice" );
|
||||
ExcelUtil<FtInvoiceDao> util = new ExcelUtil<FtInvoiceDao>(FtInvoiceDao.class);
|
||||
return util.exportExcel(list, "invoice");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取财务收费开票详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(iFtInvoiceDaoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增财务收费开票
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:add')" )
|
||||
@Log(title = "财务收费开票" , businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:add')")
|
||||
@Log(title = "财务收费开票", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtInvoiceDao ftInvoiceDao) {
|
||||
return toAjax(iFtInvoiceDaoService.save(ftInvoiceDao) ? 1 : 0);
|
||||
@ -88,8 +85,8 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
/**
|
||||
* 修改财务收费开票
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:edit')" )
|
||||
@Log(title = "财务收费开票" , businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:edit')")
|
||||
@Log(title = "财务收费开票", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtInvoiceDao ftInvoiceDao) {
|
||||
return toAjax(iFtInvoiceDaoService.updateById(ftInvoiceDao) ? 1 : 0);
|
||||
@ -98,10 +95,50 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
/**
|
||||
* 删除财务收费开票
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:remove')" )
|
||||
@Log(title = "财务收费开票" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoice:remove')")
|
||||
@Log(title = "财务收费开票", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iFtInvoiceDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
|
||||
@PostMapping("/addToInvoice")
|
||||
public AjaxResult addToInvoice(@RequestBody JSONObject params) {
|
||||
System.out.println(params);
|
||||
|
||||
// 应收
|
||||
BigDecimal payable = params.getBigDecimal("payable");
|
||||
// 实收
|
||||
BigDecimal receipts = params.getBigDecimal("receipts");
|
||||
// 收款方式
|
||||
String type = params.getString("type");
|
||||
// 发票号
|
||||
String invoiceNum = params.getString("invoiceNum");
|
||||
// 发票名
|
||||
String invoiceName = params.getString("invoiceName");
|
||||
// 税号
|
||||
String taxId = params.getString("taxId");
|
||||
// 开票类型
|
||||
Integer invoiceType = params.getInteger("invoiceType");
|
||||
|
||||
FtInvoiceDao invoiceDao = new FtInvoiceDao();
|
||||
Date today = new Date();
|
||||
invoiceDao.setCreateAt(today);
|
||||
invoiceDao.setPayable(payable);
|
||||
invoiceDao.setReceipts(receipts);
|
||||
invoiceDao.setCollectionType(type);
|
||||
invoiceDao.setInvoiceNum(invoiceNum);
|
||||
invoiceDao.setInvoiceName(invoiceName);
|
||||
invoiceDao.setTaxId(taxId);
|
||||
invoiceDao.setInvoiceType(invoiceType);
|
||||
iFtInvoiceDaoService.save(invoiceDao);
|
||||
|
||||
if (invoiceType == 2) {
|
||||
FtReturnDao ftReturnDao = new FtReturnDao();
|
||||
ftReturnDao.setInvoiceId(invoiceDao.getId());
|
||||
iFtReturnDaoService.save(ftReturnDao);
|
||||
}
|
||||
|
||||
return AjaxResult.success("已开票");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,100 @@
|
||||
package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.ruoyi.system.fantang.service.IFtReturnDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 回款登记Controller
|
||||
*
|
||||
* @author ft
|
||||
* @date 2021-01-04
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/invoiceReturn" )
|
||||
public class FtReturnDaoController extends BaseController {
|
||||
|
||||
private final IFtReturnDaoService iFtReturnDaoService;
|
||||
|
||||
/**
|
||||
* 查询回款登记列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtReturnDao ftReturnDao) {
|
||||
startPage();
|
||||
List<FtReturnDao> list = iFtReturnDaoService.queryList(ftReturnDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出回款登记列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:export')" )
|
||||
@Log(title = "回款登记" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
public AjaxResult export(FtReturnDao ftReturnDao) {
|
||||
List<FtReturnDao> list = iFtReturnDaoService.queryList(ftReturnDao);
|
||||
ExcelUtil<FtReturnDao> util = new ExcelUtil<FtReturnDao>(FtReturnDao.class);
|
||||
return util.exportExcel(list, "invoiceReturn" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取回款登记详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:query')" )
|
||||
@GetMapping(value = "/{id}" )
|
||||
public AjaxResult getInfo(@PathVariable("id" ) Long id) {
|
||||
return AjaxResult.success(iFtReturnDaoService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回款登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:add')" )
|
||||
@Log(title = "回款登记" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtReturnDao ftReturnDao) {
|
||||
return toAjax(iFtReturnDaoService.save(ftReturnDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回款登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:edit')" )
|
||||
@Log(title = "回款登记" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtReturnDao ftReturnDao) {
|
||||
return toAjax(iFtReturnDaoService.updateById(ftReturnDao) ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回款登记
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:invoiceReturn:remove')" )
|
||||
@Log(title = "回款登记" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}" )
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(iFtReturnDaoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
||||
}
|
||||
}
|
@ -2,40 +2,32 @@ package com.ruoyi.system.fantang.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算管理Controller
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RestController
|
||||
@RequestMapping("/fantang/settlement" )
|
||||
@RequestMapping("/fantang/settlement")
|
||||
public class FtSettlementDaoController extends BaseController {
|
||||
|
||||
private final IFtSettlementDaoService iFtSettlementDaoService;
|
||||
@ -45,59 +37,59 @@ public class FtSettlementDaoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtSettlementDao ftSettlementDao)
|
||||
{
|
||||
public TableDataInfo list(FtSettlementDao ftSettlementDao) {
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtSettlementDao> lqw = Wrappers.lambdaQuery(ftSettlementDao);
|
||||
if (ftSettlementDao.getSettleAt() != null){
|
||||
lqw.eq(FtSettlementDao::getSettleAt ,ftSettlementDao.getSettleAt());
|
||||
if (ftSettlementDao.getSettleAt() != null) {
|
||||
lqw.eq(FtSettlementDao::getSettleAt, ftSettlementDao.getSettleAt());
|
||||
}
|
||||
if (ftSettlementDao.getPrice() != null){
|
||||
lqw.eq(FtSettlementDao::getPrice ,ftSettlementDao.getPrice());
|
||||
if (ftSettlementDao.getPrice() != null) {
|
||||
lqw.eq(FtSettlementDao::getPrice, ftSettlementDao.getPrice());
|
||||
}
|
||||
if (ftSettlementDao.getPayable() != null){
|
||||
lqw.eq(FtSettlementDao::getPayable ,ftSettlementDao.getPayable());
|
||||
if (ftSettlementDao.getPayable() != null) {
|
||||
lqw.eq(FtSettlementDao::getPayable, ftSettlementDao.getPayable());
|
||||
}
|
||||
if (ftSettlementDao.getReceipts() != null){
|
||||
lqw.eq(FtSettlementDao::getReceipts ,ftSettlementDao.getReceipts());
|
||||
if (ftSettlementDao.getReceipts() != null) {
|
||||
lqw.eq(FtSettlementDao::getReceipts, ftSettlementDao.getReceipts());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftSettlementDao.getType())){
|
||||
lqw.eq(FtSettlementDao::getType ,ftSettlementDao.getType());
|
||||
if (StringUtils.isNotBlank(ftSettlementDao.getType())) {
|
||||
lqw.eq(FtSettlementDao::getType, ftSettlementDao.getType());
|
||||
}
|
||||
if (ftSettlementDao.getRefund() != null){
|
||||
lqw.eq(FtSettlementDao::getRefund ,ftSettlementDao.getRefund());
|
||||
if (ftSettlementDao.getRefund() != null) {
|
||||
lqw.eq(FtSettlementDao::getRefund, ftSettlementDao.getRefund());
|
||||
}
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
// List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.listWithPatient(ftSettlementDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出结算管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:export')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export" )
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:export')")
|
||||
@Log(title = "结算管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(FtSettlementDao ftSettlementDao) {
|
||||
LambdaQueryWrapper<FtSettlementDao> lqw = new LambdaQueryWrapper<FtSettlementDao>(ftSettlementDao);
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
ExcelUtil<FtSettlementDao> util = new ExcelUtil<FtSettlementDao>(FtSettlementDao. class);
|
||||
return util.exportExcel(list, "settlement" );
|
||||
ExcelUtil<FtSettlementDao> util = new ExcelUtil<FtSettlementDao>(FtSettlementDao.class);
|
||||
return util.exportExcel(list, "settlement");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:query')" )
|
||||
@GetMapping(value = "/{settleId}" )
|
||||
public AjaxResult getInfo(@PathVariable("settleId" ) Long settleId) {
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:query')")
|
||||
@GetMapping(value = "/{settleId}")
|
||||
public AjaxResult getInfo(@PathVariable("settleId") Long settleId) {
|
||||
return AjaxResult.success(iFtSettlementDaoService.getById(settleId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:add')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.INSERT)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:add')")
|
||||
@Log(title = "结算管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody FtSettlementDao ftSettlementDao) {
|
||||
return toAjax(iFtSettlementDaoService.save(ftSettlementDao) ? 1 : 0);
|
||||
@ -106,8 +98,8 @@ public class FtSettlementDaoController extends BaseController {
|
||||
/**
|
||||
* 修改结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:edit')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.UPDATE)
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:edit')")
|
||||
@Log(title = "结算管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody FtSettlementDao ftSettlementDao) {
|
||||
return toAjax(iFtSettlementDaoService.updateById(ftSettlementDao) ? 1 : 0);
|
||||
@ -116,9 +108,9 @@ public class FtSettlementDaoController extends BaseController {
|
||||
/**
|
||||
* 删除结算管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:remove')" )
|
||||
@Log(title = "结算管理" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{settleIds}" )
|
||||
@PreAuthorize("@ss.hasPermi('fantang:settlement:remove')")
|
||||
@Log(title = "结算管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{settleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] settleIds) {
|
||||
return toAjax(iFtSettlementDaoService.removeByIds(Arrays.asList(settleIds)) ? 1 : 0);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ private static final long serialVersionUID=1L;
|
||||
private String drawer;
|
||||
|
||||
/** 收款方式 */
|
||||
private Integer collectionType;
|
||||
private String collectionType;
|
||||
|
||||
/** 应收 */
|
||||
private BigDecimal payable;
|
||||
@ -59,4 +59,24 @@ private static final long serialVersionUID=1L;
|
||||
|
||||
/** 凭证列表 */
|
||||
private String voucherList;
|
||||
|
||||
/**
|
||||
* 发票号
|
||||
*/
|
||||
private String invoiceNum;
|
||||
|
||||
/**
|
||||
* 发票名
|
||||
*/
|
||||
private String invoiceName;
|
||||
|
||||
/**
|
||||
* 税号
|
||||
*/
|
||||
private String taxId;
|
||||
|
||||
/**
|
||||
* 开票类型
|
||||
*/
|
||||
private Integer invoiceType;
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 回款登记对象 ft_return
|
||||
*
|
||||
* @author ft
|
||||
* @date 2021-01-04
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@TableName("ft_return")
|
||||
public class FtReturnDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
/** id */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 对应发票id */
|
||||
@Excel(name = "对应发票id")
|
||||
private Long invoiceId;
|
||||
|
||||
/** 回款日期 */
|
||||
@Excel(name = "回款日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date returnAt;
|
||||
|
||||
/** 回款金额 */
|
||||
@Excel(name = "回款金额")
|
||||
private BigDecimal returnPrice;
|
||||
|
||||
/** 余额 */
|
||||
@Excel(name = "余额")
|
||||
private BigDecimal balancePrice;
|
||||
|
||||
/** 操作员 */
|
||||
@Excel(name = "操作员")
|
||||
private String opera;
|
||||
|
||||
/** 凭证的图片url */
|
||||
@Excel(name = "凭证的图片url")
|
||||
private String voucherUrl;
|
||||
|
||||
/** 是否完成回款标志 */
|
||||
@Excel(name = "是否完成回款标志")
|
||||
private Integer returnFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
}
|
@ -1,23 +1,23 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 结算管理对象 ft_settle
|
||||
*
|
||||
*
|
||||
* @author ft
|
||||
* @date 2020-12-25
|
||||
*/
|
||||
@ -29,48 +29,73 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
@TableName("ft_settle")
|
||||
public class FtSettlementDao implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 结算 id */
|
||||
/**
|
||||
* 结算 id
|
||||
*/
|
||||
@TableId(value = "settle_id")
|
||||
private Long settleId;
|
||||
|
||||
/** 病人 id */
|
||||
/**
|
||||
* 病人 id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/** 结算日期 */
|
||||
@Excel(name = "结算日期" , width = 30, dateFormat = "yyyy-MM-dd")
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@Excel(name = "结算日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date settleAt;
|
||||
|
||||
/** 操作员 */
|
||||
/**
|
||||
* 操作员
|
||||
*/
|
||||
private String opera;
|
||||
|
||||
/** 记录清单 */
|
||||
/**
|
||||
* 记录清单
|
||||
*/
|
||||
@Excel(name = "记录清单")
|
||||
private String list;
|
||||
|
||||
/** 结算总价 */
|
||||
/**
|
||||
* 结算总价
|
||||
*/
|
||||
@Excel(name = "结算总价")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 应收 */
|
||||
/**
|
||||
* 应收
|
||||
*/
|
||||
@Excel(name = "应收")
|
||||
private BigDecimal payable;
|
||||
|
||||
/** 实收 */
|
||||
/**
|
||||
* 实收
|
||||
*/
|
||||
@Excel(name = "实收")
|
||||
private BigDecimal receipts;
|
||||
|
||||
/** 结算类型 */
|
||||
/**
|
||||
* 结算类型
|
||||
*/
|
||||
@Excel(name = "结算类型")
|
||||
private String type;
|
||||
|
||||
/** 退押金标志 */
|
||||
/**
|
||||
* 退押金标志
|
||||
*/
|
||||
private Integer flag;
|
||||
|
||||
/** 退款总额 */
|
||||
/**
|
||||
* 退款总额
|
||||
*/
|
||||
@Excel(name = "退款总额")
|
||||
private BigDecimal refund;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.fantang.mapper;
|
||||
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 回款登记Mapper接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2021-01-04
|
||||
*/
|
||||
public interface FtReturnDaoMapper extends BaseMapper<FtReturnDao> {
|
||||
|
||||
}
|
@ -3,6 +3,8 @@ package com.ruoyi.system.fantang.mapper;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算管理Mapper接口
|
||||
*
|
||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface FtSettlementDaoMapper extends BaseMapper<FtSettlementDao> {
|
||||
|
||||
List<FtSettlementDao> listWithPatient(FtSettlementDao ftSettlementDao);
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.system.fantang.service;
|
||||
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回款登记Service接口
|
||||
*
|
||||
* @author ft
|
||||
* @date 2021-01-04
|
||||
*/
|
||||
public interface IFtReturnDaoService extends IService<FtReturnDao> {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
List<FtReturnDao> queryList(FtReturnDao ftReturnDao);
|
||||
}
|
@ -3,6 +3,8 @@ package com.ruoyi.system.fantang.service;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算管理Service接口
|
||||
*
|
||||
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IFtSettlementDaoService extends IService<FtSettlementDao> {
|
||||
|
||||
List<FtSettlementDao> listWithPatient(FtSettlementDao ftSettlementDao);
|
||||
}
|
||||
|
@ -0,0 +1,50 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.ruoyi.system.fantang.mapper.FtReturnDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.ruoyi.system.fantang.service.IFtReturnDaoService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 回款登记Service业务层处理
|
||||
*
|
||||
* @author ft
|
||||
* @date 2021-01-04
|
||||
*/
|
||||
@Service
|
||||
public class FtReturnDaoServiceImpl extends ServiceImpl<FtReturnDaoMapper, FtReturnDao> implements IFtReturnDaoService {
|
||||
|
||||
@Override
|
||||
public List<FtReturnDao> queryList(FtReturnDao ftReturnDao) {
|
||||
LambdaQueryWrapper<FtReturnDao> lqw = Wrappers.lambdaQuery();
|
||||
if (ftReturnDao.getInvoiceId() != null){
|
||||
lqw.eq(FtReturnDao::getInvoiceId ,ftReturnDao.getInvoiceId());
|
||||
}
|
||||
if (ftReturnDao.getReturnAt() != null){
|
||||
lqw.eq(FtReturnDao::getReturnAt ,ftReturnDao.getReturnAt());
|
||||
}
|
||||
if (ftReturnDao.getReturnPrice() != null){
|
||||
lqw.eq(FtReturnDao::getReturnPrice ,ftReturnDao.getReturnPrice());
|
||||
}
|
||||
if (ftReturnDao.getBalancePrice() != null){
|
||||
lqw.eq(FtReturnDao::getBalancePrice ,ftReturnDao.getBalancePrice());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftReturnDao.getOpera())){
|
||||
lqw.eq(FtReturnDao::getOpera ,ftReturnDao.getOpera());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftReturnDao.getVoucherUrl())){
|
||||
lqw.eq(FtReturnDao::getVoucherUrl ,ftReturnDao.getVoucherUrl());
|
||||
}
|
||||
if (ftReturnDao.getReturnFlag() != null){
|
||||
lqw.eq(FtReturnDao::getReturnFlag ,ftReturnDao.getReturnFlag());
|
||||
}
|
||||
return this.list(lqw);
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 结算管理Service业务层处理
|
||||
@ -15,4 +17,8 @@ import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
@Service
|
||||
public class FtSettlementDaoServiceImpl extends ServiceImpl<FtSettlementDaoMapper, FtSettlementDao> implements IFtSettlementDaoService {
|
||||
|
||||
@Override
|
||||
public List<FtSettlementDao> listWithPatient(FtSettlementDao ftSettlementDao) {
|
||||
return this.baseMapper.listWithPatient(ftSettlementDao);
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtInvoiceDaoMapper">
|
||||
|
||||
|
||||
<resultMap type="FtInvoiceDao" id="FtInvoiceDaoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="invoiceUnit" column="invoice_unit" />
|
||||
<result property="invoiceId" column="invoice_id" />
|
||||
<result property="createAt" column="create_at" />
|
||||
<result property="drawer" column="drawer" />
|
||||
<result property="collectionType" column="collection_type" />
|
||||
<result property="payable" column="payable" />
|
||||
<result property="receipts" column="receipts" />
|
||||
<result property="voucherList" column="voucher_list" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="invoiceUnit" column="invoice_unit"/>
|
||||
<result property="invoiceId" column="invoice_id"/>
|
||||
<result property="createAt" column="create_at"/>
|
||||
<result property="drawer" column="drawer"/>
|
||||
<result property="collectionType" column="collection_type"/>
|
||||
<result property="payable" column="payable"/>
|
||||
<result property="receipts" column="receipts"/>
|
||||
<result property="voucherList" column="voucher_list"/>
|
||||
<result property="invoiceNum" column="invoice_num"/>
|
||||
<result property="invoiceName" column="invoice_name"/>
|
||||
<result property="taxId" column="tax_id"/>
|
||||
<result property="invoiceType" column="invoice_type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtReturnDaoMapper">
|
||||
|
||||
<resultMap type="FtReturnDao" id="FtReturnDaoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="invoiceId" column="invoice_id" />
|
||||
<result property="returnAt" column="return_at" />
|
||||
<result property="returnPrice" column="return_price" />
|
||||
<result property="balancePrice" column="balance_price" />
|
||||
<result property="opera" column="opera" />
|
||||
<result property="voucherUrl" column="voucher_url" />
|
||||
<result property="returnFlag" column="return_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
@ -1,22 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper">
|
||||
|
||||
|
||||
<resultMap type="FtSettlementDao" id="FtSettlementDaoResult">
|
||||
<result property="settleId" column="settle_id" />
|
||||
<result property="patientId" column="patient_id" />
|
||||
<result property="settleAt" column="settle_at" />
|
||||
<result property="opera" column="opera" />
|
||||
<result property="list" column="list" />
|
||||
<result property="price" column="price" />
|
||||
<result property="payable" column="payable" />
|
||||
<result property="receipts" column="receipts" />
|
||||
<result property="type" column="type" />
|
||||
<result property="flag" column="flag" />
|
||||
<result property="refund" column="refund" />
|
||||
<result property="settleId" column="settle_id"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="settleAt" column="settle_at"/>
|
||||
<result property="opera" column="opera"/>
|
||||
<result property="list" column="list"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="payable" column="payable"/>
|
||||
<result property="receipts" column="receipts"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="flag" column="flag"/>
|
||||
<result property="refund" column="refund"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="listWithPatient" resultType="com.ruoyi.system.fantang.domain.FtSettlementDao">
|
||||
SELECT a.*,
|
||||
b.`name`
|
||||
FROM ft_settle a
|
||||
LEFT JOIN ft_patient b ON b.patient_id = a.patient_id
|
||||
<where>
|
||||
<if test="settleAt != null and settleAt !=''">and a.settle_at = #{settleAt}</if>
|
||||
<if test="type != null and type !=''">and a.type = #{type}</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
61
ruoyi-ui/src/api/fantang/invoice.js
Normal file
61
ruoyi-ui/src/api/fantang/invoice.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询财务收费开票列表
|
||||
export function listInvoice(query) {
|
||||
return request({
|
||||
url: '/fantang/invoice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询财务收费开票详细
|
||||
export function getInvoice(id) {
|
||||
return request({
|
||||
url: '/fantang/invoice/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增财务收费开票
|
||||
export function addInvoice(data) {
|
||||
return request({
|
||||
url: '/fantang/invoice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改财务收费开票
|
||||
export function updateInvoice(data) {
|
||||
return request({
|
||||
url: '/fantang/invoice',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除财务收费开票
|
||||
export function delInvoice(id) {
|
||||
return request({
|
||||
url: '/fantang/invoice/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出财务收费开票
|
||||
export function exportInvoice(query) {
|
||||
return request({
|
||||
url: '/fantang/invoice/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function addToInvoice(data) {
|
||||
return request({
|
||||
url: '/fantang/invoice/addToInvoice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
53
ruoyi-ui/src/api/fantang/invoiceReturn.js
Normal file
53
ruoyi-ui/src/api/fantang/invoiceReturn.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询回款登记列表
|
||||
export function listInvoiceReturn(query) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询回款登记详细
|
||||
export function getInvoiceReturn(id) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增回款登记
|
||||
export function addInvoiceReturn(data) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改回款登记
|
||||
export function updateInvoiceReturn(data) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除回款登记
|
||||
export function delInvoiceReturn(id) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出回款登记
|
||||
export function exportInvoiceReturn(query) {
|
||||
return request({
|
||||
url: '/fantang/invoiceReturn/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
353
ruoyi-ui/src/views/fantang/invoiceReturn/index.vue
Normal file
353
ruoyi-ui/src/views/fantang/invoiceReturn/index.vue
Normal file
@ -0,0 +1,353 @@
|
||||
<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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改回款登记对话框 -->
|
||||
<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>
|
@ -3,44 +3,44 @@
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="结算日期" prop="settleAt">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.settleAt"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择结算日期">
|
||||
v-model="queryParams.settleAt"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择结算日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="应收" prop="payable">
|
||||
<el-input
|
||||
v-model="queryParams.payable"
|
||||
placeholder="请输入应收"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实收" prop="receipts">
|
||||
<el-input
|
||||
v-model="queryParams.receipts"
|
||||
placeholder="请输入实收"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="应收" prop="payable">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.payable"-->
|
||||
<!-- placeholder="请输入应收"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="实收" prop="receipts">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.receipts"-->
|
||||
<!-- placeholder="请输入实收"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="结算类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择结算类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option label="请选择字典生成" value=""/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款总额" prop="refund">
|
||||
<el-input
|
||||
v-model="queryParams.refund"
|
||||
placeholder="请输入退款总额"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="退款总额" prop="refund">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.refund"-->
|
||||
<!-- 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>
|
||||
@ -48,15 +48,16 @@
|
||||
</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:settlement:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['fantang:settlement:add']"-->
|
||||
<!-- >新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@ -65,7 +66,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>修改</el-button>
|
||||
>开票
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -75,7 +77,8 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -84,25 +87,24 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['fantang:settlement:export']"
|
||||
>导出</el-button>
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="settlementList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="结算 id" align="center" prop="settleId" v-if="false"/>
|
||||
<el-table-column label="姓名" align="center" prop="name"/>
|
||||
<el-table-column label="应收" align="center" prop="payable"/>
|
||||
<el-table-column label="实收" align="center" prop="receipts"/>
|
||||
<el-table-column label="结算类型" align="center" prop="type"/>
|
||||
<el-table-column label="结算日期" align="center" prop="settleAt" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="记录清单" align="center" prop="list" />-->
|
||||
<!-- <el-table-column label="结算总价" align="center" prop="price" />-->
|
||||
<el-table-column label="应收" align="center" prop="payable" />
|
||||
<el-table-column label="实收" align="center" prop="receipts" />
|
||||
<el-table-column label="结算类型" align="center" prop="type" />
|
||||
<el-table-column label="退款总额" align="center" prop="refund" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -111,14 +113,16 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>修改</el-button>
|
||||
>开票
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -134,26 +138,51 @@
|
||||
<!-- 添加或修改结算管理对话框 -->
|
||||
<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="记录清单" prop="list">-->
|
||||
<!-- <el-input v-model="form.list" placeholder="请输入记录清单" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="结算总价" prop="price">-->
|
||||
<!-- <el-input v-model="form.price" placeholder="请输入结算总价" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="记录清单" prop="list">-->
|
||||
<!-- <el-input v-model="form.list" placeholder="请输入记录清单" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="结算总价" prop="price">-->
|
||||
<!-- <el-input v-model="form.price" placeholder="请输入结算总价" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="应收" prop="payable">
|
||||
<el-input v-model="form.payable" placeholder="请输入应收" />
|
||||
<el-input v-model="form.payable" placeholder="请输入应收" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="实收" prop="receipts">
|
||||
<el-input v-model="form.receipts" placeholder="请输入实收" />
|
||||
<el-input v-model="form.receipts" placeholder="请输入实收" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择结算类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<!-- <el-select v-model="form.type" placeholder="请选择结算类型">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in typeOptions"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<el-input v-model="form.type" placeholder="请输入结算类型" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票名" prop="invoiceName">
|
||||
<el-input v-model="form.invoiceName" placeholder="请输入发票名"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="税号" prop="taxId">
|
||||
<el-input v-model="form.taxId" placeholder="请输入税号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form.invoiceNum" placeholder="请输入发票号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票类型" prop="invoiceType">
|
||||
<el-select v-model="form.invoiceType" placeholder="请选择开票类型">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款总额" prop="refund">
|
||||
<el-input v-model="form.refund" placeholder="请输入退款总额" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="退款总额" prop="refund">-->
|
||||
<!-- <el-input v-model="form.refund" placeholder="请输入退款总额"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -164,14 +193,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSettlement, getSettlement, delSettlement, addSettlement, updateSettlement, exportSettlement } from "@/api/fantang/settlement";
|
||||
import {addSettlement, delSettlement, exportSettlement, listSettlement} from "@/api/fantang/settlement";
|
||||
import {getSettlement} from "../../../api/fantang/settlement";
|
||||
import {addToInvoice} from "../../../api/fantang/invoice";
|
||||
|
||||
export default {
|
||||
name: "Settlement",
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [{
|
||||
value: 1,
|
||||
label: '开票'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '挂账'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -206,22 +243,22 @@ export default {
|
||||
// 表单校验
|
||||
rules: {
|
||||
list: [
|
||||
{ required: true, message: "记录清单不能为空", trigger: "blur" }
|
||||
{required: true, message: "记录清单不能为空", trigger: "blur"}
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "结算总价不能为空", trigger: "blur" }
|
||||
{required: true, message: "结算总价不能为空", trigger: "blur"}
|
||||
],
|
||||
payable: [
|
||||
{ required: true, message: "应收不能为空", trigger: "blur" }
|
||||
{required: true, message: "应收不能为空", trigger: "blur"}
|
||||
],
|
||||
receipts: [
|
||||
{ required: true, message: "实收不能为空", trigger: "blur" }
|
||||
{required: true, message: "实收不能为空", trigger: "blur"}
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "结算类型不能为空", trigger: "change" }
|
||||
{required: true, message: "结算类型不能为空", trigger: "change"}
|
||||
],
|
||||
refund: [
|
||||
{ required: true, message: "退款总额不能为空", trigger: "blur" }
|
||||
{required: true, message: "退款总额不能为空", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -237,6 +274,7 @@ export default {
|
||||
this.settlementList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
console.log(response.rows)
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
@ -257,7 +295,11 @@ export default {
|
||||
receipts: undefined,
|
||||
type: undefined,
|
||||
flag: undefined,
|
||||
refund: undefined
|
||||
refund: undefined,
|
||||
invoiceName: undefined,
|
||||
taxId: undefined,
|
||||
invoiceNum: undefined,
|
||||
invoiceType: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -274,7 +316,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.settleId)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
@ -287,10 +329,11 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const settleId = row.settleId || this.ids
|
||||
console.log(row)
|
||||
getSettlement(settleId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改结算管理";
|
||||
this.title = "开票";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -298,11 +341,11 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.settleId != null) {
|
||||
updateSettlement(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
addToInvoice(this.form).then(response => {
|
||||
this.msgSuccess("已开票");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
} else {
|
||||
addSettlement(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
@ -317,28 +360,28 @@ export default {
|
||||
handleDelete(row) {
|
||||
const settleIds = row.settleId || this.ids;
|
||||
this.$confirm('是否确认删除结算管理编号为"' + settleIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delSettlement(settleIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return delSettlement(settleIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有结算管理数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportSettlement(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
return exportSettlement(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user