Sigo 4 years ago
commit 1cf9218462

@ -143,6 +143,14 @@ export function storeDaily(params) {
data: params data: params
}); });
} }
//多日期的门店日报
export function storeDailys(params) {
return service({
url: "/demay/ssm/storeStatistic/storeDailys",
method: "post",
data: params
});
}
// 门店项目统计列表 门店端-门店统计-月度门店项目统计列表 // 门店项目统计列表 门店端-门店统计-月度门店项目统计列表
export function projectMonthList(params) { export function projectMonthList(params) {

@ -107,7 +107,7 @@
</el-form-item> </el-form-item>
<el-form-item label="充后赠送:"> <el-form-item label="充后赠送:">
<div class="form-width-ms"> <div class="form-width-ms">
<span class="text-red text-price">{{ form.giftAfterMoney }}</span> <span class="text-red text-price" v-if="giftAfterShow">{{ form.giftAfterMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注说明:"> <el-form-item label="备注说明:">
@ -122,7 +122,7 @@
<br> <br>
<el-form-item label="充后赠送:" v-show="!sessionStorageData.recharge"> <el-form-item label="充后赠送:" v-show="!sessionStorageData.recharge">
<div class="form-width-ms"> <div class="form-width-ms">
<span class="text-red text-price">{{ form.giftAfterMoney }}</span> <span class="text-red text-price" v-if="giftAfterShow">{{ form.giftAfterMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注说明:" v-show="!sessionStorageData.recharge"> <el-form-item label="备注说明:" v-show="!sessionStorageData.recharge">
@ -421,6 +421,7 @@ export default {
pageInfo: { pageInfo: {
lists: [], lists: [],
}, },
giftAfterShow: true, //
payLists: [], // payLists: [], //
staffLists: [{ brandNumber: "", staffName: "", ratio: 100 }], staffLists: [{ brandNumber: "", staffName: "", ratio: 100 }],
managerLists: [{ brandNumber: "", staffName: "", ratio: 100 }], managerLists: [{ brandNumber: "", staffName: "", ratio: 100 }],
@ -592,6 +593,8 @@ export default {
this.form.rechargeTypeId = v.id; this.form.rechargeTypeId = v.id;
this.form.discount = v.discount; this.form.discount = v.discount;
this.form.typeRatio = v.typeRatio; this.form.typeRatio = v.typeRatio;
this.form.donateType = v.donateType;
this.form.giftMoney = v.giftMoney;
this.form.collectionAmount = 0; this.form.collectionAmount = 0;
this.form.collectionCashAmount = 0; this.form.collectionCashAmount = 0;
if (this.liftType == 0) { if (this.liftType == 0) {
@ -654,10 +657,17 @@ export default {
if (!this.form.giftBeforeMoney) { if (!this.form.giftBeforeMoney) {
this.form.giftBeforeMoney = 0; this.form.giftBeforeMoney = 0;
} }
let giftMoney = 0;
if (v.donateType == 1) {
giftMoney =
((v.giftMoney * this.form.rechargeAmount) / 100).toFixed(2) *
1;
} else {
giftMoney = v.giftMoney;
}
this.form.giftAfterMoney = this.form.giftAfterMoney =
this.form.giftBeforeMoney + v.giftMoney; (this.form.giftBeforeMoney + giftMoney).toFixed(2) * 1;
} }
this.money = this.form.giftAfterMoney;
if (this.sessionStorageData.recharge == true) { if (this.sessionStorageData.recharge == true) {
if (this.form.integralCheckbox == true) { if (this.form.integralCheckbox == true) {
let list = JSON.parse( let list = JSON.parse(
@ -692,14 +702,13 @@ export default {
if (!v.giftMoney) { if (!v.giftMoney) {
v.giftMoney = 0; v.giftMoney = 0;
this.form.giftAfterMoney = this.form.giftAfterMoney =
this.form.giftBeforeMoney + v.giftMoney; (this.form.giftBeforeMoney + v.giftMoney).toFixed(2) * 1;
} else { } else {
this.form.giftAfterMoney = this.form.giftAfterMoney =
this.form.giftBeforeMoney + v.giftMoney; (this.form.giftBeforeMoney + v.giftMoney).toFixed(2) * 1;
} }
} }
} }
this.money = this.form.giftAfterMoney;
let form = { ...this.form }; let form = { ...this.form };
this.form = {}; this.form = {};
this.form = form; this.form = form;
@ -863,10 +872,14 @@ export default {
if (this.typeList.giftMoney == null) { if (this.typeList.giftMoney == null) {
this.typeList.giftMoney = 0; this.typeList.giftMoney = 0;
this.form.giftAfterMoney = this.form.giftAfterMoney =
this.form.giftBeforeMoney + this.typeList.giftMoney; (this.form.giftBeforeMoney + this.typeList.giftMoney).toFixed(
2
) * 1;
} else { } else {
this.form.giftAfterMoney = this.form.giftAfterMoney =
this.form.giftBeforeMoney + this.typeList.giftMoney; (this.form.giftBeforeMoney + this.typeList.giftMoney).toFixed(
2
) * 1;
} }
this.$alert("查询会员信息 : " + res.message, "提示", { this.$alert("查询会员信息 : " + res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -938,8 +951,6 @@ export default {
} }
this.form.afterMoney = this.form.afterMoney =
this.form.collectionCashAmount + this.form.beforeMoney + integralMoney; this.form.collectionCashAmount + this.form.beforeMoney + integralMoney;
if (this.form.debtMoney != 0) {
this.form.giftAfterMoney = this.form.giftBeforeMoney;
if ( if (
this.form.debtMoney * 1 > this.form.debtMoney * 1 >
( (
@ -962,42 +973,9 @@ export default {
1, 1,
}); });
} }
} else {
this.form.giftAfterMoney = this.money;
}
}, },
empty() { empty() {
// this.form = {
// mobilePhone: null,
// memberName: null,
// sex: null,
// collectionCashAmount: null,
// beforeMoney: 0,
// afterMoney: 0,
// description: null,
// rechargeTypeName: null,
// integralCheckbox: false,
// debtMoney: null,
// additionDate: null,
// rechargeAmount: 0,
// debtMoney: 0,
// afterMoney: 0,
// giftAfterMoney: 0,
// giftBeforeMoney: 0,
// };
// this.debtMoneys = 0;
// this.integral = 0;
// this.integralMoney = 0;
// this.consumeIntegral = 0;
// this.payLists = [];
// this.staffLists = [{ ratio: 100 }];
// this.managerLists = [{ ratio: 100 }];
// this.adminList = [{ ratio: 100 }];
// this.activeName = [""];
// this.setStaffRatio();
// this.getCtList();
// },
Object.assign(this.$data, this.$options.data.call(this)); Object.assign(this.$data, this.$options.data.call(this));
this.setPage(); this.setPage();
}, },
@ -1159,7 +1137,6 @@ export default {
this.$message.success({ this.$message.success({
message: res.message, message: res.message,
}); });
this.money = 0;
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -1178,7 +1155,6 @@ export default {
this.$message.success({ this.$message.success({
message: res.message, message: res.message,
}); });
this.money = 0;
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -1324,7 +1300,6 @@ export default {
list.push(items); list.push(items);
}); });
this.payLists = list; this.payLists = list;
this.num();
} else { } else {
this.$alert("现付列表" + res.message, "提示", { this.$alert("现付列表" + res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -1389,16 +1364,32 @@ export default {
// //
num() { num() {
var num = 0; var num = 0;
var form = { ...this.form };
this.payLists.forEach((item) => { this.payLists.forEach((item) => {
num += item.payMoney * 1; num += item.payMoney * 1;
}); });
this.form.collectionCashAmount = num; form.collectionCashAmount = num;
if (this.form.integralCheckbox == true) { if (form.integralCheckbox == true) {
this.form.collectionAmount = form.collectionAmount = form.collectionCashAmount + this.integralMoney;
this.form.collectionCashAmount + this.integralMoney;
} else { } else {
this.form.collectionAmount = this.form.collectionCashAmount; form.collectionAmount = form.collectionCashAmount;
} }
let giftMoney = 0;
if (form.donateType == 1) {
giftMoney =
((form.giftMoney * form.collectionCashAmount) / 100).toFixed(2) * 1;
} else {
giftMoney = form.giftMoney;
}
form.giftAfterMoney = (form.giftBeforeMoney + giftMoney).toFixed(2) * 1;
console.log(form.giftBeforeMoney + giftMoney);
console.log(form.giftAfterMoney);
this.giftAfterShow = false;
this.form = {};
this.form = { ...form };
console.log(this.form);
this.giftAfterShow = true;
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {

@ -3,74 +3,72 @@
<div> <div>
<div class="staffRanking_header padding-bottom-xs"> <div class="staffRanking_header padding-bottom-xs">
<div> <div>
当前年/月份{{ month }}
<el-button size="mini" @click="del" type="primary" v-role="6006001"></el-button>
</div>
<div class="block">
<span class="demonstration padding-left-xs">选择日</span> <span class="demonstration padding-left-xs">选择日</span>
<el-date-picker v-model="days" :picker-options="pickerOptions" @change="changeMonth" type="daterange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> <el-date-picker v-model="days" :picker-options="pickerOptions" @change="changeMonth" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</div> </div>
<div class="block">
</div>
</div> </div>
<el-table @row-dblclick="confirm" :data="tableDate" :header-cell-style="{ <el-table @row-dblclick="confirm" :data="tableDate" :header-cell-style="{
background: 'linear-gradient(#6cb3ff, #1873d4)', background: 'linear-gradient(#6cb3ff, #1873d4)',
color: '#eeeeee', color: '#eeeeee',
}" :summary-method="getSummaries" show-summary border max-height="700"> }" :summary-method="getSummaries" show-summary border max-height="700">
<el-table-column align="center" min-width="80" prop="datae" label="日期"></el-table-column> <el-table-column align="center" min-width="80" prop="date" label="日期"></el-table-column>
<el-table-column align="center" min-width="80" prop="kedans" label="客单数"> <el-table-column align="center" min-width="80" prop="cashPeopleNum" label="客单数">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.kedans?scope.row.kedans:'--'}} {{scope.row.cashPeopleNum?scope.row.cashPeopleNum:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeyj" label="充值金额"> <el-table-column align="center" min-width="80" prop="rechargeMoney" label="充值金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeyj?scope.row.rechargeyj:'--'}} {{scope.row.rechargeMoney?scope.row.rechargeMoney:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="courseOfTreatmentYJ" label="充值人数"> <el-table-column align="center" min-width="80" prop="rechargeOrderNum" label="充值人数">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.courseOfTreatmentYJ?scope.row.courseOfTreatmentYJ:'--'}} {{scope.row.rechargeOrderNum?scope.row.rechargeOrderNum:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="lcCardyj" label="服务金额"> <el-table-column align="center" min-width="80" prop="cashMoney" label="服务金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.lcCardyj?scope.row.lcCardyj:'--'}} {{scope.row.cashMoney?scope.row.cashMoney:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="男客"> <el-table-column align="center" min-width="80" prop="man" label="男客">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.man?scope.row.man:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="女客"> <el-table-column align="center" min-width="80" prop="woman" label="女客">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.woman?scope.row.woman:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="还款金额"> <el-table-column align="center" min-width="80" prop="repayMoney" label="还款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.repayMoney?scope.row.repayMoney:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="退款金额"> <el-table-column align="center" min-width="80" prop="refundMoney" label="退款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.refundMoney?scope.row.refundMoney:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="新增会员"> <el-table-column align="center" min-width="80" prop="newMemberNum" label="新增会员">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.newMemberNum?scope.row.newMemberNum:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="启用会员"> <el-table-column align="center" min-width="80" prop="startMemberNum" label="启用会员">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.startMemberNum?scope.row.startMemberNum:'--'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="80" prop="rechargeTurnCourseChia" label="会员总数"> <el-table-column align="center" min-width="80" prop="memberNum" label="会员总数">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.rechargeTurnCourseChia?scope.row.rechargeTurnCourseChia:'--'}} {{scope.row.memberNum?scope.row.memberNum:'--'}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -79,14 +77,7 @@
</template> </template>
<script> <script>
import { import { storeDailys, exportachi, exportachiwhole } from "@/api/statistics.js";
selectSalary,
addSalary,
delSalary,
achiCommListsgroup,
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";
export default { export default {
@ -96,6 +87,7 @@ export default {
days: "", days: "",
tableDate: [{}], tableDate: [{}],
month: partten.months, month: partten.months,
queryForm: {},
pickerOptions: { pickerOptions: {
// //
onPick: ({ maxDate, minDate }) => { onPick: ({ maxDate, minDate }) => {
@ -130,8 +122,8 @@ export default {
methods: { methods: {
// //
exit() { exit() {
let date1 = this.formatTime(this.days[0], "YYYY-MM-DD 00:00:00"); let date1 = this.formatTime(this.days[0], "YYYY-MM-DD");
let date2 = this.formatTime(this.days[1], "YYYY-MM-DD 23:59:59"); let date2 = this.formatTime(this.days[1], "YYYY-MM-DD");
let form = { startDate: date1, endDate: date2 }; let form = { startDate: date1, endDate: date2 };
exportachi(form).then((res) => { exportachi(form).then((res) => {
let blob = new Blob([res]); let blob = new Blob([res]);
@ -145,8 +137,8 @@ export default {
}); });
}, },
exits() { exits() {
let date1 = this.formatTime(this.days[0], "YYYY-MM-DD 00:00:00"); let date1 = this.formatTime(this.days[0], "YYYY-MM-DD");
let date2 = this.formatTime(this.days[1], "YYYY-MM-DD 23:59:59"); let date2 = this.formatTime(this.days[1], "YYYY-MM-DD");
let form = { startDate: date1, endDate: date2 }; let form = { startDate: date1, endDate: date2 };
exportachiwhole(form).then((res) => { exportachiwhole(form).then((res) => {
let blob = new Blob([res]); let blob = new Blob([res]);
@ -159,91 +151,15 @@ export default {
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
}); });
}, },
handleStaffName(index) {
let tableDate = Array.from(this.tableDate);
tableDate[index].show = true;
this.tableDate = Array.from(tableDate);
},
del() {
this.$confirm("将之前保存数据库的数据进行删除 , 是否继续", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
cancelButtonClass: "cancelbtnFalses",
confirmButtonClass: "confirmbtnFalses",
}).then(() => {
delSalary({ type: 3 }).then((res) => {
if (res.code == "000000") {
this.$message.success({ message: res.message });
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
});
},
seve() {
this.$confirm("将当前数据保存到数据库备份 , 是否继续保存", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
cancelButtonClass: "cancelbtnFalses",
confirmButtonClass: "confirmbtnFalses",
}).then(() => {
addSalary(this.tableDate).then((res) => {
if (res.code == "000000") {
this.$message.success({ message: res.message });
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
});
},
changeMonth(res) {
console.log(res);
let date = this.formatTime(res[1], "YYYY-MM-DD 23:59:59");
var form = { startDate: res[0], endDate: date };
let month = this.formatTime(this.month, "YYYY-MM");
achiCommListsgroup(form).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.baseSalary = item.baseSalary == null ? 0 : item.baseSalary * 1;
item.commSalary = item.commSalary == null ? 0 : item.commSalary * 1;
item.sumNumber = (item.baseSalary + item.commSalary).toFixed(2) * 1;
item.startDate = form.startDate;
item.endDate = form.endDate;
console.log(item);
});
this.tableDate = res.rows; changeMonth(res) {
} else { this.days = res;
this.$alert(res.message, "提示", { this.getData();
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
}, },
achiCommListsgroup() { getData() {
let month = this.formatTime(new Date(), "YYYY-MM-DD hh:mm:ss"); this.queryForm.startDate = this.days[0];
let date1 = this.formatTime(new Date(), "YYYY-MM-DD 00:00:00"); this.queryForm.endDate = this.days[1];
let date2 = this.formatTime(new Date(), "YYYY-MM-DD 23:59:59"); storeDailys(this.queryForm).then((res) => {
let form = { startDate: date1, endDate: date2 };
achiCommListsgroup(form).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
res.rows.forEach((item) => { res.rows.forEach((item) => {
item.baseSalary = item.baseSalary == null ? 0 : item.baseSalary * 1; item.baseSalary = item.baseSalary == null ? 0 : item.baseSalary * 1;
@ -328,10 +244,10 @@ export default {
}, },
}, },
created() { created() {
let sDate = this.formatTime(new Date(), "YYYY-MM-DD 00:00:00"); let sDate = this.formatTime(new Date(), "YYYY-MM-DD");
let eDate = this.formatTime(new Date(), "YYYY-MM-DD 23:59:59"); let eDate = this.formatTime(new Date(), "YYYY-MM-DD");
this.days = [sDate, eDate]; this.days = [sDate, eDate];
// this.achiCommListsgroup(); this.getData();
}, },
}; };
</script> </script>

Loading…
Cancel
Save