收银台
This commit is contained in:
parent
9fb78cf532
commit
757d9c5adb
@ -35,6 +35,11 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
*/
|
||||
public MerchantConfig selectMerchById(int id);
|
||||
|
||||
/**
|
||||
* 将所有的使用1改为0
|
||||
*/
|
||||
public void updateMerchOrter();
|
||||
|
||||
/**
|
||||
* 修改商户使用状态
|
||||
* @param merchantConfig
|
||||
|
@ -13,9 +13,11 @@ import com.fuint.api.fuyou.util.Utils;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||
import com.fuint.business.order.entity.CashierOrder;
|
||||
import com.fuint.business.order.entity.HangBill;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.OilOrder;
|
||||
import com.fuint.business.order.service.CashierOrderService;
|
||||
import com.fuint.business.order.service.HangBillService;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.business.order.service.OilOrderService;
|
||||
import io.swagger.models.auth.In;
|
||||
@ -102,6 +104,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
|
||||
@Autowired
|
||||
private MerchantConfigService merchantConfigService;
|
||||
@Autowired
|
||||
private HangBillService hangBillService;
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryOrder(Map<String, String> map1) throws Exception {
|
||||
@ -140,6 +144,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
LJOrder goodsOrder = goodsOrderService.selectGoodsOrder(orderNo);
|
||||
CashierOrder cashierOrder = cashierOrderService.selectCashierOrder(orderNo);
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
HangBill hangBill = hangBillService.selectHangBillByOrderNo(orderNo);
|
||||
Date date = new Date();
|
||||
if (reqMap.get("trans_stat").equals("SUCCESS")){
|
||||
if (!ObjectUtil.isEmpty(oilOrder)){
|
||||
@ -152,6 +157,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
if (!ObjectUtil.isEmpty(cashierOrder)){
|
||||
cashierOrder.setStatus("paid");
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(hangBill)){
|
||||
hangBill.setPayStatus("paid");
|
||||
hangBillService.updateHangBills(hangBill,allAmount);
|
||||
}
|
||||
if (ArrayUtil.isEmpty(list)){
|
||||
for (OilOrder order : list) {
|
||||
order.setOrderStatus("paid");
|
||||
@ -185,6 +194,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
if (!ObjectUtil.isEmpty(cashierOrder)){
|
||||
cashierOrder.setStatus("payFail");
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(hangBill)){
|
||||
hangBill.setPayStatus("payFail");
|
||||
hangBillService.updateById(hangBill);
|
||||
}
|
||||
if (!ArrayUtil.isEmpty(list)){
|
||||
for (OilOrder order : list) {
|
||||
order.setOrderStatus("payFail");
|
||||
|
@ -48,6 +48,19 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
return merchantConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMerchOrter() {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_use","1");
|
||||
List<MerchantConfig> list = baseMapper.selectList(queryWrapper);
|
||||
if (list.size()>0){
|
||||
for (MerchantConfig merchantConfig : list) {
|
||||
merchantConfig.setIsUse("0");
|
||||
this.updateMerch(merchantConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateMerch(MerchantConfig merchantConfig) {
|
||||
int row = baseMapper.updateById(merchantConfig);
|
||||
|
@ -50,6 +50,9 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
// 将其他使用的账户关掉
|
||||
merchantConfigService.updateMerchOrter();
|
||||
// 改变目前使用账户
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMerchById(list.get(index).getMerchConfigId());
|
||||
merchantConfig.setIsUse("1");
|
||||
merchantConfig.setIsOpenRule("1");
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.fuint.business.order.controller;
|
||||
|
||||
import com.fuint.business.order.entity.CreditUnit;
|
||||
import com.fuint.business.order.service.CreditUnitService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/business/creditUnit")
|
||||
public class CreditUnitController extends BaseController {
|
||||
@Autowired
|
||||
private CreditUnitService creditUnitService;
|
||||
|
||||
/**
|
||||
* 查询所有挂账单位信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
private ResponseObject list(){
|
||||
return getSuccessResult(creditUnitService.selectCreditUnitList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加挂账单位信息
|
||||
* @param creditUnit
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
private ResponseObject add(@Validated @RequestBody CreditUnit creditUnit){
|
||||
return getSuccessResult(creditUnitService.insertCreditUnit(creditUnit));
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.fuint.business.order.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.HangBill;
|
||||
import com.fuint.business.order.service.HangBillService;
|
||||
import com.fuint.business.order.vo.HangBillVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 挂账记录信息 controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/hangBill")
|
||||
public class HangBillController extends BaseController {
|
||||
@Autowired
|
||||
private HangBillService hangBillService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询收银员订单信息
|
||||
* @param hangBillVo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(HangBillVo hangBillVo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<HangBillVo> list = hangBillService.selectHangBillList(page,hangBillVo);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有挂账信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/hangBills")
|
||||
public ResponseObject hangBills(){
|
||||
return getSuccessResult(hangBillService.selectHangBills());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询挂账信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject info(@PathVariable Integer id){
|
||||
HangBillVo hangBillVo = hangBillService.selectHangBillById(id);
|
||||
return getSuccessResult(hangBillVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加挂账记录信息
|
||||
* @param hangBill
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@Validated @RequestBody HangBill hangBill){
|
||||
return getSuccessResult(hangBillService.insertHangBill(hangBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 归还挂账记录信息,并收款
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@Validated @RequestBody Map<String,String> map){
|
||||
int row = hangBillService.updateHangBill(map);
|
||||
return getSuccessResult(row);
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.fuint.business.order.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 挂账单位信息表(CreditUnit)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-14 10:45:00
|
||||
*/
|
||||
@Data
|
||||
@TableName("credit_unit")
|
||||
@ApiModel(value = "CreditUnit对象", description = "挂账单位信息表")
|
||||
public class CreditUnit extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String unitName;
|
||||
/**
|
||||
* 挂账人
|
||||
*/
|
||||
private String personCredit;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactMobile;
|
||||
/**
|
||||
* 挂账额度
|
||||
*/
|
||||
private Double creditLimit;
|
||||
/**
|
||||
* 单据备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 单位状态:启用禁用
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
@ -30,26 +30,22 @@ public class HangBill extends BaseEntity implements Serializable {
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 挂账单位id
|
||||
*/
|
||||
private Integer creditUnitId;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String unitName;
|
||||
/**
|
||||
* 挂账人
|
||||
*/
|
||||
private String personCredit;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String contactMobile;
|
||||
/**
|
||||
* 订单状态:0未归还,1已归还
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 支付状态:已支付,未支付,支付失败
|
||||
*/
|
||||
private String payStatus;
|
||||
/**
|
||||
* 归还状态:0挂账,1归还
|
||||
*/
|
||||
@ -57,7 +53,15 @@ public class HangBill extends BaseEntity implements Serializable {
|
||||
/**
|
||||
* 挂账金额
|
||||
*/
|
||||
private String amount;
|
||||
private Double amount;
|
||||
/**
|
||||
* 已还金额
|
||||
*/
|
||||
private Double repaidAmount;
|
||||
/**
|
||||
* 未还金额
|
||||
*/
|
||||
private Double outstandAmount;
|
||||
/**
|
||||
* 操作员工id
|
||||
*/
|
||||
@ -66,127 +70,6 @@ public class HangBill extends BaseEntity implements Serializable {
|
||||
* 单据备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public String getPersonCredit() {
|
||||
return personCredit;
|
||||
}
|
||||
|
||||
public void setPersonCredit(String personCredit) {
|
||||
this.personCredit = personCredit;
|
||||
}
|
||||
|
||||
public String getContactMobile() {
|
||||
return contactMobile;
|
||||
}
|
||||
|
||||
public void setContactMobile(String contactMobile) {
|
||||
this.contactMobile = contactMobile;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Integer getStaffId() {
|
||||
return staffId;
|
||||
}
|
||||
|
||||
public void setStaffId(Integer staffId) {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.fuint.business.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.order.entity.CreditUnit;
|
||||
|
||||
/**
|
||||
* 挂账单位信息 mapper层
|
||||
*/
|
||||
public interface CreditUnitMapper extends BaseMapper<CreditUnit> {
|
||||
}
|
@ -1,10 +1,37 @@
|
||||
package com.fuint.business.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.HangBill;
|
||||
import com.fuint.business.order.vo.HangBillVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂账记录表 mapper层
|
||||
*/
|
||||
public interface HangBillMapper extends BaseMapper<HangBill> {
|
||||
/**
|
||||
* 根据条件分页查询油品订单信息
|
||||
* @param page
|
||||
* @param hangBill
|
||||
* @return
|
||||
*/
|
||||
public IPage<HangBillVo> selectHangBillList(Page page,@Param("hangBill") HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询所有挂账信息
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
public List<HangBillVo> selectHangBills(@Param("storeId") int storeId);
|
||||
|
||||
/**
|
||||
* 根据id查询挂账信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public HangBillVo selectHangBillById(@Param("id") int id);
|
||||
}
|
||||
|
@ -0,0 +1,53 @@
|
||||
<?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.fuint.business.order.mapper.HangBillMapper">
|
||||
<sql id="selectHangBill">
|
||||
select hb.*,ms.real_name,ms.mobile,cu.unit_name,cu.person_credit,cu.contact_mobile
|
||||
from hang_bill hb
|
||||
inner join mt_staff ms on hb.staff_id = ms.id
|
||||
inner join credit_unit cu on hb.credit_unit_id = cu.id
|
||||
</sql>
|
||||
|
||||
<select id="selectHangBillList" resultType="com.fuint.business.order.vo.HangBillVo">
|
||||
<include refid="selectHangBill"></include>
|
||||
<where>
|
||||
hb.store_id = #{hangBill.storeId}
|
||||
<if test="hangBill.status != null and hangBill.status != ''">
|
||||
and hb.status = #{hangBill.status}
|
||||
</if>
|
||||
<if test="hangBill.returnType != null and hangBill.returnType != ''">
|
||||
and hb.return_type = #{hangBill.returnType}
|
||||
</if>
|
||||
<if test="hangBill.unitName != null and hangBill.unitName != ''">
|
||||
and cu.unit_name like concat('%', #{hangBill.unitName}, '%')
|
||||
</if>
|
||||
<if test="hangBill.personCredit != null and hangBill.personCredit != ''">
|
||||
and cu.person_credit like concat('%', #{hangBill.personCredit}, '%')
|
||||
</if>
|
||||
<if test="hangBill.contactMobile != null and hangBill.contactMobile != ''">
|
||||
and cu.contact_mobile like concat('%', #{hangBill.contactMobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.mobile != null and hangBill.mobile != ''">
|
||||
and ms.mobile like concat('%', #{hangBill.mobile}, '%')
|
||||
</if>
|
||||
<if test="hangBill.params.beginTime != null and hangBill.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(hb.create_time,'%y%m%d') >= date_format(#{hangBill.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="hangBill.params.endTime != null and hangBill.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
||||
<include refid="selectHangBill"></include>
|
||||
<where>
|
||||
hb.id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectHangBills" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
||||
<include refid="selectHangBill"></include>
|
||||
<where>
|
||||
hb.store_id = #{storeId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,24 @@
|
||||
package com.fuint.business.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.CreditUnit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 挂账单位信息 业务层
|
||||
*/
|
||||
public interface CreditUnitService extends IService<CreditUnit> {
|
||||
/**
|
||||
* 查询所有挂账单位信息
|
||||
* @return
|
||||
*/
|
||||
public List<CreditUnit> selectCreditUnitList();
|
||||
|
||||
/**
|
||||
* 添加挂账单位信息
|
||||
* @param creditUnit
|
||||
* @return
|
||||
*/
|
||||
public int insertCreditUnit(CreditUnit creditUnit);
|
||||
}
|
@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.HangBill;
|
||||
import com.fuint.business.order.vo.HangBillVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 挂账记录信息 业务层
|
||||
@ -15,7 +19,27 @@ public interface HangBillService extends IService<HangBill> {
|
||||
* @param hangBill
|
||||
* @return
|
||||
*/
|
||||
public IPage<HangBill> selectHangBillList(Page page, HangBill hangBill);
|
||||
public IPage<HangBillVo> selectHangBillList(Page page, HangBillVo hangBill);
|
||||
|
||||
/**
|
||||
* 查询所有挂账记录信息
|
||||
* @return
|
||||
*/
|
||||
public List<HangBillVo> selectHangBills();
|
||||
|
||||
/**
|
||||
* 根据id查询挂账信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public HangBillVo selectHangBillById(int id);
|
||||
|
||||
/**
|
||||
* 根据订单号查询挂账信息
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
public HangBill selectHangBillByOrderNo(String orderNo);
|
||||
|
||||
/**
|
||||
* 添加挂账记录
|
||||
@ -23,4 +47,19 @@ public interface HangBillService extends IService<HangBill> {
|
||||
* @return
|
||||
*/
|
||||
public int insertHangBill(HangBill hangBill);
|
||||
|
||||
/**
|
||||
* 修改挂账记录 并收款
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updateHangBill(Map<String,String> map);
|
||||
|
||||
/**
|
||||
* 修改挂账信息
|
||||
* @param hangBill
|
||||
* @param repaidAmount
|
||||
* @return
|
||||
*/
|
||||
public int updateHangBills(HangBill hangBill,Double repaidAmount);
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.CreditUnit;
|
||||
import com.fuint.business.order.mapper.CreditUnitMapper;
|
||||
import com.fuint.business.order.service.CreditUnitService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditUnit> implements CreditUnitService {
|
||||
@Override
|
||||
public List<CreditUnit> selectCreditUnitList() {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("status","qy");
|
||||
List<CreditUnit> list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertCreditUnit(CreditUnit creditUnit) {
|
||||
int row = baseMapper.insert(creditUnit);
|
||||
return row;
|
||||
}
|
||||
}
|
@ -1,31 +1,165 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.entity.MerchantConfig;
|
||||
import com.fuint.api.fuyou.service.FyPayService;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.api.fuyou.service.OilConfigService;
|
||||
import com.fuint.business.order.entity.HangBill;
|
||||
import com.fuint.business.order.mapper.HangBillMapper;
|
||||
import com.fuint.business.order.service.HangBillService;
|
||||
import com.fuint.business.order.vo.HangBillVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 挂账记录信息 业务层
|
||||
*/
|
||||
@Service
|
||||
public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> implements HangBillService {
|
||||
@Override
|
||||
public IPage<HangBill> selectHangBillList(Page page, HangBill hangBill) {
|
||||
public IPage<HangBillVo> selectHangBillList(Page page, HangBillVo hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
hangBill.setStoreId(storeId);
|
||||
return null;
|
||||
IPage<HangBillVo> hangBillVoIPage = baseMapper.selectHangBillList(page, hangBill);
|
||||
return hangBillVoIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HangBillVo> selectHangBills() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
List<HangBillVo> hangBillVos = baseMapper.selectHangBills(storeId);
|
||||
return hangBillVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HangBillVo selectHangBillById(int id) {
|
||||
HangBillVo hangBillVo = baseMapper.selectHangBillById(id);
|
||||
return hangBillVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HangBill selectHangBillByOrderNo(String orderNo) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("order_no",orderNo);
|
||||
HangBill hangBill = baseMapper.selectOne(queryWrapper);
|
||||
return hangBill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertHangBill(HangBill hangBill) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
hangBill.setStoreId(storeId);
|
||||
// 根据日期生成订单号
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
|
||||
String orderNo = timestamp+randomString;
|
||||
Integer staffId = nowAccountInfo.getStaffId();
|
||||
hangBill.setStaffId(staffId);
|
||||
hangBill.setOrderNo(orderNo);
|
||||
hangBill.setOutstandAmount(hangBill.getAmount());
|
||||
hangBill.setRepaidAmount(0.0);
|
||||
int row = baseMapper.insert(hangBill);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private FyPayService fyPayService;
|
||||
@Autowired
|
||||
private MerchantConfigService merchantConfigService;
|
||||
@Autowired
|
||||
private OilConfigService oilConfigService;
|
||||
|
||||
@Override
|
||||
public int updateHangBill(Map<String,String> map) {
|
||||
String payType = map.get("payType");
|
||||
if (!map.get("repaidAmount").equals("0") && !payType.equals("CASH")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("repaidAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen();
|
||||
if (list.size()>0){
|
||||
oilConfigService.oilRule();
|
||||
}
|
||||
// 根据店铺id查询商户配置信息
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMeChByIsUse("1");
|
||||
// 处理支付需要的数据
|
||||
Map<String,String> map1 = new HashMap<>();
|
||||
map1.put("authCode",map.get("authCode"));
|
||||
map1.put("allAmount",allAmount.toString());
|
||||
map1.put("orderNo",map.get("orderNo"));
|
||||
map1.put("payType",payType);
|
||||
map1.put("insCd",merchantConfig.getInsCd());
|
||||
map1.put("mchntCd",merchantConfig.getMchntCd());
|
||||
map1.put("goodsDes",merchantConfig.getMerchantName());
|
||||
map1.put("publicKey",merchantConfig.getPublicKey());
|
||||
map1.put("privateKey",merchantConfig.getPrivateKey());
|
||||
try {
|
||||
fyPayService.pay(map);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// 根据id查询挂账信息
|
||||
HangBill hangBill = baseMapper.selectById(Integer.parseInt(map.get("id")));
|
||||
if (payType.equals("CASH")){
|
||||
hangBill.setPayStatus("paid");
|
||||
}
|
||||
int row = 0;
|
||||
hangBill.setRemark(map.get("remark"));
|
||||
// 支付成功后修改挂账信息
|
||||
if (hangBill.getPayStatus().equals("paid")){
|
||||
Double repaidAmount1 = Double.valueOf(map.get("repaidAmount"));
|
||||
Double amount = hangBill.getAmount();
|
||||
Double repaidAmount = hangBill.getRepaidAmount();
|
||||
Double outstandAmount = hangBill.getOutstandAmount();
|
||||
Double repaidAmountAfter = repaidAmount+repaidAmount1;
|
||||
// 修改挂账信息
|
||||
hangBill.setRepaidAmount(repaidAmountAfter);
|
||||
hangBill.setOutstandAmount(amount-repaidAmountAfter);
|
||||
if (outstandAmount == repaidAmountAfter){
|
||||
hangBill.setStatus("1");
|
||||
hangBill.setReturnType("1");
|
||||
}else {
|
||||
hangBill.setStatus("2");
|
||||
}
|
||||
}
|
||||
row = baseMapper.updateById(hangBill);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateHangBills(HangBill hangBill, Double repaidAmount) {
|
||||
HangBill hangBill1 = this.updateStatus(hangBill, repaidAmount);
|
||||
int row = baseMapper.updateById(hangBill1);
|
||||
return row;
|
||||
}
|
||||
|
||||
private HangBill updateStatus(HangBill hangBill,Double repaidAmount1){
|
||||
Double amount = hangBill.getAmount();
|
||||
Double repaidAmount = hangBill.getRepaidAmount();
|
||||
Double outstandAmount = hangBill.getOutstandAmount();
|
||||
Double repaidAmountAfter = repaidAmount+repaidAmount1;
|
||||
// 修改挂账信息
|
||||
hangBill.setRepaidAmount(repaidAmountAfter);
|
||||
hangBill.setOutstandAmount(amount-repaidAmountAfter);
|
||||
if (outstandAmount == repaidAmountAfter){
|
||||
hangBill.setStatus("1");
|
||||
hangBill.setReturnType("1");
|
||||
}else {
|
||||
hangBill.setStatus("2");
|
||||
}
|
||||
return hangBill;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,14 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HangBillVo extends HangBill {
|
||||
// 操作人名称
|
||||
private String realName;
|
||||
// 操作人手机号
|
||||
private String mobile;
|
||||
// 单位名称
|
||||
private String unitName;
|
||||
// 挂账人
|
||||
private String personCredit;
|
||||
// 联系电话
|
||||
private String contactMobile;
|
||||
}
|
||||
|
19
fuintCashierWeb/src/api/cashier/creditunit.js
Normal file
19
fuintCashierWeb/src/api/cashier/creditunit.js
Normal file
@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function listCreditUnit(query) {
|
||||
return request({
|
||||
url: '/business/creditUnit/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增挂账记录
|
||||
export function addCreditUnit(data) {
|
||||
return request({
|
||||
url: '/business/creditUnit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
44
fuintCashierWeb/src/api/cashier/hangbill.js
Normal file
44
fuintCashierWeb/src/api/cashier/hangbill.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function listHangBill(query) {
|
||||
return request({
|
||||
url: '/business/hangBill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询挂账信息列表
|
||||
export function hangBillInfo(id) {
|
||||
return request({
|
||||
url: '/business/hangBill/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有挂账信息列表
|
||||
export function hangBills() {
|
||||
return request({
|
||||
url: '/business/hangBill/hangBills',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 新增挂账记录
|
||||
export function addHangBill(data) {
|
||||
return request({
|
||||
url: '/business/hangBill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改挂账记录及收款
|
||||
export function editHangBill(data) {
|
||||
return request({
|
||||
url: '/business/hangBill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
@ -5,18 +5,89 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span>挂账</span>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div class="top-app-sou">
|
||||
<el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <div class="top-app-sou">-->
|
||||
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
|
||||
<!-- <el-form-item label="名称">-->
|
||||
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-left: 10px">-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="归还状态" prop="returnType">
|
||||
<el-select
|
||||
v-model="queryParams.returnType"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="挂账" value="0"></el-option>
|
||||
<el-option label="归还" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
>
|
||||
<el-option label="未归还" value="0"></el-option>
|
||||
<el-option label="已归还" value="1"></el-option>
|
||||
<el-option label="部分归还" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams.unitName"
|
||||
placeholder="请输入挂账单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="挂账人" prop="personCredit">
|
||||
<el-input
|
||||
v-model="queryParams.personCredit"
|
||||
placeholder="请输入挂账人名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="contactMobile">
|
||||
<el-input
|
||||
v-model="queryParams.contactMobile"
|
||||
placeholder="请输入挂账人联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入操作人手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
@ -35,71 +106,91 @@
|
||||
<div class="wgang">
|
||||
<div>列表</div>
|
||||
<div style="display: flex ">
|
||||
<el-button type="primary" size="mini">新增挂账记录</el-button>
|
||||
<el-button type="success" size="mini">批量挂账归还</el-button>
|
||||
<el-button type="primary" size="mini" @click="addRecord">新增挂账记录</el-button>
|
||||
<el-button type="success" size="mini" @click="open3 = true">批量挂账归还</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:data="hangBillList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="名称">
|
||||
<span>{{ props.row.name }}</span>
|
||||
<el-form label-position="left" style="margin-left: 20px" inline class="demo-table-expand">
|
||||
<el-form-item label="操作人手机号">
|
||||
<span>{{ props.row.mobile }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="更新时间">
|
||||
<span>{{ props.row.updateTime ? props.row.updateTime:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据备注">
|
||||
<span>{{ props.row.remark ? props.row.remark:"--" }}</span>
|
||||
</el-form-item><br/>
|
||||
<el-form-item label="单据金额">
|
||||
<span>{{ props.row.amount ? props.row.amount:"--" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已还金额">
|
||||
<span>{{ props.row.repaidAmount ? props.row.repaidAmount:"--" }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="未还金额">
|
||||
<span>{{ props.row.outstandAmount ? props.row.outstandAmount:"--" }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
prop="orderNo"
|
||||
label="单据号"
|
||||
width="150">
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column label="挂账单位">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="单位名称"
|
||||
width="120">
|
||||
prop="unitName"
|
||||
label="单位名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="挂账人"
|
||||
width="120">
|
||||
prop="personCredit"
|
||||
label="挂账人">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="联系电话"
|
||||
width="120">
|
||||
prop="contactMobile"
|
||||
label="联系电话">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="记录明显">
|
||||
<el-table-column label="记录明细">
|
||||
<el-table-column
|
||||
prop="province"
|
||||
label="类型"
|
||||
width="120">
|
||||
prop="returnType"
|
||||
label="类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.returnType == 0">挂账</el-tag>
|
||||
<el-tag v-else type="success">归还</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="city"
|
||||
label="金额"
|
||||
width="120">
|
||||
prop="amount"
|
||||
label="金额">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="状态"
|
||||
width="300">
|
||||
prop="status"
|
||||
label="状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 0">未归还</span>
|
||||
<span v-else-if="scope.row.status == 1" type="success">已归还</span>
|
||||
<span v-else type="success">部分归还</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="zip"
|
||||
label="操作人"
|
||||
width="220">
|
||||
prop="realName"
|
||||
label="操作人">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="zip"
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="220">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="zip"-->
|
||||
@ -108,16 +199,22 @@
|
||||
<!-- </el-table-column>-->
|
||||
<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"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
>删除</el-button>
|
||||
:disabled="scope.row.status == 1"
|
||||
@click="repay(scope.row.id)"
|
||||
>归还</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -127,83 +224,609 @@
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="1000">
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- 新增挂账记录-->
|
||||
<el-dialog title="新增挂账记录" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="挂账单位" prop="unitName" style="width: 420px">
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
v-model="form.unitName"
|
||||
style="width: 180%"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="请选择挂账单位"
|
||||
@select="changeUnit">
|
||||
<template slot-scope="{ item }">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
{{item.unitName}}({{item.personCredit}} {{item.contactMobile}})
|
||||
</div>
|
||||
</template>
|
||||
<el-button slot="append" @click="open1 = true">新增挂账单位</el-button>
|
||||
</el-autocomplete>
|
||||
<!-- <el-input placeholder="请选择挂账单位" v-model="form.unitName" class="input-with-select">-->
|
||||
<!-- <el-button slot="append">新增挂账单位</el-button>-->
|
||||
<!-- </el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="挂账金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入挂账金额" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注信息" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addHangbill">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增挂账单位信息-->
|
||||
<el-dialog title="新增挂账单位" :visible.sync="open1" width="700px" append-to-body>
|
||||
<el-form ref="formName" :model="form1" :rules="rules1" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="挂账单位" prop="unitName">
|
||||
<el-input v-model="form1.unitName" show-word-limit placeholder="请输入挂账单位名称" maxlength="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="负责人" prop="personCredit">
|
||||
<el-input v-model="form1.personCredit" show-word-limit placeholder="请输入挂账单位负责人姓名" maxlength="10" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="联系电话" prop="contactMobile">
|
||||
<el-input v-model="form1.contactMobile" show-word-limit placeholder="请输入挂账单位联系电话" maxlength="15" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="挂账额度" prop="creditLimit">
|
||||
<el-input v-model="form1.creditLimit" placeholder="请输入挂账额度,为0则不限额" maxlength="30">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<span style="font-size: 12px;color: grey">
|
||||
0为不限额,额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注信息" prop="remark">
|
||||
<el-input v-model="form1.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单位状态" prop="status">
|
||||
<el-radio-group v-model="form1.status">
|
||||
<el-radio label="qy" value="qy">启用</el-radio>
|
||||
<el-radio label="jy" value="jy">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="open1 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addCredit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 挂账归还-->
|
||||
<el-dialog title="挂账归还" :visible.sync="open2" width="700px" append-to-body>
|
||||
<el-descriptions class="margin-top" :column="2" border>
|
||||
<el-descriptions-item content-width="100%">
|
||||
<template slot="label">
|
||||
挂账单位
|
||||
</template>
|
||||
{{ form2.unitName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
挂账人
|
||||
</template>
|
||||
{{ form2.personCredit }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
联系电话
|
||||
</template>
|
||||
{{ form2.contactMobile }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
挂账金额
|
||||
</template>
|
||||
¥{{ form2.amount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">
|
||||
未归还金额
|
||||
</template>
|
||||
¥{{ form2.outstandAmount }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-form ref="formName" :model="form2" label-width="80px" style="margin-top: 30px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归还金额" prop="creditLimit">
|
||||
<el-input v-model="form2.repaidAmount" placeholder="请输入归还金额" maxlength="30">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注信息" prop="remark">
|
||||
<el-input v-model="form2.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归还方式" prop="payType">
|
||||
<el-radio-group v-model="form2.payType">
|
||||
<el-radio v-for="item in payList"
|
||||
:key="item.dictValue"
|
||||
:value="item.dictValue"
|
||||
:label="item.dictValue" border>{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="open2 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitReturn">确认归还</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 立即结算-->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="dialogVisiblej"
|
||||
width="30%"
|
||||
:close-on-click-modal="false">
|
||||
<div v-if="isPay == true"
|
||||
v-loading="loading">
|
||||
<div style="text-align: center;font-size: 15px;font-weight: bold">付款金额</div>
|
||||
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
|
||||
¥{{ form2.repaidAmount }}
|
||||
</div>
|
||||
<div style="text-align: center;color: grey;font-size: 14px;margin: 20px 0">请自行核实归还金额,提交完成后将自动处理</div>
|
||||
<div>
|
||||
<el-input v-model="form2.authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false" class="but">取 消</el-button>
|
||||
<el-button type="primary" class="but" @click="collection">确 定 收 款</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="isPaySuccess">
|
||||
<el-result icon="success" title="收款成功">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-result icon="error" title="支付失败,请重新支付">
|
||||
<template slot="extra">
|
||||
<el-button type="primary" @click="handClose">关 闭</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量挂账归还-->
|
||||
<el-dialog title="批量挂账归还" :visible.sync="open3" append-to-body>
|
||||
<el-form ref="form3" :model="form3">
|
||||
<el-form-item>
|
||||
<el-input placeholder="请输入挂账单位、挂账人、挂账人手机号检索" v-model="form3.unitName" class="input-with-select">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getRepayList">查询</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="repayList"
|
||||
tooltip-effect="dark"
|
||||
height="300"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
prop="orderNo"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="挂账方详情">
|
||||
<el-table-column
|
||||
prop="unitName"
|
||||
label="单位">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="personCredit"
|
||||
label="姓名">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="contactMobile"
|
||||
label="电话">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="挂账金额">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="outstandAmount"
|
||||
label="未归还金额">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="repaidAmount"
|
||||
label="归还金额"
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number size="mini" style="width: 100px"
|
||||
v-model="scope.row.repaidAmount" @change="handleChange" :min="1" :max="10"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="pagination-box">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total1"
|
||||
:page.sync="queryParam.page"
|
||||
:limit.sync="queryParam.pageSize"
|
||||
@current-change="getList">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="open3 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="open3 = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addHangBill, editHangBill, hangBillInfo, hangBills, listHangBill} from "@/api/cashier/hangbill";
|
||||
import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
|
||||
export default {
|
||||
name: "credit",
|
||||
data(){
|
||||
return{
|
||||
labelPosition: 'right',
|
||||
formLabelAlign: {
|
||||
name: '',
|
||||
list:[],
|
||||
// 选中表格数据
|
||||
repayList:[],
|
||||
isPay:true,
|
||||
isPaySuccess:false,
|
||||
loading: false,
|
||||
// 弹出框标题
|
||||
title:'',
|
||||
// 支付方式列表
|
||||
payList:[],
|
||||
unit:'',
|
||||
// 挂账单位列表
|
||||
unitList:[],
|
||||
form:{},
|
||||
form1:{
|
||||
unitName:"",
|
||||
personCredit:"",
|
||||
contactMobile:"",
|
||||
creditLimit:0,
|
||||
remark:'',
|
||||
status:'qy',
|
||||
},
|
||||
form2:{},
|
||||
form3:{},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryParam: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 挂账记录列表
|
||||
hangBillList:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
total1: 0,
|
||||
// 是否开启提示框
|
||||
open:false,
|
||||
open1:false,
|
||||
open2:false,
|
||||
open3:false,
|
||||
dialogVisiblej:false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
unitName: [ { required: true, message: "请选择挂账单位", trigger: "blur" }, ],
|
||||
amount: [{ required: true, message: "请输入挂账金额", trigger: "blur" }],
|
||||
},
|
||||
rules1: {
|
||||
unitName: [ { required: true, message: "请填写挂账单位名称", trigger: "blur" }, ],
|
||||
personCredit: [{ required: true, message: "请填写挂账单位负责人姓名", trigger: "blur" }],
|
||||
contactMobile: [ { required: true, message: "请填写挂账单位联系电话", trigger: "blur" }, ],
|
||||
creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ],
|
||||
status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ],
|
||||
},
|
||||
|
||||
// labelPosition: 'right',
|
||||
// formLabelAlign: {
|
||||
// name: '',
|
||||
// },
|
||||
// tableData: [{
|
||||
// date: '2016-05-03',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-02',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-04',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-01',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-08',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-06',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }, {
|
||||
// date: '2016-05-07',
|
||||
// name: '王小虎',
|
||||
// province: '上海',
|
||||
// city: '普陀区',
|
||||
// address: '上海市普陀区金沙江路 1518 弄',
|
||||
// zip: 200333
|
||||
// }]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getUnitList();
|
||||
this.getPayList();
|
||||
this.getLists();
|
||||
},
|
||||
methods:{
|
||||
getRepayList(){
|
||||
let result = [];
|
||||
let str = this.form3.unitName
|
||||
this.list.forEach(item => {
|
||||
if (item.unitName.includes(str)){
|
||||
result.push(item)
|
||||
}
|
||||
if (item.personCredit.includes(str)){
|
||||
result.push(item)
|
||||
}
|
||||
if (item.contactMobile.includes(str)){
|
||||
result.push(item)
|
||||
}
|
||||
})
|
||||
this.repayList = result
|
||||
},
|
||||
getLists(){
|
||||
hangBills().then(response => {
|
||||
this.list = response.data;
|
||||
})
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
// 选择表格数据
|
||||
handleSelectionChange(val) {
|
||||
this.repayList = val;
|
||||
},
|
||||
handClose(){
|
||||
|
||||
},
|
||||
tableData: [{
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-08',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-06',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
address: '上海市普陀区金沙江路 1518 弄',
|
||||
zip: 200333
|
||||
}]
|
||||
collection(){
|
||||
editHangBill(this.form2).then(response => {
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
submitReturn(){
|
||||
if (this.form2.payType!="CASH"){
|
||||
this.title = "扫码付款";
|
||||
}else {
|
||||
this.title = "现金还款";
|
||||
}
|
||||
|
||||
|
||||
this.dialogVisiblej = true;
|
||||
},
|
||||
// 获取支付方式
|
||||
getPayList() {
|
||||
getDicts("payment_type").then(response => {
|
||||
this.payList = response.data;
|
||||
})
|
||||
},
|
||||
// 归还
|
||||
repay(id){
|
||||
hangBillInfo(id).then( response => {
|
||||
this.open2 = true;
|
||||
this.form2 = response.data
|
||||
this.form2.payType = "WECHAT"
|
||||
this.form2.repaidAmount = this.form2.outstandAmount
|
||||
})
|
||||
},
|
||||
// 显示添加挂账记录对话框
|
||||
addRecord(){
|
||||
this.open = true;
|
||||
// 重置
|
||||
this.form = {};
|
||||
this.form1 = {
|
||||
unitName:"",
|
||||
personCredit:"",
|
||||
contactMobile:"",
|
||||
creditLimit:0,
|
||||
remark:'',
|
||||
status:'qy',
|
||||
}
|
||||
},
|
||||
// 添加挂账记录
|
||||
addHangbill(){
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
addHangBill(this.form).then( response => {
|
||||
this.$modal.msgSuccess("挂账记录添加成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加挂账单位信息
|
||||
addCredit(){
|
||||
this.$refs["formName"].validate((valid) => {
|
||||
if (valid) {
|
||||
addCreditUnit(this.form1).then( response => {
|
||||
this.$modal.msgSuccess("挂账单位信息创建成功");
|
||||
this.open1 = false;
|
||||
this.getUnitList();
|
||||
})
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择挂账单位
|
||||
changeUnit(val){
|
||||
this.form.creditUnitId = val.id;
|
||||
return val.id
|
||||
},
|
||||
querySearch(queryString, cb) {
|
||||
let _this = this;
|
||||
let obj = {};
|
||||
let results = _this.unitList
|
||||
if (queryString != "" && queryString!=undefined){
|
||||
results = [];
|
||||
_this.unitList.forEach(item => {
|
||||
if (item.unitName.includes(queryString)){
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
}
|
||||
if (item.personCredit.includes(queryString)){
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
}
|
||||
if (item.contactMobile.includes(queryString)){
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
results.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
cb(results);
|
||||
},
|
||||
// 获取挂账单位列表
|
||||
getUnitList(){
|
||||
let obj = {};
|
||||
let _this = this;
|
||||
listCreditUnit().then( response => {
|
||||
response.data.forEach(item => {
|
||||
obj = item;
|
||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||
_this.unitList.push(obj)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取列表信息
|
||||
getList(){
|
||||
listHangBill(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.hangBillList = response.data.records
|
||||
this.total = response.data.total;
|
||||
})
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.queryParams.page = 1;
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user