bug
This commit is contained in:
parent
96eaddcd7c
commit
7c538e5aab
@ -62,13 +62,18 @@
|
|||||||
|
|
||||||
<el-table ref="tables" v-loading="loading" :data="list">
|
<el-table ref="tables" v-loading="loading" :data="list">
|
||||||
<el-table-column type="index" width="80" align="center" label="序号"/>
|
<el-table-column type="index" width="80" align="center" label="序号"/>
|
||||||
<el-table-column label="单位名称" prop="unitName" align="center" width="120"/>
|
<el-table-column label="单位名称" prop="unitName" align="center" />
|
||||||
<el-table-column label="挂账人" prop="personCredit" align="center" width="160"/>
|
<el-table-column label="挂账人" prop="personCredit" align="center"/>
|
||||||
<el-table-column label="联系电话" prop="contactMobile" align="center" width="120"/>
|
<el-table-column label="联系电话" prop="contactMobile" align="center"/>
|
||||||
<el-table-column label="预设挂账额度" prop="creditLimit" align="center" width="160"/>
|
<el-table-column label="预设挂账额度" prop="creditLimit" align="center"/>
|
||||||
<el-table-column label="已使用挂账额度" prop="usedCreditLimit" align="center" width="160"/>
|
<el-table-column label="已使用挂账额度" prop="usedCreditLimit" align="center" />
|
||||||
<el-table-column label="剩余可挂账额度" prop="residueCreditLimit" align="center" width="160"/>
|
<el-table-column label="剩余可挂账额度" prop="residueCreditLimit" align="center" />
|
||||||
<el-table-column label="备注" prop="remark" align="center" width="120"/>
|
<el-table-column label="操作人" prop="staffName" align="center"/>
|
||||||
|
<el-table-column label="备注" prop="remark" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.remark || "--"}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.status=='qy'">启用</el-tag>
|
<el-tag v-if="scope.row.status=='qy'">启用</el-tag>
|
||||||
@ -150,9 +155,6 @@
|
|||||||
<el-input v-model="form1.usedCreditLimit" disabled placeholder="0" maxlength="10">
|
<el-input v-model="form1.usedCreditLimit" disabled placeholder="0" maxlength="10">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey">
|
|
||||||
额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -162,9 +164,20 @@
|
|||||||
<el-input v-model="form1.residueCreditLimit" disabled placeholder="0" maxlength="10">
|
<el-input v-model="form1.residueCreditLimit" disabled placeholder="0" maxlength="10">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey">
|
</el-form-item>
|
||||||
额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
</el-col>
|
||||||
</span>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="挂账负责人" prop="staffId">
|
||||||
|
<el-select v-model="form1.staffId" filterable placeholder="请选择油站挂账负责人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in staffList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.realName"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -199,12 +212,14 @@ import {
|
|||||||
editCreditUnit,
|
editCreditUnit,
|
||||||
listsCreditUnit
|
listsCreditUnit
|
||||||
} from "@/api/staff/user/creditunit";
|
} from "@/api/staff/user/creditunit";
|
||||||
|
import {queryStaffs} from "@/api/staff/staff";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
dicts: ['zhzt'],
|
dicts: ['zhzt'],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
list:[],
|
list:[],
|
||||||
|
staffList:[],
|
||||||
loading:false,
|
loading:false,
|
||||||
total:0,
|
total:0,
|
||||||
form1:{},
|
form1:{},
|
||||||
@ -223,18 +238,25 @@ export default {
|
|||||||
personCredit: [{ required: true, message: "请填写挂账单位负责人姓名", trigger: "blur" }],
|
personCredit: [{ required: true, message: "请填写挂账单位负责人姓名", trigger: "blur" }],
|
||||||
contactMobile: [ { required: true, message: "请填写挂账单位联系电话", trigger: "blur" }, ],
|
contactMobile: [ { required: true, message: "请填写挂账单位联系电话", trigger: "blur" }, ],
|
||||||
creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ],
|
creditLimit: [ { required: true, message: "请填写挂账额度", trigger: "blur" }, ],
|
||||||
|
staffId: [ { required: true, message: "请选择油站挂账负责人", trigger: "blur" }, ],
|
||||||
status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ],
|
status: [ { required: true, message: "请选择挂账单位状态", trigger: "blur" }, ],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getStaffList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getStaffList(){
|
||||||
|
queryStaffs().then(res => {
|
||||||
|
this.staffList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
changeCreditAmount(){
|
changeCreditAmount(){
|
||||||
if (this.title = "新增挂账单位") {
|
if (this.title = "新增挂账单位") {
|
||||||
this.form1.usedCreditLimit = this.form1.creditLimit
|
this.form1.usedCreditLimit = 0
|
||||||
this.form1.residueCreditLimit = 0
|
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||||
}
|
}
|
||||||
if (this.title = "修改挂账单位") {
|
if (this.title = "修改挂账单位") {
|
||||||
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<select id="selectLJStaffList" resultType="com.fuint.business.member.entity.LJStaff">
|
<select id="selectLJStaffList" resultType="com.fuint.business.member.entity.LJStaff">
|
||||||
<include refid="selectMtStaff"></include>
|
<include refid="selectMtStaff"></include>
|
||||||
<where>
|
<where>
|
||||||
store_id = #{staff.storeId}
|
store_id = #{staff.storeId} and if_delete = 0
|
||||||
<if test="staff.realName != null and staff.realName != ''">
|
<if test="staff.realName != null and staff.realName != ''">
|
||||||
and real_name like concat('%', #{staff.realName}, '%')
|
and real_name like concat('%', #{staff.realName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -73,6 +73,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("store_id",storeId);
|
queryWrapper.eq("store_id",storeId);
|
||||||
queryWrapper.eq("status","qy");
|
queryWrapper.eq("status","qy");
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
List list = baseMapper.selectList(queryWrapper);
|
List list = baseMapper.selectList(queryWrapper);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -87,6 +88,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
queryWrapper.eq("store_id",storeId);
|
queryWrapper.eq("store_id",storeId);
|
||||||
queryWrapper.eq("status","qy");
|
queryWrapper.eq("status","qy");
|
||||||
queryWrapper.eq("role_id","15");
|
queryWrapper.eq("role_id","15");
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
List list = baseMapper.selectList(queryWrapper);
|
List list = baseMapper.selectList(queryWrapper);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -98,7 +100,10 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LJStaff selectStaffById(int id) {
|
public LJStaff selectStaffById(int id) {
|
||||||
return baseMapper.selectById(id);
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("id",id);
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
|
return baseMapper.selectOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,6 +117,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("mobile",mobile);
|
queryWrapper.eq("mobile",mobile);
|
||||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
||||||
return staff;
|
return staff;
|
||||||
}
|
}
|
||||||
@ -311,6 +317,7 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("store_id",storeId);
|
queryWrapper.eq("store_id",storeId);
|
||||||
queryWrapper.eq("status","qy");
|
queryWrapper.eq("status","qy");
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,18 @@ public class CreditUnitController extends BaseController {
|
|||||||
return getSuccessResult(creditUnitService.selectCreditUnitOrderList(page,creditUnit));
|
return getSuccessResult(creditUnitService.selectCreditUnitOrderList(page,creditUnit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有挂账单位信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectStatistic")
|
||||||
|
private ResponseObject selectStatistic(CreditUnit creditUnit,
|
||||||
|
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
|
Page page =new Page(pageNo,pageSize);
|
||||||
|
return getSuccessResult(creditUnitService.selectTotalAndAmount(page,creditUnit));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有挂账单位信息
|
* 查询所有挂账单位信息
|
||||||
* @return
|
* @return
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.order.entity.CashierOrder;
|
import com.fuint.business.order.entity.CashierOrder;
|
||||||
import com.fuint.business.order.entity.HangBill;
|
import com.fuint.business.order.entity.HangBill;
|
||||||
|
import com.fuint.business.order.entity.OilOrder;
|
||||||
import com.fuint.business.order.service.HangBillService;
|
import com.fuint.business.order.service.HangBillService;
|
||||||
import com.fuint.business.order.vo.HangBillVo;
|
import com.fuint.business.order.vo.HangBillVo;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
@ -45,8 +46,8 @@ public class HangBillController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/hangBills")
|
@GetMapping("/hangBills")
|
||||||
public ResponseObject hangBills(){
|
public ResponseObject hangBills(HangBillVo hangBillVo){
|
||||||
return getSuccessResult(hangBillService.selectHangBills());
|
return getSuccessResult(hangBillService.selectHangBills(hangBillVo));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +36,10 @@ public class CreditUnit extends BaseEntity implements Serializable {
|
|||||||
* 店铺id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
|
/**
|
||||||
|
* 员工id
|
||||||
|
*/
|
||||||
|
private Integer staffId;
|
||||||
/**
|
/**
|
||||||
* 连锁店id
|
* 连锁店id
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ public class HangBill extends BaseEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
/**
|
/**
|
||||||
* 订单状态:0未归还,1已归还
|
* 订单状态:0未归还,1已归还,2部分归还
|
||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.order.entity.CreditUnit;
|
import com.fuint.business.order.entity.CreditUnit;
|
||||||
|
import com.fuint.business.order.vo.CreditUnitVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,5 +17,9 @@ public interface CreditUnitMapper extends BaseMapper<CreditUnit> {
|
|||||||
* @param creditUnit
|
* @param creditUnit
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<CreditUnit> selectCreditUnitList(Page page,@Param("creditUnit") CreditUnit creditUnit);
|
public IPage<CreditUnitVo> selectCreditUnitList(Page page, @Param("creditUnit") CreditUnit creditUnit);
|
||||||
|
|
||||||
|
Double selectAllCreditLimit(@Param("creditUnit") CreditUnit creditUnit);
|
||||||
|
Double selectAllUsedCreditLimit(@Param("creditUnit") CreditUnit creditUnit);
|
||||||
|
Double selectAllResidueCreditLimit(@Param("creditUnit") CreditUnit creditUnit);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.order.entity.HangBill;
|
import com.fuint.business.order.entity.HangBill;
|
||||||
|
import com.fuint.business.order.vo.Excel.HangBillExcel;
|
||||||
import com.fuint.business.order.vo.HangBillVo;
|
import com.fuint.business.order.vo.HangBillVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@ -29,10 +30,10 @@ public interface HangBillMapper extends BaseMapper<HangBill> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有挂账信息
|
* 查询所有挂账信息
|
||||||
* @param storeId
|
* @param hangBillVo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<HangBillVo> selectHangBills(@Param("storeId") int storeId);
|
public List<HangBillVo> selectHangBills(@Param("hangBill") HangBillVo hangBillVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询挂账信息
|
* 根据id查询挂账信息
|
||||||
@ -41,6 +42,8 @@ public interface HangBillMapper extends BaseMapper<HangBill> {
|
|||||||
*/
|
*/
|
||||||
public HangBillVo selectHangBillById(@Param("id") int id);
|
public HangBillVo selectHangBillById(@Param("id") int id);
|
||||||
|
|
||||||
|
List<HangBillExcel> selectHangBillListExport(@Param("hangBill") HangBillVo hangBill);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询当前店铺所有的订单总额
|
* 查询当前店铺所有的订单总额
|
||||||
* @return
|
* @return
|
||||||
|
@ -2,12 +2,87 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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.CreditUnitMapper">
|
<mapper namespace="com.fuint.business.order.mapper.CreditUnitMapper">
|
||||||
|
|
||||||
<select id="selectCreditUnitList" resultType="com.fuint.business.order.entity.CreditUnit">
|
<select id="selectCreditUnitList" resultType="com.fuint.business.order.vo.CreditUnitVo">
|
||||||
select * from credit_unit
|
select cu.*,ms.real_name staffName from credit_unit cu left join mt_staff ms on cu.staff_id = ms.id
|
||||||
|
<where>
|
||||||
|
<if test="creditUnit.storeId != null and creditUnit.storeId != ''">
|
||||||
|
and cu.store_id = #{creditUnit.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.staffId != null and creditUnit.staffId != ''">
|
||||||
|
and cu.staff_id = #{creditUnit.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.status != null and creditUnit.status != ''">
|
||||||
|
and cu.status = #{creditUnit.status}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.unitName != null and creditUnit.unitName != ''">
|
||||||
|
and cu.unit_name like concat('%', #{creditUnit.unitName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.personCredit != null and creditUnit.personCredit != ''">
|
||||||
|
and cu.person_credit like concat('%', #{creditUnit.personCredit}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.contactMobile != null and creditUnit.contactMobile != ''">
|
||||||
|
and cu.contact_mobile like concat('%', #{creditUnit.contactMobile}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectAllCreditLimit" resultType="java.lang.Double"
|
||||||
|
parameterType="com.fuint.business.order.entity.CreditUnit">
|
||||||
|
select sum(credit_limit) from credit_unit
|
||||||
<where>
|
<where>
|
||||||
<if test="creditUnit.storeId != null and creditUnit.storeId != ''">
|
<if test="creditUnit.storeId != null and creditUnit.storeId != ''">
|
||||||
and store_id = #{creditUnit.storeId}
|
and store_id = #{creditUnit.storeId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="creditUnit.staffId != null and creditUnit.staffId != ''">
|
||||||
|
and staff_id = #{creditUnit.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.status != null and creditUnit.status != ''">
|
||||||
|
and status = #{creditUnit.status}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.unitName != null and creditUnit.unitName != ''">
|
||||||
|
and unit_name like concat('%', #{creditUnit.unitName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.personCredit != null and creditUnit.personCredit != ''">
|
||||||
|
and person_credit like concat('%', #{creditUnit.personCredit}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.contactMobile != null and creditUnit.contactMobile != ''">
|
||||||
|
and contact_mobile like concat('%', #{creditUnit.contactMobile}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectAllUsedCreditLimit" resultType="java.lang.Double"
|
||||||
|
parameterType="com.fuint.business.order.entity.CreditUnit">
|
||||||
|
select sum(used_credit_limit) from credit_unit
|
||||||
|
<where>
|
||||||
|
<if test="creditUnit.storeId != null and creditUnit.storeId != ''">
|
||||||
|
and store_id = #{creditUnit.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.staffId != null and creditUnit.staffId != ''">
|
||||||
|
and staff_id = #{creditUnit.staffId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.status != null and creditUnit.status != ''">
|
||||||
|
and status = #{creditUnit.status}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.unitName != null and creditUnit.unitName != ''">
|
||||||
|
and unit_name like concat('%', #{creditUnit.unitName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.personCredit != null and creditUnit.personCredit != ''">
|
||||||
|
and person_credit like concat('%', #{creditUnit.personCredit}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.contactMobile != null and creditUnit.contactMobile != ''">
|
||||||
|
and contact_mobile like concat('%', #{creditUnit.contactMobile}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectAllResidueCreditLimit" resultType="java.lang.Double"
|
||||||
|
parameterType="com.fuint.business.order.entity.CreditUnit">
|
||||||
|
select sum(residue_credit_limit) from credit_unit
|
||||||
|
<where>
|
||||||
|
<if test="creditUnit.storeId != null and creditUnit.storeId != ''">
|
||||||
|
and store_id = #{creditUnit.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="creditUnit.staffId != null and creditUnit.staffId != ''">
|
||||||
|
and staff_id = #{creditUnit.staffId}
|
||||||
|
</if>
|
||||||
<if test="creditUnit.status != null and creditUnit.status != ''">
|
<if test="creditUnit.status != null and creditUnit.status != ''">
|
||||||
and status = #{creditUnit.status}
|
and status = #{creditUnit.status}
|
||||||
</if>
|
</if>
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by hb.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
<select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
||||||
<include refid="selectHangBill"></include>
|
<include refid="selectHangBill"></include>
|
||||||
@ -45,11 +45,14 @@
|
|||||||
hb.id = #{id}
|
hb.id = #{id}
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectHangBills" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">
|
<select id="selectHangBills" resultType="com.fuint.business.order.vo.HangBillVo">
|
||||||
select hb.*,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit from hang_bill hb
|
select hb.*,cu.unit_name,cu.person_credit,cu.contact_mobile,cu.credit_limit from hang_bill hb
|
||||||
left join credit_unit cu on hb.credit_unit_id = cu.id
|
left join credit_unit cu on hb.credit_unit_id = cu.id
|
||||||
<where>
|
<where>
|
||||||
hb.store_id = #{storeId} and hb.status!=1
|
hb.store_id = #{hangBill.storeId} and hb.status!=1
|
||||||
|
<if test="hangBill.creditUnitId != null and hangBill.creditUnitId != ''">
|
||||||
|
and hb.credit_unit_id = #{hangBill.creditUnitId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -95,6 +98,42 @@
|
|||||||
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
and date_format(hb.create_time,'%y%m%d') <= date_format(#{hangBill.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by hb.create_time desc
|
||||||
|
</select>
|
||||||
|
<select id="selectHangBillListExport" resultType="com.fuint.business.order.vo.Excel.HangBillExcel"
|
||||||
|
parameterType="com.fuint.business.order.vo.HangBillVo">
|
||||||
|
select hb.order_no,hb.return_type,hb.status,hb.amount,hb.repaid_amount,hb.outstand_amount,
|
||||||
|
ms.real_name,ms.mobile,
|
||||||
|
cu.unit_name,cu.person_credit,cu.contact_mobile from hang_bill hb
|
||||||
|
left join mt_staff ms on hb.staff_id = ms.id
|
||||||
|
left join credit_unit cu on hb.credit_unit_id = cu.id
|
||||||
|
<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>
|
||||||
|
order by hb.create_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.fuint.business.order.entity.CreditUnit;
|
import com.fuint.business.order.entity.CreditUnit;
|
||||||
|
import com.fuint.business.order.vo.CreditUnitVo;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 挂账单位信息 业务层
|
* 挂账单位信息 业务层
|
||||||
@ -19,7 +22,7 @@ public interface CreditUnitService extends IService<CreditUnit> {
|
|||||||
* @param creditUnit
|
* @param creditUnit
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<CreditUnit> selectCreditUnitList(Page page, CreditUnit creditUnit);
|
public IPage<CreditUnitVo> selectCreditUnitList(Page page, CreditUnit creditUnit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询挂账单位信息和挂账单位下的订单信息
|
* 根据条件分页查询挂账单位信息和挂账单位下的订单信息
|
||||||
@ -27,7 +30,15 @@ public interface CreditUnitService extends IService<CreditUnit> {
|
|||||||
* @param creditUnit
|
* @param creditUnit
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<CreditUnit> selectCreditUnitOrderList(Page page, CreditUnit creditUnit);
|
public IPage<CreditUnitVo> selectCreditUnitOrderList(Page page, CreditUnit creditUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件查询挂账单位信息
|
||||||
|
* @param page
|
||||||
|
* @param creditUnit
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Double> selectTotalAndAmount(Page page, CreditUnit creditUnit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有挂账单位信息
|
* 查询所有挂账单位信息
|
||||||
|
@ -34,7 +34,7 @@ public interface HangBillService extends IService<HangBill> {
|
|||||||
* 查询所有挂账记录信息
|
* 查询所有挂账记录信息
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<HangBillVo> selectHangBills();
|
public List<HangBillVo> selectHangBills(HangBillVo hangBillVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询挂账信息
|
* 根据id查询挂账信息
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.fuint.business.order.service.impl;
|
package com.fuint.business.order.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -9,6 +10,7 @@ import com.fuint.business.order.entity.CreditUnit;
|
|||||||
import com.fuint.business.order.mapper.CreditUnitMapper;
|
import com.fuint.business.order.mapper.CreditUnitMapper;
|
||||||
import com.fuint.business.order.service.CreditUnitService;
|
import com.fuint.business.order.service.CreditUnitService;
|
||||||
import com.fuint.business.order.service.HangBillService;
|
import com.fuint.business.order.service.HangBillService;
|
||||||
|
import com.fuint.business.order.vo.CreditUnitVo;
|
||||||
import com.fuint.business.order.vo.HangBillVo;
|
import com.fuint.business.order.vo.HangBillVo;
|
||||||
import com.fuint.business.storeInformation.entity.LJStore;
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
@ -18,7 +20,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditUnit> implements CreditUnitService {
|
public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditUnit> implements CreditUnitService {
|
||||||
@ -29,26 +34,60 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
|
|||||||
private HangBillService hangBillService;
|
private HangBillService hangBillService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CreditUnit> selectCreditUnitList(Page page, CreditUnit creditUnit) {
|
public IPage<CreditUnitVo> selectCreditUnitList(Page page, CreditUnit creditUnit) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
creditUnit.setStoreId(nowAccountInfo.getStoreId());
|
creditUnit.setStoreId(nowAccountInfo.getStoreId());
|
||||||
return baseMapper.selectCreditUnitList(page,creditUnit);
|
return baseMapper.selectCreditUnitList(page,creditUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<CreditUnit> selectCreditUnitOrderList(Page page, CreditUnit creditUnit) {
|
public IPage<CreditUnitVo> selectCreditUnitOrderList(Page page, CreditUnit creditUnit) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
creditUnit.setStoreId(nowAccountInfo.getStoreId());
|
creditUnit.setStoreId(nowAccountInfo.getStoreId());
|
||||||
IPage<CreditUnit> creditUnitIPage = baseMapper.selectCreditUnitList(page, creditUnit);
|
IPage<CreditUnitVo> creditUnitIPage = baseMapper.selectCreditUnitList(page, creditUnit);
|
||||||
for (CreditUnit record : creditUnitIPage.getRecords()) {
|
for (CreditUnitVo record : creditUnitIPage.getRecords()) {
|
||||||
HangBillVo hangBillVo = new HangBillVo();
|
HangBillVo hangBillVo = new HangBillVo();
|
||||||
hangBillVo.setCreditUnitId(record.getId());
|
hangBillVo.setCreditUnitId(record.getId());
|
||||||
|
hangBillVo.setParams(creditUnit.getParams());
|
||||||
List<HangBillVo> hangBillVos = hangBillService.selectHangBillsByCreditUnit(hangBillVo);
|
List<HangBillVo> hangBillVos = hangBillService.selectHangBillsByCreditUnit(hangBillVo);
|
||||||
|
record.setHangBillTotal(hangBillVos.size());
|
||||||
|
Double hangBillAmount = 0.0;
|
||||||
|
Integer returnTotal = 0;
|
||||||
|
Double returnAmount = 0.0;
|
||||||
|
Integer noReturnTotal = 0;
|
||||||
|
Double noReturnAmount = 0.0;
|
||||||
|
for (HangBillVo billVo : hangBillVos) {
|
||||||
|
hangBillAmount += billVo.getAmount();
|
||||||
|
if (billVo.getReturnType().equals("1")){
|
||||||
|
returnTotal += 1;
|
||||||
|
returnAmount += billVo.getRepaidAmount();
|
||||||
|
}else {
|
||||||
|
noReturnTotal += 1;
|
||||||
|
noReturnAmount += billVo.getOutstandAmount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
record.setHangBillAmount(hangBillAmount);
|
||||||
|
record.setReturnTotal(returnTotal);
|
||||||
|
record.setReturnAmount(returnAmount);
|
||||||
|
record.setNoReturnTotal(noReturnTotal);
|
||||||
|
record.setNoReturnAmount(noReturnAmount);
|
||||||
|
|
||||||
record.setHangBillVos(hangBillVos);
|
record.setHangBillVos(hangBillVos);
|
||||||
}
|
}
|
||||||
return creditUnitIPage;
|
return creditUnitIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Double> selectTotalAndAmount(Page page, CreditUnit creditUnit) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
creditUnit.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
Map<String, Double> resMap = new HashMap<>();
|
||||||
|
resMap.put("allCreditLimit",baseMapper.selectAllCreditLimit(creditUnit));
|
||||||
|
resMap.put("allUsedCreditLimit",baseMapper.selectAllUsedCreditLimit(creditUnit));
|
||||||
|
resMap.put("allResidueCreditLimit",baseMapper.selectAllResidueCreditLimit(creditUnit));
|
||||||
|
return resMap;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CreditUnit> selectCreditUnitList() {
|
public List<CreditUnit> selectCreditUnitList() {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
@ -81,6 +120,9 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
|
|||||||
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||||
creditUnit.setStoreId(store.getId());
|
creditUnit.setStoreId(store.getId());
|
||||||
creditUnit.setChainStoreId(store.getChainStoreId());
|
creditUnit.setChainStoreId(store.getChainStoreId());
|
||||||
|
if (creditUnit.getStaffId()==null){
|
||||||
|
creditUnit.setStaffId(nowAccountInfo.getId());
|
||||||
|
}
|
||||||
// 查询挂账单位是否存在
|
// 查询挂账单位是否存在
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("unit_name",creditUnit.getUnitName());
|
queryWrapper.eq("unit_name",creditUnit.getUnitName());
|
||||||
|
@ -22,6 +22,7 @@ import com.fuint.business.order.service.CreditUnitService;
|
|||||||
import com.fuint.business.order.service.HangBillService;
|
import com.fuint.business.order.service.HangBillService;
|
||||||
import com.fuint.business.order.service.ReturnRecordService;
|
import com.fuint.business.order.service.ReturnRecordService;
|
||||||
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
|
import com.fuint.business.order.vo.Excel.CashierOrderExcel;
|
||||||
|
import com.fuint.business.order.vo.Excel.HangBillExcel;
|
||||||
import com.fuint.business.order.vo.HangBillVo;
|
import com.fuint.business.order.vo.HangBillVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
@ -58,10 +59,11 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HangBillVo> selectHangBills() {
|
public List<HangBillVo> selectHangBills(HangBillVo hangBillVo) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
List<HangBillVo> hangBillVos = baseMapper.selectHangBills(storeId);
|
hangBillVo.setStoreId(storeId);
|
||||||
|
List<HangBillVo> hangBillVos = baseMapper.selectHangBills(hangBillVo);
|
||||||
return hangBillVos;
|
return hangBillVos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,16 +88,17 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
// 根据挂账单位id查询挂账单位信息
|
// 根据挂账单位id查询挂账单位信息
|
||||||
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBillVo.getCreditUnitId());
|
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBillVo.getCreditUnitId());
|
||||||
// 挂账单位限额的数据删减
|
// 挂账单位限额的数据删减
|
||||||
if (creditUnit.getCreditLimit()!=0){
|
|
||||||
Double creditLimit = creditUnit.getCreditLimit();
|
Double creditLimit = creditUnit.getCreditLimit();
|
||||||
|
Double residueCreditLimit = creditUnit.getResidueCreditLimit();
|
||||||
|
Double usedCreditLimit = creditUnit.getUsedCreditLimit();
|
||||||
// 判断修改之后的挂账单位限额金额是否小于0
|
// 判断修改之后的挂账单位限额金额是否小于0
|
||||||
if (creditLimit-hangBillVo.getAmount()>=0){
|
if (residueCreditLimit-hangBillVo.getAmount()>=0){
|
||||||
creditUnit.setCreditLimit(creditLimit-hangBillVo.getAmount());
|
creditUnit.setUsedCreditLimit(usedCreditLimit+hangBillVo.getAmount());
|
||||||
|
creditUnit.setResidueCreditLimit(creditLimit - usedCreditLimit - hangBillVo.getAmount());
|
||||||
creditUnitService.updateCreditUnit(creditUnit);
|
creditUnitService.updateCreditUnit(creditUnit);
|
||||||
}else {
|
}else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 创建挂账记录对象
|
// 创建挂账记录对象
|
||||||
HangBill hangBill = new HangBill();
|
HangBill hangBill = new HangBill();
|
||||||
@ -151,10 +154,10 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBill.getCreditUnitId());
|
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBill.getCreditUnitId());
|
||||||
// 挂账单位限额的数据添加
|
// 挂账单位限额的数据添加
|
||||||
Double creditLimit = creditUnit.getCreditLimit();
|
Double creditLimit = creditUnit.getCreditLimit();
|
||||||
if (creditLimit!=0) {
|
Double usedCreditLimit = creditUnit.getUsedCreditLimit();
|
||||||
creditUnit.setCreditLimit(creditLimit+amount);
|
creditUnit.setUsedCreditLimit(usedCreditLimit - amount);
|
||||||
|
creditUnit.setResidueCreditLimit(creditLimit - usedCreditLimit + amount);
|
||||||
creditUnitService.updateCreditUnit(creditUnit);
|
creditUnitService.updateCreditUnit(creditUnit);
|
||||||
}
|
|
||||||
int row = baseMapper.updateById(hangBill);
|
int row = baseMapper.updateById(hangBill);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
@ -296,7 +299,24 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
hangBill.setStoreId(storeId);
|
hangBill.setStoreId(storeId);
|
||||||
// List<CashierOrderExcel> cashierOrderExcels = baseMapper.selectCashierOrderListExport(hangBill);
|
List<HangBillExcel> hangBillExcels = baseMapper.selectHangBillListExport(hangBill);
|
||||||
|
for (HangBillExcel hangBillExcel : hangBillExcels) {
|
||||||
|
if (hangBillExcel.getStatus().equals("0")){
|
||||||
|
hangBillExcel.setStatus("未归还");
|
||||||
|
}
|
||||||
|
if (hangBillExcel.getStatus().equals("1")){
|
||||||
|
hangBillExcel.setStatus("已归还");
|
||||||
|
}
|
||||||
|
if (hangBillExcel.getStatus().equals("2")){
|
||||||
|
hangBillExcel.setStatus("部分归还");
|
||||||
|
}
|
||||||
|
if (hangBillExcel.getReturnType().equals("0")){
|
||||||
|
hangBillExcel.setReturnType("挂账");
|
||||||
|
}
|
||||||
|
if (hangBillExcel.getReturnType().equals("1")){
|
||||||
|
hangBillExcel.setReturnType("归还");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 设置文件名字
|
// 设置文件名字
|
||||||
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
String fileName = "订单"+System.currentTimeMillis() + ".xlsx";
|
||||||
@ -309,7 +329,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
// 写入文件数据
|
// 写入文件数据
|
||||||
// EasyExcel.write(response.getOutputStream(), CashierOrderExcel.class).sheet("download").doWrite(cashierOrderExcels);
|
EasyExcel.write(response.getOutputStream(), HangBillExcel.class).sheet("download").doWrite(hangBillExcels);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
@ -368,10 +388,10 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
|
|||||||
}
|
}
|
||||||
// 根据挂账单位id查询挂账单位信息
|
// 根据挂账单位id查询挂账单位信息
|
||||||
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBill.getCreditUnitId());
|
CreditUnit creditUnit = creditUnitService.selectCreditUnitListById(hangBill.getCreditUnitId());
|
||||||
if (creditUnit.getCreditLimit()!=0){
|
|
||||||
Double creditLimit = creditUnit.getCreditLimit();
|
Double creditLimit = creditUnit.getCreditLimit();
|
||||||
creditUnit.setCreditLimit(creditLimit+repaidAmount1);
|
Double usedCreditLimit = creditUnit.getUsedCreditLimit();
|
||||||
}
|
creditUnit.setUsedCreditLimit(usedCreditLimit+amount);
|
||||||
|
creditUnit.setResidueCreditLimit(creditLimit - usedCreditLimit - amount);
|
||||||
// 修改挂账单位余额信息
|
// 修改挂账单位余额信息
|
||||||
creditUnitService.updateCreditUnit(creditUnit);
|
creditUnitService.updateCreditUnit(creditUnit);
|
||||||
return hangBill;
|
return hangBill;
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.fuint.business.order.unit;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.excel.converters.Converter;
|
||||||
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
|
import com.alibaba.excel.metadata.CellData;
|
||||||
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
|
||||||
|
public class GenderConverter1 implements Converter<Integer> {
|
||||||
|
|
||||||
|
public static final String YSTATUS = "已归还";
|
||||||
|
public static final String NSTATUS = "未归还";
|
||||||
|
public static final String BFSTATUS = "部分归还";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class supportJavaTypeKey() {
|
||||||
|
return Integer.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellDataTypeEnum supportExcelTypeKey() {
|
||||||
|
return CellDataTypeEnum.STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
String stringValue = cellData.getStringValue();
|
||||||
|
if (YSTATUS.equals(stringValue)){
|
||||||
|
return 1;
|
||||||
|
}else if (BFSTATUS.equals(stringValue)){
|
||||||
|
return 2;
|
||||||
|
}else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.fuint.business.order.unit;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.excel.converters.Converter;
|
||||||
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
|
import com.alibaba.excel.metadata.CellData;
|
||||||
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
|
||||||
|
public class GenderConverter2 implements Converter<Integer> {
|
||||||
|
|
||||||
|
public static final String YRETURN = "归还";
|
||||||
|
public static final String NRETURN = "挂账";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class supportJavaTypeKey() {
|
||||||
|
return Integer.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellDataTypeEnum supportExcelTypeKey() {
|
||||||
|
return CellDataTypeEnum.STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
String stringValue = cellData.getStringValue();
|
||||||
|
if (YRETURN.equals(stringValue)){
|
||||||
|
return 1;
|
||||||
|
}else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.fuint.business.order.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fuint.business.order.entity.CreditUnit;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CreditUnitVo extends CreditUnit {
|
||||||
|
// 员工名称
|
||||||
|
private String staffName;
|
||||||
|
// 挂账订单总数
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer hangBillTotal;
|
||||||
|
// 挂账总金额
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double hangBillAmount;
|
||||||
|
// 归还笔数
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer returnTotal;
|
||||||
|
// 归还总金额
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double returnAmount;
|
||||||
|
// 未归还笔数
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer noReturnTotal;
|
||||||
|
// 未归还总额
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Double noReturnAmount;
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package com.fuint.business.order.vo.Excel;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.fuint.business.order.unit.GenderConverter1;
|
||||||
|
import com.fuint.business.order.unit.GenderConverter2;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HangBillExcel {
|
||||||
|
@ExcelProperty("员工姓名")
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
@ExcelProperty("员工手机号")
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ExcelProperty("订单号")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
@ExcelProperty("挂账单位")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ExcelProperty("挂账人")
|
||||||
|
private String personCredit;
|
||||||
|
|
||||||
|
@ExcelProperty("挂账人联系电话")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String contactMobile;
|
||||||
|
/**
|
||||||
|
* 订单状态:0未归还,1已归还,2部分归还
|
||||||
|
*/
|
||||||
|
// @ExcelProperty(value = "订单状态",converter = GenderConverter1.class)
|
||||||
|
@ExcelProperty(value = "订单状态")
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 归还状态:0挂账,1归还
|
||||||
|
*/
|
||||||
|
// @ExcelProperty(value = "归还状态",converter = GenderConverter2.class)
|
||||||
|
@ExcelProperty(value = "归还状态")
|
||||||
|
private String returnType;
|
||||||
|
|
||||||
|
@ExcelProperty("挂账金额")
|
||||||
|
private Double amount;
|
||||||
|
|
||||||
|
@ExcelProperty("已还金额")
|
||||||
|
private Double repaidAmount;
|
||||||
|
|
||||||
|
@ExcelProperty("未还金额")
|
||||||
|
private Double outstandAmount;
|
||||||
|
|
||||||
|
@ExcelProperty("单据备注")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String remark;
|
||||||
|
}
|
@ -147,4 +147,18 @@ public interface LJUserService extends IService<LJUser> {
|
|||||||
* 等级清算规则
|
* 等级清算规则
|
||||||
*/
|
*/
|
||||||
public void clearRule();
|
public void clearRule();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据openid查询用户信息
|
||||||
|
* @param openId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LJUser selectUserByOpenId(String openId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据userId查询用户信息
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LJUser selectUserByUserId(String userId);
|
||||||
}
|
}
|
||||||
|
@ -517,4 +517,18 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LJUser selectUserByOpenId(String openId) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("open_id",openId);
|
||||||
|
return baseMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LJUser selectUserByUserId(String userId) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("user_id",userId);
|
||||||
|
return baseMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.fuint.business.userManager.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fuint.business.userManager.util.GenderConverter;
|
import com.fuint.business.userManager.util.GenderConverter;
|
||||||
import com.fuint.framework.entity.BaseEntity;
|
import com.fuint.framework.entity.BaseEntity;
|
||||||
@ -21,6 +22,7 @@ public class LJUserVo extends BaseEntity {
|
|||||||
|
|
||||||
// 会员号
|
// 会员号
|
||||||
@ExcelProperty(value = "会员号")
|
@ExcelProperty(value = "会员号")
|
||||||
|
@ColumnWidth(20)
|
||||||
private String userNo;
|
private String userNo;
|
||||||
|
|
||||||
// 实体卡号
|
// 实体卡号
|
||||||
@ -42,10 +44,12 @@ public class LJUserVo extends BaseEntity {
|
|||||||
|
|
||||||
// 手机号码
|
// 手机号码
|
||||||
@ExcelProperty(value = "手机号码(必填)")
|
@ExcelProperty(value = "手机号码(必填)")
|
||||||
|
@ColumnWidth(20)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
// 证件号码
|
// 证件号码
|
||||||
@ExcelProperty(value = "证件号码")
|
@ExcelProperty(value = "证件号码")
|
||||||
|
@ColumnWidth(20)
|
||||||
private String idcard;
|
private String idcard;
|
||||||
|
|
||||||
// 性别 1男,0女
|
// 性别 1男,0女
|
||||||
@ -60,6 +64,7 @@ public class LJUserVo extends BaseEntity {
|
|||||||
|
|
||||||
// 地址
|
// 地址
|
||||||
@ExcelProperty(value = "地址")
|
@ExcelProperty(value = "地址")
|
||||||
|
@ColumnWidth(30)
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
// 状态,启用、禁用
|
// 状态,启用、禁用
|
||||||
@ -67,6 +72,7 @@ public class LJUserVo extends BaseEntity {
|
|||||||
|
|
||||||
// 备注信息
|
// 备注信息
|
||||||
@ExcelProperty(value = "备注信息")
|
@ExcelProperty(value = "备注信息")
|
||||||
|
@ColumnWidth(20)
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
// 公众号
|
// 公众号
|
||||||
@ -93,7 +99,7 @@ public class LJUserVo extends BaseEntity {
|
|||||||
private Integer consumeNum;
|
private Integer consumeNum;
|
||||||
|
|
||||||
// 副卡信息
|
// 副卡信息
|
||||||
@ExcelProperty(value = "副卡信息")
|
// @ExcelProperty(value = "副卡信息")
|
||||||
private String secondCard;
|
private String secondCard;
|
||||||
|
|
||||||
// 固定等级
|
// 固定等级
|
||||||
|
@ -64,6 +64,9 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/business/indexBanner/list/**","anon"); // 获取员工信息
|
filterMap.put("/business/indexBanner/list/**","anon"); // 获取员工信息
|
||||||
filterMap.put("/business/storeInformation/store/queryStores","anon"); // 切换站点
|
filterMap.put("/business/storeInformation/store/queryStores","anon"); // 切换站点
|
||||||
filterMap.put("/business/handoverRecord/downloadFile","anon"); // 切换站点
|
filterMap.put("/business/handoverRecord/downloadFile","anon"); // 切换站点
|
||||||
|
filterMap.put("/business/petrolStationManagement/oilGun/queryGunList/**","anon"); // 获取油枪列表信息
|
||||||
|
filterMap.put("/business/petrolStationManagement/oilTank/**","anon"); // 获取油罐信息
|
||||||
|
filterMap.put("/business/oilOrder/addOilOrder","anon"); // 添加油品订单信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,6 +191,11 @@ public class ClientSignController extends BaseController {
|
|||||||
if (ObjectUtil.isEmpty(loginInfo) && ObjectUtil.isEmpty(loginInfo.get("openid")) ) {
|
if (ObjectUtil.isEmpty(loginInfo) && ObjectUtil.isEmpty(loginInfo.get("openid")) ) {
|
||||||
return getSuccessResult(true);
|
return getSuccessResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Boolean) param.get("isRefuel") == true){
|
||||||
|
return getSuccessResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);
|
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);
|
||||||
|
|
||||||
|
@ -17,6 +17,15 @@ export function creditUnits(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询挂账信息列表
|
||||||
|
export function creditUnitsStatistic(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/creditUnit/selectStatistic',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 新增挂账记录
|
// 新增挂账记录
|
||||||
export function addCreditUnit(data) {
|
export function addCreditUnit(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -18,10 +18,11 @@ export function hangBillInfo(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询所有挂账信息列表
|
// 查询所有挂账信息列表
|
||||||
export function hangBills() {
|
export function hangBills(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/business/hangBill/hangBills',
|
url: '/business/hangBill/hangBills',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,3 +51,13 @@ export function exportExcelAppletApi(data) {
|
|||||||
data: data // 通过 data 参数传递需要的数据
|
data: data // 通过 data 参数传递需要的数据
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出挂账订单
|
||||||
|
export function exportExcelHangBillApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/hangBill/exportExcel',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob', // 表明响应类型为二进制流
|
||||||
|
data: data // 通过 data 参数传递需要的数据
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -5,78 +5,135 @@
|
|||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>挂账</span>
|
<span>挂账</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
|
||||||
<el-form-item label="归还状态" prop="returnType">
|
<el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||||
<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-form-item label="单位名称" prop="unitName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.unitName"
|
v-model="queryParams2.unitName"
|
||||||
placeholder="请输入挂账单位名称"
|
placeholder="请输入单位名称"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="挂账人" prop="personCredit">
|
<el-form-item label="挂账人" prop="personCredit">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.personCredit"
|
v-model="queryParams2.personCredit"
|
||||||
placeholder="请输入挂账人名称"
|
placeholder="请输入挂账人名称"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="contactMobile">
|
<el-form-item label="联系电话" prop="contactMobile">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.contactMobile"
|
v-model="queryParams2.contactMobile"
|
||||||
placeholder="请输入挂账人联系电话"
|
placeholder="请输入挂账人联系电话"
|
||||||
clearable
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作人手机号" prop="mobile">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="queryParams.mobile"
|
v-model="queryParams2.status"
|
||||||
placeholder="请输入操作人手机号"
|
placeholder="全部"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
style="width: 240px"
|
||||||
/>
|
>
|
||||||
|
<el-option label="启用" value="qy"/>
|
||||||
|
<el-option label="禁用" value="jy"/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
style="width: 240px"
|
style="width: 400px"
|
||||||
size="medium"
|
size="medium"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="daterange"
|
type="datetimerange"
|
||||||
range-separator="-"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
<!-- <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>-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 统计-->
|
<!-- 统计-->
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
@ -84,34 +141,53 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="box-gang">
|
<div class="box-gang">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="size-hui">挂账笔数</div>
|
<div class="size-hui">挂账单位总数</div>
|
||||||
<div class="size-bole">{{ total }}</div>
|
<div class="size-bole">{{ total3 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="size-hui">挂账总额</div>
|
<div class="size-hui">预设挂账总额</div>
|
||||||
<div class="size-bole">{{ allAmount }}</div>
|
<div class="size-bole">{{ allCreditLimit || 0 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="size-hui">归还笔数</div>
|
<div class="size-hui">已使用挂账总额</div>
|
||||||
<div class="size-bole">{{ returnTotal }}</div>
|
<div class="size-bole">{{ allUsedCreditLimit || 0 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="size-hui">归还总额</div>
|
<div class="size-hui">剩余可挂账总额</div>
|
||||||
<div class="size-bole">{{ returnAllAmount }}</div>
|
<div class="size-bole">{{ allResidueCreditLimit || 0 }}</div>
|
||||||
</div>
|
|
||||||
<div class="box">
|
|
||||||
<div class="size-hui">未还金额</div>
|
|
||||||
<div class="size-bole">{{ noReturnAllAmount }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="box-gang">-->
|
||||||
|
<!-- <div class="box">-->
|
||||||
|
<!-- <div class="size-hui">挂账笔数</div>-->
|
||||||
|
<!-- <div class="size-bole">{{ total3 }}</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="box">-->
|
||||||
|
<!-- <div class="size-hui">挂账总额</div>-->
|
||||||
|
<!-- <div class="size-bole">{{ allAmount }}</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="box">-->
|
||||||
|
<!-- <div class="size-hui">归还笔数</div>-->
|
||||||
|
<!-- <div class="size-bole">{{ returnTotal }}</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="box">-->
|
||||||
|
<!-- <div class="size-hui">归还总额</div>-->
|
||||||
|
<!-- <div class="size-bole">{{ returnAllAmount }}</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <div class="box">-->
|
||||||
|
<!-- <div class="size-hui">未还金额</div>-->
|
||||||
|
<!-- <div class="size-bole">{{ noReturnAllAmount }}</div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 挂账列表-->
|
<!-- 挂账列表-->
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div class="wgang">
|
<div class="wgang">
|
||||||
<div>列表</div>
|
<div>列表</div>
|
||||||
<div style="display: flex ">
|
<div style="display: flex ">
|
||||||
<el-button type="primary" size="mini" @click="open1 = true">新增挂账单位</el-button>
|
<el-button type="primary" size="mini" @click="addUnit">新增挂账单位</el-button>
|
||||||
<el-button type="success" size="mini" @click="batchReturn">批量挂账归还</el-button>
|
<!-- <el-button type="success" size="mini" @click="batchReturn">批量挂账归还</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
@ -164,13 +240,24 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位名称" prop="unitName" align="center" width="120"/>
|
<el-table-column label="单位名称" prop="unitName" align="center"/>
|
||||||
<el-table-column label="挂账人" prop="personCredit" align="center" width="160"/>
|
<el-table-column label="挂账人" prop="personCredit" align="center"/>
|
||||||
<el-table-column label="联系电话" prop="contactMobile" align="center" width="120"/>
|
<el-table-column label="联系电话" prop="contactMobile" align="center" width="110"/>
|
||||||
<el-table-column label="预设挂账额度" prop="creditLimit" align="center" width="160"/>
|
<el-table-column label="预设挂账额度" prop="creditLimit" align="center" width="100"/>
|
||||||
<el-table-column label="已使用挂账额度" prop="usedCreditLimit" align="center" width="160"/>
|
<el-table-column label="已使用挂账额度" prop="usedCreditLimit" align="center" width="115"/>
|
||||||
<el-table-column label="剩余可挂账额度" prop="residueCreditLimit" align="center" width="160"/>
|
<el-table-column label="剩余可挂账额度" prop="residueCreditLimit" align="center" width="115"/>
|
||||||
<el-table-column label="备注" prop="remark" align="center" width="120"/>
|
<el-table-column label="操作人" prop="staffName" align="center"/>
|
||||||
|
<el-table-column label="挂账订单总数" prop="hangBillTotal" align="center" width="110"/>
|
||||||
|
<el-table-column label="挂账总金额" prop="hangBillAmount" align="center"/>
|
||||||
|
<el-table-column label="归还笔数" prop="returnTotal" align="center"/>
|
||||||
|
<el-table-column label="归还总金额" prop="returnAmount" align="center"/>
|
||||||
|
<el-table-column label="未归还笔数" prop="noReturnTotal" align="center"/>
|
||||||
|
<el-table-column label="未归还总额" prop="noReturnAmount" align="center"/>
|
||||||
|
<el-table-column label="备注" prop="remark" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.remark || "--"}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.status=='qy'">启用</el-tag>
|
<el-tag v-if="scope.row.status=='qy'">启用</el-tag>
|
||||||
@ -178,12 +265,12 @@
|
|||||||
<!-- <dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>-->
|
<!-- <dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" width="160" prop="createTime">
|
<el-table-column label="创建时间" align="center" width="150" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="190" fixed='right'>
|
<el-table-column label="操作" align="center" width="160" fixed='right'>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -195,8 +282,8 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="batchReturn(scope.row)"
|
||||||
>删除</el-button>
|
>归还</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -460,7 +547,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="负责人" prop="personCredit">
|
<el-form-item label="挂账单位负责人" prop="personCredit">
|
||||||
<el-input v-model="form1.personCredit" show-word-limit placeholder="请输入挂账单位负责人姓名" maxlength="10" />
|
<el-input v-model="form1.personCredit" show-word-limit placeholder="请输入挂账单位负责人姓名" maxlength="10" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -475,7 +562,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="预设挂账额度" prop="creditLimit">
|
<el-form-item label="预设挂账额度" prop="creditLimit">
|
||||||
<el-input v-model="form1.creditLimit" placeholder="请输入预设挂账额度" maxlength="10">
|
<el-input v-model="form1.creditLimit" @input="changeCreditAmount" placeholder="请输入预设挂账额度" maxlength="10">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey">
|
<span style="font-size: 12px;color: grey">
|
||||||
@ -490,9 +577,6 @@
|
|||||||
<el-input v-model="form1.usedCreditLimit" disabled placeholder="0" maxlength="10">
|
<el-input v-model="form1.usedCreditLimit" disabled placeholder="0" maxlength="10">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey">
|
|
||||||
额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -502,9 +586,20 @@
|
|||||||
<el-input v-model="form1.residueCreditLimit" disabled placeholder="0" maxlength="10">
|
<el-input v-model="form1.residueCreditLimit" disabled placeholder="0" maxlength="10">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey">
|
</el-form-item>
|
||||||
额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
</el-col>
|
||||||
</span>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="挂账负责人" prop="staffId">
|
||||||
|
<el-select v-model="form1.staffId" filterable placeholder="请选择油站挂账负责人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in staffList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.realName"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -692,16 +787,16 @@
|
|||||||
|
|
||||||
<!-- 批量挂账归还-->
|
<!-- 批量挂账归还-->
|
||||||
<el-dialog title="批量挂账归还" :visible.sync="open3" append-to-body>
|
<el-dialog title="批量挂账归还" :visible.sync="open3" append-to-body>
|
||||||
<el-form ref="form3" :model="form3">
|
<!-- <el-form ref="form3" :model="form3">-->
|
||||||
<el-form-item>
|
<!-- <el-form-item>-->
|
||||||
<el-input placeholder="请输入挂账单位、挂账人、挂账人手机号检索"
|
<!-- <el-input placeholder="请输入挂账单位、挂账人、挂账人手机号检索"-->
|
||||||
v-model="unitName"
|
<!-- v-model="unitName"-->
|
||||||
@keyup.enter.native="getRepayList"
|
<!-- @keyup.enter.native="getRepayList"-->
|
||||||
clearable class="input-with-select">
|
<!-- clearable class="input-with-select">-->
|
||||||
<el-button slot="append" icon="el-icon-search" @click="getRepayList">查询</el-button>
|
<!-- <el-button slot="append" icon="el-icon-search" @click="getRepayList">查询</el-button>-->
|
||||||
</el-input>
|
<!-- </el-input>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-form>
|
<!-- </el-form>-->
|
||||||
<div>
|
<div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
@ -738,8 +833,8 @@
|
|||||||
layout="prev, pager, next"
|
layout="prev, pager, next"
|
||||||
:total="total1"
|
:total="total1"
|
||||||
:page.sync="queryParam.page"
|
:page.sync="queryParam.page"
|
||||||
:limit.sync="queryParam.pageSize"
|
:limit.sync="queryParam.pageSize">
|
||||||
@current-change="getLists">
|
<!-- @current-change="getLists">-->
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;height: 36px">
|
<div style="display: flex;height: 36px">
|
||||||
@ -807,20 +902,28 @@ import {
|
|||||||
import {
|
import {
|
||||||
addCreditUnit,
|
addCreditUnit,
|
||||||
creditUnitInfo,
|
creditUnitInfo,
|
||||||
creditUnits,
|
creditUnits, creditUnitsStatistic,
|
||||||
deleteCreditUnit,
|
deleteCreditUnit,
|
||||||
editCreditUnit,
|
editCreditUnit,
|
||||||
listCreditUnit
|
listCreditUnit
|
||||||
} from "@/api/cashier/creditunit";
|
} from "@/api/cashier/creditunit";
|
||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/cashier/returnrecord";
|
import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/cashier/returnrecord";
|
||||||
|
import {queryStaffs} from "@/api/staff/staff";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "credit",
|
name: "credit",
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
staffList:[],
|
||||||
// 归还账单总数
|
// 归还账单总数
|
||||||
returnTotal:0,
|
returnTotal:0,
|
||||||
|
// 预设挂账总额
|
||||||
|
allCreditLimit:0,
|
||||||
|
// 已使用挂账总额
|
||||||
|
allUsedCreditLimit:0,
|
||||||
|
// 剩余可挂账总额
|
||||||
|
allResidueCreditLimit:0,
|
||||||
// 挂账总额
|
// 挂账总额
|
||||||
allAmount:0,
|
allAmount:0,
|
||||||
// 归还总额
|
// 归还总额
|
||||||
@ -860,7 +963,9 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
unitName:"",
|
unitName:"",
|
||||||
personCredit:"",
|
personCredit:"",
|
||||||
contactMobile:"",
|
contactMobile:"",
|
||||||
creditLimit:0,
|
creditLimit:"",
|
||||||
|
usedCreditLimit:0,
|
||||||
|
residueCreditLimit:0,
|
||||||
remark:'',
|
remark:'',
|
||||||
status:'qy',
|
status:'qy',
|
||||||
},
|
},
|
||||||
@ -870,6 +975,14 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
// 挂账信息
|
// 挂账信息
|
||||||
record:{},
|
record:{},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
queryParams2:{
|
||||||
|
page:1,
|
||||||
|
pageSize: 10,
|
||||||
|
unitName:"",
|
||||||
|
personCredit:"",
|
||||||
|
contactMobile:"",
|
||||||
|
status:"",
|
||||||
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@ -895,6 +1008,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
total: 0,
|
total: 0,
|
||||||
total1: 0,
|
total1: 0,
|
||||||
total2: 0,
|
total2: 0,
|
||||||
|
total3: 0,
|
||||||
// 是否开启提示框
|
// 是否开启提示框
|
||||||
open:false,
|
open:false,
|
||||||
open1:false,
|
open1:false,
|
||||||
@ -929,8 +1043,9 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
// this.getList();
|
// this.getList();
|
||||||
// this.getUnitList();
|
// this.getUnitList();
|
||||||
this.getPayList();
|
this.getPayList();
|
||||||
this.getLists();
|
// this.getLists();
|
||||||
this.getCreditUnits();
|
this.getCreditUnits();
|
||||||
|
this.getStaffList();
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
// 注册一个局部的自定义指令 v-focus
|
// 注册一个局部的自定义指令 v-focus
|
||||||
@ -946,6 +1061,36 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getStaffList(){
|
||||||
|
queryStaffs().then(res => {
|
||||||
|
this.staffList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索按钮操作
|
||||||
|
handleQuery1() {
|
||||||
|
this.queryParams.page = 1;
|
||||||
|
this.getCreditUnits();
|
||||||
|
},
|
||||||
|
// 重置按钮操作
|
||||||
|
resetQuery1() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.dateRange = []
|
||||||
|
this.handleQuery1();
|
||||||
|
},
|
||||||
|
changeCreditAmount(){
|
||||||
|
if (this.title = "新增挂账单位") {
|
||||||
|
this.form1.usedCreditLimit = 0
|
||||||
|
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||||
|
}
|
||||||
|
if (this.title = "修改挂账单位") {
|
||||||
|
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addUnit(){
|
||||||
|
this.form1 = {}
|
||||||
|
this.title = "新增挂账单位"
|
||||||
|
this.open1 = true
|
||||||
|
},
|
||||||
handleUpdate(data){
|
handleUpdate(data){
|
||||||
creditUnitInfo(data.id).then(res => {
|
creditUnitInfo(data.id).then(res => {
|
||||||
this.form1 = res.data
|
this.form1 = res.data
|
||||||
@ -966,13 +1111,24 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
},
|
},
|
||||||
getCreditUnits(val){
|
getCreditUnits(val){
|
||||||
if (val!=undefined){
|
if (val!=undefined){
|
||||||
this.queryParams.page = val
|
this.queryParams2.page = val
|
||||||
}
|
}
|
||||||
creditUnits().then(res => {
|
creditUnits(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||||
this.creditUnitList = res.data.records
|
this.creditUnitList = res.data.records
|
||||||
this.total = res.data.total;
|
this.total3 = res.data.total;
|
||||||
})
|
|
||||||
|
|
||||||
|
})
|
||||||
|
this.getUnitStatistic(val)
|
||||||
|
},
|
||||||
|
getUnitStatistic(val){
|
||||||
|
if (val!=undefined){
|
||||||
|
this.queryParams2.page = val
|
||||||
|
}
|
||||||
|
creditUnitsStatistic(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||||
|
this.allCreditLimit = res.data.allCreditLimit
|
||||||
|
this.allUsedCreditLimit = res.data.allUsedCreditLimit
|
||||||
|
this.allResidueCreditLimit = res.data.allResidueCreditLimit
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 获取挂账统计信息
|
// 获取挂账统计信息
|
||||||
getStatistic(){
|
getStatistic(){
|
||||||
@ -1048,11 +1204,11 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
this.form4.payType = "WECHAT"
|
this.form4.payType = "WECHAT"
|
||||||
this.open4 = true;
|
this.open4 = true;
|
||||||
},
|
},
|
||||||
batchReturn(){
|
batchReturn(data){
|
||||||
this.open3 = true
|
this.open3 = true
|
||||||
this.repayList = [];
|
this.repayList = [];
|
||||||
this.unitName = ""
|
this.unitName = ""
|
||||||
this.getLists();
|
this.getLists(data.id);
|
||||||
},
|
},
|
||||||
getRepayList(){
|
getRepayList(){
|
||||||
let result = [];
|
let result = [];
|
||||||
@ -1077,8 +1233,8 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
})
|
})
|
||||||
this.repayList = result
|
this.repayList = result
|
||||||
},
|
},
|
||||||
getLists(){
|
getLists(id){
|
||||||
hangBills().then(response => {
|
hangBills({creditUnitId:id}).then(response => {
|
||||||
this.list = response.data;
|
this.list = response.data;
|
||||||
this.repayList = response.data;
|
this.repayList = response.data;
|
||||||
for (let i = 0; i<response.data.length;i++){
|
for (let i = 0; i<response.data.length;i++){
|
||||||
@ -1150,8 +1306,9 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
|
|
||||||
this.open3 = false;
|
this.open3 = false;
|
||||||
this.open4 = false;
|
this.open4 = false;
|
||||||
this.getLists();
|
// this.getLists();
|
||||||
this.getList();
|
// this.getList();
|
||||||
|
this.getCreditUnits();
|
||||||
}else {
|
}else {
|
||||||
// 单个归还
|
// 单个归还
|
||||||
_this.form2.repaidAmount = _this.payAmount;
|
_this.form2.repaidAmount = _this.payAmount;
|
||||||
@ -1165,7 +1322,8 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c
|
|||||||
_this.queryPayStatus();
|
_this.queryPayStatus();
|
||||||
|
|
||||||
this.open2 = false;
|
this.open2 = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
|
this.getCreditUnits();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询支付状态
|
// 查询支付状态
|
||||||
|
@ -998,7 +998,7 @@
|
|||||||
{{item.unitName}}({{item.personCredit}} {{item.contactMobile}})
|
{{item.unitName}}({{item.personCredit}} {{item.contactMobile}})
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-button slot="append" @click="open1 = true">新增挂账单位</el-button>
|
<!-- <el-button slot="append" @click="open1 = true">新增挂账单位</el-button>-->
|
||||||
</el-autocomplete>
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -1006,11 +1006,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="可用额度" prop="creditLimit">
|
<el-form-item label="可用额度" prop="creditLimit">
|
||||||
<el-input v-model="form1.creditLimit" placeholder="请先选择挂账单位" disabled>
|
<el-input v-model="form1.residueCreditLimit" placeholder="请先选择挂账单位" disabled>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey;">
|
<span style="font-size: 12px;color: grey;">
|
||||||
可用额度为挂账人的最大可用额度,如挂账金额大于可用额度,将无法进行挂账,0为不限额
|
可用额度为挂账人的最大可用额度,如挂账金额大于可用额度,将无法进行挂账
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -1065,7 +1065,7 @@
|
|||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span style="font-size: 12px;color: grey;">
|
<span style="font-size: 12px;color: grey;">
|
||||||
0为不限额,额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
额度为当前单位最大可挂账金额,如已挂账金额归还,额度将也同步返还
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -1109,6 +1109,7 @@
|
|||||||
<div v-else-if="payType == 'WECHAT'">微信</div>
|
<div v-else-if="payType == 'WECHAT'">微信</div>
|
||||||
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
<div v-else-if="payType == 'ALIPAY'">支付宝</div>
|
||||||
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
<div v-else-if="payType == 'UNIONPAY'">银联二维码</div>
|
||||||
|
<div v-else-if="payType == 'credit'">挂账</div>
|
||||||
<div v-else>小程序码</div>
|
<div v-else>小程序码</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
@ -1125,7 +1126,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<div>实付款</div>
|
<div>实付款</div>
|
||||||
<div>¥{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
|
<div v-if="payType == 'credit'">¥0.00</div>
|
||||||
|
<div v-else>¥{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="seekZero>0">
|
<div class="input-box" v-if="seekZero>0">
|
||||||
<div>找零</div>
|
<div>找零</div>
|
||||||
@ -1334,7 +1336,9 @@
|
|||||||
goods:"",
|
goods:"",
|
||||||
select:"元",
|
select:"元",
|
||||||
form:{ amount : 0,exist:false },
|
form:{ amount : 0,exist:false },
|
||||||
form1:{},
|
form1:{
|
||||||
|
amount:"",
|
||||||
|
},
|
||||||
form2:{
|
form2:{
|
||||||
unitName:"",
|
unitName:"",
|
||||||
personCredit:"",
|
personCredit:"",
|
||||||
@ -2142,6 +2146,10 @@
|
|||||||
},
|
},
|
||||||
// 挂账
|
// 挂账
|
||||||
addCredits(type){
|
addCredits(type){
|
||||||
|
if (this.oilAmount==0){
|
||||||
|
this.$message.error("请先选择挂账订单")
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.typeIdex = type
|
this.typeIdex = type
|
||||||
this.map.payType = "credit"
|
this.map.payType = "credit"
|
||||||
this.payType = "credit"
|
this.payType = "credit"
|
||||||
@ -2178,12 +2186,14 @@
|
|||||||
addHangbill(){
|
addHangbill(){
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
addHangBill(this.form1).then( response => {
|
addHangBill(this.form1).then( async response => {
|
||||||
if (response.data==0){
|
if (response.data==0){
|
||||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||||
}else {
|
}else {
|
||||||
this.$modal.msgSuccess("挂账记录添加成功");
|
this.$modal.msgSuccess("挂账记录添加成功");
|
||||||
this.dialogVisibleCredit = false;
|
this.dialogVisibleCredit = false;
|
||||||
|
this.form1.unitName = ""
|
||||||
|
this.printLocally()
|
||||||
this.resetMember();
|
this.resetMember();
|
||||||
this.resetting();
|
this.resetting();
|
||||||
this.empty();
|
this.empty();
|
||||||
@ -2198,6 +2208,7 @@
|
|||||||
changeUnit(val){
|
changeUnit(val){
|
||||||
this.form1.creditUnitId = val.id;
|
this.form1.creditUnitId = val.id;
|
||||||
this.form1.creditLimit = val.creditLimit
|
this.form1.creditLimit = val.creditLimit
|
||||||
|
this.form1.residueCreditLimit = val.residueCreditLimit
|
||||||
return val.id
|
return val.id
|
||||||
},
|
},
|
||||||
querySearch1(queryString, cb) {
|
querySearch1(queryString, cb) {
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
<div>挂账订单列表</div>
|
<div>挂账订单列表</div>
|
||||||
<div style="display: flex ">
|
<div style="display: flex ">
|
||||||
|
|
||||||
<el-button type="primary" size="mini" icon="el-icon-plus">导出订单</el-button>
|
<el-button type="primary" size="mini" icon="el-icon-plus" @click = "exportExcelCashier()">导出订单</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
@ -292,6 +292,7 @@ import {
|
|||||||
} from "@/api/cashier/hangbill";
|
} from "@/api/cashier/hangbill";
|
||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {listReturnRecord} from "@/api/cashier/returnrecord";
|
import {listReturnRecord} from "@/api/cashier/returnrecord";
|
||||||
|
import {exportExcelCashierApi, exportExcelHangBillApi} from "@/api/order/exportExcel";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "order_Cashier",
|
name: "order_Cashier",
|
||||||
@ -338,6 +339,14 @@ import {listReturnRecord} from "@/api/cashier/returnrecord";
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
exportExcelCashier() {
|
||||||
|
// this.dateRange.push(this.beginTime)
|
||||||
|
// this.dateRange.push(this.endTime)
|
||||||
|
exportExcelHangBillApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||||
|
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||||
|
this.$download.saveAs(blob,'挂账订单统计.xLsx')
|
||||||
|
})
|
||||||
|
},
|
||||||
// 归还记录详情弹框
|
// 归还记录详情弹框
|
||||||
returnRecord(id){
|
returnRecord(id){
|
||||||
this.record = {}
|
this.record = {}
|
||||||
|
@ -306,9 +306,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showLoading({
|
// uni.showLoading({
|
||||||
title: JSON.stringify(err) + 222
|
// title: JSON.stringify(err) + 222
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取当前位置
|
// 获取当前位置
|
||||||
@ -567,7 +567,8 @@
|
|||||||
url: 'clientApi/sign/mpWxLogin2',
|
url: 'clientApi/sign/mpWxLogin2',
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
code: res.code
|
code: res.code,
|
||||||
|
isRefuel: true,
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (!res.data) {
|
if (!res.data) {
|
||||||
|
@ -30,25 +30,39 @@
|
|||||||
{{timestamp}}秒后自动刷新
|
{{timestamp}}秒后自动刷新
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom-box" @click="bottomShow()">
|
<view class="bottom-box">
|
||||||
|
<view style="display: flex;align-items: center;">
|
||||||
|
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
|
||||||
|
<view style="margin-left: 10px;">
|
||||||
|
<view class="">优先使用囤油卡付款</view>
|
||||||
|
<view style="font-size: 14px; color: #666666;">若囤油卡升数不足以进行支付,则会与储值卡组合付款</view>
|
||||||
|
<!-- <view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="">
|
||||||
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<!-- <view class="bottom-box" @click="bottomShow()">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
|
<uni-icons type="wallet-filled" color="#2979ff" size="30"></uni-icons>
|
||||||
<view style="margin-left: 10px;">
|
<view style="margin-left: 10px;">
|
||||||
<view class="">{{value}}</view>
|
<view class="">{{value}}</view>
|
||||||
<view style="font-size: 14px; color: #666666;">优先使用此付款方式</view>
|
<view style="font-size: 14px; color: #666666;">优先使用此付款方式</view>
|
||||||
<!-- <view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view> -->
|
<view style="font-size: 14px; color: #666666;">根据账户自动识别的付款方式</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="v-bottom-box">
|
<view class="v-bottom-box">
|
||||||
<u-icon name="warning-fill" size="20px"></u-icon>
|
<u-icon name="warning-fill" size="20px"></u-icon>
|
||||||
<view style="width: 80%;margin-left: 10px;">付款码有效时长180秒,切勿截屏使用</view>
|
<view style="width: 80%;margin-left: 10px;">付款码有效时长60秒,切勿截屏使用</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup :show="show" :round="10" @close="close" @open="open">
|
<u-popup :show="show" :round="10" @close="close" @open="open">
|
||||||
|
Loading…
Reference in New Issue
Block a user