部分bug修复

master
十七 4 years ago
parent 25748231ff
commit 17be547c16

@ -1,140 +1,124 @@
<template> <template>
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="600px"> <el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="dialogVisible" width="600px">
<el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText"> <el-table @row-dblclick="confirms" :data="list" @row-click="rowClick" max-height="600" v-loading="listLoading" :element-loading-text="elementLoadingText">
<el-table-column label="选择" width="60"> <el-table-column label="选择" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;"> <el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
{{ "" }} {{ "" }}
</el-radio> </el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="100" prop="brandNumber" label="水牌号"></el-table-column> <el-table-column align="center" width="100" prop="brandNumber" label="水牌号"></el-table-column>
<el-table-column align="center" min-width="120" prop="staffName" label="名字"></el-table-column> <el-table-column align="center" min-width="120" prop="staffName" label="名字"></el-table-column>
<el-table-column align="center" min-width="100" prop="jobName" label="工种"> <el-table-column align="center" min-width="100" prop="wordTypeName" label="工种"></el-table-column>
<template slot-scope="scope"> </el-table>
{{ <span slot="footer" class="dialog-footer">
scope.row.job == 1 <el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button>
? "美发师" <el-button size="mini" type="primary" @click="confirms()">
: scope.row.job == 2 </el-button>
? "技师" </span>
: scope.row.job == 3 </el-dialog>
? "助理" </template>
: scope.row.job == 4
? "收银员" <script>
: scope.row.job == 5 import { selectList } from "@/api/eashier.js";
? "美容师" export default {
: "暂无" data() {
}} return {
</template> radio: null, //
</el-table-column> radioForm: {}, //
</el-table> list: [], //
<span slot="footer" class="dialog-footer"> dialogVisible: false, // //
<el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button> elementLoadingText: "数据加载中...", //list //
<el-button size="mini" type="primary" @click="confirms()"> listLoading: false, //list //
</el-button> title: "选择员工", //
</span> selectNumber: 0, // 0 1 2
</el-dialog> staffList: [], //
</template> };
},
<script> methods: {
import { selectList } from "@/api/eashier.js"; //
export default { show(number, title, list) {
data() { //number 0 1 2
return { //list
radio: null, // this.staffList = [];
radioForm: {}, // if (title) {
list: [], // this.title = title;
dialogVisible: false, // // }
elementLoadingText: "数据加载中...", //list // if (list) {
listLoading: false, //list // this.staffList = list;
title: "选择员工", // }
selectNumber: 0, // 0 1 2 this.selectNumber = number;
staffList: [], // this.list = [];
}; this.radio = null;
}, this.radioForm = {};
methods: { this.dialogVisible = true;
// console.log(this.staffList);
show(number, title, list) { this.getData();
//number 0 1 2 },
//list //
this.staffList = []; //
if (title) { rowClick(row) {
this.title = title; this.radio = row.id;
} this.radioForm = row;
if (list) { },
this.staffList = list; //
} //
this.selectNumber = number; async getData() {
this.list = []; this.listLoading = true;
this.radio = null; let form = { id: "" };
this.radioForm = {}; if (this.staffName) {
this.dialogVisible = true; form.staffName = this.staffName;
console.log(this.staffList); }
this.getData(); selectList(form).then((res) => {
}, this.listLoading = false;
// if (res.code == "000000") {
// if (this.staffList.length == 0) {
rowClick(row) { this.list = res.rows;
this.radio = row.id; } else {
this.radioForm = row; var list = [];
}, res.rows.forEach((item) => {
// this.staffList.forEach((items) => {
// if (item.id == items.id) {
async getData() { } else {
this.listLoading = true; list.push(item);
let form = { id: "" }; }
if (this.staffName) { });
form.staffName = this.staffName; });
} this.list = Array.from(new Set(list));
selectList(form).then((res) => { }
this.listLoading = false; } else {
if (res.code == "000000") { this.$alert(res.message, "提示", {
if (this.staffList.length == 0) { confirmButtonText: "确定",
this.list = res.rows; confirmButtonClass: "confirmbtnFalses",
} else { type: "warning",
var list = []; center: true,
res.rows.forEach((item) => { callback: (action) => {},
this.staffList.forEach((items) => { });
if (item.id == items.id) { }
} else { });
list.push(item); },
} //
}); confirms() {
}); if (this.selectNumber == 1) {
this.list = Array.from(new Set(list)); this.radioForm.saleStaffName = this.radioForm.staffName;
} this.radioForm.saleStaffId = this.radioForm.id;
} else { this.radioForm.saleIdentityCard = this.radioForm.identityCard;
this.$alert(res.message, "提示", { this.radioForm.saleRatio = 0;
confirmButtonText: "确定", }
confirmButtonClass: "confirmbtnFalses", if (this.selectNumber == 2) {
type: "warning", this.radioForm.manageStaffName = this.radioForm.staffName;
center: true, this.radioForm.manageStaffId = this.radioForm.id;
callback: (action) => {}, this.radioForm.manageIdentityCard = this.radioForm.identityCard;
}); this.radioForm.manageBrandNumber = this.radioForm.brandNumber;
} }
}); this.radioForm.ratioShow = false;
}, this.$emit("staffData", this.radioForm);
// this.dialogVisible = false;
confirms() { },
if (this.selectNumber == 1) { },
this.radioForm.saleStaffName = this.radioForm.staffName; };
this.radioForm.saleStaffId = this.radioForm.id; </script>
this.radioForm.saleIdentityCard = this.radioForm.identityCard;
this.radioForm.saleRatio = 0; <style>
} </style>
if (this.selectNumber == 2) {
this.radioForm.manageStaffName = this.radioForm.staffName;
this.radioForm.manageStaffId = this.radioForm.id;
this.radioForm.manageIdentityCard = this.radioForm.identityCard;
this.radioForm.manageBrandNumber = this.radioForm.brandNumber;
}
this.radioForm.ratioShow = false;
this.$emit("staffData", this.radioForm);
this.dialogVisible = false;
},
},
};
</script>
<style>
</style>

@ -1,178 +1,180 @@
<template> <template>
<div style="width: 300px;overflow: hidden;" class="border-radius-10 border margin-right-xs bg-white"> <div style="width: 300px;overflow: hidden;" class="border-radius-10 border margin-right-xs bg-white">
<el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px"> <el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px">
<el-table-column align="left" prop="brandNumber" label="水牌号--管理员名字" min-width="180"> <el-table-column align="left" prop="brandNumber" label="水牌号--管理员名字" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option> <el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option>
<el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id"> <el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80"> <el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)"> <div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }} {{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i> <i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input> <el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="width: 150px;margin:10px auto;" class="flex justify-between align-center"> <div style="width: 150px;margin:10px auto;" class="flex justify-between align-center">
<el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button> <el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button>
<el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button> <el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { selectListType } from "@/api/eashier.js"; import { selectListType } from "@/api/eashier.js";
export default { export default {
data() { data() {
return { return {
staffList: [], // staffList: [], //
staffLists: [{ ratio: 100 }], // // staffLists: [{ ratio: 100 }], // //
editIndex: -1, // editIndex: -1, //
staffListCopy: [], // staffListCopy: [], //
storeId: null, //id storeId: null, //id
}; };
}, },
methods: { methods: {
// //
clear() { clear() {
this.staffLists = [{ ratio: 100 }]; this.staffLists = [
this.changeStaff(); { staffNames: "", brandNumber: "", staffName: "", ratio: 100 },
this.confirm(); ];
}, this.changeStaff();
// this.confirm();
ratioChange(v, index) { },
this.staffList.forEach((item) => { //
if (item.id == v) { ratioChange(v, index) {
item.ratio = this.staffLists[index].ratio; this.staffList.forEach((item) => {
item.staffNames = item.brandNumber + "--" + item.staffName; if (item.id == v) {
this.staffLists.splice(index, 1, item); item.ratio = this.staffLists[index].ratio;
} item.staffNames = item.brandNumber + "--" + item.staffName;
}); this.staffLists.splice(index, 1, item);
this.confirm(); }
this.changeStaff(); });
}, this.confirm();
// this.changeStaff();
openStaffRatio(index, row) { },
if (index != 0 || row.ratio * 1 != 100) { //
let form = { ...row }; openStaffRatio(index, row) {
this.editIndex = index; if (index != 0 || row.ratio * 1 != 100) {
this.staffLists.splice(index, 1, form); let form = { ...row };
} this.editIndex = index;
}, this.staffLists.splice(index, 1, form);
// }
endStaffRatio(row, index) { },
let num = 0; //
if (index != 0) { endStaffRatio(row, index) {
this.staffLists.forEach((item, i) => { let num = 0;
if (i != 0) { if (index != 0) {
num += item.ratio * 1; this.staffLists.forEach((item, i) => {
} if (i != 0) {
}); num += item.ratio * 1;
this.staffLists[0].ratio = 100 - num; }
if (this.staffLists[0].ratio < 1) { });
this.$message.error({ this.staffLists[0].ratio = 100 - num;
message: "第一位员工占比过低", if (this.staffLists[0].ratio < 1) {
}); this.$message.error({
} else { message: "第一位员工占比过低",
if (!row.ratio) { });
row.ratio = 0; } else {
} else { if (!row.ratio) {
row.ratio = row.ratio * 1; row.ratio = 0;
} } else {
let form = this.staffLists[index]; row.ratio = row.ratio * 1;
this.staffLists.splice(index, 1, form); }
} let form = this.staffLists[index];
this.editIndex = -1; this.staffLists.splice(index, 1, form);
} }
this.confirm(); this.editIndex = -1;
this.changeStaff(); }
}, this.confirm();
// this.changeStaff();
delsalesman() { },
let index = this.staffLists.length - 1; //
if (index == 0) { delsalesman() {
this.$message.warning({ message: "第一行员工只能修改" }); let index = this.staffLists.length - 1;
} else { if (index == 0) {
let ratio = this.staffLists[index].ratio; this.$message.warning({ message: "第一行员工只能修改" });
this.staffLists[0].ratio += ratio; } else {
this.staffLists.splice(index, 1); let ratio = this.staffLists[index].ratio;
} this.staffLists[0].ratio += ratio;
this.confirm(); this.staffLists.splice(index, 1);
this.changeStaff(); }
}, this.confirm();
// this.changeStaff();
show(list, storeId) { },
this.staffLists = [...list]; //
if (storeId) { show(list, storeId) {
this.storeId = storeId; this.staffLists = [...list];
} if (storeId) {
this.getData(); this.storeId = storeId;
}, }
// this.getData();
confirm() { },
let list = []; //
this.staffLists.forEach((item) => { confirm() {
let items = { let list = [];
id: item.id, this.staffLists.forEach((item) => {
ratio: item.ratio, let items = {
brandNumber: item.brandNumber, id: item.id,
staffName: item.staffName, ratio: item.ratio,
identityCard: item.identityCard, brandNumber: item.brandNumber,
storeId: item.storeId, staffName: item.staffName,
storeName: item.storeName, identityCard: item.identityCard,
staffType: 1, storeId: item.storeId,
staffNames: item.brandNumber + "--" + item.staffName, storeName: item.storeName,
}; staffType: 1,
list.push(items); staffNames: item.brandNumber + "--" + item.staffName,
}); };
this.$emit("adminData", list); list.push(items);
}, });
// this.$emit("adminData", list);
changeStaff() { },
var that = this; //
var list = that.staffLists changeStaff() {
.concat(that.staffListCopy) var that = this;
.filter(function (v) { var list = that.staffLists
return ( .concat(that.staffListCopy)
that.staffLists.indexOf(v) === -1 || .filter(function (v) {
that.staffListCopy.indexOf(v) === -1 return (
); that.staffLists.indexOf(v) === -1 ||
}); that.staffListCopy.indexOf(v) === -1
this.staffList = list; );
}, });
// this.staffList = list;
// },
async getData() { //
let form = { type: 0 }; //
if (this.storeId) { async getData() {
form.storeId = this.storeId; let form = { type: 0 };
} if (this.storeId) {
selectListType(form).then((res) => { form.storeId = this.storeId;
if (res.code == "000000") { }
res.rows.forEach((item) => { selectListType(form).then((res) => {
item.editStaffRatioShow = false; if (res.code == "000000") {
}); res.rows.forEach((item) => {
this.staffList = res.rows; item.editStaffRatioShow = false;
this.staffListCopy = res.rows; });
} else { this.staffList = res.rows;
this.$alert(res.message, "加载员工提示", { this.staffListCopy = res.rows;
confirmButtonText: "确定", } else {
confirmButtonClass: "confirmbtnFalses", this.$alert(res.message, "加载员工提示", {
type: "warning", confirmButtonText: "确定",
center: true, confirmButtonClass: "confirmbtnFalses",
callback: (action) => {}, type: "warning",
}); center: true,
} callback: (action) => {},
}); });
}, }
}, });
}; },
</script> },
};
<style> </script>
</style>
<style>
</style>

@ -1,167 +1,167 @@
<template> <template>
<div style="width: 300px;overflow: hidden;" class="border-radius-10 border bg-white"> <div style="width: 300px;overflow: hidden;" class="border-radius-10 border bg-white">
<el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px"> <el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px">
<el-table-column align="left" prop="brandNumber" label="水牌号--高管名字" min-width="180"> <el-table-column align="left" prop="brandNumber" label="水牌号--高管名字" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option> <el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option>
<el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id"> <el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80"> <el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)"> <div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }} {{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i> <i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input> <el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="width: 150px;margin:10px auto;" class="flex justify-between align-center"> <div style="width: 150px;margin:10px auto;" class="flex justify-between align-center">
<el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button> <el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button>
<el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button> <el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { QuerCompetent } from "@/api/eashier.js"; import { QuerCompetent } from "@/api/eashier.js";
export default { export default {
data() { data() {
return { return {
staffList: [], // staffList: [], //
staffLists: [{ ratio: 100 }], // // staffLists: [{ ratio: 100 }], // //
editIndex: -1, // editIndex: -1, //
staffListCopy: [], // staffListCopy: [], //
}; };
}, },
methods: { methods: {
// //
clear() { clear() {
this.staffLists = [{ ratio: 100 }]; this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.changeStaff(); this.changeStaff();
this.confirm(); this.confirm();
}, },
// //
ratioChange(v, index) { ratioChange(v, index) {
this.staffList.forEach((item) => { this.staffList.forEach((item) => {
if (item.id == v) { if (item.id == v) {
item.ratio = this.staffLists[index].ratio; item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName; item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item); this.staffLists.splice(index, 1, item);
} }
}); });
this.confirm(); this.confirm();
this.changeStaff(); this.changeStaff();
}, },
// //
openStaffRatio(index, row) { openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) { if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row }; let form = { ...row };
this.editIndex = index; this.editIndex = index;
this.staffLists.splice(index, 1, form); this.staffLists.splice(index, 1, form);
} }
}, },
// //
endStaffRatio(row, index) { endStaffRatio(row, index) {
let num = 0; let num = 0;
if (index != 0) { if (index != 0) {
this.staffLists.forEach((item, i) => { this.staffLists.forEach((item, i) => {
if (i != 0) { if (i != 0) {
num += item.ratio * 1; num += item.ratio * 1;
} }
}); });
this.staffLists[0].ratio = 100 - num; this.staffLists[0].ratio = 100 - num;
if (this.staffLists[0].ratio < 1) { if (this.staffLists[0].ratio < 1) {
this.$message.error({ this.$message.error({
message: "第一位占比过低", message: "第一位占比过低",
}); });
} else { } else {
if (!row.ratio) { if (!row.ratio) {
row.ratio = 0; row.ratio = 0;
} else { } else {
row.ratio = row.ratio * 1; row.ratio = row.ratio * 1;
} }
let form = this.staffLists[index]; let form = this.staffLists[index];
this.editIndex = -1; this.editIndex = -1;
this.staffLists.splice(index, 1, form); this.staffLists.splice(index, 1, form);
} }
} }
this.confirm(); this.confirm();
this.changeStaff(); this.changeStaff();
}, },
// //
delsalesman() { delsalesman() {
let index = this.staffLists.length - 1; let index = this.staffLists.length - 1;
if (index == 0) { if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" }); this.$message.warning({ message: "第一行员工只能修改" });
} else { } else {
let ratio = this.staffLists[index].ratio; let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio; this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1); this.staffLists.splice(index, 1);
} }
this.confirm(); this.confirm();
this.changeStaff(); this.changeStaff();
}, },
// //
show(list) { show(list) {
this.staffLists = [...list]; this.staffLists = [...list];
this.getData(); this.getData();
}, },
// //
confirm() { confirm() {
let list = []; let list = [];
this.staffLists.forEach((item) => { this.staffLists.forEach((item) => {
let items = { let items = {
id: item.id, id: item.id,
ratio: item.ratio, ratio: item.ratio,
brandNumber: item.brandNumber, brandNumber: item.brandNumber,
staffName: item.staffName, staffName: item.staffName,
identityCard: item.identityCard, identityCard: item.identityCard,
storeId: item.storeId, storeId: item.storeId,
storeName: item.storeName, storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName, staffNames: item.brandNumber + "--" + item.staffName,
staffType: 0, staffType: 0,
}; };
list.push(items); list.push(items);
}); });
this.$emit("managerData", list); this.$emit("managerData", list);
}, },
// //
changeStaff() { changeStaff() {
var that = this; var that = this;
var list = that.staffLists var list = that.staffLists
.concat(that.staffListCopy) .concat(that.staffListCopy)
.filter(function (v) { .filter(function (v) {
return ( return (
that.staffLists.indexOf(v) === -1 || that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1 that.staffListCopy.indexOf(v) === -1
); );
}); });
this.staffList = list; this.staffList = list;
}, },
// //
// //
async getData() { async getData() {
QuerCompetent({ type: 0, pageSize: 999 }).then((res) => { QuerCompetent({ type: 0, pageSize: 999 }).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.staffList = res.pageInfo.list; this.staffList = res.pageInfo.list;
this.staffListCopy = res.pageInfo.list; this.staffListCopy = res.pageInfo.list;
} else { } else {
this.$alert(res.message, "加载高管提示", { this.$alert(res.message, "加载高管提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

@ -1,180 +1,180 @@
<template> <template>
<div style="width: 300px;overflow: hidden;" class="border-radius-10 border margin-right-xs bg-white "> <div style="width: 300px;overflow: hidden;" class="border-radius-10 border margin-right-xs bg-white ">
<el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px"> <el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px">
<el-table-column align="left" prop="brandNumber" label="水牌号--员工名字" min-width="180"> <el-table-column align="left" prop="brandNumber" label="水牌号--员工名字" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option> <el-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear" no-match-text="" placeholder="请选择" @change="ratioChange($event,scope.$index)" filterable default-first-option>
<el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id"> <el-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80"> <el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)"> <div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }} {{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i> <i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input> <el-input v-focus class="form-input-width-xs" size="samll" type="number" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="width: 150px;margin:10px auto;" class="flex justify-between align-center"> <div style="width: 150px;margin:10px auto;" class="flex justify-between align-center">
<el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button> <el-button size="mini" type="info" :disabled="staffLists.length == 0" @click="delsalesman"></el-button>
<el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button> <el-button size="mini" type="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { selectList } from "@/api/eashier.js"; import { selectList } from "@/api/eashier.js";
export default { export default {
data() { data() {
return { return {
staffList: [], // staffList: [], //
staffLists: [{ ratio: 100 }], // // staffLists: [{ ratio: 100 }], // //
editIndex: -1, // editIndex: -1, //
staffListCopy: [], // staffListCopy: [], //
storeId: null, //id storeId: null, //id
}; };
}, },
methods: { methods: {
// //
ratioChange(v, index) { ratioChange(v, index) {
this.staffList.forEach((item) => { this.staffList.forEach((item) => {
if (item.id == v) { if (item.id == v) {
item.ratio = this.staffLists[index].ratio; item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName; item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item); this.staffLists.splice(index, 1, item);
} }
}); });
this.changeStaff(); this.changeStaff();
this.confirm(); this.confirm();
}, },
// //
clear() { clear() {
this.staffLists = [{ ratio: 100 }]; this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.changeStaff(); this.changeStaff();
this.confirm(); this.confirm();
}, },
// //
openStaffRatio(index, row) { openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) { if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row }; let form = { ...row };
this.editIndex = index; this.editIndex = index;
this.staffLists.splice(index, 1, form); this.staffLists.splice(index, 1, form);
} }
}, },
// //
endStaffRatio(row, index) { endStaffRatio(row, index) {
let num = 0; let num = 0;
if (index != 0) { if (index != 0) {
this.staffLists.forEach((item, i) => { this.staffLists.forEach((item, i) => {
if (i != 0) { if (i != 0) {
num += item.ratio * 1; num += item.ratio * 1;
} }
}); });
this.staffLists[0].ratio = 100 - num; this.staffLists[0].ratio = 100 - num;
if (this.staffLists[0].ratio < 1) { if (this.staffLists[0].ratio < 1) {
this.$message.error({ this.$message.error({
message: "第一位员工占比过低", message: "第一位员工占比过低",
}); });
} else { } else {
if (!row.ratio) { if (!row.ratio) {
row.ratio = 0; row.ratio = 0;
} else { } else {
row.ratio = row.ratio * 1; row.ratio = row.ratio * 1;
} }
let form = this.staffLists[index]; let form = this.staffLists[index];
this.editIndex = -1; this.editIndex = -1;
this.staffLists.splice(index, 1, form); this.staffLists.splice(index, 1, form);
} }
} }
this.changeStaff(); this.changeStaff();
this.confirm(); this.confirm();
}, },
// //
delsalesman() { delsalesman() {
let index = this.staffLists.length - 1; let index = this.staffLists.length - 1;
if (index == 0) { if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" }); this.$message.warning({ message: "第一行员工只能修改" });
} else { } else {
let ratio = this.staffLists[index].ratio; let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio; this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1); this.staffLists.splice(index, 1);
} }
this.changeStaff(); this.changeStaff();
this.confirm(); this.confirm();
}, },
// //
show(list, storeId) { show(list, storeId) {
console.log(list); console.log(list);
this.staffLists = [...list]; this.staffLists = [...list];
if (storeId) { if (storeId) {
this.storeId = storeId; this.storeId = storeId;
} }
this.getData(); this.getData();
}, },
// //
confirm() { confirm() {
let list = []; let list = [];
this.staffLists.forEach((item) => { this.staffLists.forEach((item) => {
let items = { let items = {
id: item.id, id: item.id,
ratio: item.ratio, ratio: item.ratio,
brandNumber: item.brandNumber, brandNumber: item.brandNumber,
staffName: item.staffName, staffName: item.staffName,
identityCard: item.identityCard, identityCard: item.identityCard,
storeId: item.storeId, storeId: item.storeId,
storeName: item.storeName, storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName, staffNames: item.brandNumber + "--" + item.staffName,
staffType: 2, staffType: 2,
}; };
list.push(items); list.push(items);
}); });
this.$emit("staffslesData", list); this.$emit("staffslesData", list);
}, },
// //
changeStaff() { changeStaff() {
var that = this; var that = this;
var list = that.staffLists var list = that.staffLists
.concat(that.staffListCopy) .concat(that.staffListCopy)
.filter(function (v) { .filter(function (v) {
return ( return (
that.staffLists.indexOf(v) === -1 || that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1 that.staffListCopy.indexOf(v) === -1
); );
}); });
this.staffList = list; this.staffList = list;
}, },
// //
// //
async getData() { async getData() {
let form = { id: "" }; let form = { id: "" };
if (this.storeId) { if (this.storeId) {
form.storeId = this.storeId; form.storeId = this.storeId;
} }
selectList(form).then((res) => { selectList(form).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
res.rows.forEach((item) => { res.rows.forEach((item) => {
item.editStaffRatioShow = false; item.editStaffRatioShow = false;
}); });
this.staffList = res.rows; this.staffList = res.rows;
this.staffListCopy = res.rows; this.staffListCopy = res.rows;
} else { } else {
this.$alert(res.message, "加载员工提示", { this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

@ -1,171 +1,174 @@
<template> <template>
<!-- 门店日报 --> <!-- 门店日报 -->
<div> <div class="bottom-right flex justify-center flex-wrap padding-bottom">
<div class="bottom-right flex justify-center flex-wrap padding-bottom"> <el-tooltip effect="dark" :content="'今日客单总数为 ' + form.cashPeopleNum " placement="top">
<el-tooltip effect="dark" :content="'今日客单总数为 ' + form.cashPeopleNum " placement="top"> <div class="bottom-right-item text-center">
<div class="bottom-right-item"> <div style="width:100%;" class="text-center">
<i class="el-icon-user i"></i> <i class="el-icon-user i"></i>
<br> </div>
<span>客单数</span> <span>客单数</span>
<div class="bottom-right-item-number">{{form.cashPeopleNum}}</div> <div class="bottom-right-item-number">{{form.cashPeopleNum?form.cashPeopleNum:0}}</div>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="'今日总充值金额 ' + form.rechargeMoney +' , 总共充值人数为 ' +form.rechargeOrderNum" placement="top"> <el-tooltip effect="dark" :content="'今日总充值金额 ' + form.rechargeMoney +' , 总共充值人数为 ' +form.rechargeOrderNum" placement="top">
<div class="bottom-right-item"> <div class="bottom-right-item">
<i class="el-icon-s-management i"></i> <i class="el-icon-s-management i"></i>
<br> <br>
<span>充值金额</span> <span>充值金额</span>
<div> <div>
<div class="text-red text-price">{{form.rechargeMoney | money}}</div> <div class="text-red text-price">{{form.rechargeMoney | money}}</div>
<div> <div>
<i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i> <i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i>
<div class=" bottom-right-item-icon-number">{{form.rechargeOrderNum}}</div> <div class=" bottom-right-item-icon-number">{{form.rechargeOrderNum}}</div>
</div> </div>
</div> </div>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="'今日总服务金额 ' + form.cashMoney +' , 男客 ' +form.man+'女客'+form.woman" placement="top"> <el-tooltip effect="dark" :content="'今日总服务金额 ' + form.cashMoney +' , 男客 ' +form.man+'女客'+form.woman" placement="top">
<div class="bottom-right-item"> <div class="bottom-right-item">
<i class="el-icon-s-finance i"></i> <i class="el-icon-s-finance i"></i>
<br> <br>
<span>服务金额</span> <span>服务金额</span>
<div> <div>
<div class="text-red text-price">{{form.cashMoney | money}}</div> <div class="text-red text-price">{{form.cashMoney | money}}</div>
<div> <div>
<i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i> <i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i>
<div class="text-blue bottom-right-item-icon-number">{{form.man}}</div> <div class="text-blue bottom-right-item-icon-number">{{form.man}}</div>
<i class="text-red el-icon-user-solid bottom-right-item-icon"></i> <i class="text-red el-icon-user-solid bottom-right-item-icon"></i>
<div class="text-red bottom-right-item-icon-number">{{form.woman}}</div> <div class="text-red bottom-right-item-icon-number">{{form.woman}}</div>
</div> </div>
</div>
</div> </div>
</div> </el-tooltip>
</el-tooltip> <el-tooltip effect="dark" :content="'今日总还款金额 ' + form.repayMoney" placement="top">
<el-tooltip effect="dark" :content="'今日总还款金额 ' + form.repayMoney" placement="top"> <div class="bottom-right-item">
<div class="bottom-right-item"> <i class="el-icon-s-ticket i"></i>
<i class="el-icon-s-ticket i"></i> <br>
<br> <span>还款金额</span>
<span>还款金额</span> <div class="text-red text-price">{{form.repayMoney | money}}</div>
<div class="text-red text-price">{{form.repayMoney | money}}</div> </div>
</div> </el-tooltip>
</el-tooltip> <el-tooltip effect="dark" :content="'今日总退款金额 ' + form.refundMoney" placement="top">
<el-tooltip effect="dark" :content="'今日总退款金额 ' + form.refundMoney" placement="top"> <div class="bottom-right-item">
<div class="bottom-right-item"> <i class="el-icon-s-release i"></i>
<i class="el-icon-s-release i"></i> <br>
<br> <span>退款金额</span>
<span>退款金额</span> <div class="text-red text-price">{{form.refundMoney | money}}</div>
<div class="text-red text-price">{{form.refundMoney | money}}</div> </div>
</div> </el-tooltip>
</el-tooltip> <el-tooltip effect="dark" :content="'今日新增会员 ' + form.newMemberNum" placement="top">
<el-tooltip effect="dark" :content="'今日新增会员 ' + form.newMemberNum" placement="top"> <div class="bottom-right-item">
<div class="bottom-right-item"> <i class="el-icon-s-marketing i"></i>
<i class="el-icon-s-marketing i"></i> <br>
<br> <span>新增会员</span>
<span>新增会员</span> <div>
<div> <i class="text-blue el-icon-user-solid bottom-right-item-icon"></i>
<i class="text-blue el-icon-user-solid bottom-right-item-icon"></i> <div class=" bottom-right-item-icon-number">{{form.newMemberNum}}</div>
<div class=" bottom-right-item-icon-number">{{form.newMemberNum}}</div> </div>
</div> </div>
</div> </el-tooltip>
</el-tooltip> <el-tooltip effect="dark" :content="'总使用中的会员数为 ' + form.startMemberNum" placement="top">
<el-tooltip effect="dark" :content="'总使用中的会员数为 ' + form.startMemberNum" placement="top"> <div class="bottom-right-item">
<div class="bottom-right-item"> <i class="el-icon-loading i"></i>
<i class="el-icon-loading i"></i> <br>
<br> <span>启用会员</span>
<span>启用会员</span> <div>
<div> <i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i>
<i class=" text-blue el-icon-user-solid bottom-right-item-icon"></i> <div class=" bottom-right-item-icon-number">{{form.startMemberNum}}</div>
<div class=" bottom-right-item-icon-number">{{form.startMemberNum}}</div> </div>
</div> </div>
</div> </el-tooltip>
</el-tooltip> <el-tooltip effect="dark" :content="'门店会员总数为 ' + form.memberNum" placement="top">
<el-tooltip effect="dark" :content="'门店会员总数为 ' + form.memberNum" placement="top">
<div class="bottom-right-item">
<div class="bottom-right-item"> <i class="el-icon-s-data i"></i>
<i class="el-icon-s-data i"></i> <br>
<br> <span>会员总数</span>
<span>会员总数</span> <div>
<div> <i class="text-blue el-icon-user-solid bottom-right-item-icon"></i>
<i class="text-blue el-icon-user-solid bottom-right-item-icon"></i> <div class=" bottom-right-item-icon-number">{{form.memberNum}}</div>
<div class=" bottom-right-item-icon-number">{{form.memberNum}}</div> </div>
</div> </div>
</div> </el-tooltip>
</el-tooltip> </div>
</div>
</template>
</div>
</template> <script>
import { storeDaily } from "../../api/statistics";
<script> export default {
import { storeDaily } from "../../api/statistics"; data() {
export default { return {
data() { form: {
return { headCount: 68,
form: { rechargeMoney: 264568,
headCount: 68, rechargeOrderNum: 26,
rechargeMoney: 264568, cashPeopleNum: 54,
rechargeOrderNum: 26, cashMoney: 344501,
cashPeopleNum: 54, repayMoney: 5500,
cashMoney: 344501, newMemberNum: 8,
repayMoney: 5500, memberNum: 48,
newMemberNum: 8, startMemberNum: 47,
memberNum: 48, refundMoney: 3500,
startMemberNum: 47, },
refundMoney: 3500, };
}, },
}; methods: {
}, storeDaily() {
methods: { let form = JSON.parse(sessionStorage.getItem("userInfo"));
storeDaily() { storeDaily({ storeId: form.storeId }).then((res) => {
let form = JSON.parse(sessionStorage.getItem("userInfo")); if (res.code == "000000") {
storeDaily({ storeId: form.storeId }).then((res) => { this.form = res.data;
if (res.code == "000000") { }
this.form = res.data; });
} },
}); },
}, created() {
}, this.storeDaily();
created() { },
this.storeDaily(); };
}, </script>
}; <style scoped>
</script> .bottom-right {
<style scoped> /* display: flex;
.bottom-right { justify-content: space-between;
/* display: flex; flex-wrap: wrap; */
justify-content: space-between; max-height: 40vh;
flex-wrap: wrap; */ height: 100%;
max-height: 40vh; overflow: auto;
padding: 2%;
overflow: auto; }
} .bottom-right-item {
.bottom-right-item { overflow: hidden;
height: 80px; height: 40%;
width: 130px; width: 20%;
/* border: 1px solid #333; */ text-align: center;
text-align: center; margin-right: 2%;
padding: 25px 50px; border: 1px solid rgba(255, 184, 184, 0.7);
} padding-top: 2%;
.bottom-right-item .i { padding-bottom: 1%;
font-size: 42px; border-radius: 10%;
color: #51a5ff; }
} .bottom-right-item .i {
.bottom-right-item span { font-size: 42px;
font-size: 16px; color: #51a5ff;
color: #999; }
} .bottom-right-item span {
.bottom-right-item-number { font-size: 16px;
font-size: 36px; color: #999;
font-weight: 700; }
color: #f78; .bottom-right-item-number {
} font-size: 36px;
.bottom-right-item-icon { font-weight: 700;
font-size: 24px; color: #f78;
} }
.bottom-right-item-icon-number { .bottom-right-item-icon {
display: inline-block; font-size: 24px;
font-size: 16px; }
color: #999; .bottom-right-item-icon-number {
font-weight: 700; display: inline-block;
} font-size: 16px;
</style> color: #999;
font-weight: 700;
}
</style>

@ -1,71 +1,71 @@
<template> <template>
<!-- 员工业绩和提成 --> <!-- 员工业绩和提成 -->
<div class="month"> <div class="month">
<div class="month_header"> <div class="month_header">
<div style="padding:0 20px;font-size:14px;color:#999">员工业绩和提成</div> <div class="padding-left-xs" style="font-size:14px;color:#999">员工业绩和提成</div>
<el-input clearable prefix-icon="el-icon-search" size="mini" style="width:150px;margin-right:50px" v-model="input"></el-input> <el-input clearable prefix-icon="el-icon-search" size="samll" style="width:150px;margin-right:20px" v-model="input"></el-input>
</div> </div>
<br> <br>
<el-table :data="tableData" max-height="280" @row-dblclick="confirm" border :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="tableData" max-height="280" @row-dblclick="confirm" border :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="brandNumber" label="水牌号"> </el-table-column> <el-table-column align="center" prop="brandNumber" label="水牌号"> </el-table-column>
<el-table-column align="center" prop="staffName" label="员工名称"> </el-table-column> <el-table-column align="center" prop="staffName" label="员工名称"> </el-table-column>
<el-table-column align="center" prop="achievementAmount" label="业绩"> </el-table-column> <el-table-column align="center" prop="achievementAmount" label="业绩"> </el-table-column>
<el-table-column align="center" prop="commissionAmount" label="提成"> </el-table-column> <el-table-column align="center" prop="commissionAmount" label="提成"> </el-table-column>
</el-table> </el-table>
<perform ref="perform"></perform> <perform ref="perform"></perform>
</div> </div>
</template> </template>
<script> <script>
import { statisticStaffDayList } from "../../api/home.js"; import { statisticStaffDayList } from "../../api/home.js";
import perform from "@/components/perform/index"; import perform from "@/components/perform/index";
export default { export default {
components: { perform }, components: { perform },
data() { data() {
return { return {
tableList: [], tableList: [],
input: "", input: "",
}; };
}, },
methods: { methods: {
statisticStaffDayList() { statisticStaffDayList() {
statisticStaffDayList({ id: "" }).then((res) => { statisticStaffDayList({ id: "" }).then((res) => {
this.tableList = res.rows; this.tableList = res.rows;
}); });
}, },
confirm(row) { confirm(row) {
let date = new Date(); let date = new Date();
console.log(row); console.log(row);
this.$refs.perform.show(row, date); this.$refs.perform.show(row, date);
}, },
}, },
created() { created() {
this.statisticStaffDayList(); this.statisticStaffDayList();
}, },
computed: { computed: {
// //
tableData() { tableData() {
var search = this.input.toString().toLowerCase(); // var search = this.input.toString().toLowerCase(); //
if (search) { if (search) {
return this.tableList.filter(function (dataNews) { return this.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) { return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1; return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
}); });
}); });
} }
return this.tableList; return this.tableList;
}, },
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.month { .month {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 10px; padding-top: 2px;
} }
.month_header { .month_header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>

@ -1,20 +1,32 @@
<template> <template>
<div class="home-body" v-if="isShow"> <div class="home-body" v-if="isShow">
<div class="home_head flex justify-center flex-wrap"> <div class="home_head ">
<div class="home_head_left divhover"> <el-row :gutter="20">
<top-left v-if="isShow" ref="topleft"></top-left> <el-col :span="16">
</div> <div class="home_head_left divhover">
<div class="home_head_right divhover"> <top-left v-if="isShow" ref="topleft"></top-left>
<top-right v-if="isShow" ref="topright"></top-right> </div>
</div> </el-col>
<el-col :span="8">
<div class="home_head_right divhover">
<top-right v-if="isShow" ref="topright"></top-right>
</div>
</el-col>
</el-row>
</div> </div>
<div class="home_footer flex justify-center flex-wrap"> <div class="home_footer">
<div class="home_footer_left divhover "> <el-row :gutter="20">
<bottom-left v-if="isShow" ref="bottomleft"></bottom-left> <el-col :span="16">
</div> <div class="home_footer_left divhover ">
<div class="home_footer_right divhover "> <bottom-left v-if="isShow" ref="bottomleft"></bottom-left>
<bottom-right v-if="isShow" ref="bottomright"></bottom-right> </div>
</div> </el-col>
<el-col :span="8">
<div class="home_footer_right divhover">
<bottom-right v-if="isShow" ref="bottomright"></bottom-right>
</div>
</el-col>
</el-row>
</div> </div>
<el-dialog title="开店流程" :visible.sync="infoDialog" :close-on-click-modal='false' width="80%" v-dialogDrag> <el-dialog title="开店流程" :visible.sync="infoDialog" :close-on-click-modal='false' width="80%" v-dialogDrag>
<div class="openStore"> <div class="openStore">
@ -283,7 +295,6 @@ export default {
} }
.stepIndex { .stepIndex {
width: 100%; width: 100%;
padding: 50px 100px; padding: 50px 100px;
} }
.stepIndex .el-button { .stepIndex .el-button {
@ -292,25 +303,25 @@ export default {
.home-body { .home-body {
background: white; background: white;
overflow-x: hidden; overflow-x: hidden;
height: -webkit-calc(100vh - 80px); height: -webkit-calc(100vh - 106px);
height: -moz-calc(100vh - 80px); height: -moz-calc(100vh - 106px);
height: calc(100vh - 80px); height: calc(100vh - 106px);
padding-bottom: 20px; padding-bottom: 20px;
} }
.home_head { .home_head {
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 2vh;
/* height: 38vh; */ height: 40vh;
} }
.home_head_left { .home_head_left {
width: 62%; width: 100%;
height: 100%;
padding: 10px; padding: 10px;
box-shadow: 5px 5px 5px rgb(221, 221, 221); box-shadow: 5px 5px 5px rgb(221, 221, 221);
border: 1px solid rgb(233, 233, 233); border: 1px solid rgb(233, 233, 233);
margin-right: 10px;
} }
.home_head_right { .home_head_right {
width: 30%; width: 100%;
border: 1px solid rgb(233, 233, 233); border: 1px solid rgb(233, 233, 233);
padding: 10px; padding: 10px;
box-shadow: 5px 5px 5px rgb(221, 221, 221); box-shadow: 5px 5px 5px rgb(221, 221, 221);
@ -322,24 +333,20 @@ export default {
padding-bottom: 10px; padding-bottom: 10px;
} }
.home_footer_left { .home_footer_left {
height: 40vh;
width: 100%;
border: 1px solid rgb(233, 233, 233); border: 1px solid rgb(233, 233, 233);
padding: 10px; padding: 10px;
box-shadow: 5px 5px 5px rgb(221, 221, 221); box-shadow: 5px 5px 5px rgb(221, 221, 221);
width: 62%;
margin-right: 10px;
} }
.home_footer_right { .home_footer_right {
width: 30%; height: 40vh;
width: 100%;
border: 1px solid rgb(233, 233, 233); border: 1px solid rgb(233, 233, 233);
padding: 20px 10px;
box-shadow: 5px 5px 5px rgb(221, 221, 221); box-shadow: 5px 5px 5px rgb(221, 221, 221);
display: flex; padding: 1%;
justify-content: space-between;
flex-wrap: wrap;
} }
.home_footer_right .el-button { .home_footer_right .el-button {
margin: 20px 5px 10px 20px;
padding: 10px 15px;
font-weight: 700; font-weight: 700;
font-size: 14px; font-size: 14px;
} }

@ -73,6 +73,16 @@ export default {
}, },
// //
setTags(route) { setTags(route) {
if (route.meta.title == "服务单-收银") {
this.tagsList.forEach((item, index) => {
if (item.title == "服务单-收银") {
this.tagsList.splice(index, 1, {
title: route.meta.title,
path: route.path,
});
}
});
}
this.isShow = false; this.isShow = false;
const isExist = this.tagsList.some((item) => { const isExist = this.tagsList.some((item) => {
return item.title === route.meta.title; return item.title === route.meta.title;
@ -95,24 +105,25 @@ export default {
this.copyList = JSON.parse(JSON.stringify(this.tagsList)); this.copyList = JSON.parse(JSON.stringify(this.tagsList));
this.isShow = true; this.isShow = true;
// if (route.meta.title != "") { if (route.meta.title != "促销购买") {
// this.tagsList.forEach((item, index) => { this.tagsList.forEach((item, index) => {
// if (item.title == "") { if (item.title == "促销购买") {
// console.log(index); console.log(index);
// this.tagsList.splice(index, 1); this.tagsList.splice(index, 1);
// } }
// }); });
// } }
// if (!sessionStorage.getItem("list") && route.path != "/login") {
// this.$message.error({ if (!sessionStorage.getItem("list") && route.path != "/login") {
// message: "!", this.$message.error({
// }); message: "没有操作权限!",
// setTimeout(() => { });
// this.$router.push("/"); setTimeout(() => {
// sessionStorage.clear(); this.$router.push("/");
// localStorage.clear(); sessionStorage.clear();
// }, 2000); localStorage.clear();
// } }, 2000);
}
}, },
handleTags(command) { handleTags(command) {
command === "other" ? this.closeOther() : this.closeAll(); command === "other" ? this.closeOther() : this.closeAll();
@ -127,6 +138,7 @@ export default {
}, 100); }, 100);
}, },
}, },
created() { created() {
this.setTags(this.$route); this.setTags(this.$route);
// //

@ -1143,8 +1143,14 @@ export default {
} }
} }
} }
setTimeout(() => {
this.saveloading = false;
}, 3000);
}, },
addrec() { addrec() {
setTimeout(() => {
this.saveloading = false;
}, 3000);
if (this.liftType == 0) { if (this.liftType == 0) {
addrec(this.form).then((res) => { addrec(this.form).then((res) => {
this.saveloading = false; this.saveloading = false;

@ -189,7 +189,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip min-width="150" align="center" label="项目选项"> <el-table-column show-overflow-tooltip min-width="140" align="center" label="项目选项">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex justify-between align-center" @click.stop=""> <div class="flex justify-between align-center" @click.stop="">
<el-input v-model="scope.row.projectNum" placeholder="编码" @blur="proBlur(scope.row,proIndex=scope.$index)" @change="proBlur(scope.row,proIndex=scope.$index)"> <el-input v-model="scope.row.projectNum" placeholder="编码" @blur="proBlur(scope.row,proIndex=scope.$index)" @change="proBlur(scope.row,proIndex=scope.$index)">
@ -198,8 +198,8 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip min-width="160" align="center" prop="projectName" label="项目名称"></el-table-column> <el-table-column show-overflow-tooltip min-width="120" align="center" prop="projectName" label="项目名称"></el-table-column>
<el-table-column align="center" prop="noDiscount" label="卡付打折" width="80"> <el-table-column align="center" prop="noDiscount" label="卡付打折" width="50">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.noDiscount == 0 ? "是" : scope.row.noDiscount == 1?'否':"未设" scope.row.noDiscount == 0 ? "是" : scope.row.noDiscount == 1?'否':"未设"
}}</template> }}</template>
@ -260,7 +260,7 @@
<div v-else></div> <div v-else></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionAmount" label="实付金额金额"></el-table-column> <el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionAmount" label="实付金额"></el-table-column>
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionRechargeAmount" label="卡付金额"></el-table-column> <el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionRechargeAmount" label="卡付金额"></el-table-column>
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionCashAmount" label="现付金额"></el-table-column> <el-table-column show-overflow-tooltip min-width="75" align="center" prop="collectionCashAmount" label="现付金额"></el-table-column>
<el-table-column show-overflow-tooltip width="75" align="center" prop="sex" label="性别"> <el-table-column show-overflow-tooltip width="75" align="center" prop="sex" label="性别">
@ -288,7 +288,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="width: 280px" class="border-radius-10 border margin-left-xs bg-white padding-xs"> <div class="border-radius-10 border margin-left-xs bg-white padding-xs" style="margin-right:2%">
<div class="flex justify-center align-center text-bold padding-bottom-xs"> <div class="flex justify-center align-center text-bold padding-bottom-xs">
<div class="form-width-m "> <div class="form-width-m ">
<span class=" ">现付金额:</span> <span class=" ">现付金额:</span>
@ -1513,7 +1513,7 @@ export default {
goBack() { goBack() {
this.$router.push({ query: {} }); this.$router.push({ query: {} });
this.$router.push({ path: "/service" }); this.$router.push({ path: "/shareBill" });
this.notData(); this.notData();
}, },
getRecCard() { getRecCard() {
@ -1750,29 +1750,32 @@ export default {
this.setPage(); this.setPage();
}, },
setPage() { setPage() {
let list = JSON.parse(this.$route.query.list); if (this.$route.query.list) {
if (list.length != 0 || list === 0) { let list = JSON.parse(this.$route.query.list);
if (list == 0 || list == 1) { if (list.length != 0 || list === 0) {
this.newOrder = true; if (list == 0 || list == 1) {
this.orderNumber = list; this.newOrder = true;
this.isAddition = list; this.orderNumber = list;
this.additionDate = this.formatTime(new Date(), "YYYY-MM-DD"); this.isAddition = list;
this.additionDate = this.formatTime(new Date(), "YYYY-MM-DD");
} else {
this.list = [...list];
this.dialogFormVisible = true;
console.log(this.list);
this.getData();
this.newOrder = false;
}
} else { } else {
this.list = [...list]; this.goBack();
this.dialogFormVisible = true;
console.log(this.list);
this.getData();
this.newOrder = false;
} }
} else {
this.goBack();
} }
this.getDetail(); this.getDetail();
}, },
}, },
created() { activated() {
this.setPage(); this.setPage();
}, },
created() {},
}; };
</script> </script>

@ -1,92 +1,92 @@
<template> <template>
<div class="flex"> <div class="flex">
<div style="width:280px"> <div style="width:100%">
<el-table :data="payLists" class='border ' :summary-method="getSummariesPay" show-summary :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="payLists" style="width:280px" class='border' :summary-method="getSummariesPay" show-summary :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column align="center" prop="payName" min-width="150" 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" width="120" 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 v-if="payIndex != scope.$index" @click="editPay(scope.row,scope.$index)">
{{ 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 oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" @blur="endEdit(scope.row, scope.$index,)" v-model="scope.row.payMoney" size="samll"></el-input> <el-input class="form-input-xs" v-else v-focus oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]{0,2}" @blur="endEdit(scope.row, scope.$index,)" v-model="scope.row.payMoney" size="samll"></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
list: [], // list: [], //
form: {}, // form: {}, //
payLists: [], // payLists: [], //
rechargeAccountList: [], // rechargeAccountList: [], //
recIndex: -1, recIndex: -1,
giftIndex: -1, giftIndex: -1,
payIndex: -1, payIndex: -1,
}; };
}, },
methods: { methods: {
// //
show(form, list) { show(form, list) {
var that = this; var that = this;
that.form = JSON.parse(JSON.stringify(form)); that.form = JSON.parse(JSON.stringify(form));
that.payLists = []; that.payLists = [];
that.payLists = JSON.parse(JSON.stringify(list)); that.payLists = JSON.parse(JSON.stringify(list));
}, },
//. //.
editPay(row, index) { editPay(row, index) {
this.payIndex = index; this.payIndex = index;
row.payMoney = row.payMoney =
(this.form.cashAmount - this.form.collectionCashAmount).toFixed(2) * 1; (this.form.cashAmount - this.form.collectionCashAmount).toFixed(2) * 1;
}, },
endEdit(row, index) { endEdit(row, index) {
this.payIndex = -1; this.payIndex = -1;
if (!row.payMoney) { if (!row.payMoney) {
row.payMoney = 0; row.payMoney = 0;
} }
this.sumNum(); this.sumNum();
}, },
sumNum() { sumNum() {
let payMoney = 0; let payMoney = 0;
this.payLists.forEach((item) => { this.payLists.forEach((item) => {
payMoney += item.payMoney * 1; payMoney += item.payMoney * 1;
}); });
this.form.collectionCashAmount = payMoney; this.form.collectionCashAmount = payMoney;
let form = { form: this.form, list: this.payLists }; let form = { form: this.form, list: this.payLists };
this.$emit("paymentData", form); this.$emit("paymentData", form);
}, },
getSummariesPay(param) { getSummariesPay(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
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 == "payMoney") { if (column.property == "payMoney") {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return prev + curr; return prev + curr;
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}, 0); }, 0);
sums[index] += " "; sums[index] += " ";
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}); });
return sums; return sums;
}, },
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

File diff suppressed because it is too large Load Diff

@ -1196,33 +1196,35 @@ export default {
} }
}, },
empty() { empty() {
this.form = { // this.form = {
mobilePhone: null, // mobilePhone: null,
integralCheckbox: false, // integralCheckbox: false,
description: "", // description: "",
salesPrice: "", // salesPrice: "",
numberTimes: "", // numberTimes: "",
menberShow: false, // menberShow: false,
courseReatmentAmount: 0, // courseReatmentAmount: 0,
isDebt: false, // isDebt: false,
collectionRechargeAmount: 0, // collectionRechargeAmount: 0,
collectionCashAmount: 0, // collectionCashAmount: 0,
collectionIntegralAmount: 0, // collectionIntegralAmount: 0,
integral: 0, // integral: 0,
integralMoney: 0, // integralMoney: 0,
consumeIntegral: 0, // consumeIntegral: 0,
debtMoney: 0, // debtMoney: 0,
}; // };
this.debtMoneys = 0; // this.debtMoneys = 0;
this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }]; // this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.rechargeAccountList = []; // this.rechargeAccountList = [];
this.rechargeAccountLis = []; // this.rechargeAccountLis = [];
this.payLists = []; // this.payLists = [];
this.managerLists = [{ ratio: 100 }]; // this.managerLists = [{ ratio: 100 }];
this.adminList = [{ ratio: 100 }]; // this.adminList = [{ ratio: 100 }];
this.activeName = "现付"; // this.activeName = "";
this.ctlist(); // this.ctlist();
this.setStaffRatio(); // this.setStaffRatio();
Object.assign(this.$data, this.$options.data.call(this));
this.setPage();
}, },
// //
@ -1339,9 +1341,16 @@ export default {
that.addCourse(); that.addCourse();
that.loading = false; that.loading = false;
} }
setTimeout(() => {
this.loading = false;
}, 3000);
}, },
addCourse() { addCourse() {
setTimeout(() => {
this.loading = false;
}, 3000);
addcourse(this.form).then((res) => { addcourse(this.form).then((res) => {
this.loading = false;
if (res.code == "000000") { if (res.code == "000000") {
this.empty(); this.empty();
this.$message.success({ this.$message.success({
@ -1693,13 +1702,16 @@ export default {
}); });
return sums; return sums;
}, },
setPage() {
this.ctlist();
this.setStaffRatio();
this.sessionStorageData = JSON.parse(
sessionStorage.getItem("sessionStorageData")
);
},
}, },
created() { created() {
this.ctlist(); this.setPage();
this.setStaffRatio();
this.sessionStorageData = JSON.parse(
sessionStorage.getItem("sessionStorageData")
);
}, },
}; };
</script> </script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -64,7 +64,10 @@
<el-cascader :disabled="title=='查看'" class="form-width" v-model="form.grade" :options="grade" :emitPath="false" :show-all-levels="false" @change="gradechange"></el-cascader> <el-cascader :disabled="title=='查看'" class="form-width" v-model="form.grade" :options="grade" :emitPath="false" :show-all-levels="false" @change="gradechange"></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="工种"> <el-form-item label="工种">
<el-cascader :disabled="title=='查看'" class="form-width" v-model="form.job" :options="job" :emitPath="false" :show-all-levels="false" @change="jobchange"></el-cascader> <el-select :disabled="title=='查看'" v-model="form.wordTypeName" placeholder="请选择" @change="jobchange">
<el-option v-for="item in jobList" :key="item.id" :label="item.wordTypeName" :value="item.id">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="部门"> <el-form-item label="部门">
<el-select :disabled="title=='查看'" v-model="form.deptName" placeholder="请选择"> <el-select :disabled="title=='查看'" v-model="form.deptName" placeholder="请选择">
@ -146,6 +149,7 @@ import {
rolepage, rolepage,
editStaff, editStaff,
pageBasePost, pageBasePost,
pageBaseWorkType,
} from "@/api/storeManage.js"; } from "@/api/storeManage.js";
export default { export default {
data() { data() {
@ -162,6 +166,7 @@ export default {
{ value: 1, label: "美容部" }, { value: 1, label: "美容部" },
{ value: 2, label: "其他部" }, { value: 2, label: "其他部" },
], ],
jobList: [],
rule: {}, rule: {},
rules: { rules: {
staffName: { staffName: {
@ -367,6 +372,13 @@ export default {
}); });
this.gradeList = res.pageInfo.list; this.gradeList = res.pageInfo.list;
}); });
pageBaseWorkType({}).then((res) => {
res.data.forEach((item) => {
item.value = item.wordTypeNum;
item.label = item.wordTypeName;
});
this.jobList = res.data;
});
}, },
// //
changeRole(v) { changeRole(v) {
@ -405,12 +417,16 @@ export default {
} }
}, },
// //
jobchange(row) { jobchange(e) {
if (row) { console.log(e);
row.forEach((item) => { this.jobList.forEach((item) => {
this.form.job = item; if (item.id == e) {
}); this.form.wordTypeNum = item.wordTypeNum;
} this.form.wordTypeName = item.wordTypeName;
this.form.wordTypeId = item.id;
console.log(this.form);
}
});
}, },
// //
confirm() { confirm() {

@ -18,7 +18,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号码" sortable min-width="130"></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号码" sortable min-width="130"></el-table-column>
<el-table-column align="center" prop="joinedDate" label="入职日期" sortable min-width="120"></el-table-column> <el-table-column align="center" prop="joinedDate" label="入职日期" sortable min-width="120"></el-table-column>
<el-table-column align="center" prop="jobName" label="工种" sortable min-width="80"></el-table-column> <el-table-column align="center" prop="wordTypeName" label="工种" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="gradeName" label="用户身份" sortable min-width="100"></el-table-column> <el-table-column align="center" prop="gradeName" label="用户身份" sortable min-width="100"></el-table-column>
<el-table-column align="center" prop="postName" label="职务" sortable min-width="100"></el-table-column> <el-table-column align="center" prop="postName" label="职务" sortable min-width="100"></el-table-column>
<el-table-column align="center" prop="type" label="员工类型" sortable min-width="100"> <el-table-column align="center" prop="type" label="员工类型" sortable min-width="100">

@ -1,233 +1,233 @@
<template> <template>
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="dialogFormVisible" width="80%" v-dialogDrag> <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="dialogFormVisible" width="80%" v-dialogDrag>
<el-form :model="form" inline ref="form" class="max-height-60" label-width="80px"> <el-form :model="form" inline ref="form" class="max-height-60" label-width="80px">
<el-form-item label="转出门店"> <el-form-item label="转出门店">
<el-select filterable default-first-option clearable v-model="form.storesNum" placeholder="请选择" @change="changeOut"> <el-select filterable default-first-option clearable v-model="form.storesNum" placeholder="请选择" @change="changeOut">
<el-option v-for="(item,index) in options" :key="index" :label="item.storeNum" :value="item.storeNum"> <el-option v-for="(item,index) in options" :key="index" :label="item.storeNum" :value="item.storeNum">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="门店名称"> <el-form-item label="门店名称">
{{form.storesName}} {{form.storesName}}
<!-- <el-select filterable default-first-option clearable v-model="form.storeName" placeholder="请选择"> <!-- <el-select filterable default-first-option clearable v-model="form.storeName" placeholder="请选择">
<el-option v-for="(item,index) in options" :key="index" :label="item.storeName" :value="item.storeName"> <el-option v-for="(item,index) in options" :key="index" :label="item.storeName" :value="item.storeName">
</el-option> </el-option>
</el-select> --> </el-select> -->
</el-form-item> </el-form-item>
<el-table :data="list" ref="list" v-loading="listLoading" max-height="600" :element-loading-text="elementLoadingText" @row-click="getCurrentRow" :row-class-name="rowName" @selection-change="handleSelectionChange" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}"> <el-table :data="list" ref="list" v-loading="listLoading" max-height="600" :element-loading-text="elementLoadingText" @row-click="getCurrentRow" :row-class-name="rowName" @selection-change="handleSelectionChange" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column align="center" prop="brandNumber" label="水牌号" sortable min-width="80"></el-table-column> <el-table-column align="center" prop="brandNumber" label="水牌号" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="staffName" label="员工名称" sortable min-width="80"></el-table-column> <el-table-column align="center" prop="staffName" label="员工名称" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="sex" label="性别" sortable min-width="80"> <el-table-column align="center" prop="sex" label="性别" sortable min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sex==1"></div> <div v-if="scope.row.sex==1"></div>
<div v-else></div> <div v-else></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机号码" sortable min-width="120"></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机号码" sortable min-width="120"></el-table-column>
<el-table-column align="center" prop="joinedDate" label="入职日期" sortable min-width="110"></el-table-column> <el-table-column align="center" prop="joinedDate" label="入职日期" sortable min-width="110"></el-table-column>
<el-table-column align="center" prop="jobName" label="工种" sortable min-width="80"></el-table-column> <el-table-column align="center" prop="wordTypeName" label="工种" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="postName" label="职务" sortable min-width="80"></el-table-column> <el-table-column align="center" prop="postName" label="职务" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="type" label="员工类型" sortable min-width="80"> <el-table-column align="center" prop="type" label="员工类型" sortable min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.type==0?"高管":"普通员工"}} {{scope.row.type==0?"高管":"普通员工"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align=" center" prop="source" label="员工来源" sortable min-width="80"> <el-table-column align=" center" prop="source" label="员工来源" sortable min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.source==0?"校招":scope.row.source==1?"社招":scope.row.source==2?"介绍":"其他"}} {{scope.row.source==0?"校招":scope.row.source==1?"社招":scope.row.source==2?"介绍":"其他"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="转入门店"> <el-table-column align="center" label="转入门店">
<el-table-column align="center" prop="storeNum" label="编码" min-width="80"> <el-table-column align="center" prop="storeNum" label="编码" min-width="80">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<el-select class="form-width-m" filterable default-first-option clearable v-model="scope.row.storeNums" placeholder="请选择"> <el-select class="form-width-m" filterable default-first-option clearable v-model="scope.row.storeNums" placeholder="请选择">
<el-option v-for="(item,index) in options" :key="index" :label="item.storeNum" :value="item.storeNum"> <el-option v-for="(item,index) in options" :key="index" :label="item.storeNum" :value="item.storeNum">
</el-option> </el-option>
</el-select> </el-select>
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column align="center" prop="storeName" label="名称" min-width="200"> <el-table-column align="center" prop="storeName" label="名称" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select class="form-width-m" filterable default-first-option clearable @clear='clear(scope.row)' v-model="scope.row.storeName" @change="changeIn($event,scope.row)" placeholder="请选择"> <el-select class="form-width-m" filterable default-first-option clearable @clear='clear(scope.row)' v-model="scope.row.storeName" @change="changeIn($event,scope.row)" placeholder="请选择">
<el-option v-for="(item,index) in storeList" :key="index" :label="item.storeName" :value="item.storeName"> <el-option v-for="(item,index) in storeList" :key="index" :label="item.storeName" :value="item.storeName">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogFormVisible = false"> </el-button> <el-button size="mini" type="primary" @click="dialogFormVisible = false"> </el-button>
<el-button size="mini" type="primary" :disabled="outShow" @click="confirm()"> </el-button> <el-button size="mini" type="primary" :disabled="outShow" @click="confirm()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { import {
addStoreConversion, addStoreConversion,
staffPage, staffPage,
organizations, organizations,
} from "@/api/storeManage.js"; } from "@/api/storeManage.js";
export default { export default {
data() { data() {
return { return {
dialogFormVisible: false, dialogFormVisible: false,
listLoading: false, //list listLoading: false, //list
elementLoadingText: "加载中...", elementLoadingText: "加载中...",
title: "", title: "",
form: {}, // form: {}, //
list: [], // list: [], //
selection: [], selection: [],
queryForm: { queryForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
options: [], options: [],
outShow: false, outShow: false,
}; };
}, },
methods: { methods: {
changeOut(e) { changeOut(e) {
console.log(123); console.log(123);
this.options.forEach((item) => { this.options.forEach((item) => {
if (item.storeNum == e) { if (item.storeNum == e) {
this.form.storesName = item.storeName; this.form.storesName = item.storeName;
this.form.storesId = item.id; this.form.storesId = item.id;
} }
}); });
this.getStaffData(); this.getStaffData();
this.getData(); this.getData();
}, },
changeIn(e, row) { changeIn(e, row) {
let form = { ...row }; let form = { ...row };
this.storeList.forEach((item) => { this.storeList.forEach((item) => {
if (item.storeName == e) { if (item.storeName == e) {
form.storeName = item.storeName; form.storeName = item.storeName;
form.storeId = item.id; form.storeId = item.id;
form.storeNum = item.storeNum; form.storeNum = item.storeNum;
} }
}); });
this.list.splice(row.index, 1, form); this.list.splice(row.index, 1, form);
this.getCurrentRow(row); this.getCurrentRow(row);
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], true); this.$refs["list"].toggleRowSelection(this.list[row.index], true);
}); });
console.log(this.selection); console.log(this.selection);
}, },
clear(row) { clear(row) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], false); this.$refs["list"].toggleRowSelection(this.list[row.index], false);
}); });
}, },
// //
getCurrentRow(row) { getCurrentRow(row) {
this.$refs["list"].toggleRowSelection(row); this.$refs["list"].toggleRowSelection(row);
}, },
// //
rowName({ row, rowIndex }) { rowName({ row, rowIndex }) {
row.index = rowIndex; row.index = rowIndex;
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
show(row) { show(row) {
this.title = "员工转出门店"; this.title = "员工转出门店";
this.dialogFormVisible = true; this.dialogFormVisible = true;
this.getData(); this.getData();
}, },
// //
async getData() { async getData() {
// let parentId = JSON.parse(sessionStorage.getItem("storeInfo")).id; // let parentId = JSON.parse(sessionStorage.getItem("storeInfo")).id;
organizations({ pageSize: 999 }).then((res) => { organizations({ pageSize: 999 }).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
let list = []; let list = [];
res.rows.forEach((item) => { res.rows.forEach((item) => {
if (this.form.storesNum != item.storeNum) { if (this.form.storesNum != item.storeNum) {
list.push(item); list.push(item);
} }
}); });
this.options = res.rows; this.options = res.rows;
this.storeList = list; this.storeList = list;
} else { } else {
this.$alert(res.message, "获取门店信息", { this.$alert(res.message, "获取门店信息", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
getStaffData() { getStaffData() {
var arr1 = { var arr1 = {
state: 1, state: 1,
pageNum: this.queryForm.pageNum, pageNum: this.queryForm.pageNum,
pageSize: this.queryForm.pageSize, pageSize: this.queryForm.pageSize,
storeId: this.form.storesId, storeId: this.form.storesId,
}; };
console.log(arr1); console.log(arr1);
staffPage(arr1).then((res) => { staffPage(arr1).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
res.pageInfo.list.forEach((item) => { res.pageInfo.list.forEach((item) => {
item.storeNum = null; item.storeNum = null;
item.storeName = null; item.storeName = null;
item.storeId = null; item.storeId = null;
item.staffId = item.id; item.staffId = item.id;
}); });
if (res.pageInfo.total > 1) { if (res.pageInfo.total > 1) {
this.outShow = false; this.outShow = false;
} else { } else {
this.outShow = true; this.outShow = true;
this.$alert("店铺剩余人数过少不建议转店", "提示", { this.$alert("店铺剩余人数过少不建议转店", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
this.list = res.pageInfo.list; this.list = res.pageInfo.list;
} else { } else {
this.$alert(res.message, "获取门店员工信息", { this.$alert(res.message, "获取门店员工信息", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
confirm() { confirm() {
this.selection.forEach((item) => { this.selection.forEach((item) => {
item.storesId = this.form.storesId; item.storesId = this.form.storesId;
item.storesName = this.form.storesName; item.storesName = this.form.storesName;
item.storesNum = this.form.storesNum; item.storesNum = this.form.storesNum;
}); });
addStoreConversion(this.selection).then((res) => { addStoreConversion(this.selection).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.$emit("editData"); this.$emit("editData");
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

@ -1,281 +1,281 @@
<template> <template>
<div> <div>
<div class="header_flex"> <div class="header_flex">
<div> <div>
</div> </div>
<div> <div>
<el-input size="medium" style="width:180px;" placeholder="当前页搜索" v-model="input"> <el-input size="medium" style="width:180px;" placeholder="当前页搜索" v-model="input">
<i slot="prefix" class="el-input__icon el-icon-search"></i> <i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
<el-button size="mini" type="primary" @click="(searchDialog=true)"></el-button> <el-button size="mini" type="primary" @click="(searchDialog=true)"></el-button>
<el-button size="mini" type="info" plain @click="getData(refreshtext=true)"></el-button> <el-button size="mini" type="info" plain @click="getData(refreshtext=true)"></el-button>
</div> </div>
</div> </div>
<hr /> <hr />
<el-table :data="tableData" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" :summary-method="getSummaries" show-summary style="width: 100%"> <el-table :data="tableData" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" :summary-method="getSummaries" show-summary style="width: 100%">
<el-table-column align="center" prop="brandNumber" label="水牌号" min-width="110"></el-table-column> <el-table-column align="center" prop="brandNumber" label="水牌号" min-width="110"></el-table-column>
<el-table-column align="center" prop="staffName" label="名字" min-width="100"></el-table-column> <el-table-column align="center" prop="staffName" label="名字" min-width="100"></el-table-column>
<el-table-column align="center" prop="postName" label="职务" min-width="100"></el-table-column> <el-table-column align="center" prop="postName" label="职务" min-width="100"></el-table-column>
<el-table-column align="center" prop="jobName" label="工种" min-width="100"></el-table-column> <el-table-column align="center" prop="wordTypeName" label="工种" min-width="100"></el-table-column>
<el-table-column align="center" prop="joinedDate" sortable label="入职时间" min-width="180"></el-table-column> <el-table-column align="center" prop="joinedDate" sortable label="入职时间" min-width="180"></el-table-column>
<el-table-column align="center" prop="count" sortable label="会员数(个)" min-width="110"></el-table-column> <el-table-column align="center" prop="count" sortable label="会员数(个)" min-width="110"></el-table-column>
<el-table-column fixed="right" align="center" label="操作" width="80"> <el-table-column fixed="right" align="center" label="操作" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="detail(scope.row,scope.$index,(detailVisible=true))" plain>明细</el-button> <el-button size="mini" type="primary" @click="detail(scope.row,scope.$index,(detailVisible=true))" plain>明细</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top:15px;"> <div class="block" style="margin-top:15px;">
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total"></el-pagination> <el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[10,20,30,40,50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="pageInfo.total"></el-pagination>
</div> </div>
<el-drawer :visible.sync="detailVisible" size="40%" direction="rtl"> <el-drawer :visible.sync="detailVisible" size="40%" direction="rtl">
<el-table :data="detailTableData" stripe style="width: 95%;margin:2px auto;border:0.5px solid #eeeeee" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" height="90%"> <el-table :data="detailTableData" stripe style="width: 95%;margin:2px auto;border:0.5px solid #eeeeee" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}" height="90%">
<el-table-column align="center" prop="memberNum" label="编码" min-width="100" sortable></el-table-column> <el-table-column align="center" prop="memberNum" label="编码" min-width="100" sortable></el-table-column>
<el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column> <el-table-column align="center" prop="memberName" label="姓名" min-width="100" sortable></el-table-column>
<el-table-column align="center" prop="sex" label="性别" min-width="80"> <el-table-column align="center" prop="sex" label="性别" min-width="80">
<template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template> <template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80"></el-table-column> <el-table-column align="center" prop="label" :show-overflow-tooltip="true" label="标签" min-width="80"></el-table-column>
<el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable> <template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template></el-table-column> <el-table-column align="center" prop="mobilePhone" label="手机" min-width="150" sortable> <template slot-scope="scope">{{scope.row.mobilePhone | phone}}</template></el-table-column>
</el-table> </el-table>
</el-drawer> </el-drawer>
<el-dialog title="搜索" :visible.sync="searchDialog"> <el-dialog title="搜索" :visible.sync="searchDialog">
<el-form :model="searchForm"> <el-form :model="searchForm">
<el-form-item label="入职日期搜索:" label-width="120px"> <el-form-item label="入职日期搜索:" label-width="120px">
<div class="block"> <div class="block">
<el-date-picker @change='changeDate' size="large" v-model="date" type="daterange" align="center" unlink-panels value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"> <el-date-picker @change='changeDate' size="large" v-model="date" type="daterange" align="center" unlink-panels value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="水牌号搜索:" label-width="120px"> <el-form-item label="水牌号搜索:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.brandNumber" placeholder="输入要查询的员工水牌号" clearable></el-input> <el-input size="medium" v-model="searchForm.brandNumber" placeholder="输入要查询的员工水牌号" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="员工名字搜索:" label-width="120px"> <el-form-item label="员工名字搜索:" label-width="120px">
<div class="searchDiv"> <div class="searchDiv">
<el-input size="medium" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable></el-input> <el-input size="medium" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button> <el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button> <el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<style scoped> <style scoped>
</style> </style>
<script> <script>
import { staffMemberPage, storeMemberlistByStaff } from "@/api/storeManage.js"; import { staffMemberPage, storeMemberlistByStaff } from "@/api/storeManage.js";
export default { export default {
data() { data() {
return { return {
detailVisible: false, // detailVisible: false, //
pageNum: 1, // pageNum: 1, //
pageSize: 10, // , pageSize: 10, // ,
input: "", // input: "", //
searchDialog: false, // searchDialog: false, //
refreshtext: false, // refreshtext: false, //
date: [], // date: [], //
searchForm: { searchForm: {
// //
brandNumber: "", brandNumber: "",
staffName: "", staffName: "",
startTime: "", startTime: "",
endTime: "", endTime: "",
}, },
pageInfo: { pageInfo: {
total: 0, // total: 0, //
tableList: [], tableList: [],
}, },
detailTableData: [], // detailTableData: [], //
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
{ {
text: "最近一周", text: "最近一周",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]); picker.$emit("pick", [start, end]);
}, },
}, },
{ {
text: "最近一个月", text: "最近一个月",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]); picker.$emit("pick", [start, end]);
}, },
}, },
], ],
}, },
searchTrue: false, searchTrue: false,
}; };
}, },
methods: { methods: {
// //
// //
changeDate() { changeDate() {
this.searchForm.startTime = this.date[0]; this.searchForm.startTime = this.date[0];
this.searchForm.endTime = this.date[1]; this.searchForm.endTime = this.date[1];
}, },
// //
search() { search() {
// //
staffMemberPage(this.searchForm).then((res) => { staffMemberPage(this.searchForm).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.searchTrue = true; this.searchTrue = true;
res.pageInfo.tableList = res.pageInfo.list; res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo; this.pageInfo = res.pageInfo;
if (res.pageInfo.total == 0) { if (res.pageInfo.total == 0) {
this.$message.warning({ message: "没有找到该员工数据" }); this.$message.warning({ message: "没有找到该员工数据" });
} else { } else {
this.$message.success({ message: "已显示符合条件的全部数据" }); this.$message.success({ message: "已显示符合条件的全部数据" });
} }
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
// //
// //
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
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 == "count") { if (column.property == "count") {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return prev + curr; return prev + curr;
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}, 0); }, 0);
//console.log(sums ) //console.log(sums )
sums[index] += " 个"; sums[index] += " 个";
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}); });
return sums; return sums;
}, },
// //
detail(row) { detail(row) {
var id = { staffId: row.id }; var id = { staffId: row.id };
storeMemberlistByStaff(id).then((res) => { storeMemberlistByStaff(id).then((res) => {
//console.log(res); //console.log(res);
if (res.code == "000000") { if (res.code == "000000") {
//console.log(res.rows); //console.log(res.rows);
res.rows.forEach((item) => { res.rows.forEach((item) => {
if (item.sex == 1) { if (item.sex == 1) {
item.sex = "男"; item.sex = "男";
} else { } else {
item.sex = "女"; item.sex = "女";
} }
if (item.kinType == 3) { if (item.kinType == 3) {
item.kinType = "干性"; item.kinType = "干性";
} else if (item.kinType == 2) { } else if (item.kinType == 2) {
item.kinType = "中性"; item.kinType = "中性";
} else if (item.kinType == 1) { } else if (item.kinType == 1) {
item.kinType = "油性"; item.kinType = "油性";
} else { } else {
item.kinType = "暂无"; item.kinType = "暂无";
} }
if (item.hairLong == 3) { if (item.hairLong == 3) {
item.hairLong = "短"; item.hairLong = "短";
} else if (item.hairLong == 2) { } else if (item.hairLong == 2) {
item.hairLong = "适中"; item.hairLong = "适中";
} else if (item.hairLong == 1) { } else if (item.hairLong == 1) {
item.hairLong = "长"; item.hairLong = "长";
} else { } else {
item.hairLong == "暂无"; item.hairLong == "暂无";
} }
}); });
this.detailTableData = res.rows; this.detailTableData = res.rows;
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
// //console.log(` ${val} `); // //console.log(` ${val} `);
this.pageSize = val; this.pageSize = val;
if (this.searchTrue == true) { if (this.searchTrue == true) {
this.search(); this.search();
} else { } else {
this.getData(); this.getData();
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
// //console.log(`: ${val}`); // //console.log(`: ${val}`);
this.pageNum = val; this.pageNum = val;
if (this.searchTrue == true) { if (this.searchTrue == true) {
this.search(); this.search();
} else { } else {
this.getData(); this.getData();
} }
}, },
// //
getData() { getData() {
var page = { pageNum: this.pageNum, pageSize: this.pageSize }; var page = { pageNum: this.pageNum, pageSize: this.pageSize };
staffMemberPage(page).then((res) => { staffMemberPage(page).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
if (this.refreshtext == true) { if (this.refreshtext == true) {
this.searchTrue = false; this.searchTrue = false;
this.$message.success({ message: "已刷新最新数据" }); this.$message.success({ message: "已刷新最新数据" });
this.refreshtext = false; this.refreshtext = false;
} }
res.pageInfo.tableList = res.pageInfo.list; res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo; this.pageInfo = res.pageInfo;
} }
}); });
}, },
}, },
created() { created() {
let list = JSON.parse(sessionStorage.getItem("list")); let list = JSON.parse(sessionStorage.getItem("list"));
list.forEach((item) => { list.forEach((item) => {
if (item.id == 4009001) { if (item.id == 4009001) {
this.getData(); this.getData();
} }
}); });
}, },
computed: { computed: {
// //
tableData() { tableData() {
var search = this.input.toString().toLowerCase(); // var search = this.input.toString().toLowerCase(); //
if (search) { if (search) {
return this.pageInfo.tableList.filter(function (dataNews) { return this.pageInfo.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) { return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1; return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
}); });
}); });
} }
return this.pageInfo.tableList; return this.pageInfo.tableList;
}, },
}, },
}; };
</script> </script>

@ -257,8 +257,7 @@ const router = new VueRouter({
import("../pages/eashier/proceeds/components/edit.vue"), import("../pages/eashier/proceeds/components/edit.vue"),
meta: { meta: {
title: "服务单-收银", title: "服务单-收银",
index: "proceeds-edit", index: "proceeds-edit"
keepAlive: true
} }
}, },
//充值 shareBill //充值 shareBill
@ -268,8 +267,7 @@ const router = new VueRouter({
import("../pages/eashier/collectionList/collectionList.vue"), import("../pages/eashier/collectionList/collectionList.vue"),
meta: { meta: {
title: "充值", title: "充值",
index: "collectionList", index: "collectionList"
keepAlive: true
} }
}, },
//疗程 reatment //疗程 reatment
@ -278,8 +276,7 @@ const router = new VueRouter({
component: () => import("../pages/eashier/reatment/reatment.vue"), component: () => import("../pages/eashier/reatment/reatment.vue"),
meta: { meta: {
title: "疗程", title: "疗程",
index: "reatment", index: "reatment"
keepAlive: true
} }
}, },
//加价转疗程 raiseReatment //加价转疗程 raiseReatment

@ -12,9 +12,9 @@
} }
.into-table-width { .into-table-width {
width: -webkit-calc(100% - 360px); width: -webkit-calc(100% - 450px);
width: -moz-calc(100% - 360px); width: -moz-calc(100% - 450px);
width: calc(100% - 360px); width: calc(100% - 450px);
} }
.text-out { .text-out {

Loading…
Cancel
Save