diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java index 7094b36a1..b5d14b75a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/controller/HangBillController.java @@ -99,4 +99,40 @@ public class HangBillController extends BaseController { HangBill hangBill = hangBillService.selectHangBillByOrderNo(orderNo); return getSuccessResult(hangBill); } + + /** + * 查询当前店铺所有的订单总额 + * @return + */ + @GetMapping("allAmount") + public ResponseObject allAmount(){ + return getSuccessResult(hangBillService.selectAllAmount()); + } + + /** + * 查询当前店铺归还的账单总额 + * @return + */ + @GetMapping("allReturnAmount") + public ResponseObject allReturnAmount(){ + return getSuccessResult(hangBillService.selectReturnAmount()); + } + + /** + * 查询当前店铺未归还的账单总额 + * @return + */ + @GetMapping("allNoReturnAmount") + public ResponseObject allNoReturnAmount(){ + return getSuccessResult(hangBillService.selectNoReturnAmount()); + } + + /** + * 查询当前店铺归还账单的数量 + * @return + */ + @GetMapping("returnTotal") + public ResponseObject returnTotal(){ + return getSuccessResult(hangBillService.selectCountReturn()); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java index 1b1555a36..50afb0d19 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/HangBillMapper.java @@ -34,4 +34,22 @@ public interface HangBillMapper extends BaseMapper { * @return */ public HangBillVo selectHangBillById(@Param("id") int id); + + /** + * 查询当前店铺所有的订单总额 + * @return + */ + double selectAllAmount(@Param("storeId") int storeId); + + /** + * 查询当前店铺归还的账单总额 + * @return + */ + double selectReturnAmount(@Param("storeId") int storeId); + + /** + * 查询当前店铺未归还的账单总额 + * @return + */ + double selectNoReturnAmount(@Param("storeId") int storeId); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml index 028f25e72..5546a03ac 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/HangBillMapper.xml @@ -51,4 +51,14 @@ hb.store_id = #{storeId} and hb.status!=1 + + + + \ No newline at end of file diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml index ff74a7d55..192df7fff 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml @@ -438,7 +438,7 @@ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HangBillService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HangBillService.java index 10d1745d9..a48e20c28 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HangBillService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/HangBillService.java @@ -78,4 +78,28 @@ public interface HangBillService extends IService { * @return */ public int updateHangBills(HangBill hangBill,Double repaidAmount,String status); + + /** + * 查询当前店铺所有的订单总额 + * @return + */ + double selectAllAmount(); + + /** + * 查询当前店铺归还账单的数量 + * @return + */ + int selectCountReturn(); + + /** + * 查询当前店铺归还的账单总额 + * @return + */ + double selectReturnAmount(); + + /** + * 查询当前店铺未归还的账单总额 + * @return + */ + double selectNoReturnAmount(); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HangBillServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HangBillServiceImpl.java index 2f4ec1225..81bd89192 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HangBillServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/HangBillServiceImpl.java @@ -253,6 +253,33 @@ public class HangBillServiceImpl extends ServiceImpl i return row; } + @Override + public double selectAllAmount() { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + return baseMapper.selectAllAmount(nowAccountInfo.getStoreId()); + } + + @Override + public int selectCountReturn() { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("store_id",nowAccountInfo.getStoreId()); + queryWrapper.eq("status","1"); + return baseMapper.selectCount(queryWrapper); + } + + @Override + public double selectReturnAmount() { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + return baseMapper.selectReturnAmount(nowAccountInfo.getStoreId()); + } + + @Override + public double selectNoReturnAmount() { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + return baseMapper.selectNoReturnAmount(nowAccountInfo.getStoreId()); + } + /** * 调用支付接口 * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index a504f1eff..1affc0b1f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -399,9 +399,10 @@ public class LJUserServiceImpl extends ServiceImpl impleme certifiedMemberService.insertCertifiedMember(certifiedMember1); } } - + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId()); // 修改余额会员等级信息 - UserBalance balance = balanceService.selectUserBalanceByStorId(userVo.getId(),userVo.getStoreId()); + UserBalance balance = balanceService.selectUserBalance(userVo.getId(),store.getChainStoreId()); if (!ObjectUtil.isEmpty(balance)){ balance.setGradeId(userVo.getGradeId()); balance.setFixingLevel(userVo.getFixingLevel()); diff --git a/fuintCashierWeb/src/api/cashier/hangbill.js b/fuintCashierWeb/src/api/cashier/hangbill.js index c941330d8..7628192cf 100644 --- a/fuintCashierWeb/src/api/cashier/hangbill.js +++ b/fuintCashierWeb/src/api/cashier/hangbill.js @@ -60,3 +60,35 @@ export function editHangBill(data) { data: data }) } + +// 当前店铺归还账单的数量 +export function hangBillReturnTotal() { + return request({ + url: '/business/hangBill/returnTotal', + method: 'get', + }) +} + +// 当前店铺归还账单的数量 +export function hangBillAllAmount() { + return request({ + url: '/business/hangBill/allAmount', + method: 'get', + }) +} + +// 当前店铺归还账单的数量 +export function hangBillAllReturnAmount() { + return request({ + url: '/business/hangBill/allReturnAmount', + method: 'get', + }) +} + +// 当前店铺归还账单的数量 +export function hangBillAllNoReturnAmount() { + return request({ + url: '/business/hangBill/allNoReturnAmount', + method: 'get', + }) +} diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/credit.vue b/fuintCashierWeb/src/views/cashier/NewComponents/credit.vue index 24479a57c..ba3021a88 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/credit.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/credit.vue @@ -95,11 +95,26 @@ 统计
-
+
挂账笔数
-
55
+
{{ total }}
+
+
+
挂账总额
+
{{ allAmount }}
+
+
+
归还笔数
+
{{ returnTotal }}
+
+
+
归还总额
+
{{ returnAllAmount }}
+
+
+
未还金额
+
{{ noReturnAllAmount }}
-
@@ -128,13 +143,13 @@ {{ props.row.remark ? props.row.remark:"--" }}
- {{ props.row.amount ? props.row.amount:"--" }} + {{ props.row.amount ? props.row.amount:"0" }} - {{ props.row.repaidAmount ? props.row.repaidAmount:"--" }} + {{ props.row.repaidAmount ? props.row.repaidAmount:"0" }} - {{ props.row.outstandAmount ? props.row.outstandAmount:"--" }} + {{ props.row.outstandAmount ? props.row.outstandAmount:"0" }} @@ -647,8 +662,8 @@ import { addHangBill, batchHangBill, - editHangBill, - hangBillInfo, + editHangBill, hangBillAllAmount, hangBillAllNoReturnAmount, hangBillAllReturnAmount, + hangBillInfo, hangBillReturnTotal, hangBills, listHangBill, queryHangBill @@ -661,6 +676,14 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c name: "credit", data(){ return{ + // 归还账单总数 + returnTotal:0, + // 挂账总额 + allAmount:0, + // 归还总额 + returnAllAmount:0, + // 未归还总额 + noReturnAllAmount:0, // 挂账金额 amount:0, // 未归还金额 @@ -754,60 +777,6 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c 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() { @@ -815,6 +784,7 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c this.getUnitList(); this.getPayList(); this.getLists(); + this.getStatistic(); }, directives: { // 注册一个局部的自定义指令 v-focus @@ -830,6 +800,21 @@ import {listReturnRecord, returnRecordByOrderNo, returnRecordInfo} from "@/api/c }, }, methods:{ + // 获取挂账统计信息 + getStatistic(){ + hangBillReturnTotal().then(res => { + this.returnTotal = res.data + }) + hangBillAllAmount().then(res => { + this.allAmount = res.data + }) + hangBillAllReturnAmount().then(res => { + this.returnAllAmount = res.data + }) + hangBillAllNoReturnAmount().then(res => { + this.noReturnAllAmount = res.data + }) + }, getPayMeth(list,val){ let name = ""; if (list!=null && list!=""){ diff --git a/fuintCashierWeb/src/views/cashier/vipComponents/vipList.vue b/fuintCashierWeb/src/views/cashier/vipComponents/vipList.vue index 8acd893e9..4b38789fb 100644 --- a/fuintCashierWeb/src/views/cashier/vipComponents/vipList.vue +++ b/fuintCashierWeb/src/views/cashier/vipComponents/vipList.vue @@ -100,125 +100,75 @@ - -
- 统计 -
-
-
-
会员总数
-
55
+ +
统计
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -607,67 +557,13 @@ rules: { name: [ { required: true, message: "会员名称不能为空", trigger: "blur" }, - { min: 2, max: 200, message: '会员名称长度必须介于2 和 100 之间', trigger: 'blur' } + // { min: 2, max: 200, message: '会员名称长度必须介于2 和 100 之间', trigger: 'blur' } ], gradeId: [{ required: true, message: "会员等级", trigger: "blur" }], mobile: [ { 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() { @@ -675,6 +571,7 @@ this.getConfig(); this.getUserList(); this.getOfficial(); + this.getStatistic(); }, methods:{ getOfficial(){ @@ -718,8 +615,8 @@ // this.literCard = response.data.literCard; // this.refuelMoney = response.data.refuelMoney; }); - listUserGrade().then( response => { - this.userGradeList = response.data.records + listUserGrade({page:1,pageSize:20}).then( response => { + this.userGradeList = response.data.records; }); ljStoreList().then( response => { this.storeList = response.data @@ -961,6 +858,11 @@ .top-app-sou{ width: 20%; } - + .sta{ + height: 100px; + margin-top: 10px; + background: #f6f8f9; + padding-top: 30px; + }