部分bug提交

master
Wangxubin 3 years ago
parent 6c49104110
commit 3355a83277

@ -28,7 +28,7 @@ module.exports = {
"/api": { "/api": {
target: "http://192.168.31.214:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地 target: "http://192.168.31.214:8084/", //设置你调用的接口域名和端口号 别忘了加http 本地
//target: "http://192.168.31.209: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.185.131:8098/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式
// target: "http://139.9.58.205:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式华为云 // target: "http://139.9.58.205:8084/", //设置你调用的接口域名和端口号 别忘了加http 天懿达正式华为云
// target: "http://139.9.185.131:9094/", //设置你调用的接口域名和端口号 别忘了加http 盛联 // target: "http://139.9.185.131:9094/", //设置你调用的接口域名和端口号 别忘了加http 盛联

@ -79,7 +79,7 @@ export function storeStatisticMemberList(params) {
return service({ return service({
url: "/api" + "/demay/ssm/storeStatistic/memberList", url: "/api" + "/demay/ssm/storeStatistic/memberList",
method: "post", method: "post",
params: params params: params,
}); });
} }

@ -180,10 +180,14 @@ export default {
}, },
methods: { methods: {
handleCheckAllChange(val) { handleCheckAllChange(val) {
console.log(val)
let list = []; let list = [];
this.cities.forEach((item) => { this.checkList = []
this.cities.forEach((item,index) => {
list.push(item.label); list.push(item.label);
this.checkList.push(index)
}); });
if(!val)this.checkList = []
this.checkedCities = val ? list : []; this.checkedCities = val ? list : [];
this.isIndeterminate = false; this.isIndeterminate = false;
}, },

@ -559,7 +559,7 @@ export default {
cardCommissionTechnician: item.cardCommissionTechnician, cardCommissionTechnician: item.cardCommissionTechnician,
cardCommissionSmall: item.cardCommissionSmall, cardCommissionSmall: item.cardCommissionSmall,
courseAccountId: item.courseAccountId, courseAccountId: item.courseAccountId,
payLists: item.payLists, payLists: this.form.payLists,
storeId: item.storeId, storeId: item.storeId,
rechargeAccountList: item.rechargeConsumeList, rechargeAccountList: item.rechargeConsumeList,
amount: item.amount, amount: item.amount,

@ -6,13 +6,10 @@
<el-table-column align="center" prop="payName" min-width="100" label="支付方式"></el-table-column> <el-table-column align="center" prop="payName" min-width="100" label="支付方式"></el-table-column>
<el-table-column align="center" prop="payMoney" min-width="80" label="本次支付 "> <el-table-column align="center" prop="payMoney" min-width="80" label="本次支付 ">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="payIndex != scope.$index" @click="editPay(scope.row, scope.$index)"> <div>
{{ scope.row.payMoney }} {{ scope.row.payMoney }}
<i class="text-cyan el-icon-edit"></i> <i class="text-cyan el-icon-edit"></i>
</div> </div>
<el-input class="form-input-xs" v-else v-focus type="number" @blur="endEdit(scope.row, scope.$index,)"
v-model="scope.row.payMoney" size="samll"></el-input>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>

@ -468,9 +468,8 @@
v-focus v-focus
type="number" type="number"
size="samll" size="samll"
onkeyup="value=value.replace(/[^\d]/g,' ')"
class="form-input-width" class="form-input-width"
@blur="endEditcard(scope.row, scope.$index,props.$index)" @blur="endEditcard(scope.row, scope.$index)"
v-model="scope.row.spendMoney" v-model="scope.row.spendMoney"
></el-input> ></el-input>
</template> </template>
@ -923,6 +922,9 @@ export default {
collectionRechargeAmount = collectionRechargeAmount.toFixed(2)*1 collectionRechargeAmount = collectionRechargeAmount.toFixed(2)*1
collectionAmounts = collectionAmounts.toFixed(2)*1 collectionAmounts = collectionAmounts.toFixed(2)*1
this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount) 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) this.$set(this.list[this.projectIndex],'collectionAmounts',collectionAmounts)
}else{ }else{
// //
@ -934,6 +936,9 @@ export default {
collectionAmounts = collectionAmounts.toFixed(2)*1 collectionAmounts = collectionAmounts.toFixed(2)*1
this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount) this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount)
this.$set(this.list[this.projectIndex],'collectionAmounts',collectionAmounts) 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 // collectionAmounts  collectionRechargeAmount
// spendMoney cardConsumeMoney cardOvers discount discountFreeAmount giftSpendMoney cardGiftOvers // spendMoney cardConsumeMoney cardOvers discount discountFreeAmount giftSpendMoney cardGiftOvers
// type:0 1 2 noDiscount 0 1 appearPrice // type:0 1 2 noDiscount 0 1 appearPrice
if( row.spendMoney){ if( row.spendMoney ){
// //
row.spendMoney = 0 row.spendMoney = 0
row.cardOvers = row.CardCurrentUse 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 row.giftSpendMoney = 0
this.list.push({}) this.list.push({})
this.list.pop() this.list.pop()
@ -956,7 +961,7 @@ export default {
} }
if(this.useRecharge !== 1 && row.cardOvers ==0 && row.giftSpendMoney){ //1 if(this.useRecharge !== 1 && row.cardOvers ==0 && row.giftSpendMoney){ //1
row.spendMoney = 0 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 row.giftSpendMoney = 0
// //
this.$set(this.list[this.projectIndex],'popover',false) this.$set(this.list[this.projectIndex],'popover',false)
@ -1018,7 +1023,7 @@ export default {
giveProportion = giveProportion.toFixed(2)*1 giveProportion = giveProportion.toFixed(2)*1
row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1
row.giftSpendMoney = (appearPrice*giveProportion).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{ }else{
row.spendMoney = row.cardOvers row.spendMoney = row.cardOvers
row.giftSpendMoney = row.cardGiftOvers row.giftSpendMoney = row.cardGiftOvers
@ -1026,6 +1031,7 @@ export default {
// this.updataList() // this.updataList()
} }
} }
this.spendMoney = row.spendMoney
}else{ // }else{ //
console.log('来到了门店参数2--->') console.log('来到了门店参数2--->')
// // // //
@ -1039,7 +1045,7 @@ export default {
if(total>appearPrice){ // if(total>appearPrice){ //
row.giftSpendMoney = (appearPrice*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1)).toFixed(2)*1 row.giftSpendMoney = (appearPrice*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1)).toFixed(2)*1
row.spendMoney = row.giftSpendMoney row.spendMoney = row.giftSpendMoney
row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1
}else{ // }else{ //
row.spendMoney = row.cardGiftOvers row.spendMoney = row.cardGiftOvers
row.giftSpendMoney = row.cardGiftOvers row.giftSpendMoney = row.cardGiftOvers
@ -1055,7 +1061,7 @@ export default {
let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) // let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //
console.log('还需要支付多少--->',remainderCsee) console.log('还需要支付多少--->',remainderCsee)
row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) // 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{ //, }else{ //,
row.spendMoney = row.cardOvers // row.spendMoney = row.cardOvers //
@ -1069,7 +1075,7 @@ export default {
if( total>appearPrice ){ // if( total>appearPrice ){ //
row.spendMoney = appearPrice row.spendMoney = appearPrice
row.giftSpendMoney = appearPrice row.giftSpendMoney = appearPrice
row.cardGiftOvers = row.cardGiftOvers - appearPrice row.cardGiftOvers = (row.cardGiftOvers - appearPrice).toFixed(2)*1
}else{ // }else{ //
row.spendMoney = row.cardGiftOvers row.spendMoney = row.cardGiftOvers
row.giftSpendMoney = row.cardGiftOvers row.giftSpendMoney = row.cardGiftOvers
@ -1084,7 +1090,7 @@ export default {
let remainderCsee = appearPrice - row.cardOvers // let remainderCsee = appearPrice - row.cardOvers //
row.spendMoney = row.cardOvers row.spendMoney = row.cardOvers
row.giftSpendMoney = remainderCsee row.giftSpendMoney = remainderCsee
row.cardGiftOvers = row.cardGiftOvers - remainderCsee row.cardGiftOvers = (row.cardGiftOvers - remainderCsee).toFixed(2)*1
} }
}else{ // }else{ //
row.spendMoney = row.cardOvers row.spendMoney = row.cardOvers
@ -1098,14 +1104,29 @@ export default {
}, },
endEditcard(row, index) { //!!!!!! endEditcard(row, index) { //!!!!!!
console.log('测试---二进制--->>>',0.1+0.2)
// collectionAmounts  collectionRechargeAmount // collectionAmounts  collectionRechargeAmount
// spendMoney cardConsumeMoney cardOvers discount discountFreeAmount giftSpendMoney cardGiftOvers // spendMoney cardConsumeMoney cardOvers discount discountFreeAmount giftSpendMoney cardGiftOvers
// type:0 1 2 noDiscount 0 1 // type:0 1 2 noDiscount 0 1
this.recIndex = -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) // 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.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 if(this.list[this.projectIndex].noDiscount == 0){ // 0
row.spendMoney = row.spendMoney*1 // row.spendMoney = row.spendMoney*1 //
if(row.spendMoney>row.cardOvers){ // if(row.spendMoney>row.cardOvers){ //
@ -1141,7 +1162,7 @@ export default {
}else{ // }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 // row.giftSpendMoney = 0 //
let balanceProportion = row.cardOvers/(row.cardOvers + (row.cardGiftOvers?row.cardGiftOvers*1: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)) // 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 ))// 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 balanceProportion = balanceProportion.toFixed(4)*1
giveProportion = giveProportion.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 // row.giftSpendMoney = 0 //
console.log('现在的赠送余额是多少----->',row.cardGiftOvers,'比例是多少--->',balanceProportion,'另外一个比例---->',giveProportion) console.log('现在的赠送余额是多少----->',row.cardGiftOvers,'比例是多少--->',balanceProportion,'另外一个比例---->',giveProportion)
if(row.spendMoney > row.cardOvers){ // if(row.spendMoney > row.cardOvers){ //
@ -1252,9 +1273,10 @@ export default {
this.updataList() this.updataList()
}else{ // }else{ //
// //
let giveCase = ((row.spendMoney/balanceProportion)*giveProportion)*1 // let giveCase = ((row.spendMoney/balanceProportion)*giveProportion).toFixed(2)*1 //
if(((row.spendMoney*1 + giveCase)*1) > appearPrice){ 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: "按比例支付总和大于成交金额" }); // if((((row.spendMoney*1 + giveCase)*1) - appearPrice)>=this.balance*1)this.$message.warning({ message: "按比例支付总和大于成交金额" }); //
// //
console.log('是多少-->',row.spendMoney,'总额-->',row.cardOvers) console.log('是多少-->',row.spendMoney,'总额-->',row.cardOvers)
@ -1276,17 +1298,18 @@ export default {
this.list.push({}) this.list.push({})
this.list.pop() this.list.pop()
}else{ // }else{ //
if(row.spendMoney === this.spendMoney){ // if((row.spendMoney*1) === this.spendMoney){ //
console.log('现在只执行这里---->!!!') console.log('现在只执行这里---->!!!')
row.cardOvers = (row.cardOvers - row.spendMoney).toFixed(2)*1 row.cardOvers = (row.cardOvers - row.spendMoney).toFixed(2)*1
this.updataList() this.updataList()
this.list.push({}) this.list.push({})
this.list.pop() this.list.pop()
this.spendMoney = ''
return return
} }
if(this.list[this.projectIndex].noDiscount == 0){ // 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 // row.giftSpendMoney = 0 //
// 0 // 0
if(row.cardOvers === 0 && row.cardGiftOvers){ //0 if(row.cardOvers === 0 && row.cardGiftOvers){ //0
@ -1351,7 +1374,7 @@ export default {
if(paymentAmount>appearPrice){ // if(paymentAmount>appearPrice){ //
this.$message.warning({ message: "赠送金额大于项目金额" }); this.$message.warning({ message: "赠送金额大于项目金额" });
row.giftSpendMoney = (appearPrice*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1)).toFixed(2)*1 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.spendMoney = 0
row.cardOvers = 0 row.cardOvers = 0
// ,, // ,,
@ -1362,7 +1385,7 @@ export default {
return this.updataList() return this.updataList()
}else{ // }else{ //
row.giftSpendMoney = row.spendMoney row.giftSpendMoney = row.spendMoney
row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1
row.spendMoney = 0 row.spendMoney = 0
row.cardOvers = 0 row.cardOvers = 0
// ,, // ,,
@ -1392,7 +1415,7 @@ export default {
row.cardOvers = 0 row.cardOvers = 0
let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) // let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //
row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) // 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() this.updataList()
} }
}else{ // }else{ //
@ -1421,7 +1444,7 @@ export default {
row.cardOvers = 0 row.cardOvers = 0
let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) // let remainderCsee = appearPrice - ((row.spendMoney/row.discount)*100) //
row.giftSpendMoney = remainderCsee*(row.discountFreeAmount?(row.discountFreeAmount*1)/100:1) // 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() this.updataList()
} }
}else{ // }else{ //
@ -1447,7 +1470,7 @@ export default {
} }
} }
}else{ // }else{ //
row.cardGiftOvers = row.cardGiftOvers + row.giftSpendMoney // row.cardGiftOvers = (row.cardGiftOvers + row.giftSpendMoney).toFixed(2)*1 //
row.giftSpendMoney = 0 // row.giftSpendMoney = 0 //
let total = row.cardOvers + row.cardGiftOvers let total = row.cardOvers + row.cardGiftOvers
@ -1458,7 +1481,7 @@ export default {
if(row.cardGiftOvers>appearPrice){ // if(row.cardGiftOvers>appearPrice){ //
row.spendMoney = 0 row.spendMoney = 0
row.giftSpendMoney = appearPrice 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',false)
this.$set(this.list[this.projectIndex],'popover',true) this.$set(this.list[this.projectIndex],'popover',true)
@ -1479,7 +1502,7 @@ export default {
if(row.cardGiftOvers>appearPrice){ // if(row.cardGiftOvers>appearPrice){ //
row.spendMoney = 0 row.spendMoney = 0
row.giftSpendMoney = appearPrice 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',false)
this.$set(this.list[this.projectIndex],'popover',true) this.$set(this.list[this.projectIndex],'popover',true)
@ -1495,7 +1518,7 @@ export default {
} }
}else{ // }else{ //
row.giftSpendMoney = row.spendMoney*1 row.giftSpendMoney = row.spendMoney*1
row.cardGiftOvers = row.cardGiftOvers - row.giftSpendMoney row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1
row.spendMoney = 0 row.spendMoney = 0
// ,, // ,,
this.$set(this.list[this.projectIndex],'popover',false) this.$set(this.list[this.projectIndex],'popover',false)
@ -1518,7 +1541,7 @@ export default {
row.spendMoney = row.cardOvers row.spendMoney = row.cardOvers
row.cardOvers = 0 row.cardOvers = 0
row.giftSpendMoney = appearPrice - row.spendMoney row.giftSpendMoney = appearPrice - row.spendMoney
row.cardGiftOvers = row.giftSpendMoney row.cardGiftOvers = (row.giftSpendMoney).toFixed(2)*1
this.updataList() this.updataList()
} }
}else{ }else{
@ -1542,7 +1565,7 @@ export default {
row.spendMoney = row.cardOvers row.spendMoney = row.cardOvers
row.cardOvers = 0 row.cardOvers = 0
row.giftSpendMoney = appearPrice - row.spendMoney row.giftSpendMoney = appearPrice - row.spendMoney
row.cardGiftOvers = row.giftSpendMoney row.cardGiftOvers = (row.giftSpendMoney).topPrice(2)*1
this.updataList() this.updataList()
} }
}else{ }else{
@ -1854,7 +1877,7 @@ export default {
this.$refs.project.show(this.memberForm); this.$refs.project.show(this.memberForm);
}, },
projectData(v) { projectData(v) {
console.log('是这里没错了--->') console.log('是这里没错了--->',v)
if (!v.courseAccountId) { if (!v.courseAccountId) {
v.courseAccountId = null; v.courseAccountId = null;
v.courseProjectId = v.id; v.courseProjectId = v.id;
@ -1862,6 +1885,7 @@ export default {
} else { } else {
v.courseMoney = v.courseConsumePrice; v.courseMoney = v.courseConsumePrice;
} }
this.list.splice(this.proIndex,1,[])
this.setProOne(v); this.setProOne(v);
}, },
// cashAmount // cashAmount
@ -1870,11 +1894,6 @@ export default {
row.courseMoney = 0; row.courseMoney = 0;
} else { } else {
row.courseMoney = row.courseConsumePrice; row.courseMoney = row.courseConsumePrice;
// row.collectionAmounts=row.transactionPrice
console.log(
"🚀 ~ file: service.vue ~ line 1466 ~ setProOne ~ row.transactionPrice",
row
);
} }
let form = {}; let form = {};
proOne({ proOne({
@ -1908,7 +1927,7 @@ export default {
projectName: res.data.projectName, projectName: res.data.projectName,
projectNum: res.data.projectNum, projectNum: res.data.projectNum,
courseAccountId: row.courseAccountId, courseAccountId: row.courseAccountId,
courseMoney: row.courseMoney, courseMoney:row.courseAccountId?row.price:0,
noDiscount: res.data.noDiscount, noDiscount: res.data.noDiscount,
isCardPay: res.data.isCardPay, isCardPay: res.data.isCardPay,
amount: res.data.transactionPrice, amount: res.data.transactionPrice,
@ -1920,7 +1939,6 @@ export default {
collectionIntegralAmount: 0, collectionIntegralAmount: 0,
collectionAmount: 0, collectionAmount: 0,
projectId: res.data.id, projectId: res.data.id,
// cashNum: res.data.cashNum,
storeId: res.data.storeId, storeId: res.data.storeId,
storeName: res.data.storeName, storeName: res.data.storeName,
price: res.data.price, price: res.data.price,
@ -2057,6 +2075,28 @@ export default {
callback: action => {} 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<this.appearPrices*1){
this.formData = new FormData();
return this.$alert(`金额还需支付${this.appearPrices*1 - total}`, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: action => {}
});
}
}
if (flag) { if (flag) {
let passShow = false; let passShow = false;
this.list.forEach((item, index) => { this.list.forEach((item, index) => {
@ -2093,7 +2133,7 @@ export default {
if (item.courseAccountId == null) { if (item.courseAccountId == null) {
item.collectionCashAmount = item.collectionCashAmount =
( (
item.amount - item.collectionAmounts item.amount - (item.collectionAmounts?item.collectionAmounts*1:0)
).toFixed(2) * 1; ).toFixed(2) * 1;
item.cashAmount = item.cashAmount =
( (
@ -2155,28 +2195,6 @@ export default {
collectionAmountsum+=(item.collectionAmount*1+collectionAmountsum*1); collectionAmountsum+=(item.collectionAmount*1+collectionAmountsum*1);
}); });
this.formData.append("cashListRequestList", JSON.stringify(list)); 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<this.appearPrices*1){
this.formData = new FormData();
return this.$alert(`金额还需支付${this.appearPrices*1 - total}`, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: action => {}
});
}
}
addCash(this.formData).then(res => { addCash(this.formData).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.$message.success({ this.$message.success({
@ -2266,12 +2284,13 @@ export default {
}, },
reccardData(v) {}, reccardData(v) {},
courseData(v) { courseData(v) {
console.log('这个v--->',v)
if (!v.courseAccountId) { if (!v.courseAccountId) {
v.courseAccountId = null; v.courseAccountId = null;
v.courseProjectId = v.id; v.courseProjectId = v.id;
v.courseMoney = 0; v.courseMoney = 0;
} else { } else {
v.courseMoney = v.courseConsumePrice; v.courseMoney = v.price;
} }
this.setProOne(v); this.setProOne(v);
}, },
@ -2850,7 +2869,9 @@ export default {
activated() { activated() {
this.setPage(); this.setPage();
}, },
created() {} created() {
this.notData()
}
}; };
</script> </script>

@ -667,7 +667,7 @@ export default {
row.spendMoney = this.form.debtMoney; row.spendMoney = this.form.debtMoney;
} }
row.isShow = true; row.isShow = true;
spendMoney = spendMoney.toFixed(2) * 1; row.spendMoney = row.spendMoney.toFixed(2) * 1;
} else { } else {
this.$message.warning({ message: "请先输入会员手机号!" }); this.$message.warning({ message: "请先输入会员手机号!" });
} }
@ -892,8 +892,7 @@ export default {
return sums; return sums;
}, },
}, },
created() {}, created() {
activated() {
this.form = JSON.parse(JSON.stringify({})); this.form = JSON.parse(JSON.stringify({}));
if (this.$route.query.promotionName != undefined) { if (this.$route.query.promotionName != undefined) {
this.form = Object.assign(this.$route.query); this.form = Object.assign(this.$route.query);

@ -81,6 +81,11 @@ export default {
this.queryForm.stopDates = res[1]; this.queryForm.stopDates = res[1];
}, },
changeMonth(res) { changeMonth(res) {
if(!res){
this.dateStr = this.formatTime(new Date(), "YYYY-MM");
this.storeStatisticMemberList();
return
}
this.dateStr = this.formatTime(res, "YYYY-MM"); this.dateStr = this.formatTime(res, "YYYY-MM");
this.storeStatisticMemberList(); this.storeStatisticMemberList();
}, },
@ -88,6 +93,9 @@ export default {
this.storeStatisticMemberList(); this.storeStatisticMemberList();
}, },
storeStatisticMemberList() { storeStatisticMemberList() {
let params = {
dateStr:this.dateStr
}
memberRecharge().then((res) => { memberRecharge().then((res) => {
console.log(res); console.log(res);
if (res.code == "000000") { if (res.code == "000000") {
@ -108,9 +116,7 @@ export default {
}); });
} }
}); });
storeStatisticMemberList({ storeStatisticMemberList(params).then((res) => {
dateStr: this.dateStr,
}).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.cashList = res.rows; this.cashList = res.rows;
} else { } else {
@ -121,7 +127,7 @@ export default {
}); });
}, },
}, },
activated() { created() {
this.dateStr = this.formatTime(new Date(), "YYYY-MM"); this.dateStr = this.formatTime(new Date(), "YYYY-MM");
this.storeStatisticMemberList(); this.storeStatisticMemberList();
this.month = this.formatTime(new Date(), "YYYY-MM"); this.month = this.formatTime(new Date(), "YYYY-MM");

@ -0,0 +1,175 @@
<template>
<div class="box">
<div class="left">
<el-table v-loading="loading" :data="tableDate" :header-cell-style="{
background: 'linear-gradient(#6cb3ff, #1873d4)',
color: '#eeeeee',
}" show-summary border max-height="600">
<el-table-column align="center" min-width="75" prop="date" label="日期"></el-table-column>
<el-table-column align="center" label="客单数">
<el-table-column align="center" min-width="60" prop="rechargeOrderNum" label="充值">
</el-table-column>
<el-table-column align="center" min-width="60" prop="courseOrderNum" label="疗程">
</el-table-column>
<el-table-column align="center" min-width="60" prop="cashPeopleNum" label="服务">
</el-table-column>
</el-table-column>
<el-table-column align="center" min-width="60" prop="rechargeMoney" label="充值金额">
</el-table-column>
<el-table-column align="center" min-width="60" label="疗程">
<el-table-column align="center" prop="coursexMoney" label="现付"></el-table-column>
<el-table-column align="center" prop="coursekMoney" label="卡付"></el-table-column>
</el-table-column>
<el-table-column align="center" label="服务">
<el-table-column align="center" prop="cashMoney" label="总金额">
</el-table-column>
<el-table-column align="center" prop="cashierCashMoney" label="现付金额">
</el-table-column>
<el-table-column align="center" prop="cashierCardMoney" label="卡付金额">
</el-table-column>
</el-table-column>
<el-table-column align="center" label="项目男女客数">
<el-table-column align="center" min-width="60" prop="man" label="男客">
</el-table-column>
<el-table-column align="center" min-width="60" prop="woman" label="女客">
</el-table-column>
</el-table-column>
<el-table-column align="center" min-width="60" label="还款">
<el-table-column align="center" label="充值金额" prop="recRepayMoney"></el-table-column>
<el-table-column align="center" label="疗程金额" prop="courseRepayMoney"></el-table-column>
<el-table-column align="center" label="促销金额" prop="promotionCourseRepayMoney"></el-table-column>
</el-table-column>
<el-table-column align="center" min-width="60" prop="refundMoney" label="退款金额">
</el-table-column>
<el-table-column align="center" min-width="60" label="会员">
<el-table-column align="center" min-width="60" prop="newMemberNum" label="新增"></el-table-column>
<el-table-column align="center" min-width="60" prop="startMemberNum" label="启用" v-if="headOffice==1">
</el-table-column>
<el-table-column align="center" min-width="60" prop="memberNum" label="总数" v-if="headOffice==1">
</el-table-column>
</el-table-column>
</el-table>
</div>
<div class="right">
<payment style="width:100%" ref="payment" :payLists='payLists' :pay='pay'/>
</div>
</div>
</template>
<script>
import payment from './payment.vue'
import { ctlist } from "@/api/eashier.js";
export default {
props:{
lists:{
type:Array,
default:()=>([])
},
pay:{
type:Array,
default:()=>([])
}
},
watch:{
lists:{
handler(arr){
if(arr){
this.tableDate = arr
}else{
this.tableDate = []
}
},
immediate:true
},
pay:{
handler(arr){
try{
for(let i=0;i<this.payLists.length;i++){
this.$set(this.payLists[i],'payMoney',0)
for(let j=0;j<arr.length;j++){
if(this.payLists[i].collectionTypeName === arr[j].payName){
this.$set(this.payLists[i],'payMoney',arr[j].payMoney)
}
}
}
}catch(err){
this.payLists.forEach(item=>{
this.$set(item,'payMoney',0)
})
}
},
immediate:true
}
},
data () {
return {
loading:false,
payLists:[],
tableDate:[],
headOffice: sessionStorage.getItem("headOffice") * 1,
}
},
components:{
payment
},
methods:{
//
initpay(){
ctlist({
state: 1
}).then(res=>{
if(res.code === '000000'){
this.payLists = res.rows
}
})
},
},
created(){
this.initpay()
},
}
</script>
<style scoped>
.box{
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.left{
/* flex: 1; */
width: 80%;
padding-right: 10px;
}
.form{
border: 1px solid #ccc;
padding: 0 20px;
}
.right{
width: 20%;
/* flex: 1; */
display: flex;
justify-content: flex-end;
}
.parallel{
display: flex;
align-items: center;
height: 60px;
line-height: 60px;
}
.title{
font-size: 15px;
line-height: 30px;
}
.content{
display: flex;
}
.testShow{
padding: 20px;
font-size:15px;
}
.colSpan{
color: red;
text-decoration:underline
}
</style>

@ -0,0 +1,36 @@
<template>
<div class="flex">
<div style="width:100%">
<el-table :data="payLists" style="max-width:280px" class='border'
:header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }">
<el-table-column align="center" prop="collectionTypeName" min-width="100" label="支付方式"></el-table-column>
<el-table-column align="center" prop="payMoney" min-width="80" label="本次支付 ">
<template slot-scope="scope">
{{ scope.row.payMoney?scope.row.payMoney:0 }}
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
props:{
payLists:{
type:Array,
default:()=>([])
},
pay:{
type:Array,
default:()=>([])
}
},
data() {
return {
};
},
};
</script>
<style>
</style>

@ -10,102 +10,9 @@
<div class="block"> <div class="block">
</div> </div>
</div> </div>
<el-table @row-dblclick="confirm" :data="tableDate" :header-cell-style="{ <div class="padding-left-xs">
background: 'linear-gradient(#6cb3ff, #1873d4)', <Forms :lists='tableDate' :pay='payLists' ref="form"></Forms>
color: '#eeeeee', </div>
}" show-summary border max-height="700">
<el-table-column align="center" min-width="80" prop="date" label="日期"></el-table-column>
<el-table-column align="center" label="客单数">
<el-table-column align="center" min-width="80" prop="rechargeNum" label="充值">
<template slot-scope="scope">
{{scope.row.rechargeNum?scope.row.rechargeNum:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="courseOrderNum" label="疗程">
<template slot-scope="scope">
{{scope.row.courseOrderNum?scope.row.courseOrderNum:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="cashPeopleNum" label="服务">
<template slot-scope="scope">
{{scope.row.cashPeopleNum?scope.row.cashPeopleNum:'0'}}
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeMoney" label="充值金额">
<template slot-scope="scope">
{{scope.row.rechargeMoney?scope.row.rechargeMoney:'0'}}
</template>
</el-table-column>
<!-- <el-table-column align="center" min-width="80" prop="rechargeOrderNum" label="充值人数">
<template slot-scope="scope">
{{scope.row.rechargeOrderNum?scope.row.rechargeOrderNum:'--'}}
</template>
</el-table-column> -->
<el-table-column align="center" min-width="80" prop="courseMoney" label="疗程金额">
<template slot-scope="scope">
{{scope.row.courseMoney?scope.row.courseMoney:'0'}}
</template>
</el-table-column>
<!-- <el-table-column align="center" min-width="80" prop="courseOrderNum" label="疗程人数">
<template slot-scope="scope">
{{scope.row.courseOrderNum?scope.row.courseOrderNum:'--'}}
</template>
</el-table-column> -->
<el-table-column align="center" label="服务">
<el-table-column align="center" min-width="80" prop="cashMoney" label="总金额">
<template slot-scope="scope">
{{scope.row.cashMoney?scope.row.cashMoney:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="cashierCashMoney" label="现付金额">
<template slot-scope="scope">
{{scope.row.cashierCashMoney?scope.row.cashierCashMoney:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="cashierCardMoney" label="卡付金额">
<template slot-scope="scope">
{{scope.row.cashierCardMoney?scope.row.cashierCardMoney:'0'}}
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" min-width="80" prop="man" label="男客">
<template slot-scope="scope">
{{scope.row.man?scope.row.man:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="woman" label="女客">
<template slot-scope="scope">
{{scope.row.woman?scope.row.woman:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="repayMoney" label="还款金额">
<template slot-scope="scope">
{{scope.row.repayMoney?scope.row.repayMoney:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="refundMoney" label="退款金额">
<template slot-scope="scope">
{{scope.row.refundMoney?scope.row.refundMoney:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" prop="newMemberNum" label="新增会员">
<template slot-scope="scope">
{{scope.row.newMemberNum?scope.row.newMemberNum:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" label="启用会员" v-if="headOffice==1">
<template slot-scope="scope">
{{scope.row.startMemberNum?scope.row.startMemberNum:'0'}}
</template>
</el-table-column>
<el-table-column align="center" min-width="80" label="会员总数" v-if="headOffice==1">
<template slot-scope="scope">
{{scope.row.memberNum?scope.row.memberNum:'0'}}
</template>
</el-table-column>
</el-table>
<perform ref="perform"></perform>
</div> </div>
</template> </template>
@ -113,13 +20,15 @@
import { storeDailys, exportachi, exportachiwhole } from "@/api/statistics.js"; import { storeDailys, exportachi, exportachiwhole } from "@/api/statistics.js";
import { partten } from "../../../../partten/index"; import { partten } from "../../../../partten/index";
import perform from "./examine/index"; import perform from "./examine/index";
import Forms from './form.vue'
export default { export default {
components: { perform }, components: { perform ,Forms},
data() { data() {
return { return {
headOffice: sessionStorage.getItem("headOffice") * 1, headOffice: sessionStorage.getItem("headOffice") * 1,
days: "", days: "",
tableDate: [{}], payLists:[],
tableDate: [],
month: partten.months, month: partten.months,
queryForm: {}, queryForm: {},
pickerOptions: { pickerOptions: {
@ -185,18 +94,26 @@ export default {
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
}); });
}, },
changeMonth(res) { changeMonth(res) {
if(!res){
this.payLists = null
this.tableDate = []
return
}
this.days = res; this.days = res;
this.getData(); this.getData();
}, },
getData() { getData() {
this.$refs.form.loading = true
this.queryForm.startDate = this.days[0]; this.queryForm.startDate = this.days[0];
this.queryForm.endDate = this.days[1]; this.queryForm.endDate = this.days[1];
this.queryForm.storeId = sessionStorage.getItem("storeId"); this.queryForm.storeId = sessionStorage.getItem("storeId");
storeDailys(this.queryForm).then((res) => { storeDailys(this.queryForm).then((res) => {
this.$refs.form.loading = false
if (res.code == "000000") { if (res.code == "000000") {
this.tableDate = res.data; console.log('这是什么----->',res)
this.tableDate = res.data.lists;
this.payLists = res.data.payLists
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -208,10 +125,6 @@ export default {
} }
}); });
}, },
confirm(row) {
// row.type = 3;
// this.$refs.perform.show(row);
},
// //
// //
getSummaries(param) { getSummaries(param) {
@ -222,7 +135,6 @@ export default {
sums[index] = "合计"; sums[index] = "合计";
return; return;
} }
const values = data.map((item) => Number(item[column.property])); const values = data.map((item) => Number(item[column.property]));
if (column.property == "baseSalary") { if (column.property == "baseSalary") {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
@ -271,11 +183,13 @@ export default {
return sums; return sums;
}, },
}, },
activated() { created() {
let sDate = this.formatTime(new Date(), "YYYY-MM-DD"); let sDate = this.formatTime(new Date(), "YYYY-MM-DD");
let eDate = this.formatTime(new Date(), "YYYY-MM-DD"); let eDate = this.formatTime(new Date(), "YYYY-MM-DD");
this.days = [sDate, eDate]; this.days = [sDate, eDate];
this.$nextTick(()=>{
this.getData(); this.getData();
})
}, },
}; };
</script> </script>

@ -138,7 +138,7 @@ export default {
}; };
</script> </script>
<style> <style scoped>
.el-form-item__content { .el-form-item__content {
display: flex !important; display: flex !important;
flex-wrap: wrap !important; flex-wrap: wrap !important;

Loading…
Cancel
Save