部分bug修复

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

@ -1,140 +1,124 @@
<template>
<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-column label="选择" width="60">
<template slot-scope="scope">
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
{{ "" }}
</el-radio>
</template>
</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="100" prop="jobName" label="工种">
<template slot-scope="scope">
{{
scope.row.job == 1
? "美发师"
: scope.row.job == 2
? "技师"
: scope.row.job == 3
? "助理"
: scope.row.job == 4
? "收银员"
: scope.row.job == 5
? "美容师"
: "暂无"
}}
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button>
<el-button size="mini" type="primary" @click="confirms()">
</el-button>
</span>
</el-dialog>
</template>
<script>
import { selectList } from "@/api/eashier.js";
export default {
data() {
return {
radio: null, //
radioForm: {}, //
list: [], //
dialogVisible: false, // //
elementLoadingText: "数据加载中...", //list //
listLoading: false, //list //
title: "选择员工", //
selectNumber: 0, // 0 1 2
staffList: [], //
};
},
methods: {
//
show(number, title, list) {
//number 0 1 2
//list
this.staffList = [];
if (title) {
this.title = title;
}
if (list) {
this.staffList = list;
}
this.selectNumber = number;
this.list = [];
this.radio = null;
this.radioForm = {};
this.dialogVisible = true;
console.log(this.staffList);
this.getData();
},
//
//
rowClick(row) {
this.radio = row.id;
this.radioForm = row;
},
//
//
async getData() {
this.listLoading = true;
let form = { id: "" };
if (this.staffName) {
form.staffName = this.staffName;
}
selectList(form).then((res) => {
this.listLoading = false;
if (res.code == "000000") {
if (this.staffList.length == 0) {
this.list = res.rows;
} else {
var list = [];
res.rows.forEach((item) => {
this.staffList.forEach((items) => {
if (item.id == items.id) {
} else {
list.push(item);
}
});
});
this.list = Array.from(new Set(list));
}
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
confirms() {
if (this.selectNumber == 1) {
this.radioForm.saleStaffName = this.radioForm.staffName;
this.radioForm.saleStaffId = this.radioForm.id;
this.radioForm.saleIdentityCard = this.radioForm.identityCard;
this.radioForm.saleRatio = 0;
}
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>
<template>
<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-column label="选择" width="60">
<template slot-scope="scope">
<el-radio v-model="radio" :label="scope.row.id" @change.native="scope.row;">
{{ "" }}
</el-radio>
</template>
</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="100" prop="wordTypeName" label="工种"></el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="dialogVisible = false"> </el-button>
<el-button size="mini" type="primary" @click="confirms()">
</el-button>
</span>
</el-dialog>
</template>
<script>
import { selectList } from "@/api/eashier.js";
export default {
data() {
return {
radio: null, //
radioForm: {}, //
list: [], //
dialogVisible: false, // //
elementLoadingText: "数据加载中...", //list //
listLoading: false, //list //
title: "选择员工", //
selectNumber: 0, // 0 1 2
staffList: [], //
};
},
methods: {
//
show(number, title, list) {
//number 0 1 2
//list
this.staffList = [];
if (title) {
this.title = title;
}
if (list) {
this.staffList = list;
}
this.selectNumber = number;
this.list = [];
this.radio = null;
this.radioForm = {};
this.dialogVisible = true;
console.log(this.staffList);
this.getData();
},
//
//
rowClick(row) {
this.radio = row.id;
this.radioForm = row;
},
//
//
async getData() {
this.listLoading = true;
let form = { id: "" };
if (this.staffName) {
form.staffName = this.staffName;
}
selectList(form).then((res) => {
this.listLoading = false;
if (res.code == "000000") {
if (this.staffList.length == 0) {
this.list = res.rows;
} else {
var list = [];
res.rows.forEach((item) => {
this.staffList.forEach((items) => {
if (item.id == items.id) {
} else {
list.push(item);
}
});
});
this.list = Array.from(new Set(list));
}
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
confirms() {
if (this.selectNumber == 1) {
this.radioForm.saleStaffName = this.radioForm.staffName;
this.radioForm.saleStaffId = this.radioForm.id;
this.radioForm.saleIdentityCard = this.radioForm.identityCard;
this.radioForm.saleRatio = 0;
}
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>
<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-column align="left" prop="brandNumber" label="水牌号--管理员名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { selectListType } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
};
},
methods: {
//
clear() {
this.staffLists = [{ ratio: 100 }];
this.changeStaff();
this.confirm();
},
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.confirm();
this.changeStaff();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位员工占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.staffLists.splice(index, 1, form);
}
this.editIndex = -1;
}
this.confirm();
this.changeStaff();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.confirm();
this.changeStaff();
},
//
show(list, storeId) {
this.staffLists = [...list];
if (storeId) {
this.storeId = storeId;
}
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffType: 1,
staffNames: item.brandNumber + "--" + item.staffName,
};
list.push(items);
});
this.$emit("adminData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
let form = { type: 0 };
if (this.storeId) {
form.storeId = this.storeId;
}
selectListType(form).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.editStaffRatioShow = false;
});
this.staffList = res.rows;
this.staffListCopy = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>
<template>
<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-column align="left" prop="brandNumber" label="水牌号--管理员名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { selectListType } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
};
},
methods: {
//
clear() {
this.staffLists = [
{ staffNames: "", brandNumber: "", staffName: "", ratio: 100 },
];
this.changeStaff();
this.confirm();
},
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.confirm();
this.changeStaff();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位员工占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.staffLists.splice(index, 1, form);
}
this.editIndex = -1;
}
this.confirm();
this.changeStaff();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.confirm();
this.changeStaff();
},
//
show(list, storeId) {
this.staffLists = [...list];
if (storeId) {
this.storeId = storeId;
}
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffType: 1,
staffNames: item.brandNumber + "--" + item.staffName,
};
list.push(items);
});
this.$emit("adminData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
let form = { type: 0 };
if (this.storeId) {
form.storeId = this.storeId;
}
selectListType(form).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.editStaffRatioShow = false;
});
this.staffList = res.rows;
this.staffListCopy = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>

@ -1,167 +1,167 @@
<template>
<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-column align="left" prop="brandNumber" label="水牌号--高管名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { QuerCompetent } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
};
},
methods: {
//
clear() {
this.staffLists = [{ ratio: 100 }];
this.changeStaff();
this.confirm();
},
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.confirm();
this.changeStaff();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.editIndex = -1;
this.staffLists.splice(index, 1, form);
}
}
this.confirm();
this.changeStaff();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.confirm();
this.changeStaff();
},
//
show(list) {
this.staffLists = [...list];
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName,
staffType: 0,
};
list.push(items);
});
this.$emit("managerData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
QuerCompetent({ type: 0, pageSize: 999 }).then((res) => {
if (res.code == "000000") {
this.staffList = res.pageInfo.list;
this.staffListCopy = res.pageInfo.list;
} else {
this.$alert(res.message, "加载高管提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>
<template>
<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-column align="left" prop="brandNumber" label="水牌号--高管名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { QuerCompetent } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
};
},
methods: {
//
clear() {
this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.changeStaff();
this.confirm();
},
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.confirm();
this.changeStaff();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.editIndex = -1;
this.staffLists.splice(index, 1, form);
}
}
this.confirm();
this.changeStaff();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.confirm();
this.changeStaff();
},
//
show(list) {
this.staffLists = [...list];
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName,
staffType: 0,
};
list.push(items);
});
this.$emit("managerData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
QuerCompetent({ type: 0, pageSize: 999 }).then((res) => {
if (res.code == "000000") {
this.staffList = res.pageInfo.list;
this.staffListCopy = res.pageInfo.list;
} else {
this.$alert(res.message, "加载高管提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>

@ -1,180 +1,180 @@
<template>
<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-column align="left" prop="brandNumber" label="水牌号--员工名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { selectList } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
};
},
methods: {
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.changeStaff();
this.confirm();
},
//
clear() {
this.staffLists = [{ ratio: 100 }];
this.changeStaff();
this.confirm();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位员工占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.editIndex = -1;
this.staffLists.splice(index, 1, form);
}
}
this.changeStaff();
this.confirm();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.changeStaff();
this.confirm();
},
//
show(list, storeId) {
console.log(list);
this.staffLists = [...list];
if (storeId) {
this.storeId = storeId;
}
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName,
staffType: 2,
};
list.push(items);
});
this.$emit("staffslesData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
let form = { id: "" };
if (this.storeId) {
form.storeId = this.storeId;
}
selectList(form).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.editStaffRatioShow = false;
});
this.staffList = res.rows;
this.staffListCopy = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>
<template>
<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-column align="left" prop="brandNumber" label="水牌号--员工名字" min-width="180">
<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-option v-for="(item,index) in staffList" :key="index" :label="item.brandNumber+'--'+ item.staffName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</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>
</template>
</el-table-column>
</el-table>
<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="primary" plain @click="(staffLists.push({brandNumber:'',staffName:'',ratio:0}))"></el-button>
</div>
</div>
</template>
<script>
import { selectList } from "@/api/eashier.js";
export default {
data() {
return {
staffList: [], //
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
};
},
methods: {
//
ratioChange(v, index) {
this.staffList.forEach((item) => {
if (item.id == v) {
item.ratio = this.staffLists[index].ratio;
item.staffNames = item.brandNumber + "--" + item.staffName;
this.staffLists.splice(index, 1, item);
}
});
this.changeStaff();
this.confirm();
},
//
clear() {
this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.changeStaff();
this.confirm();
},
//
openStaffRatio(index, row) {
if (index != 0 || row.ratio * 1 != 100) {
let form = { ...row };
this.editIndex = index;
this.staffLists.splice(index, 1, form);
}
},
//
endStaffRatio(row, index) {
let num = 0;
if (index != 0) {
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({
message: "第一位员工占比过低",
});
} else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
}
let form = this.staffLists[index];
this.editIndex = -1;
this.staffLists.splice(index, 1, form);
}
}
this.changeStaff();
this.confirm();
},
//
delsalesman() {
let index = this.staffLists.length - 1;
if (index == 0) {
this.$message.warning({ message: "第一行员工只能修改" });
} else {
let ratio = this.staffLists[index].ratio;
this.staffLists[0].ratio += ratio;
this.staffLists.splice(index, 1);
}
this.changeStaff();
this.confirm();
},
//
show(list, storeId) {
console.log(list);
this.staffLists = [...list];
if (storeId) {
this.storeId = storeId;
}
this.getData();
},
//
confirm() {
let list = [];
this.staffLists.forEach((item) => {
let items = {
id: item.id,
ratio: item.ratio,
brandNumber: item.brandNumber,
staffName: item.staffName,
identityCard: item.identityCard,
storeId: item.storeId,
storeName: item.storeName,
staffNames: item.brandNumber + "--" + item.staffName,
staffType: 2,
};
list.push(items);
});
this.$emit("staffslesData", list);
},
//
changeStaff() {
var that = this;
var list = that.staffLists
.concat(that.staffListCopy)
.filter(function (v) {
return (
that.staffLists.indexOf(v) === -1 ||
that.staffListCopy.indexOf(v) === -1
);
});
this.staffList = list;
},
//
//
async getData() {
let form = { id: "" };
if (this.storeId) {
form.storeId = this.storeId;
}
selectList(form).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.editStaffRatioShow = false;
});
this.staffList = res.rows;
this.staffListCopy = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>

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

@ -1,71 +1,71 @@
<template>
<!-- 员工业绩和提成 -->
<div class="month">
<div class="month_header">
<div style="padding:0 20px;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>
</div>
<br>
<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="staffName" 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>
<perform ref="perform"></perform>
</div>
</template>
<script>
import { statisticStaffDayList } from "../../api/home.js";
import perform from "@/components/perform/index";
export default {
components: { perform },
data() {
return {
tableList: [],
input: "",
};
},
methods: {
statisticStaffDayList() {
statisticStaffDayList({ id: "" }).then((res) => {
this.tableList = res.rows;
});
},
confirm(row) {
let date = new Date();
console.log(row);
this.$refs.perform.show(row, date);
},
},
created() {
this.statisticStaffDayList();
},
computed: {
//
tableData() {
var search = this.input.toString().toLowerCase(); //
if (search) {
return this.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
});
});
}
return this.tableList;
},
},
};
</script>
<style scoped>
.month {
width: 100%;
height: 100%;
padding-top: 10px;
}
.month_header {
display: flex;
justify-content: space-between;
}
</style>
<template>
<!-- 员工业绩和提成 -->
<div class="month">
<div class="month_header">
<div class="padding-left-xs" style="font-size:14px;color:#999">员工业绩和提成</div>
<el-input clearable prefix-icon="el-icon-search" size="samll" style="width:150px;margin-right:20px" v-model="input"></el-input>
</div>
<br>
<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="staffName" 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>
<perform ref="perform"></perform>
</div>
</template>
<script>
import { statisticStaffDayList } from "../../api/home.js";
import perform from "@/components/perform/index";
export default {
components: { perform },
data() {
return {
tableList: [],
input: "",
};
},
methods: {
statisticStaffDayList() {
statisticStaffDayList({ id: "" }).then((res) => {
this.tableList = res.rows;
});
},
confirm(row) {
let date = new Date();
console.log(row);
this.$refs.perform.show(row, date);
},
},
created() {
this.statisticStaffDayList();
},
computed: {
//
tableData() {
var search = this.input.toString().toLowerCase(); //
if (search) {
return this.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
});
});
}
return this.tableList;
},
},
};
</script>
<style scoped>
.month {
width: 100%;
height: 100%;
padding-top: 2px;
}
.month_header {
display: flex;
justify-content: space-between;
}
</style>

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

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

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

@ -189,7 +189,7 @@
</div>
</template>
</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">
<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)">
@ -198,8 +198,8 @@
</div>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip min-width="160" align="center" prop="projectName" label="项目名称"></el-table-column>
<el-table-column align="center" prop="noDiscount" label="卡付打折" width="80">
<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="50">
<template slot-scope="scope">{{
scope.row.noDiscount == 0 ? "是" : scope.row.noDiscount == 1?'否':"未设"
}}</template>
@ -260,7 +260,7 @@
<div v-else></div>
</template>
</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="collectionCashAmount" label="现付金额"></el-table-column>
<el-table-column show-overflow-tooltip width="75" align="center" prop="sex" label="性别">
@ -288,7 +288,7 @@
</el-table-column>
</el-table>
</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="form-width-m ">
<span class=" ">现付金额:</span>
@ -1513,7 +1513,7 @@ export default {
goBack() {
this.$router.push({ query: {} });
this.$router.push({ path: "/service" });
this.$router.push({ path: "/shareBill" });
this.notData();
},
getRecCard() {
@ -1750,29 +1750,32 @@ export default {
this.setPage();
},
setPage() {
let list = JSON.parse(this.$route.query.list);
if (list.length != 0 || list === 0) {
if (list == 0 || list == 1) {
this.newOrder = true;
this.orderNumber = list;
this.isAddition = list;
this.additionDate = this.formatTime(new Date(), "YYYY-MM-DD");
if (this.$route.query.list) {
let list = JSON.parse(this.$route.query.list);
if (list.length != 0 || list === 0) {
if (list == 0 || list == 1) {
this.newOrder = true;
this.orderNumber = list;
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 {
this.list = [...list];
this.dialogFormVisible = true;
console.log(this.list);
this.getData();
this.newOrder = false;
this.goBack();
}
} else {
this.goBack();
}
this.getDetail();
},
},
created() {
activated() {
this.setPage();
},
created() {},
};
</script>

@ -1,92 +1,92 @@
<template>
<div class="flex">
<div style="width:280px">
<el-table :data="payLists" 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="payMoney" width="120" label="本次支付 ">
<template slot-scope="scope">
<div v-if="payIndex != scope.$index" @click="editPay(scope.row,scope.$index)">
{{ scope.row.payMoney }}
<i class="text-cyan el-icon-edit"></i>
</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>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
list: [], //
form: {}, //
payLists: [], //
rechargeAccountList: [], //
recIndex: -1,
giftIndex: -1,
payIndex: -1,
};
},
methods: {
//
show(form, list) {
var that = this;
that.form = JSON.parse(JSON.stringify(form));
that.payLists = [];
that.payLists = JSON.parse(JSON.stringify(list));
},
//.
editPay(row, index) {
this.payIndex = index;
row.payMoney =
(this.form.cashAmount - this.form.collectionCashAmount).toFixed(2) * 1;
},
endEdit(row, index) {
this.payIndex = -1;
if (!row.payMoney) {
row.payMoney = 0;
}
this.sumNum();
},
sumNum() {
let payMoney = 0;
this.payLists.forEach((item) => {
payMoney += item.payMoney * 1;
});
this.form.collectionCashAmount = payMoney;
let form = { form: this.form, list: this.payLists };
this.$emit("paymentData", form);
},
getSummariesPay(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
const values = data.map((item) => Number(item[column.property]));
if (column.property == "payMoney") {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
sums[index] = "--";
}
}, 0);
sums[index] += " ";
} else {
sums[index] = "--";
}
});
return sums;
},
},
};
</script>
<style>
</style>
<template>
<div class="flex">
<div style="width:100%">
<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="100" label="支付方式"></el-table-column>
<el-table-column align="center" prop="payMoney" min-width="80" label="本次支付 ">
<template slot-scope="scope">
<div v-if="payIndex != scope.$index" @click="editPay(scope.row,scope.$index)">
{{ scope.row.payMoney }}
<i class="text-cyan el-icon-edit"></i>
</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>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
list: [], //
form: {}, //
payLists: [], //
rechargeAccountList: [], //
recIndex: -1,
giftIndex: -1,
payIndex: -1,
};
},
methods: {
//
show(form, list) {
var that = this;
that.form = JSON.parse(JSON.stringify(form));
that.payLists = [];
that.payLists = JSON.parse(JSON.stringify(list));
},
//.
editPay(row, index) {
this.payIndex = index;
row.payMoney =
(this.form.cashAmount - this.form.collectionCashAmount).toFixed(2) * 1;
},
endEdit(row, index) {
this.payIndex = -1;
if (!row.payMoney) {
row.payMoney = 0;
}
this.sumNum();
},
sumNum() {
let payMoney = 0;
this.payLists.forEach((item) => {
payMoney += item.payMoney * 1;
});
this.form.collectionCashAmount = payMoney;
let form = { form: this.form, list: this.payLists };
this.$emit("paymentData", form);
},
getSummariesPay(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
const values = data.map((item) => Number(item[column.property]));
if (column.property == "payMoney") {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
sums[index] = "--";
}
}, 0);
sums[index] += " ";
} else {
sums[index] = "--";
}
});
return sums;
},
},
};
</script>
<style>
</style>

File diff suppressed because it is too large Load Diff

@ -1196,33 +1196,35 @@ export default {
}
},
empty() {
this.form = {
mobilePhone: null,
integralCheckbox: false,
description: "",
salesPrice: "",
numberTimes: "",
menberShow: false,
courseReatmentAmount: 0,
isDebt: false,
collectionRechargeAmount: 0,
collectionCashAmount: 0,
collectionIntegralAmount: 0,
integral: 0,
integralMoney: 0,
consumeIntegral: 0,
debtMoney: 0,
};
this.debtMoneys = 0;
this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
this.rechargeAccountList = [];
this.rechargeAccountLis = [];
this.payLists = [];
this.managerLists = [{ ratio: 100 }];
this.adminList = [{ ratio: 100 }];
this.activeName = "现付";
this.ctlist();
this.setStaffRatio();
// this.form = {
// mobilePhone: null,
// integralCheckbox: false,
// description: "",
// salesPrice: "",
// numberTimes: "",
// menberShow: false,
// courseReatmentAmount: 0,
// isDebt: false,
// collectionRechargeAmount: 0,
// collectionCashAmount: 0,
// collectionIntegralAmount: 0,
// integral: 0,
// integralMoney: 0,
// consumeIntegral: 0,
// debtMoney: 0,
// };
// this.debtMoneys = 0;
// this.staffLists = [{ brandNumber: "", staffName: "", ratio: 100 }];
// this.rechargeAccountList = [];
// this.rechargeAccountLis = [];
// this.payLists = [];
// this.managerLists = [{ ratio: 100 }];
// this.adminList = [{ ratio: 100 }];
// this.activeName = "";
// this.ctlist();
// this.setStaffRatio();
Object.assign(this.$data, this.$options.data.call(this));
this.setPage();
},
//
@ -1339,9 +1341,16 @@ export default {
that.addCourse();
that.loading = false;
}
setTimeout(() => {
this.loading = false;
}, 3000);
},
addCourse() {
setTimeout(() => {
this.loading = false;
}, 3000);
addcourse(this.form).then((res) => {
this.loading = false;
if (res.code == "000000") {
this.empty();
this.$message.success({
@ -1693,13 +1702,16 @@ export default {
});
return sums;
},
setPage() {
this.ctlist();
this.setStaffRatio();
this.sessionStorageData = JSON.parse(
sessionStorage.getItem("sessionStorageData")
);
},
},
created() {
this.ctlist();
this.setStaffRatio();
this.sessionStorageData = JSON.parse(
sessionStorage.getItem("sessionStorageData")
);
this.setPage();
},
};
</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-form-item>
<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 label="部门">
<el-select :disabled="title=='查看'" v-model="form.deptName" placeholder="请选择">
@ -146,6 +149,7 @@ import {
rolepage,
editStaff,
pageBasePost,
pageBaseWorkType,
} from "@/api/storeManage.js";
export default {
data() {
@ -162,6 +166,7 @@ export default {
{ value: 1, label: "美容部" },
{ value: 2, label: "其他部" },
],
jobList: [],
rule: {},
rules: {
staffName: {
@ -367,6 +372,13 @@ export default {
});
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) {
@ -405,12 +417,16 @@ export default {
}
},
//
jobchange(row) {
if (row) {
row.forEach((item) => {
this.form.job = item;
});
}
jobchange(e) {
console.log(e);
this.jobList.forEach((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() {

@ -18,7 +18,7 @@
</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="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="postName" label="职务" sortable min-width="100"></el-table-column>
<el-table-column align="center" prop="type" label="员工类型" sortable min-width="100">

@ -1,233 +1,233 @@
<template>
<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-item label="转出门店">
<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>
</el-select>
</el-form-item>
<el-form-item label="门店名称">
{{form.storesName}}
<!-- <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>
</el-select> -->
</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-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="staffName" label="员工名称" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="sex" label="性别" sortable min-width="80">
<template slot-scope="scope">
<div v-if="scope.row.sex==1"></div>
<div v-else></div>
</template>
</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="jobName" 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">
<template slot-scope="scope">
{{scope.row.type==0?"高管":"普通员工"}}
</template>
</el-table-column>
<el-table-column align=" center" prop="source" label="员工来源" sortable min-width="80">
<template slot-scope="scope">
{{scope.row.source==0?"校招":scope.row.source==1?"社招":scope.row.source==2?"介绍":"其他"}}
</template>
</el-table-column>
<el-table-column align="center" label="转入门店">
<el-table-column align="center" prop="storeNum" label="编码" min-width="80">
<!-- <template slot-scope="scope">
<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>
</el-select>
</template> -->
</el-table-column>
<el-table-column align="center" prop="storeName" label="名称" min-width="200">
<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-option v-for="(item,index) in storeList" :key="index" :label="item.storeName" :value="item.storeName">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogFormVisible = false"> </el-button>
<el-button size="mini" type="primary" :disabled="outShow" @click="confirm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
addStoreConversion,
staffPage,
organizations,
} from "@/api/storeManage.js";
export default {
data() {
return {
dialogFormVisible: false,
listLoading: false, //list
elementLoadingText: "加载中...",
title: "",
form: {}, //
list: [], //
selection: [],
queryForm: {
pageNum: 1,
pageSize: 10,
},
options: [],
outShow: false,
};
},
methods: {
changeOut(e) {
console.log(123);
this.options.forEach((item) => {
if (item.storeNum == e) {
this.form.storesName = item.storeName;
this.form.storesId = item.id;
}
});
this.getStaffData();
this.getData();
},
changeIn(e, row) {
let form = { ...row };
this.storeList.forEach((item) => {
if (item.storeName == e) {
form.storeName = item.storeName;
form.storeId = item.id;
form.storeNum = item.storeNum;
}
});
this.list.splice(row.index, 1, form);
this.getCurrentRow(row);
this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], true);
});
console.log(this.selection);
},
clear(row) {
this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], false);
});
},
//
getCurrentRow(row) {
this.$refs["list"].toggleRowSelection(row);
},
//
rowName({ row, rowIndex }) {
row.index = rowIndex;
},
//
handleSelectionChange(selection) {
this.selection = selection;
},
show(row) {
this.title = "员工转出门店";
this.dialogFormVisible = true;
this.getData();
},
//
async getData() {
// let parentId = JSON.parse(sessionStorage.getItem("storeInfo")).id;
organizations({ pageSize: 999 }).then((res) => {
if (res.code == "000000") {
let list = [];
res.rows.forEach((item) => {
if (this.form.storesNum != item.storeNum) {
list.push(item);
}
});
this.options = res.rows;
this.storeList = list;
} else {
this.$alert(res.message, "获取门店信息", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
getStaffData() {
var arr1 = {
state: 1,
pageNum: this.queryForm.pageNum,
pageSize: this.queryForm.pageSize,
storeId: this.form.storesId,
};
console.log(arr1);
staffPage(arr1).then((res) => {
if (res.code == "000000") {
res.pageInfo.list.forEach((item) => {
item.storeNum = null;
item.storeName = null;
item.storeId = null;
item.staffId = item.id;
});
if (res.pageInfo.total > 1) {
this.outShow = false;
} else {
this.outShow = true;
this.$alert("店铺剩余人数过少不建议转店", "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
this.list = res.pageInfo.list;
} else {
this.$alert(res.message, "获取门店员工信息", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
confirm() {
this.selection.forEach((item) => {
item.storesId = this.form.storesId;
item.storesName = this.form.storesName;
item.storesNum = this.form.storesNum;
});
addStoreConversion(this.selection).then((res) => {
if (res.code == "000000") {
this.dialogFormVisible = false;
this.$emit("editData");
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>
<template>
<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-item label="转出门店">
<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>
</el-select>
</el-form-item>
<el-form-item label="门店名称">
{{form.storesName}}
<!-- <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>
</el-select> -->
</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-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="staffName" label="员工名称" sortable min-width="80"></el-table-column>
<el-table-column align="center" prop="sex" label="性别" sortable min-width="80">
<template slot-scope="scope">
<div v-if="scope.row.sex==1"></div>
<div v-else></div>
</template>
</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="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="type" label="员工类型" sortable min-width="80">
<template slot-scope="scope">
{{scope.row.type==0?"高管":"普通员工"}}
</template>
</el-table-column>
<el-table-column align=" center" prop="source" label="员工来源" sortable min-width="80">
<template slot-scope="scope">
{{scope.row.source==0?"校招":scope.row.source==1?"社招":scope.row.source==2?"介绍":"其他"}}
</template>
</el-table-column>
<el-table-column align="center" label="转入门店">
<el-table-column align="center" prop="storeNum" label="编码" min-width="80">
<!-- <template slot-scope="scope">
<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>
</el-select>
</template> -->
</el-table-column>
<el-table-column align="center" prop="storeName" label="名称" min-width="200">
<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-option v-for="(item,index) in storeList" :key="index" :label="item.storeName" :value="item.storeName">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="dialogFormVisible = false"> </el-button>
<el-button size="mini" type="primary" :disabled="outShow" @click="confirm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
addStoreConversion,
staffPage,
organizations,
} from "@/api/storeManage.js";
export default {
data() {
return {
dialogFormVisible: false,
listLoading: false, //list
elementLoadingText: "加载中...",
title: "",
form: {}, //
list: [], //
selection: [],
queryForm: {
pageNum: 1,
pageSize: 10,
},
options: [],
outShow: false,
};
},
methods: {
changeOut(e) {
console.log(123);
this.options.forEach((item) => {
if (item.storeNum == e) {
this.form.storesName = item.storeName;
this.form.storesId = item.id;
}
});
this.getStaffData();
this.getData();
},
changeIn(e, row) {
let form = { ...row };
this.storeList.forEach((item) => {
if (item.storeName == e) {
form.storeName = item.storeName;
form.storeId = item.id;
form.storeNum = item.storeNum;
}
});
this.list.splice(row.index, 1, form);
this.getCurrentRow(row);
this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], true);
});
console.log(this.selection);
},
clear(row) {
this.$nextTick(() => {
this.$refs["list"].toggleRowSelection(this.list[row.index], false);
});
},
//
getCurrentRow(row) {
this.$refs["list"].toggleRowSelection(row);
},
//
rowName({ row, rowIndex }) {
row.index = rowIndex;
},
//
handleSelectionChange(selection) {
this.selection = selection;
},
show(row) {
this.title = "员工转出门店";
this.dialogFormVisible = true;
this.getData();
},
//
async getData() {
// let parentId = JSON.parse(sessionStorage.getItem("storeInfo")).id;
organizations({ pageSize: 999 }).then((res) => {
if (res.code == "000000") {
let list = [];
res.rows.forEach((item) => {
if (this.form.storesNum != item.storeNum) {
list.push(item);
}
});
this.options = res.rows;
this.storeList = list;
} else {
this.$alert(res.message, "获取门店信息", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
getStaffData() {
var arr1 = {
state: 1,
pageNum: this.queryForm.pageNum,
pageSize: this.queryForm.pageSize,
storeId: this.form.storesId,
};
console.log(arr1);
staffPage(arr1).then((res) => {
if (res.code == "000000") {
res.pageInfo.list.forEach((item) => {
item.storeNum = null;
item.storeName = null;
item.storeId = null;
item.staffId = item.id;
});
if (res.pageInfo.total > 1) {
this.outShow = false;
} else {
this.outShow = true;
this.$alert("店铺剩余人数过少不建议转店", "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
this.list = res.pageInfo.list;
} else {
this.$alert(res.message, "获取门店员工信息", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
confirm() {
this.selection.forEach((item) => {
item.storesId = this.form.storesId;
item.storesName = this.form.storesName;
item.storesNum = this.form.storesNum;
});
addStoreConversion(this.selection).then((res) => {
if (res.code == "000000") {
this.dialogFormVisible = false;
this.$emit("editData");
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
},
};
</script>
<style>
</style>

@ -1,281 +1,281 @@
<template>
<div>
<div class="header_flex">
<div>
</div>
<div>
<el-input size="medium" style="width:180px;" placeholder="当前页搜索" v-model="input">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-button size="mini" type="primary" @click="(searchDialog=true)"></el-button>
<el-button size="mini" type="info" plain @click="getData(refreshtext=true)"></el-button>
</div>
</div>
<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-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="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="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 fixed="right" align="center" label="操作" width="80">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="detail(scope.row,scope.$index,(detailVisible=true))" plain>明细</el-button>
</template>
</el-table-column>
</el-table>
<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>
</div>
<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-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="sex" label="性别" min-width="80">
<template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template>
</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>
</el-drawer>
<el-dialog title="搜索" :visible.sync="searchDialog">
<el-form :model="searchForm">
<el-form-item label="入职日期搜索:" label-width="120px">
<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>
</div>
</el-form-item>
<el-form-item label="水牌号搜索:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.brandNumber" placeholder="输入要查询的员工水牌号" clearable></el-input>
</div>
</el-form-item>
<el-form-item label="员工名字搜索:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable></el-input>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button>
</span>
</el-dialog>
</div>
</template>
<style scoped>
</style>
<script>
import { staffMemberPage, storeMemberlistByStaff } from "@/api/storeManage.js";
export default {
data() {
return {
detailVisible: false, //
pageNum: 1, //
pageSize: 10, // ,
input: "", //
searchDialog: false, //
refreshtext: false, //
date: [], //
searchForm: {
//
brandNumber: "",
staffName: "",
startTime: "",
endTime: "",
},
pageInfo: {
total: 0, //
tableList: [],
},
detailTableData: [], //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
],
},
searchTrue: false,
};
},
methods: {
//
//
changeDate() {
this.searchForm.startTime = this.date[0];
this.searchForm.endTime = this.date[1];
},
//
search() {
//
staffMemberPage(this.searchForm).then((res) => {
if (res.code == "000000") {
this.searchTrue = true;
res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo;
if (res.pageInfo.total == 0) {
this.$message.warning({ message: "没有找到该员工数据" });
} else {
this.$message.success({ message: "已显示符合条件的全部数据" });
}
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
//
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
const values = data.map((item) => Number(item[column.property]));
if (column.property == "count") {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
sums[index] = "--";
}
}, 0);
//console.log(sums )
sums[index] += " 个";
} else {
sums[index] = "--";
}
});
return sums;
},
//
detail(row) {
var id = { staffId: row.id };
storeMemberlistByStaff(id).then((res) => {
//console.log(res);
if (res.code == "000000") {
//console.log(res.rows);
res.rows.forEach((item) => {
if (item.sex == 1) {
item.sex = "男";
} else {
item.sex = "女";
}
if (item.kinType == 3) {
item.kinType = "干性";
} else if (item.kinType == 2) {
item.kinType = "中性";
} else if (item.kinType == 1) {
item.kinType = "油性";
} else {
item.kinType = "暂无";
}
if (item.hairLong == 3) {
item.hairLong = "短";
} else if (item.hairLong == 2) {
item.hairLong = "适中";
} else if (item.hairLong == 1) {
item.hairLong = "长";
} else {
item.hairLong == "暂无";
}
});
this.detailTableData = res.rows;
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
handleSizeChange(val) {
// //console.log(` ${val} `);
this.pageSize = val;
if (this.searchTrue == true) {
this.search();
} else {
this.getData();
}
},
handleCurrentChange(val) {
// //console.log(`: ${val}`);
this.pageNum = val;
if (this.searchTrue == true) {
this.search();
} else {
this.getData();
}
},
//
getData() {
var page = { pageNum: this.pageNum, pageSize: this.pageSize };
staffMemberPage(page).then((res) => {
if (res.code == "000000") {
if (this.refreshtext == true) {
this.searchTrue = false;
this.$message.success({ message: "已刷新最新数据" });
this.refreshtext = false;
}
res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo;
}
});
},
},
created() {
let list = JSON.parse(sessionStorage.getItem("list"));
list.forEach((item) => {
if (item.id == 4009001) {
this.getData();
}
});
},
computed: {
//
tableData() {
var search = this.input.toString().toLowerCase(); //
if (search) {
return this.pageInfo.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
});
});
}
return this.pageInfo.tableList;
},
},
};
</script>
<template>
<div>
<div class="header_flex">
<div>
</div>
<div>
<el-input size="medium" style="width:180px;" placeholder="当前页搜索" v-model="input">
<i slot="prefix" class="el-input__icon el-icon-search"></i>
</el-input>
<el-button size="mini" type="primary" @click="(searchDialog=true)"></el-button>
<el-button size="mini" type="info" plain @click="getData(refreshtext=true)"></el-button>
</div>
</div>
<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-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="postName" 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="count" sortable label="会员数(个)" min-width="110"></el-table-column>
<el-table-column fixed="right" align="center" label="操作" width="80">
<template slot-scope="scope">
<el-button size="mini" type="primary" @click="detail(scope.row,scope.$index,(detailVisible=true))" plain>明细</el-button>
</template>
</el-table-column>
</el-table>
<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>
</div>
<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-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="sex" label="性别" min-width="80">
<template slot-scope="scope">{{scope.row.sex==1?'男':'女'}}</template>
</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>
</el-drawer>
<el-dialog title="搜索" :visible.sync="searchDialog">
<el-form :model="searchForm">
<el-form-item label="入职日期搜索:" label-width="120px">
<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>
</div>
</el-form-item>
<el-form-item label="水牌号搜索:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.brandNumber" placeholder="输入要查询的员工水牌号" clearable></el-input>
</div>
</el-form-item>
<el-form-item label="员工名字搜索:" label-width="120px">
<div class="searchDiv">
<el-input size="medium" v-model="searchForm.staffName" placeholder="输入要查询的员工姓名" clearable></el-input>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="searchDialog = false"> </el-button>
<el-button type="primary" size="mini" @click="search(searchDialog = false) "> </el-button>
</span>
</el-dialog>
</div>
</template>
<style scoped>
</style>
<script>
import { staffMemberPage, storeMemberlistByStaff } from "@/api/storeManage.js";
export default {
data() {
return {
detailVisible: false, //
pageNum: 1, //
pageSize: 10, // ,
input: "", //
searchDialog: false, //
refreshtext: false, //
date: [], //
searchForm: {
//
brandNumber: "",
staffName: "",
startTime: "",
endTime: "",
},
pageInfo: {
total: 0, //
tableList: [],
},
detailTableData: [], //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
],
},
searchTrue: false,
};
},
methods: {
//
//
changeDate() {
this.searchForm.startTime = this.date[0];
this.searchForm.endTime = this.date[1];
},
//
search() {
//
staffMemberPage(this.searchForm).then((res) => {
if (res.code == "000000") {
this.searchTrue = true;
res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo;
if (res.pageInfo.total == 0) {
this.$message.warning({ message: "没有找到该员工数据" });
} else {
this.$message.success({ message: "已显示符合条件的全部数据" });
}
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
//
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = "合计";
return;
}
const values = data.map((item) => Number(item[column.property]));
if (column.property == "count") {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
sums[index] = "--";
}
}, 0);
//console.log(sums )
sums[index] += " 个";
} else {
sums[index] = "--";
}
});
return sums;
},
//
detail(row) {
var id = { staffId: row.id };
storeMemberlistByStaff(id).then((res) => {
//console.log(res);
if (res.code == "000000") {
//console.log(res.rows);
res.rows.forEach((item) => {
if (item.sex == 1) {
item.sex = "男";
} else {
item.sex = "女";
}
if (item.kinType == 3) {
item.kinType = "干性";
} else if (item.kinType == 2) {
item.kinType = "中性";
} else if (item.kinType == 1) {
item.kinType = "油性";
} else {
item.kinType = "暂无";
}
if (item.hairLong == 3) {
item.hairLong = "短";
} else if (item.hairLong == 2) {
item.hairLong = "适中";
} else if (item.hairLong == 1) {
item.hairLong = "长";
} else {
item.hairLong == "暂无";
}
});
this.detailTableData = res.rows;
} else {
this.$alert(res.message, "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
},
//
handleSizeChange(val) {
// //console.log(` ${val} `);
this.pageSize = val;
if (this.searchTrue == true) {
this.search();
} else {
this.getData();
}
},
handleCurrentChange(val) {
// //console.log(`: ${val}`);
this.pageNum = val;
if (this.searchTrue == true) {
this.search();
} else {
this.getData();
}
},
//
getData() {
var page = { pageNum: this.pageNum, pageSize: this.pageSize };
staffMemberPage(page).then((res) => {
if (res.code == "000000") {
if (this.refreshtext == true) {
this.searchTrue = false;
this.$message.success({ message: "已刷新最新数据" });
this.refreshtext = false;
}
res.pageInfo.tableList = res.pageInfo.list;
this.pageInfo = res.pageInfo;
}
});
},
},
created() {
let list = JSON.parse(sessionStorage.getItem("list"));
list.forEach((item) => {
if (item.id == 4009001) {
this.getData();
}
});
},
computed: {
//
tableData() {
var search = this.input.toString().toLowerCase(); //
if (search) {
return this.pageInfo.tableList.filter(function (dataNews) {
return Object.keys(dataNews).some(function (key) {
return String(dataNews[key]).toLowerCase().indexOf(search) > -1;
});
});
}
return this.pageInfo.tableList;
},
},
};
</script>

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

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

Loading…
Cancel
Save