diff --git a/config/index.js b/config/index.js index 014d2e4..bee214c 100644 --- a/config/index.js +++ b/config/index.js @@ -28,7 +28,7 @@ module.exports = { "/api": { target: "http://192.168.31.214:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 //target: "http://192.168.31.209:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 - //target: "http://192.168.31.201:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 + // target: "http://192.168.31.201:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 // target: "http://139.9.185.131:8098/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式 // target: "http://139.9.58.205:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式华为云 // target: "http://139.9.185.131:9094/", //设置你调用的接口域名和端口号 别忘了加http 盛联 diff --git a/src/api/statistics.js b/src/api/statistics.js index b112ffd..d0fcf74 100644 --- a/src/api/statistics.js +++ b/src/api/statistics.js @@ -79,7 +79,7 @@ export function storeStatisticMemberList(params) { return service({ url: "/api" + "/demay/ssm/storeStatistic/memberList", method: "post", - params: params + params: params, }); } diff --git a/src/pages/eashier/recount/index.vue b/src/pages/eashier/recount/index.vue index a080918..b02e1b9 100644 --- a/src/pages/eashier/recount/index.vue +++ b/src/pages/eashier/recount/index.vue @@ -180,10 +180,14 @@ export default { }, methods: { handleCheckAllChange(val) { + console.log(val) let list = []; - this.cities.forEach((item) => { + this.checkList = [] + this.cities.forEach((item,index) => { list.push(item.label); + this.checkList.push(index) }); + if(!val)this.checkList = [] this.checkedCities = val ? list : []; this.isIndeterminate = false; }, diff --git a/src/pages/eashier/service/detail/editform.vue b/src/pages/eashier/service/detail/editform.vue index 385990e..f8c9746 100644 --- a/src/pages/eashier/service/detail/editform.vue +++ b/src/pages/eashier/service/detail/editform.vue @@ -559,7 +559,7 @@ export default { cardCommissionTechnician: item.cardCommissionTechnician, cardCommissionSmall: item.cardCommissionSmall, courseAccountId: item.courseAccountId, - payLists: item.payLists, + payLists: this.form.payLists, storeId: item.storeId, rechargeAccountList: item.rechargeConsumeList, amount: item.amount, diff --git a/src/pages/eashier/service/payment.vue b/src/pages/eashier/service/payment.vue index 2f22f99..1d1935d 100644 --- a/src/pages/eashier/service/payment.vue +++ b/src/pages/eashier/service/payment.vue @@ -6,13 +6,10 @@ - + {{ scope.row.payMoney }} - - diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue index bc88d5a..6857892 100644 --- a/src/pages/eashier/service/service.vue +++ b/src/pages/eashier/service/service.vue @@ -468,9 +468,8 @@ v-focus type="number" size="samll" - onkeyup="value=value.replace(/[^\d]/g,' ')" class="form-input-width" - @blur="endEditcard(scope.row, scope.$index,props.$index)" + @blur="endEditcard(scope.row, scope.$index)" v-model="scope.row.spendMoney" > @@ -923,6 +922,9 @@ export default { collectionRechargeAmount = collectionRechargeAmount.toFixed(2)*1 collectionAmounts = collectionAmounts.toFixed(2)*1 this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount) + if(this.list[this.projectIndex].collectionRechargeAmount>=this.list[this.projectIndex].transactionPrice ){ + this.list[this.projectIndex].collectionRechargeAmount = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1 + } //误差 this.$set(this.list[this.projectIndex],'collectionAmounts',collectionAmounts) }else{ // 不能打折的计算 @@ -934,6 +936,9 @@ export default { collectionAmounts = collectionAmounts.toFixed(2)*1 this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount) this.$set(this.list[this.projectIndex],'collectionAmounts',collectionAmounts) + if(this.list[this.projectIndex].collectionRechargeAmount>=this.list[this.projectIndex].transactionPrice ){ + this.list[this.projectIndex].collectionRechargeAmount = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1 + } //误差 } }, //修改卡付金额 @@ -944,11 +949,11 @@ export default { // 卡付抵扣金额collectionAmounts 卡付金额collectionRechargeAmount // 本次支付spendMoney 可用金额cardConsumeMoney 可用余额cardOvers 可用折扣discount 赠送折扣discountFreeAmount 赠送支付giftSpendMoney 赠送剩余cardGiftOvers // type:0折扣卡 1赠送卡 2活动卡 noDiscount 0 能打折 1 不打折 appearPrice当前需要支付多少 - if( row.spendMoney){ + if( row.spendMoney ){ // 要修改 row.spendMoney = 0 row.cardOvers = row.CardCurrentUse - row.cardGiftOvers = row.cardGiftOvers +(row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers = (row.cardGiftOvers +(row.giftSpendMoney?row.giftSpendMoney*1:0)).toFixed(2)*1 row.giftSpendMoney = 0 this.list.push({}) this.list.pop() @@ -956,7 +961,7 @@ export default { } if(this.useRecharge !== 1 && row.cardOvers ==0 && row.giftSpendMoney){ //可用余额不存在并且门店参数不等于1并且赠送支付存在触发 row.spendMoney = 0 - row.cardGiftOvers = (row.cardGiftOvers?row.cardGiftOvers*1:0) + (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers = ((row.cardGiftOvers?row.cardGiftOvers*1:0) + (row.giftSpendMoney?row.giftSpendMoney*1:0)).toFixed(2)*1 row.giftSpendMoney = 0 // 不知名错误,别删 this.$set(this.list[this.projectIndex],'popover',false) @@ -1018,7 +1023,7 @@ export default { giveProportion = giveProportion.toFixed(2)*1 row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 }else{ row.spendMoney = row.cardOvers row.giftSpendMoney = row.cardGiftOvers @@ -1026,6 +1031,7 @@ export default { // this.updataList() } } + this.spendMoney = row.spendMoney }else{ //先用实冲,再用赠送 console.log('来到了门店参数2--->') //做法 扣除本次支付/赠送支付/赠送剩余 @@ -1039,7 +1045,7 @@ export default { if(total>appearPrice){ //当前赠送够支付 row.giftSpendMoney = (appearPrice*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1)).toFixed(2)*1 row.spendMoney = row.giftSpendMoney - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 }else{ //当前卡不够支付 row.spendMoney = row.cardGiftOvers row.giftSpendMoney = row.cardGiftOvers @@ -1055,7 +1061,7 @@ export default { let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //剩余支付 console.log('还需要支付多少--->',remainderCsee) row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) //算出还需支付多少 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 } }else{ //折后金额总和不够支付项目金额,直接扣除 row.spendMoney = row.cardOvers // 支付金额 直接赋值支付金额 @@ -1069,7 +1075,7 @@ export default { if( total>appearPrice ){ //当前卡够支付 row.spendMoney = appearPrice row.giftSpendMoney = appearPrice - row.cardGiftOvers = row.cardGiftOvers - appearPrice + row.cardGiftOvers = (row.cardGiftOvers - appearPrice).toFixed(2)*1 }else{ //当前卡剩余余额不够支付 row.spendMoney = row.cardGiftOvers row.giftSpendMoney = row.cardGiftOvers @@ -1084,7 +1090,7 @@ export default { let remainderCsee = appearPrice - row.cardOvers //赠送还要补充多少 row.spendMoney = row.cardOvers row.giftSpendMoney = remainderCsee - row.cardGiftOvers = row.cardGiftOvers - remainderCsee + row.cardGiftOvers = (row.cardGiftOvers - remainderCsee).toFixed(2)*1 } }else{ //当前卡不够支付项目金额 row.spendMoney = row.cardOvers @@ -1098,14 +1104,29 @@ export default { }, endEditcard(row, index) { //看不懂别乱改!!!!!! - console.log('测试---二进制--->>>',0.1+0.2) // 卡付抵扣金额collectionAmounts 卡付金额collectionRechargeAmount // 本次支付spendMoney 可用金额cardConsumeMoney 可用余额cardOvers 可用折扣discount 赠送折扣discountFreeAmount 赠送支付giftSpendMoney 赠送剩余cardGiftOvers // type:0折扣卡 1赠送卡 2活动卡 noDiscount 0 能打折 1 不打折 this.recIndex = -1 - if(row.spendMoney === 0)return + if((row.spendMoney*1) === 0){ + row.cardGiftOvers = (row.cardGiftOvers*1 + row.giftSpendMoney*1).toFixed(2)*1 + row.giftSpendMoney = 0 + this.spendMoney = '' + return + } let appearPrice = this.list[this.projectIndex].transactionPrice - (this.list[this.projectIndex].collectionAmounts?this.list[this.projectIndex].collectionAmounts*1:0) //本次需要支付的钱 if(this.useRecharge == 1){ //门店参数 按比例支付 + // 上一次输入的没变 + if((this.spendMoney*1) === row.spendMoney*1){ + console.log('我会到这里呀!!!!') + // 上一次没改变 + row.cardOvers = (row.cardOvers - (row.spendMoney*1)).toFixed(2)*1 + this.updataList() + this.list.push({}) + this.list.pop() + this.spendMoney = '' + return + } if(this.list[this.projectIndex].noDiscount == 0){ //可以打折 0 row.spendMoney = row.spendMoney*1 //转化 if(row.spendMoney>row.cardOvers){ //如果输入的大于本身余额 @@ -1141,7 +1162,7 @@ export default { }else{ // 输入的值不大于本卡金额 // 输入的金额也要做判断,判断是否大于支付金额,如果大于支付金额,就拿支付金额按比例付款,小于则按输入金额付款 // !!!这里也需要还原之前的赠送!!! - row.cardGiftOvers = (row.cardGiftOvers?row.cardGiftOvers*1:0) + (row.giftSpendMoney?row.giftSpendMoney*1:0) //还原之前赠送金额 + row.cardGiftOvers = ((row.cardGiftOvers?row.cardGiftOvers*1:0) + (row.giftSpendMoney?row.giftSpendMoney*1:0)).toFixed(2)*1 //还原之前赠送金额 row.giftSpendMoney = 0 //还原赠送支付 let balanceProportion = row.cardOvers/(row.cardOvers + (row.cardGiftOvers?row.cardGiftOvers*1:0)) // 可用金额比例 let giveProportion = (row.cardGiftOvers?row.cardGiftOvers*1:0)/(row.cardOvers + (row.cardGiftOvers?row.cardGiftOvers*1:0)) // 可用赠送比例 @@ -1219,7 +1240,7 @@ export default { let giveProportion = (row.cardGiftOvers*1 + (row.giftSpendMoney?row.giftSpendMoney*1:0))/(row.cardOvers*1+( (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1 ))//赠送金额比例 balanceProportion = balanceProportion.toFixed(4)*1 giveProportion = giveProportion.toFixed(4)*1 - row.cardGiftOvers = (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1 //还原赠送支付 + row.cardGiftOvers = ((row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1).toFixed(2)*1 //还原赠送支付 row.giftSpendMoney = 0 //清空赠送支付 console.log('现在的赠送余额是多少----->',row.cardGiftOvers,'比例是多少--->',balanceProportion,'另外一个比例---->',giveProportion) if(row.spendMoney > row.cardOvers){ // 当输入的金额大于自身可用金额时 @@ -1252,9 +1273,10 @@ export default { this.updataList() }else{ //输入的金额不大于项目金额 // 需要判断比例总和是否大于项目金额 - let giveCase = ((row.spendMoney/balanceProportion)*giveProportion)*1 //按比例算出的赠送支付 + let giveCase = ((row.spendMoney/balanceProportion)*giveProportion).toFixed(2)*1 //按比例算出的赠送支付 if(((row.spendMoney*1 + giveCase)*1) > appearPrice){ // 如果按比例之和大于项目金额,大于的情况一定是够支付的!!! + console.log((((row.spendMoney*1 + giveCase)*1) - appearPrice),'---<为多少') if((((row.spendMoney*1 + giveCase)*1) - appearPrice)>=this.balance*1)this.$message.warning({ message: "按比例支付总和大于成交金额" }); //判断误差 // 自动计算 console.log('是多少-->',row.spendMoney,'总额-->',row.cardOvers) @@ -1276,17 +1298,18 @@ export default { this.list.push({}) this.list.pop() }else{ //先用实充,再用赠送 - if(row.spendMoney === this.spendMoney){ //上一次的值没有改变 + if((row.spendMoney*1) === this.spendMoney){ //上一次的值没有改变 console.log('现在只执行这里---->!!!') row.cardOvers = (row.cardOvers - row.spendMoney).toFixed(2)*1 this.updataList() this.list.push({}) this.list.pop() + this.spendMoney = '' return } if(this.list[this.projectIndex].noDiscount == 0){ //可以打折 // 还原原先赠送以及赠送支付 - row.cardGiftOvers = row.cardGiftOvers + row.giftSpendMoney //还原赠送剩余 + row.cardGiftOvers = (row.cardGiftOvers + row.giftSpendMoney).toFixed(2)*1 //还原赠送剩余 row.giftSpendMoney = 0 //还原赠送支付 // 只有可用余额为0并且赠送金额存在时触发 if(row.cardOvers === 0 && row.cardGiftOvers){ //当可用余额为0时,扣除赠送支付 @@ -1351,7 +1374,7 @@ export default { if(paymentAmount>appearPrice){ //当前卡够支付 this.$message.warning({ message: "赠送金额大于项目金额" }); row.giftSpendMoney = (appearPrice*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1)).toFixed(2)*1 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 row.spendMoney = 0 row.cardOvers = 0 // 不知名错误,未展示扣除,需要关闭再打开 @@ -1362,7 +1385,7 @@ export default { return this.updataList() }else{ //当前输入的值大大于项目金额 row.giftSpendMoney = row.spendMoney - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 row.spendMoney = 0 row.cardOvers = 0 // 不知名错误,未展示扣除,需要关闭再打开 @@ -1392,7 +1415,7 @@ export default { row.cardOvers = 0 let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //剩余支付 row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) //算出还需支付多少 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney //赠送剩余 + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //赠送剩余 this.updataList() } }else{ //两个折扣价格不够支付 @@ -1421,7 +1444,7 @@ export default { row.cardOvers = 0 let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //剩余支付 row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) //算出还需支付多少 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney //赠送剩余 + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //赠送剩余 this.updataList() } }else{ //两个折扣价格不够支付 @@ -1447,7 +1470,7 @@ export default { } } }else{ //不能打折 - row.cardGiftOvers = row.cardGiftOvers + row.giftSpendMoney //还原赠送剩余 + row.cardGiftOvers = (row.cardGiftOvers + row.giftSpendMoney).toFixed(2)*1 //还原赠送剩余 row.giftSpendMoney = 0 //还原赠送支付 let total = row.cardOvers + row.cardGiftOvers @@ -1458,7 +1481,7 @@ export default { if(row.cardGiftOvers>appearPrice){ //当前赠送够支付项目金额 row.spendMoney = 0 row.giftSpendMoney = appearPrice - row.cardGiftOvers = row.cardGiftOvers - appearPrice + row.cardGiftOvers = (row.cardGiftOvers - appearPrice).toFixed(2)*1 // 不知名错误,未展示扣除,需要关闭再打开 this.$set(this.list[this.projectIndex],'popover',false) this.$set(this.list[this.projectIndex],'popover',true) @@ -1479,7 +1502,7 @@ export default { if(row.cardGiftOvers>appearPrice){ //当前赠送够支付项目金额 row.spendMoney = 0 row.giftSpendMoney = appearPrice - row.cardGiftOvers = row.cardGiftOvers - appearPrice + row.cardGiftOvers = (row.cardGiftOvers - appearPrice).toFixed(2)*1 // 不知名错误,未展示扣除,需要关闭再打开 this.$set(this.list[this.projectIndex],'popover',false) this.$set(this.list[this.projectIndex],'popover',true) @@ -1495,7 +1518,7 @@ export default { } }else{ //输入金额不大于项目金额 row.giftSpendMoney = row.spendMoney*1 - row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney + row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 row.spendMoney = 0 // 不知名错误,未展示扣除,需要关闭再打开 this.$set(this.list[this.projectIndex],'popover',false) @@ -1518,7 +1541,7 @@ export default { row.spendMoney = row.cardOvers row.cardOvers = 0 row.giftSpendMoney = appearPrice - row.spendMoney - row.cardGiftOvers = row.giftSpendMoney + row.cardGiftOvers = (row.giftSpendMoney).toFixed(2)*1 this.updataList() } }else{ @@ -1542,7 +1565,7 @@ export default { row.spendMoney = row.cardOvers row.cardOvers = 0 row.giftSpendMoney = appearPrice - row.spendMoney - row.cardGiftOvers = row.giftSpendMoney + row.cardGiftOvers = (row.giftSpendMoney).topPrice(2)*1 this.updataList() } }else{ @@ -1854,7 +1877,7 @@ export default { this.$refs.project.show(this.memberForm); }, projectData(v) { - console.log('是这里没错了--->') + console.log('是这里没错了--->',v) if (!v.courseAccountId) { v.courseAccountId = null; v.courseProjectId = v.id; @@ -1862,6 +1885,7 @@ export default { } else { v.courseMoney = v.courseConsumePrice; } + this.list.splice(this.proIndex,1,[]) this.setProOne(v); }, // cashAmount @@ -1870,11 +1894,6 @@ export default { row.courseMoney = 0; } else { row.courseMoney = row.courseConsumePrice; - // row.collectionAmounts=row.transactionPrice - console.log( - "🚀 ~ file: service.vue ~ line 1466 ~ setProOne ~ row.transactionPrice", - row - ); } let form = {}; proOne({ @@ -1908,7 +1927,7 @@ export default { projectName: res.data.projectName, projectNum: res.data.projectNum, courseAccountId: row.courseAccountId, - courseMoney: row.courseMoney, + courseMoney:row.courseAccountId?row.price:0, noDiscount: res.data.noDiscount, isCardPay: res.data.isCardPay, amount: res.data.transactionPrice, @@ -1920,7 +1939,6 @@ export default { collectionIntegralAmount: 0, collectionAmount: 0, projectId: res.data.id, - // cashNum: res.data.cashNum, storeId: res.data.storeId, storeName: res.data.storeName, price: res.data.price, @@ -2057,6 +2075,28 @@ export default { callback: action => {} }); } + let total = eval(this.$refs.payment.payLists.map(item=>{return item.payMoney?item.payMoney*1:0}).join("+")) //现金支付总和 + if(this.appearPrices*1 || total){ + if(total>this.appearPrices*1){ + this.formData = new FormData(); + return this.$alert(`金额多出${total-this.appearPrices*1}元`, "提示", { + confirmButtonText: "确定", + confirmButtonClass: "confirmbtnFalses", + type: "warning", + center: true, + callback: action => {} + }); + }else if(total {} + }); + } + } if (flag) { let passShow = false; this.list.forEach((item, index) => { @@ -2093,7 +2133,7 @@ export default { if (item.courseAccountId == null) { item.collectionCashAmount = ( - item.amount - item.collectionAmounts + item.amount - (item.collectionAmounts?item.collectionAmounts*1:0) ).toFixed(2) * 1; item.cashAmount = ( @@ -2155,28 +2195,6 @@ export default { collectionAmountsum+=(item.collectionAmount*1+collectionAmountsum*1); }); this.formData.append("cashListRequestList", JSON.stringify(list)); - let total = eval(this.$refs.payment.payLists.map(item=>{return item.payMoney?item.payMoney*1:0}).join("+")) //现金支付总和 - if(this.appearPrices*1 || total){ - if(total>this.appearPrices*1){ - this.formData = new FormData(); - return this.$alert(`金额多出${total-this.appearPrices*1}元`, "提示", { - confirmButtonText: "确定", - confirmButtonClass: "confirmbtnFalses", - type: "warning", - center: true, - callback: action => {} - }); - }else if(total {} - }); - } - } addCash(this.formData).then(res => { if (res.code == "000000") { this.$message.success({ @@ -2266,12 +2284,13 @@ export default { }, reccardData(v) {}, courseData(v) { + console.log('这个v--->',v) if (!v.courseAccountId) { v.courseAccountId = null; v.courseProjectId = v.id; v.courseMoney = 0; } else { - v.courseMoney = v.courseConsumePrice; + v.courseMoney = v.price; } this.setProOne(v); }, @@ -2850,7 +2869,9 @@ export default { activated() { this.setPage(); }, - created() {} + created() { + this.notData() + } }; diff --git a/src/pages/promotion/sellpacking/sellpacking.vue b/src/pages/promotion/sellpacking/sellpacking.vue index 0ee66f4..c18c552 100644 --- a/src/pages/promotion/sellpacking/sellpacking.vue +++ b/src/pages/promotion/sellpacking/sellpacking.vue @@ -667,7 +667,7 @@ export default { row.spendMoney = this.form.debtMoney; } row.isShow = true; - spendMoney = spendMoney.toFixed(2) * 1; + row.spendMoney = row.spendMoney.toFixed(2) * 1; } else { this.$message.warning({ message: "请先输入会员手机号!" }); } @@ -892,8 +892,7 @@ export default { return sums; }, }, - created() {}, - activated() { + created() { this.form = JSON.parse(JSON.stringify({})); if (this.$route.query.promotionName != undefined) { this.form = Object.assign(this.$route.query); diff --git a/src/pages/statistics/memberRanking/memberRanking.vue b/src/pages/statistics/memberRanking/memberRanking.vue index 568209d..4e89e6a 100644 --- a/src/pages/statistics/memberRanking/memberRanking.vue +++ b/src/pages/statistics/memberRanking/memberRanking.vue @@ -81,6 +81,11 @@ export default { this.queryForm.stopDates = res[1]; }, changeMonth(res) { + if(!res){ + this.dateStr = this.formatTime(new Date(), "YYYY-MM"); + this.storeStatisticMemberList(); + return + } this.dateStr = this.formatTime(res, "YYYY-MM"); this.storeStatisticMemberList(); }, @@ -88,6 +93,9 @@ export default { this.storeStatisticMemberList(); }, storeStatisticMemberList() { + let params = { + dateStr:this.dateStr + } memberRecharge().then((res) => { console.log(res); if (res.code == "000000") { @@ -108,9 +116,7 @@ export default { }); } }); - storeStatisticMemberList({ - dateStr: this.dateStr, - }).then((res) => { + storeStatisticMemberList(params).then((res) => { if (res.code == "000000") { this.cashList = res.rows; } else { @@ -121,7 +127,7 @@ export default { }); }, }, - activated() { + created() { this.dateStr = this.formatTime(new Date(), "YYYY-MM"); this.storeStatisticMemberList(); this.month = this.formatTime(new Date(), "YYYY-MM"); diff --git a/src/pages/statistics/storeDaily/form.vue b/src/pages/statistics/storeDaily/form.vue new file mode 100644 index 0000000..20999c2 --- /dev/null +++ b/src/pages/statistics/storeDaily/form.vue @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pages/statistics/storeDaily/payment.vue b/src/pages/statistics/storeDaily/payment.vue new file mode 100644 index 0000000..204d6a7 --- /dev/null +++ b/src/pages/statistics/storeDaily/payment.vue @@ -0,0 +1,36 @@ + + + + + + + + {{ scope.row.payMoney?scope.row.payMoney:0 }} + + + + + + + + + diff --git a/src/pages/statistics/storeDaily/storeDaily.vue b/src/pages/statistics/storeDaily/storeDaily.vue index 6b2b7bd..e436275 100644 --- a/src/pages/statistics/storeDaily/storeDaily.vue +++ b/src/pages/statistics/storeDaily/storeDaily.vue @@ -10,102 +10,9 @@ - - - - - - {{scope.row.rechargeNum?scope.row.rechargeNum:'0'}} - - - - - {{scope.row.courseOrderNum?scope.row.courseOrderNum:'0'}} - - - - - {{scope.row.cashPeopleNum?scope.row.cashPeopleNum:'0'}} - - - - - - {{scope.row.rechargeMoney?scope.row.rechargeMoney:'0'}} - - - - - - {{scope.row.courseMoney?scope.row.courseMoney:'0'}} - - - - - - - {{scope.row.cashMoney?scope.row.cashMoney:'0'}} - - - - - {{scope.row.cashierCashMoney?scope.row.cashierCashMoney:'0'}} - - - - - {{scope.row.cashierCardMoney?scope.row.cashierCardMoney:'0'}} - - - - - - {{scope.row.man?scope.row.man:'0'}} - - - - - {{scope.row.woman?scope.row.woman:'0'}} - - - - - {{scope.row.repayMoney?scope.row.repayMoney:'0'}} - - - - - {{scope.row.refundMoney?scope.row.refundMoney:'0'}} - - - - - {{scope.row.newMemberNum?scope.row.newMemberNum:'0'}} - - - - - {{scope.row.startMemberNum?scope.row.startMemberNum:'0'}} - - - - - {{scope.row.memberNum?scope.row.memberNum:'0'}} - - - - + + + @@ -113,13 +20,15 @@ import { storeDailys, exportachi, exportachiwhole } from "@/api/statistics.js"; import { partten } from "../../../../partten/index"; import perform from "./examine/index"; +import Forms from './form.vue' export default { - components: { perform }, + components: { perform ,Forms}, data() { return { headOffice: sessionStorage.getItem("headOffice") * 1, days: "", - tableDate: [{}], + payLists:[], + tableDate: [], month: partten.months, queryForm: {}, pickerOptions: { @@ -185,18 +94,26 @@ export default { window.URL.revokeObjectURL(url); }); }, - changeMonth(res) { + if(!res){ + this.payLists = null + this.tableDate = [] + return + } this.days = res; this.getData(); }, getData() { + this.$refs.form.loading = true this.queryForm.startDate = this.days[0]; this.queryForm.endDate = this.days[1]; this.queryForm.storeId = sessionStorage.getItem("storeId"); storeDailys(this.queryForm).then((res) => { + this.$refs.form.loading = false if (res.code == "000000") { - this.tableDate = res.data; + console.log('这是什么----->',res) + this.tableDate = res.data.lists; + this.payLists = res.data.payLists } else { this.$alert(res.message, "提示", { confirmButtonText: "确定", @@ -208,10 +125,6 @@ export default { } }); }, - confirm(row) { - // row.type = 3; - // this.$refs.perform.show(row); - }, //指定列求和 //数组按对应字段合计返回方法 getSummaries(param) { @@ -222,7 +135,6 @@ export default { sums[index] = "合计"; return; } - const values = data.map((item) => Number(item[column.property])); if (column.property == "baseSalary") { sums[index] = values.reduce((prev, curr) => { @@ -271,11 +183,13 @@ export default { return sums; }, }, - activated() { + created() { let sDate = this.formatTime(new Date(), "YYYY-MM-DD"); let eDate = this.formatTime(new Date(), "YYYY-MM-DD"); this.days = [sDate, eDate]; - this.getData(); + this.$nextTick(()=>{ + this.getData(); + }) }, }; diff --git a/src/pages/storeManage/baseStaff/components/editothers.vue b/src/pages/storeManage/baseStaff/components/editothers.vue index 8153ea0..57b0397 100644 --- a/src/pages/storeManage/baseStaff/components/editothers.vue +++ b/src/pages/storeManage/baseStaff/components/editothers.vue @@ -138,7 +138,7 @@ export default { }; -