fixbug:部分提交

master
Wangxubin 3 years ago
parent 10a725ee11
commit a38d3e3b7d

@ -26,9 +26,9 @@ module.exports = {
assetsPublicPath: "/",
proxyTable: {
"/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.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 盛联

@ -249,7 +249,8 @@ export function exportachiwhole(params) {
return service({
url: "/api" + "/demay/ssm/staff/achiCommLists/exportachiwhole",
method: "post",
data: params
data: params,
responseType:"blob"
});
}
//查询项目单品贡献率 selectType; 0=查全公司1=查门店

@ -131,7 +131,7 @@ export default {
sessionStorage.getItem("storeInfo")
).storeName;
cashsignature({
cashNum: row.cashNum,
cashNum: row.cashNum,methods
}).then((res) => {
if (res.code == "000000" && res.data) {
this.printForm.signature =

@ -0,0 +1,34 @@
<template>
<el-dialog
title="备注"
:visible.sync="messageShow"
width="30%"
:close-on-click-modal="false"
:before-close="handleClose">
<span>{{ message }}</span>
<div slot="footer" class="dialog-footer" >
<el-button type="primary" plain size="mini" @click="messageShow = false">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props:{
message:{
type:String,
default:""
}
},
data () {
return {
messageShow:false
}
},
methods:{
handleClose(done) {
done();
}
}
}
</script>

@ -534,6 +534,11 @@
prop="collectionAmounts"
label="卡付抵扣金额"
>
<template slot-scope="scope">
<span>
{{ scope.row.collectionAmounts?scope.row.collectionAmounts:0 }}
</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
@ -652,10 +657,12 @@
<repayment ref="repayment" @repaymentData="inputMember"></repayment>
<addmember ref="addmember"></addmember>
<orders ref="orders"></orders>
<message :message="message" ref="message"></message>
</div>
</template>
<script>
import addmember from "@/components/member/edit/index";
import message from './detail/message.vue'
import {
selectList,
selectListType,
@ -694,9 +701,11 @@ export default {
repayment,
recash,
orders,
message
},
data() {
return {
message:"",
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
@ -756,7 +765,6 @@ export default {
card4:0,
};
},
computed: {
//
appearPrices() {
@ -764,9 +772,7 @@ export default {
      现付金额 = 项目金额transactionPrice - 卡付抵扣金额collectionAmounts
      需要转换下number格式,不然是字符串拼接
      */
let num = this.list.reduce((pre, item) => {
console.log("🚀 ~ file: service.vue ~ line 804 ~ num ~ item.courseAccountId", item.collectionAmounts)
item.transactionPrice = item.transactionPrice
?(item.transactionPrice*1).toFixed(2) * 1
: 0; // ,
@ -784,38 +790,24 @@ export default {
return pre + 0;
}
}, 0);
return num.toFixed(2);
return num.toFixed(2)*1;
},
appearPrice() {
/*
      现付金额 = 项目金额transactionPrice - 卡付抵扣金额collectionAmounts
      需要转换下number格式,不然是字符串拼接
      */
let num = this.list.reduce((pre, item) => {
console.log("🚀 ~ file: service.vue ~ line 804 ~ num ~ item.courseAccountId", item)
item.transactionPrice = item.transactionPrice
?(item.transactionPrice*1).toFixed(2) * 1
: 0; // ,
if(item.isCardPay !== 0){
return pre
}
if(item.courseAccountId == null){
item.collectionAmounts = (item.collectionAmounts*1).toFixed(2) * 1;
}else{
item.collectionAmounts =(item.transactionPrice*1).toFixed(2) * 1;
}
if (item.collectionAmounts) {
return pre + (item.transactionPrice - item.collectionAmounts);
} // ,
else if (!item.collectionAmounts && item.transactionPrice) {
return item.transactionPrice + pre; //
} else {
return pre + 0;
//
// let num = (eval(this.$refs.payment.payLists.map(item=>{return item.payMoney}).join("+")) + eval(this.list.map(item=>{return item.collectionAmounts?item.collectionAmounts:0}).join("+")))
// // (bug)
// let total = eval(this.list.map(item=>item.transactionPrice?item.transactionPrice:0.).join("+"))
// if( num === total*1 )return 0
try{
if(this.list){
let collectionAmounts =this.list[this.projectIndex].collectionAmounts
return (this.list[this.projectIndex].amount-(collectionAmounts?collectionAmounts*1:0)).toFixed(2)*1;
}
}, 0);
return num.toFixed(2);
}, //
}catch(err){
return 0
}
},
//
total() {
/*
      项目金额transactionPrice   卡付抵扣金额collectionAmounts  卡付金额collectionRechargeAmount
@ -846,7 +838,7 @@ export default {
return pre + 0;
}
}, 0);
return total.toFixed(2);
return total.toFixed(2)*1;
}
},
methods: {
@ -875,12 +867,8 @@ export default {
},
//
editcard(row, index) {
//console.log("🚀 ~ file: service.vue ~ line 837 ~ editcard ~ row", row);
this.recIndex = index;
//console.log("🚀 ~ file: service.vue ~ line 843 ~ editcard ~ this.rowRecList[index].type", this.rowRecList[index].type)
this.recIndex = index
if(this.rowRecList[index].type == 1){
if (this.list[this.projectIndex].noDiscount == 1) {
this.rowRecList[index].spendMoney =this.appearPrice;
@ -928,12 +916,9 @@ export default {
this.rowRecList[index].discoutMoney =
((this.appearPrice * 1) * recRatio).toFixed(2) *1; //
this.rowRecList[index].discoutMoney= Math.trunc(this.rowRecList[index].discoutMoney)
//console.log("🚀 ~ file: service.vue ~ line 899 ~ editcard ~ this.appearPrice", this.appearPrice)
this.rowRecList[index].discoutGiftMoney =
(this.appearPrice-this.rowRecList[index].discoutMoney ).toFixed(2) * 1; //
this.rowRecList[index].discoutGiftMoney= Math.trunc(this.rowRecList[index].discoutGiftMoney)
//console.log("🚀 ~ file: service.vue ~ line 897 ~ editcard ~ this.rowRecList[index].discoutGiftMoney", this.rowRecList[index].discoutGiftMoney)
this.rowRecList[index].spendMoney =(this.rowRecList[index].discoutMoney *(this.rowRecList[index].discount / 100)).toFixed(2) * 1; //
this.rowRecList[index].giftSpendMoney =(this.rowRecList[index].discoutGiftMoney *(this.rowRecList[index].discountFreeAmount / 100)).toFixed(2) * 1;
@ -945,17 +930,6 @@ export default {
((this.appearPrice * 1) * recGiftRatio).toFixed(2) * 1; //
}
}
// else {
// form.spendMoney = form.cardOver;
// form.discoutMoney =
// (form.spendMoney * 1 * (form.discount / 100)).toFixed(2) * 1;
// form.giftSpendMoney =
// (((form.spendMoney * 1) / recRatio) * recGiftRatio).toFixed(2) *
// 1;
// form.discoutGiftMoney = //
// (form.giftSpendMoney * (form.discount / 100)).toFixed(2) * 1;
// }
}
}
this.card1=this.rowRecList[index].spendMoney;
@ -983,19 +957,9 @@ export default {
this.rowRecList[index].gifSpendMoney =(this.rowRecList[index].cardGiftOvers).toFixed(2) * 1;
this.rowRecList[index].cardGiftOvers=0
}
// }
// this.recIndex = -1;
},
endEditcard(row, index) {
this.recForm.cashAmount = 0;
//console.log(this.recForm);
// if(this.projectMomey==this.recForm.amount){
// this.projectMomey=0
// }
// if(this.projectMomey<0){
// this.projectMomey=this.recForm.amount
// }
let debtMoney =
(this.recForm.amount * 1 - this.recForm.cashAmount * 1).toFixed(2) * 1; //
let form = { ...row }; //row
@ -1012,9 +976,9 @@ export default {
});
form.spendMoney=0
}
//console.log("🚀 ~ file: service.vue ~ line 964 ~ endEditcard ~ form", form)
if (debtMoney > 0) {
//0
console.log('成交额大于0--->>',debtMoney,form)
if (form.type == 2 || form.type == 0) {
//20
if (this.useRecharge == 2) {
@ -1054,12 +1018,14 @@ export default {
}
}
} else {
console.log('来到了按比例使用')
//使
let sunRatio =
(form.cardOver + form.giftConsumeMoney).toFixed(2) * 1; ///+
let recRatio = (form.cardOver / sunRatio).toFixed(2) * 1; //
let recGiftRatio = (form.giftConsumeMoney / sunRatio).toFixed(2) * 1; //
if (form.offsetMoney > debtMoney * recRatio) {
console.log('会到这里---|||---',this.recForm.noDiscount)
if (this.recForm.noDiscount == 0) {
//
form.discoutMoney =
@ -1123,22 +1089,9 @@ export default {
form.discoutGiftMoney + form.discoutMoney >
this.list[this.editProIndex].amount
) {
//
//console.log("🚀 ~ file: service.vue ~ line 592 ~ endEditcard ~ this.list[this.editProIndex]", this.list[this.editProIndex])
}
} else {
// if (0 <= row.spendMoney * 1 > row.cardOver * 1) {
// this.$message.info({
// message: "!"
// });
// row.spendMoney = 0;
// row.giftSpendMoney = 0;
// }
}
// if (form.spendMoney > form.cardOver) {
// form.spendMoney = form.cardOver;
// form.giftSpendMoney = form.cardGiftOvers;
// }
form.cardOvers=(form.cardOver+(this.card1-form.spendMoney)).toFixed(2) * 1
form.cardGiftOvers=(form.giftConsumeMoney+(this.card2-form.giftSpendMoney)).toFixed(2) * 1
form.cardOver=(form.cardOver+(this.card1-form.spendMoney)).toFixed(2) * 1
@ -1171,15 +1124,14 @@ export default {
this.list.forEach(item => {
num = (num + item.collectionCashAmounts).toFixed(2) * 1;
});
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.spendMoney", form.spendMoney)
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.giftSpendMoney", form.giftSpendMoney)
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutMoney", form.discoutMoney)
console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutGiftMoney", form.discoutGiftMoney)
// console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.spendMoney", form.spendMoney)
// console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.giftSpendMoney", form.giftSpendMoney)
// console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutMoney", form.discoutMoney)
// console.log("🚀 ~ file: service.vue ~ line 1165 ~ endEditcard ~ form.discoutGiftMoney", form.discoutGiftMoney)
this.form.collectionCashAmounts = num;
this.recIndex =-1
this.sumNum();
},
sumNum() {
let spendMoney = 0;
let spendNumber = 0;
@ -1220,10 +1172,7 @@ export default {
this.recForm.collectionIntegralAmount
).toFixed(2) * 1;
console.log("🚀 ~ file: service.vue ~ line 1213 ~ sumNum ~ this.recForm", this.recForm)
this.recForm.collectionAmounts =spendMoney?spendMoney.toFixed(2) * 1:0;;
this.recForm.collectionAmounts =spendMoney?spendMoney.toFixed(2) * 1:0;;
this.recForm.rechargeAmount = spendNumber.toFixed(2) * 1;
this.list.splice(this.recForm.index, 1, this.recForm);
let rList = [];
@ -1408,8 +1357,8 @@ export default {
goPayDebt() {
this.$refs.repayment.show(this.memberForm);
},
//
inputMember() {
console.log('为什么会触发这么多次')
if (partten.phoneNum.test(this.memberForm.mobilePhone)) {
storeMemberOne({
mobilePhone: this.memberForm.mobilePhone,
@ -1421,6 +1370,9 @@ export default {
this.cashNumber = 1;
this.list = [];
var this_ = this;
this.message = res.data.label
// ,
this.message?this.$refs.message.messageShow = true:""
setTimeout(() => {
this_.$refs.reccard.show(this_.memberForm);
this_.$refs.course.show(this_.memberForm);
@ -1478,7 +1430,7 @@ export default {
} else {
row.courseMoney = row.courseConsumePrice;
// row.collectionAmounts=row.transactionPrice
console.log("🚀 ~ file: service.vue ~ line 1466 ~ setProOne ~ row.transactionPrice", row)
console.log("----||-->>", row)
}
@ -1653,7 +1605,6 @@ export default {
flag = false;
}
let sumMoney = 0;
this.list.forEach((item, index) => {
if (item.courseAccountId == null) {
@ -1665,14 +1616,9 @@ export default {
).toFixed(2) * 1;
}else{
item.transactionPrice*1;
console.log("🚀 ~ file: service.vue ~ line 1649 ~ this.list.forEach ~ item.transactionPrice", item.transactionPrice)
console.log("🚀 ~ file: service.vue ~ line 1649 ~ this.list.forEach ~ this.appearPrices", this.appearPrices)
}
});
console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ sumMoney", sumMoney)
console.log("🚀 ~ file: service.vue ~ line 1695 ~ confirm ~ this.form.collectionCashAmounts", this.appearPrices)
if (
this.balance <=
(this.appearPrices*1 - sumMoney).toFixed(2) * 1 ||
@ -1809,7 +1755,28 @@ export default {
});
this.formData = new FormData();
}else{
addCash(this.formData).then(res => {
//
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){
return this.$alert(`现金金额多出${total-this.appearPrices*1}`, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: action => {}
});
}else if(total<this.appearPrices*1){
return this.$alert(`现金金额还需支付${this.appearPrices*1 - total}`, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: action => {}
});
}
}
addCash(this.formData).then(res => {
if (res.code == "000000") {
this.$message.success({
message: "验证成功 , 收银" + res.message
@ -2374,7 +2341,7 @@ export default {
money += debtMoney;
}
collectionRechargeAmountg =collectionRechargeAmountg+
item.collectionRechargeAmount.toFixed(2) * 1;
(item.collectionRechargeAmount.toFixed(2) * 1);
});

@ -152,6 +152,7 @@
<el-button type="primary" icon="el-icon-delete" size="mini" v-show="rowIndex" @click='delRow(scope.row)'></el-button>
</template>
</el-table-column>
<el-table-column label="操作人" align="center" min-width="100" prop="modifyBy"></el-table-column>
</el-table>
<el-dialog :close-on-click-modal="false" v-dialogDrag title="新增" width="900px" :visible.sync="dialogFormVisible" :before-close="handleClose">
<div style="height:55vh;overflow: auto;padding-left:80px">

@ -99,6 +99,13 @@
<div v-else> {{scope.row.pushCount}} </div>
</template>
</el-table-column>
<el-table-column prop="createdBy" label="操作人" align="center" min-width="100"></el-table-column>
<el-table-column prop="updatedBy" label="修改人" align="center" min-width="100">
<template slot-scope="scope">
<div v-if="scope.row.updatedBy">{{scope.row.updatedBy}}</div>
<div v-else></div>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->

@ -175,6 +175,8 @@
<div v-else> {{ scope.row.pushCount }} </div>
</template>
</el-table-column>
<el-table-column prop="createdBy" label="操作人" align="center" min-width="100">
</el-table-column>
</el-table>
<div class="block" style="margin-top:15px;">
<!-- 分页组件 -->

@ -33,7 +33,8 @@ service.interceptors.request.use(
return Promise.reject(error);
}
);
var flag = false;
let flag = false;
// axios response 拦截器
service.interceptors.response.use(
response => {
@ -53,14 +54,16 @@ service.interceptors.response.use(
}).then(() => {
router.push("/login");
delCookie("token");
debounce = true
});
setTimeout(() => {
flag = false;
console.log('什么时候执行')
}, 15000);
console.log(flag);
}
break;
case "510002":
console.log(flag)
if (flag) {
break;
} else {
@ -75,7 +78,6 @@ service.interceptors.response.use(
router.push("/login");
delCookie("token");
});
//解决当token过期时同一个页面有多个请求造成 “是否重新登录”弹框多次弹出 的BUG
setTimeout(() => {
flag = false;

Loading…
Cancel
Save