diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..04b8271
Binary files /dev/null and b/dist.zip differ
diff --git a/src/App.vue b/src/App.vue
index 19a23aa..5816411 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,10 +3,10 @@
+
@@ -271,11 +271,10 @@ export default {
console.log(form);
// this.list.splice(row.index, 1, form);
},
- //打开充值卡付列表
openPro(row) {
let proList = [];
+ console.log('row---->',row)
this.list.forEach((item, index) => {
- console.log(item);
item.proList.forEach((items) => {
if (items.payNumber > 0) {
items.courseRestCount = items.courseRestCount;
@@ -287,13 +286,14 @@ export default {
this.$refs.pro.show(row);
},
proData(v) {
- console.log(v);
let form = JSON.parse(JSON.stringify(v));
- console.log(form);
- this.list.splice(form.index, 1, form);
- console.log(this.list);
+ // console.log(form);
+ // this.list.splice(form.index, 1, form);
+ // console.log('form--->',form,'form.index--->',form.index)
+ for(let key in form){
+ if(key!='recList')this.$set(this.list[form.index],key,form[key])
+ }
this.sumList();
- // this.restPro(form);
},
restPro(form) {
if (form.courseMoney > 0) {
@@ -328,9 +328,12 @@ export default {
},
recData(v) {
let form = JSON.parse(JSON.stringify(v));
- this.list.splice(form.index, 1, form);
+ console.log(form,'index--->',form.index)
+ // this.list.splice(form.index, 1, form);
+ for(let key in form){
+ if(key!='proList')this.$set(this.list[form.index],key,form[key])
+ }
this.sumList();
- // this.restRec(form);
},
restRec(form) {
if (form.recMoney > 0) {
@@ -414,7 +417,11 @@ export default {
}
});
// 疗程卡包
- couAccountList({ memberId: this.form.id }).then((res) => {
+ console.log('这是form--->',this.form)
+ let params = {
+ memberId: this.form.id
+ }
+ couAccountList(params).then((res) => {
if (res.code == "000000") {
let proCopyList = [];
res.rows.forEach((item) => {
@@ -632,7 +639,6 @@ export default {
setTimeout(() => {
form.proList = that.proCopyList;
form.recList = that.recCopyList;
- console.log(form);
list.push(form);
}, 300);
} else {
diff --git a/src/components/staffList/staffout/index.vue b/src/components/staffList/staffout/index.vue
index 9afad78..69b6125 100644
--- a/src/components/staffList/staffout/index.vue
+++ b/src/components/staffList/staffout/index.vue
@@ -161,8 +161,6 @@ export default {
message: "输入不能小于0",
});
row.ratio = 0;
-
- // });
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
@@ -198,21 +196,21 @@ export default {
},
//组件传值
show(list, storeId) {
- this.staffLists = [...list];
-
-
- this.staffLists.forEach((item) => {
- if (item.id || item.saleStaffId) {
-
- item.staffNames = item.brandNumber + "-" + item.staffName;
- } else {
- item.staffNames = "";
- }
- });
- if (storeId) {
- this.storeId = storeId;
+ this.$nextTick(()=>{
+ this.staffLists = [...list];
+ console.log('list--->',this.staffLists)
+ this.staffLists.forEach((item) => {
+ if (item.id || item.saleStaffId) {
+ item.staffNames = item.brandNumber + "-" + item.saleStaffName;
+ } else {
+ item.saleStaffName = "";
+ }
+ });
+ if (storeId) {
+ this.storeId = storeId;
}
this.getData();
+ })
},
//确定返回方法
confirm() {
@@ -248,20 +246,6 @@ export default {
});
arr = list;
});
- // var list = that.staffLists
- // .concat(that.staffListCopy)
- // .filter(function (v) {
- // return (
- // that.staffLists.indexOf(v) === -1 ||
- // that.staffListCopy.indexOf(v) === -1
- // );
- // });
- // list.forEach((item) => {
- // if (item.id) {
- // arr.push(item);
- // }
- // });
-
this.staffList = this.noRepeat(arr);
},
//获取员工数据
diff --git a/src/home/home.vue b/src/home/home.vue
index 7798920..a82d155 100644
--- a/src/home/home.vue
+++ b/src/home/home.vue
@@ -205,15 +205,20 @@ export default {
});
},
},
+ beforeRouteEnter(to,form,next){
+ if(form.path==='/login'){
+ next(vm=>vm.$router.go(0))
+ }else{
+ next()
+ }
+ },
mounted() {
- console.log(12);
- console.log("恭喜你发现了宝贝,版本号1.0.0")
var that = this;
setTimeout(() => {
that.sessionStorageData = JSON.parse(
sessionStorage.getItem("sessionStorageData")
);
- that.infoDialog = !that.sessionStorageData.guide;
+ // that.infoDialog = !that.sessionStorageData.guide;
that.infoDialog = false;
if (that.infoDialog) {
that.sessionStorageData = JSON.parse(
@@ -258,10 +263,8 @@ export default {
}
}, 1000);
},
- activated() {
+ created() {
// 进入home组件的那一刻就会打印
- // console.log("哎呀看见我了");
- // console.log("----------activated--------");
var that = this;
that.isShow = false;
setTimeout(() => {
diff --git a/src/layout/components/Emain.vue b/src/layout/components/Emain.vue
index 71c6226..700e6e7 100644
--- a/src/layout/components/Emain.vue
+++ b/src/layout/components/Emain.vue
@@ -23,20 +23,20 @@
-
-
+
+
-
+
diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue
index 07d1559..a855b16 100644
--- a/src/pages/eashier/service/service.vue
+++ b/src/pages/eashier/service/service.vue
@@ -47,14 +47,14 @@
女:
@@ -152,7 +152,7 @@
@@ -224,18 +225,17 @@
align="center"
prop=""
label="充值卡付"
- >
+ >
不允许卡付
@@ -730,6 +727,22 @@
+
+
+
+ {{ formMoneys.Course?formMoneys.Course:0 }}
+
+
+ {{ formMoneys.card?formMoneys.card:0 }}
+
+
+ {{ formMoneys.cash?formMoneys.cash:0 }}
+
+
+ {{ formMoneys.total?formMoneys.total:0 }}
+
+
+
+
+
@@ -800,7 +813,7 @@ import { Mixins } from './mixins'
import addmember from "@/components/member/edit/index";
import message from './detail/message.vue';
import captcha from './captcha.vue';
-import { getSmsCode,chekeMsg,upcashPassword } from '@/api/login.js'
+import { getCode,upcashPassword } from '@/api/login.js'
import {
selectList,
selectListType,
@@ -826,6 +839,7 @@ import recash from "./recash";
import orders from "./detail/detail";
import { partten } from "@/utils/partten/index.js";
export default {
+ name:"services",
mixins:[Mixins],
components: {
member,
@@ -844,6 +858,7 @@ export default {
},
data() {
return {
+ formMoneys:{},
cardList:[],
numlist:[{settlementNum:0,payNum:0}],
message:"",
@@ -993,6 +1008,39 @@ export default {
}
},
methods: {
+ updataCollection(){
+ let card = 0; //卡付
+ let Course = 0; //疗程付
+ let cash = 0; //现付
+ let total = 0 //总价
+ if(this.list.length){
+ this.list.forEach(item=>{
+ if(item.transactionPrice){
+ if(item.collectionRechargeAmount){
+ // 卡付
+ card+=((item.collectionRechargeAmount).toFixed(2)*1)
+ item.rechargeAccountList.forEach(item=>{ //算上赠送金额
+ item.giftSpendMoney?item.giftSpendMoney:0
+ card+=item.giftSpendMoney
+ card = card.toFixed(2)*1
+ })
+ }
+ if(item.courseAccountId){
+ // 疗程付
+ Course+=((item.transactionPrice).toFixed(2)*1)
+ }
+ }
+ })
+ try{
+ cash = eval(this.$refs.payment.payLists.map(item=>{return item.payMoney?item.payMoney*1:0}).join("+")) //现付
+ }catch(err){}
+ }
+ total = ((card*1+Course*1+cash*1))
+ total = total.toFixed(2)*1
+ this.formMoneys = {
+ card,Course,cash,total
+ }
+ },
// 切换卡付/现付
radioInput(row){
if(row.radio==1){
@@ -1068,10 +1116,10 @@ export default {
let params = {
mobilePhone:this.memberForm.mobilePhone
}
- getSmsCode(params).then(res=>{
- if(res.code == '200007'){
+ getCode(params).then(res=>{
+ if(res.code == '000000'){
this.$message.success({ message: "验证码已发送,注意查看手机" });
- }else{
+ }else if(res.code=='200007'){
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
@@ -1198,6 +1246,7 @@ export default {
} //误差
}
this.cardListUpdata()
+ this.updataCollection()
},
//修改卡付金额
editcard(row, index) {
@@ -2020,7 +2069,10 @@ export default {
// transactionPrice
let form = { ...row };
if (this.cashNumber == 1) { //是会员的情况
- if(row.radio == 2){
+ console.log('--->',row.radio)
+ if(row.radio == '2'){
+ // 会员
+ console.log('---->',form.topPriceMember,form.transactionPrice * 1,form.minumumPriceMember)
if (form.topPriceMember < form.transactionPrice * 1 ||form.transactionPrice * 1 < form.minumumPriceMember){
this.$message.error({
message:
@@ -2034,6 +2086,7 @@ export default {
form.amount = row.transactionPrice;
}
}else{
+ // 散客
if (form.topPrice < form.transactionPrice * 1 ||form.transactionPrice * 1 < form.minumumPrice){
this.$message.error({
message: "价格不能低于" + form.minumumPrice + "高于" + form.topPrice
@@ -2196,6 +2249,7 @@ export default {
}
this.list.splice(this.proIndex,1,[])
this.setProOne(v);
+ this.updataCollection()
},
// cashAmount
setProOne(row) {
@@ -2209,6 +2263,7 @@ export default {
id: row.courseProjectId
}).then(res => {
if (res.code == "000000") {
+ // transactionPrice
form = {
payLists: this.payLists,
zhonggongList: [],
@@ -2259,7 +2314,7 @@ export default {
cashNumber: this.cashNumber,
numberTimes: 1,
minumumTimes: res.data.minumumTimes,
- radio:'2' //默认卡付
+ // radio:'2' //默认卡付
};
this.setRecList(form);
if (this.cashNumber == 1) {
@@ -2277,6 +2332,21 @@ export default {
form.memberId = this.memberForm.id;
form.integral = this.memberForm.integral;
form.rechargeAccountList = JSON.parse(JSON.stringify(this.recListCopy));
+ if(!form.courseAccountId){ //只有不是疗程才使用
+ if(!this.recListCopy.length){
+ // 没有充值卡,散客价格
+ form.radio = '1'
+ form.transactionPrice = form.price
+ console.log('没有充值卡--->散客价格')
+ }else{
+ console.log('充值卡存在---->',form.rechargeAccountList)
+ // 充值卡存在,判断卡里还有没有余额,有余额会员价,没余额散客价
+ // 可用余额cardOvers 赠送剩余cardGiftOvers
+ let list = [{cardConsumeMoney:0,cardGiftMoney:0},{cardConsumeMoney:1,cardGiftMoney:0}]
+ form.radio = '2'
+ form.transactionPrice = form.priceMember
+ }
+ }
} else {
form.amount = res.data.price;
form.transactionPrice = res.data.price;
@@ -2311,6 +2381,7 @@ export default {
this.expand.push(i);
this.expandedRows.push(this.list[i]);
}
+ this.updataCollection()
this.openRec(form);
this.sumAmont();
} else {
@@ -2408,12 +2479,16 @@ export default {
let passShow = false;
this.list.forEach((item, index) => {
if (index == 0) {
- item.man = this.notMemberForm.man
- ? this.notMemberForm.man
- : this.memberForm.man;
- item.woman = this.notMemberForm.woman
- ? this.notMemberForm.woman
- : this.memberForm.woman;
+ item.manNumber = this.notMemberForm.manNumber
+ ? this.notMemberForm.manNumber
+ : this.memberForm.manNumber;
+ item.womanNumber = this.notMemberForm.womanNumber
+ ? this.notMemberForm.womanNumber
+ : this.memberForm.womanNumber;
+ let man = this.list.filter(item=>item.sex === 0)
+ let woman = this.list.filter(item=>item.sex === 1)
+ if(man.length)item.man=man.length
+ if(woman.length)item.woman = woman.length
}
if (item.courseAccountId != null) {
passShow = true;
@@ -2508,6 +2583,7 @@ export default {
});
this.formData = new FormData();
this.notData();
+ this.updataCollection()
} else {
this.payLists = this.payListsCopy;
this.list.forEach(item => {
@@ -2578,6 +2654,7 @@ export default {
});
this.sumAmont();
this.cardListUpdata()
+ this.updataCollection()
},
//打开选择会员弹窗
openMember() {
@@ -2591,7 +2668,6 @@ export default {
},
reccardData(v) {},
courseData(v) {
- console.log('这个v--->',v)
if (!v.courseAccountId) {
v.courseAccountId = null;
v.courseProjectId = v.id;
@@ -2611,6 +2687,7 @@ export default {
let total = eval(this.$refs.payment.payLists.map(item=>{return item.payMoney?item.payMoney*1:0}).join("+"))//现金/卡付总和
this.numlist=[{settlementNum:total,payNum:total}]
}
+ this.updataCollection()
},
rowClassName({ row, rowIndex }) {
row.index = rowIndex;
@@ -2710,7 +2787,6 @@ export default {
callback: action => {}
});
}
-
let list = [];
this.list.forEach((itemList, index) => {
var itemLists = {
@@ -3178,6 +3254,7 @@ export default {
}, 500);
this.setPage();
console.log('点击了清空界面')
+ this.updataCollection()
},
setPage() {
this.getDetail();
@@ -3188,7 +3265,19 @@ export default {
},
created() {
this.notData()
- }
+ },
+ // services
+ beforeRouteLeave(to, from, next) {
+ // 导航离开该组件的对应路由时调用
+ if (to.name == "services") {
+ //前往详情页面时缓存页面
+ from.meta.keepAlive = true;
+ } else {
+ // 是去 C 页面,缓存
+ from.meta.keepAlive = false;
+ }
+ next();
+ },
};
@@ -3210,6 +3299,7 @@ export default {
width: 8%;
}
.right{
+ margin-top: 15px;
padding: 0 40px 10px 0;
font-size: 12px;
line-height: 12px;
@@ -3217,7 +3307,8 @@ export default {
border: 1px solid #ccc;
background: white;
border-radius: 10px;
- height: 0.45rem;
+ height: 0.9rem;
+ width: 200px;
}
.el-icon-edit-outline {
padding-left: 5px;
diff --git a/src/pages/statistics/storeDaily/form.vue b/src/pages/statistics/storeDaily/form.vue
index 4bf7a1e..a058b12 100644
--- a/src/pages/statistics/storeDaily/form.vue
+++ b/src/pages/statistics/storeDaily/form.vue
@@ -85,7 +85,7 @@
@@ -106,6 +106,14 @@ export default {
}
},
watch:{
+ pay:{
+ handler(val){
+ if(val){
+ console.log('val是什么--->',val)
+ }
+ },
+ immediate:true
+ },
lists:{
handler(arr){
if(arr){
@@ -113,7 +121,7 @@ export default {
this.tableDate = this.tableDate.map(item=>{
return{
...item,
- numAmount:(item.rechargeMoneys?item.rechargeMoneys*1:0)+(item.coursexMoneys?item.coursexMoneys*1:0)+(item.coursekMoney?item.coursekMoney*1:0)
+ numAmount:(item.rechargeMoneys?item.rechargeMoneys*1:0)+(item.coursexMoneys?item.coursexMoneys*1:0)+(item.coursekMoney?item.coursekMoney*1:0)+(item.cashierCashMoney?item.cashierCashMoney*1:0)
}
})
}else{
@@ -122,25 +130,6 @@ export default {
},
immediate:true
},
- pay:{
- handler(arr){
- try{
- for(let i=0;i{
- this.$set(item,'payMoney',0)
- })
- }
- },
- immediate:true
- }
},
data () {
return {
@@ -166,8 +155,6 @@ export default {
},
},
created(){
- this.initpay()
- console.log(this.$route.path ==='/storeDaily')
},
}
diff --git a/src/pages/statistics/storeDaily/payment.vue b/src/pages/statistics/storeDaily/payment.vue
index 204d6a7..1454fc3 100644
--- a/src/pages/statistics/storeDaily/payment.vue
+++ b/src/pages/statistics/storeDaily/payment.vue
@@ -3,7 +3,7 @@
-
+
{{ scope.row.payMoney?scope.row.payMoney:0 }}
@@ -20,10 +20,6 @@ export default {
type:Array,
default:()=>([])
},
- pay:{
- type:Array,
- default:()=>([])
- }
},
data() {
return {
diff --git a/src/pages/statistics/storeDaily/storeDaily.vue b/src/pages/statistics/storeDaily/storeDaily.vue
index e436275..95b4e83 100644
--- a/src/pages/statistics/storeDaily/storeDaily.vue
+++ b/src/pages/statistics/storeDaily/storeDaily.vue
@@ -111,9 +111,13 @@ export default {
storeDailys(this.queryForm).then((res) => {
this.$refs.form.loading = false
if (res.code == "000000") {
- console.log('这是什么----->',res)
+ console.log('这是什么----->',res.data.payLists)
this.tableDate = res.data.lists;
this.payLists = res.data.payLists
+ if(this.payLists == null){
+ this.payLists = []
+ }
+ console.log('this.payLists---->',this.payLists)
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
diff --git a/src/pages/storeManage/baseProject/baseProject.vue b/src/pages/storeManage/baseProject/baseProject.vue
index 02c1a22..800fc68 100644
--- a/src/pages/storeManage/baseProject/baseProject.vue
+++ b/src/pages/storeManage/baseProject/baseProject.vue
@@ -31,6 +31,9 @@
>
+ 确认
条件搜索
@@ -41,6 +44,7 @@
@click="getData((refreshtext = true))"
>刷新
+
下载模板
@@ -1010,6 +1014,15 @@