收银修改--

master
Wangxubin 3 years ago
parent 67c3f8beb4
commit 3a84547ca0

@ -275,7 +275,7 @@ export function propageNew(params) {
//查询开疗程时人员 //查询开疗程时人员
export function selectRatioInfo(params) { export function selectRatioInfo(params) {
return service({ return service({
url: "/api" + "/demay/ssm/staff/selectRatioInfo", url: "/api" + "/demay/ssm/pro/copyProject",
method: "post", method: "post",
data: params data: params
}); });

@ -31,7 +31,6 @@
</el-table> </el-table>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogVisible = false">关闭</el-button> <el-button size="mini" type="primary" @click="dialogVisible = false">关闭</el-button>
</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -98,6 +97,10 @@ export default {
docType: "promotion_card_repay", docType: "promotion_card_repay",
docTypeName: "促销还款", docTypeName: "促销还款",
}, },
{
docType: 'recharge_groupon',
docTypeName: "团购卡"
},
], ],
form: {}, // form: {}, //
}; };

@ -59,6 +59,10 @@ export default {
typeName: "促销", typeName: "促销",
typeIndex: 7, typeIndex: 7,
}, },
{
typeName: "团购卡",
typeIndex: 10,
},
], ],
}; };
}, },

@ -196,6 +196,15 @@ export default {
this.rows=res.rows this.rows=res.rows
// this.radioForm.rows=res.rows // this.radioForm.rows=res.rows
this.$emit("projectData", this.radioForm,this.rows); this.$emit("projectData", this.radioForm,this.rows);
this.$message.success({ message: "操作成功" });
}else{
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
} }
}) })
} }

@ -77,10 +77,10 @@ export default {
couAccountList(ids).then((res) => { couAccountList(ids).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.list = res.rows; this.list = res.rows;
var shopname=sessionStorage.getItem("storeName") var storeId=sessionStorage.getItem("storeId")
this.lists =this.list.filter(item=>item.storeName != shopname) console.log('shopname--->',shopname)
this.list = this.list.filter(item=>item.storeName == shopname) this.lists =this.list.filter(item=>item.storeId != storeId)
this.list = this.list.filter(item=>item.storeId == storeId)
} else { } else {
this.$alert(res.message, "查询会员疗程", { this.$alert(res.message, "查询会员疗程", {
confirmButtonText: "确定", confirmButtonText: "确定",

@ -1351,10 +1351,8 @@ export default {
collectionRechargeAmount += item.spendMoney*1 collectionRechargeAmount += item.spendMoney*1
collectionAmounts += ( ( (item.spendMoney*1)/ ((item.discount?item.discount:100)/100) ) + ((item.giftSpendMoney?item.giftSpendMoney*1:0)/(item.discountFreeAmount?item.discountFreeAmount/100:1))) collectionAmounts += ( ( (item.spendMoney*1)/ ((item.discount?item.discount:100)/100) ) + ((item.giftSpendMoney?item.giftSpendMoney*1:0)/(item.discountFreeAmount?item.discountFreeAmount/100:1)))
}) })
collectionRechargeAmount = collectionRechargeAmount.toFixed(2)*1 this.$set(this.list[this.projectIndex],'collectionRechargeAmount',collectionRechargeAmount.toFixed(2)*1)
collectionAmounts = collectionAmounts.toFixed(2)*1 this.$set(this.list[this.projectIndex],'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].transactionPrice-this.list[this.projectIndex].collectionAmounts)<=this.balance*1 ){ if((this.list[this.projectIndex].transactionPrice-this.list[this.projectIndex].collectionAmounts)<=this.balance*1 ){
this.list[this.projectIndex].collectionAmounts = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1 this.list[this.projectIndex].collectionAmounts = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1
@ -1365,10 +1363,8 @@ export default {
collectionRechargeAmount += item.spendMoney*1 collectionRechargeAmount += item.spendMoney*1
collectionAmounts += ((item.spendMoney*1) + (item.giftSpendMoney?item.giftSpendMoney*1:0)) collectionAmounts += ((item.spendMoney*1) + (item.giftSpendMoney?item.giftSpendMoney*1:0))
}) })
collectionRechargeAmount = collectionRechargeAmount.toFixed(2)*1 this.$set(this.list[this.projectIndex],'collectionRechargeAmount',(collectionRechargeAmount).toFixed(2)*1)
collectionAmounts = collectionAmounts.toFixed(2)*1 this.$set(this.list[this.projectIndex],'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].transactionPrice-this.list[this.projectIndex].collectionAmounts)<=this.balance*1 ){ if((this.list[this.projectIndex].transactionPrice-this.list[this.projectIndex].collectionAmounts)<=this.balance*1 ){
this.list[this.projectIndex].collectionAmounts = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1 this.list[this.projectIndex].collectionAmounts = (this.list[this.projectIndex].transactionPrice).toFixed(2)*1
} // } //
@ -1417,7 +1413,7 @@ export default {
}else{ }else{
// //
console.log('当前剩余金额-->',appearPrice,'折扣是多少-->',row.discount) console.log('当前剩余金额-->',appearPrice,'折扣是多少-->',row.discount)
row.spendMoney = appearPrice*(row.discount*1/100).toFixed(2)*1 row.spendMoney = (appearPrice*(row.discount*1/100)).toFixed(2)*1
// this.updataList() // this.updataList()
} }
}else{ }else{
@ -1425,15 +1421,16 @@ export default {
let total = (row.cardOvers/(row.discount*1)*100 + ( row.cardGiftOvers/( (row.discountFreeAmount?row.discountFreeAmount:100)*1 )*100 )).toFixed(2)*1 let total = (row.cardOvers/(row.discount*1)*100 + ( row.cardGiftOvers/( (row.discountFreeAmount?row.discountFreeAmount:100)*1 )*100 )).toFixed(2)*1
let balanceProportion = (row.cardConsumeMoney*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) // let balanceProportion = (row.cardConsumeMoney*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) //
let giveProportion = (row.cardGiftOvers*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) // let giveProportion = (row.cardGiftOvers*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) //
balanceProportion = balanceProportion.toFixed(4)*1 let balanceConverted = balanceProportion/(row.discount?(row.discount*1/100):1) // ()
giveProportion = giveProportion.toFixed(4)*1 let giveConverted = giveProportion/(row.discountFreeAmount?(row.discountFreeAmount*1/100):1) //
let convertedNum = appearPrice/(balanceConverted+giveConverted) //
console.log('可用比例-->',balanceProportion,'赠送比例--->',giveProportion) console.log('可用比例-->',balanceProportion,'赠送比例--->',giveProportion)
if(appearPrice<total){ if(appearPrice<total){
// //
row.spendMoney = (appearPrice*balanceProportion*((row.discount?row.discount*1:100)/100)).toFixed(2)*1 row.spendMoney = (convertedNum*balanceProportion).toFixed(2)*1
row.giftSpendMoney = (appearPrice*giveProportion*((row.discountFreeAmount?row.discountFreeAmount*1:100)/100)).toFixed(2) row.giftSpendMoney = (convertedNum*giveProportion).toFixed(2)*1
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1
console.log('来了这里--->') console.log('剩了多少--->',row.cardGiftOvers)
// this.updataList() // this.updataList()
}else{ }else{
// , // ,
@ -1453,11 +1450,11 @@ export default {
// //
let balanceProportion = (row.cardConsumeMoney*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) // let balanceProportion = (row.cardConsumeMoney*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) //
let giveProportion = (row.cardGiftOvers*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) // let giveProportion = (row.cardGiftOvers*1)/(row.cardConsumeMoney*1 + row.cardGiftOvers*1) //
balanceProportion = balanceProportion.toFixed(2)*1 // row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1
giveProportion = giveProportion.toFixed(2)*1 // row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1
row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 row.spendMoney = (appearPrice*row.cardOvers/( row.cardGiftOvers+row.cardOvers )).toFixed(2)*1
row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 row.giftSpendMoney = (appearPrice*row.cardGiftOvers/( row.cardGiftOvers+row.cardOvers )).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
@ -1465,6 +1462,7 @@ export default {
// this.updataList() // this.updataList()
} }
} }
this.spendMoney = row.spendMoney
}else{ // }else{ //
console.log('来到了门店参数2--->') console.log('来到了门店参数2--->')
// // // //
@ -1535,7 +1533,7 @@ export default {
console.log('上一次的值是多少呢------>',this.spendMoney) console.log('上一次的值是多少呢------>',this.spendMoney)
} }
}, },
endEditcard(row, index) { //!!!!!! endEditcard(row, index) { //
// 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
@ -1549,7 +1547,8 @@ export default {
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('上一次--->',this.spendMoney,'现在--->',row.spendMoney)
if(this.spendMoney === row.spendMoney){
console.log('我会到这里呀!!!!') console.log('我会到这里呀!!!!')
// //
row.cardOvers = (row.cardOvers - (row.spendMoney*1)).toFixed(2)*1 row.cardOvers = (row.cardOvers - (row.spendMoney*1)).toFixed(2)*1
@ -1571,11 +1570,13 @@ export default {
// , // ,
let balanceProportion = row.cardOvers*1/(row.cardOvers*1+( (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1 )) // let balanceProportion = row.cardOvers*1/(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 ))// 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 console.log('--------->比例',balanceProportion,giveProportion)
giveProportion = giveProportion.toFixed(4)*1 let balanceConverted = balanceProportion/(row.discount?(row.discount*1/100):1) // ()
row.spendMoney = (appearPrice*balanceProportion*(row.discount/100)).toFixed(2)*1 // let giveConverted = giveProportion/(row.discountFreeAmount?(row.discountFreeAmount*1/100):1) //
let convertedNum = appearPrice/(balanceConverted+giveConverted) //
row.spendMoney = ( convertedNum*balanceProportion ).toFixed(2)*1 //
row.cardGiftOvers = (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1 // row.cardGiftOvers = (row.giftSpendMoney?row.giftSpendMoney*1:0) + row.cardGiftOvers*1 //
row.giftSpendMoney = ((appearPrice*giveProportion)*(row.discountFreeAmount/100)).toFixed(2)*1 // row.giftSpendMoney =( convertedNum*giveProportion ).toFixed(2)*1 //
row.cardGiftOvers = (row.cardGiftOvers*1 - row.giftSpendMoney*1).toFixed(2)*1 // = - row.cardGiftOvers = (row.cardGiftOvers*1 - row.giftSpendMoney*1).toFixed(2)*1 // = -
// //
if(row.cardGiftOvers<0){ if(row.cardGiftOvers<0){
@ -1598,18 +1599,18 @@ export default {
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)) //
balanceProportion = balanceProportion.toFixed(4)*1 let balanceConverted = balanceProportion/(row.discount?(row.discount*1/100):1) // ()
giveProportion = giveProportion.toFixed(4)*1 let giveConverted = giveProportion/(row.discountFreeAmount?(row.discountFreeAmount*1/100):1) //
let convertedNum = appearPrice/(balanceConverted+giveConverted) //
// //
if(row.spendMoney > appearPrice){ // if(row.spendMoney > appearPrice){ //
this.$message.warning({ message: "支付金额大于成交金额" }); this.$message.warning({ message: "支付金额大于成交金额" });
// 400,350 // 400,350
console.log('瞅瞅比例','可用---',balanceProportion,'赠送---',giveProportion) console.log('瞅瞅比例','可用---',balanceProportion,'赠送---',giveProportion)
// //
row.spendMoney = (appearPrice*balanceProportion*(row.discount/100)).toFixed(2)*1 row.spendMoney = (convertedNum*balanceProportion).toFixed(2)*1
row.cardOvers = (row.cardOvers - row.spendMoney).toFixed(2)*1 row.cardOvers = (row.cardOvers - row.spendMoney).toFixed(2)*1
console.log('可用余额为--->',row.cardOvers) row.giftSpendMoney = (convertedNum*giveProportion).toFixed(2)*1
row.giftSpendMoney = ((appearPrice*giveProportion)*(row.discountFreeAmount?row.discountFreeAmount/100:1)).toFixed(2)*1
row.cardGiftOvers =( row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 row.cardGiftOvers =( row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1
// //
if(row.cardGiftOvers<0){ if(row.cardGiftOvers<0){
@ -1625,9 +1626,9 @@ export default {
console.log('总价--->',total) console.log('总价--->',total)
if(total > appearPrice){ // if(total > appearPrice){ //
// //
this.$message.warning({ message: "支付金额大于成交金额" }); this.$message.warning({ message: "支付金额大于项目金额" });
row.spendMoney = ((appearPrice*balanceProportion)*((row.discount?row.discount*1:100)/100)).toFixed(2)*1 // row.spendMoney =( convertedNum*balanceProportion ).toFixed(2)*1 //
row.giftSpendMoney = ((appearPrice*giveProportion)*((row.discountFreeAmount?row.discountFreeAmount*1:100)/100)).toFixed(2)*1 // row.giftSpendMoney = ( convertedNum*giveProportion ).toFixed(2)*1 //
row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 // row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 //
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //
if(row.cardGiftOvers<0){ if(row.cardGiftOvers<0){
@ -1638,12 +1639,13 @@ export default {
// , // ,
let giveCase = (((row.spendMoney/(row.discount?row.discount/100:1))/balanceProportion)*giveProportion).toFixed(2)*1 // let giveCase = (((row.spendMoney/(row.discount?row.discount/100:1))/balanceProportion)*giveProportion).toFixed(2)*1 //
console.log('你是多少--->',giveCase,total) console.log('你是多少--->',giveCase,total)
if( (giveCase+total)>= appearPrice ){ //, // giveCase+total)>= appearPrice
if( row.spendMoney>(convertedNum*balanceProportion) ){ //
console.log('误差是多少--->',giveCase+total,'待支付是多少--->',appearPrice) console.log('误差是多少--->',giveCase+total,'待支付是多少--->',appearPrice)
if(((giveCase+total)-appearPrice)>= this.balance*1)this.$message.warning({ message: "输入金额金额跟赠送金额之和大于成交金额" }); this.$message.warning({ message: "支付金额大于项目金额" });
// //
row.spendMoney = ((appearPrice*balanceProportion)*((row.discount?row.discount*1:100)/100)).toFixed(2)*1 // row.spendMoney = (convertedNum*balanceProportion).toFixed(2)*1 //
row.giftSpendMoney = ((appearPrice*giveProportion)*((row.discountFreeAmount?row.discountFreeAmount*1:100)/100)).toFixed(2)*1 // row.giftSpendMoney = (convertedNum*giveProportion).toFixed(2)*1 //
row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 // row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 //
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //
// //
@ -1652,9 +1654,12 @@ export default {
} }
this.updataList() this.updataList()
}else{ // }else{ //
console.log('我到了这里呀!!!',giveProportion,balanceProportion) // console.log('',giveProportion,balanceProportion)
let zsbl = row.spendMoney/(convertedNum*balanceProportion)
console.log('比例是多少---->',zsbl,'这个呢--->',convertedNum)
row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 // row.cardOvers = ( row.cardOvers - row.spendMoney ).toFixed(2)*1 //
row.giftSpendMoney = ((((row.spendMoney/(row.discount?row.discount/100:1))/balanceProportion)*giveProportion)*((row.discountFreeAmount?row.discountFreeAmount*1:100)/100)).toFixed(2)*1 //(--- //** ---) row.giftSpendMoney = (convertedNum*giveProportion*zsbl).toFixed(2)*1
// row.giftSpendMoney = ((((row.spendMoney/(row.discount?row.discount/100:1))/balanceProportion)*giveProportion)*((row.discountFreeAmount?row.discountFreeAmount*1:100)/100)).toFixed(2)*1 //(--- //** ---)
console.log('赠送支付为多少---->',row.giftSpendMoney) console.log('赠送支付为多少---->',row.giftSpendMoney)
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //
// //
@ -1681,9 +1686,12 @@ export default {
let total = row.cardOvers + row.cardGiftOvers let total = row.cardOvers + row.cardGiftOvers
console.log('为多少--->',row.cardOvers,row.cardGiftOvers) console.log('为多少--->',row.cardOvers,row.cardGiftOvers)
if(total>appearPrice){ // if(total>appearPrice){ //
row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 // // row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 //
// row.cardOvers = row.cardOver - row.spendMoney //= -
// row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 //
row.spendMoney = (appearPrice*row.cardOver/(row.cardOver+row.cardGiftOvers)).toFixed(2)*1
row.cardOvers = row.cardOver - row.spendMoney //= - row.cardOvers = row.cardOver - row.spendMoney //= -
row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 // row.giftSpendMoney = (appearPrice*row.cardGiftOvers/(row.cardOver+row.cardGiftOvers)).toFixed(2)*1
row.cardGiftOvers =( row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // = - row.cardGiftOvers =( row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // = -
this.updataList() this.updataList()
}else{ //, }else{ //,
@ -1698,29 +1706,35 @@ export default {
if(row.spendMoney > appearPrice){ // if(row.spendMoney > appearPrice){ //
this.$message.warning({ message: "支付金额不能大于成交金额" }); this.$message.warning({ message: "支付金额不能大于成交金额" });
// //
row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 // // row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 //
// row.cardOvers = row.cardOvers - row.spendMoney //=-
// row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 //
row.spendMoney = (appearPrice*row.cardOvers/(row.cardOvers + row.cardGiftOvers)).toFixed(2)*1 //
row.giftSpendMoney = (appearPrice*row.cardGiftOvers/(row.cardGiftOvers + row.cardOvers)).toFixed(2)*1 //
row.cardOvers = row.cardOvers - row.spendMoney //=- row.cardOvers = row.cardOvers - row.spendMoney //=-
row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 //
row.cardGiftOvers = (row.cardOvers - row.giftSpendMoney).toFixed(2)*1 //= - row.cardGiftOvers = (row.cardOvers - row.giftSpendMoney).toFixed(2)*1 //= -
this.updataList() this.updataList()
}else{ // }else{ //
// //
let giveCase = ((row.spendMoney/balanceProportion)*giveProportion).toFixed(2)*1 // // let giveCase = ((row.spendMoney/balanceProportion)*giveProportion).toFixed(2)*1 //
let giveCase = 0 //
let spendMoney= (appearPrice*row.cardOvers/(row.cardOvers + row.cardGiftOvers)).toFixed(2)*1
giveCase = ((row.spendMoney/spendMoney)*((appearPrice*row.cardGiftOvers/(row.cardGiftOvers + row.cardOvers))).toFixed(2)*1)
console.log('按比例是多少----->',row.spendMoney/spendMoney,'赠送呢--->',giveCase)
if(((row.spendMoney*1 + giveCase)*1) > appearPrice){ if(((row.spendMoney*1 + giveCase)*1) > appearPrice){
// //
console.log((((row.spendMoney*1 + giveCase)*1) - appearPrice),'---<为多少') 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)
row.spendMoney = (appearPrice*balanceProportion).toFixed(2)*1 // row.spendMoney = (appearPrice*row.cardOvers/(row.cardOvers + row.cardGiftOvers)).toFixed(2)*1 //
row.giftSpendMoney = (appearPrice*row.cardGiftOvers/(row.cardGiftOvers + row.cardOvers)).toFixed(2)*1 //
row.cardOvers = row.cardOvers - row.spendMoney //=- row.cardOvers = row.cardOvers - row.spendMoney //=-
row.giftSpendMoney = (appearPrice*giveProportion).toFixed(2)*1 //
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //= - row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //= -
this.updataList() this.updataList()
}else{ // }else{ //
row.spendMoney = row.spendMoney*1 row.spendMoney = row.spendMoney*1
row.giftSpendMoney = ((appearPrice*row.cardGiftOvers/(row.cardGiftOvers + row.cardOvers))*(row.spendMoney/spendMoney)).toFixed(2)*1 //
row.cardOvers = row.cardOvers - row.spendMoney // row.cardOvers = row.cardOvers - row.spendMoney //
row.giftSpendMoney = ((row.spendMoney/balanceProportion)*giveProportion).toFixed(2)*1 //
row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 // row.cardGiftOvers = (row.cardGiftOvers - row.giftSpendMoney).toFixed(2)*1 //
this.updataList() this.updataList()
} }

@ -7,13 +7,12 @@
<el-form-item required label="类别名称" prop="rechargeTypeName"> <el-form-item required label="类别名称" prop="rechargeTypeName">
<el-input class="form-width" :disabled="title == '明细'" v-model.trim="form.rechargeTypeName" autocomplete="off" placeholder="请输入类别名称" maxlength="50"></el-input> <el-input class="form-width" :disabled="title == '明细'" v-model.trim="form.rechargeTypeName" autocomplete="off" placeholder="请输入类别名称" maxlength="50"></el-input>
</el-form-item> </el-form-item>
<el-form-item required label="有效期(月)" prop="validTime"> <el-form-item label="有效期(月)" >
<el-input class="form-width" :disabled="title == '明细'" v-model.trim="form.validTime" autocomplete="off" placeholder="请选择有效期(月)"> <el-input class="form-width" :disabled="title == '明细'" v-model.trim="form.validTime" autocomplete="off" placeholder="请选择有效期(月)">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="到期日期:" title="会员卡包统一到期日期" prop="unifiedDue"> <el-form-item label="到期日期:" title="会员卡包统一到期日期" prop="unifiedDue">
<el-date-picker class="form-width" v-model="form.unifiedDue" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择到期日期"></el-date-picker> <el-date-picker class="form-width" v-model="form.unifiedDue" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择到期日期"></el-date-picker>
</div>
</el-form-item> </el-form-item>
<el-form-item required label="开始日期" prop="startDates"> <el-form-item required label="开始日期" prop="startDates">
<el-date-picker class="form-width" :disabled="title == '明细'" v-model.trim="form.startDates" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"></el-date-picker> <el-date-picker class="form-width" :disabled="title == '明细'" v-model.trim="form.startDates" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"></el-date-picker>

@ -35,7 +35,6 @@
<orderdetail ref="orderdetail"></orderdetail> <orderdetail ref="orderdetail"></orderdetail>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogVisible = false">关闭</el-button> <el-button size="mini" type="primary" @click="dialogVisible = false">关闭</el-button>
</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -58,6 +57,10 @@ export default {
docType: "card_recharge", docType: "card_recharge",
docTypeName: "充值开卡", docTypeName: "充值开卡",
}, },
{
docType: 'recharge_groupon',
docTypeName: "团购卡"
},
{ {
docType: "recharge_roll_course", docType: "recharge_roll_course",
docTypeName: "疗程转充值卡", docTypeName: "疗程转充值卡",

@ -6,6 +6,18 @@
color: '#eeeeee', color: '#eeeeee',
}" show-summary border max-height="600"> }" 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" min-width="75" prop="date" label="日期"></el-table-column>
<!-- <el-table-column align="center" label="总营业额"></el-table-column>
<el-table-column align="center" label="充值业绩"></el-table-column>
<el-table-column align="center" label="疗程业绩"></el-table-column>
<el-table-column align="center" label="充值卡购买疗程" min-width="100"></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" label="客单数">
<el-table-column align="center" min-width="60" prop="rechargeOrderNum" label="充值"> <el-table-column align="center" min-width="60" prop="rechargeOrderNum" label="充值">
</el-table-column> </el-table-column>
@ -20,14 +32,6 @@
<el-table-column align="center" prop="coursexMoney" label="现付"></el-table-column> <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 align="center" prop="coursekMoney" label="卡付"></el-table-column>
</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" label="项目男女客数">
<el-table-column align="center" min-width="60" prop="man" label="男客"> <el-table-column align="center" min-width="60" prop="man" label="男客">
</el-table-column> </el-table-column>
@ -41,12 +45,12 @@
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="60" prop="refundMoney" label="退款金额"> <el-table-column align="center" min-width="60" prop="refundMoney" label="退款金额">
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="60" label="会员"> <!-- <el-table-column align="center" min-width="60" label="消费退">
</el-table-column> -->
<el-table-column align="center" label="会员">
<el-table-column align="center" min-width="60" prop="newMemberNum" label="新增"></el-table-column> <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 align="center" min-width="60" prop="startMemberNum" label="启用" v-if="headOffice==1"></el-table-column>
</el-table-column> <!-- <el-table-column align="center" min-width="60" prop="memberNum" 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-column>
</el-table> </el-table>
</div> </div>

@ -3,7 +3,7 @@
<div class="max-height-60"> <div class="max-height-60">
<el-form :model="form" ref="form" inline label-width="100px" :rules="rules"> <el-form :model="form" ref="form" inline label-width="100px" :rules="rules">
<el-form-item label="项目类别:" prop="projectTypeName"> <el-form-item label="项目类别:" prop="projectTypeName">
<el-select class="form-width" :disabled="title=='明细'" filterable default-first-option filterable default-first-option v-model="form.projectTypeName" clearable placeholder="请选择"> <el-select class="form-width" :disabled="title=='明细'" filterable default-first-option v-model="form.projectTypeName" clearable placeholder="请选择">
<el-option v-for="item in projecttypenames" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in projecttypenames" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -34,7 +34,7 @@
<el-radio :disabled="title=='明细'" v-model="form.noDiscount" :label="1"></el-radio> <el-radio :disabled="title=='明细'" v-model="form.noDiscount" :label="1"></el-radio>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="有效期限:" prop="validTime" v-if=" <el-form-item label="有效期限:" v-if="
sessionStorageData.allowValid == 1 && !form.directConsumption==1 sessionStorageData.allowValid == 1 && !form.directConsumption==1
"> ">
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D/g,'')" placeholder='请输入有效期限(月)' pattern="[0-9]*" v-model="form.validTime" autocomplete="on"></el-input> <el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D/g,'')" placeholder='请输入有效期限(月)' pattern="[0-9]*" v-model="form.validTime" autocomplete="on"></el-input>

@ -250,9 +250,12 @@ export default {
if (item.type == "card_repay") { if (item.type == "card_repay") {
item.docTypeName = "还款"; item.docTypeName = "还款";
} }
if(item.accountType == 'recharge_groupon·'){
item.docTypeName = '团购卡'
}
if (item.type == "card_repay") { if (item.type == "card_repay") {
if (item.orderType == "course") { if (item.orderType == "course") {
item.docTypeName = "疗程" + item.docTypeName+'测试----'; item.docTypeName = "疗程" + item.docTypeName;
} }
if (item.orderType == "recharge") { if (item.orderType == "recharge") {
item.docTypeName = "充值" + item.docTypeName; item.docTypeName = "充值" + item.docTypeName;

@ -163,6 +163,10 @@ export default {
docType: "promotion_card_repay", docType: "promotion_card_repay",
docTypeName: "促销还款", docTypeName: "促销还款",
}, },
{
docType: 'recharge_groupon',
docTypeName: "团购卡"
}
], ],
}; };
}, },
@ -217,6 +221,9 @@ export default {
}); });
}); });
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
if( item.accountType == 'recharge_groupon'){
item.docTypeName = "团购卡";
}
if (item.type == "card_repay") { if (item.type == "card_repay") {
item.docTypeName = "还款"; item.docTypeName = "还款";
} }

Loading…
Cancel
Save