修改提交

master
wangxubin@yeah.net 4 years ago
parent ac287506cf
commit 79cb59ffb7

@ -464,6 +464,13 @@ export function storeMemberpage(params) {
data: params
});
}
export function storeMemberpages(params) {
return service({
url: "/api" + "/demay/ssm/storeMember/selectListNew",
method: "post",
data: params
});
}
export function pageassign(params) {
return service({
url: "/api" + "/demay/ssm/storeMember/pageassign",

@ -164,6 +164,8 @@ import {
addCancelDebtList,
couAccountList,
recAccountCashList,
selectListType,
QuerCompetent,
} from "@/api/eashier.js";
import cancel from "./components/cancel.vue";
import admin from "@/components/staffList/admin/index";
@ -406,6 +408,64 @@ export default {
//
async getData() {
this.getPage();
//
selectList({ id: "" }).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.label = item.brandNumber + "-" + item.staffName;
delete item.state;
item.ratio = 100;
});
this.options = Array.from(new Set(res.rows));
} else {
this.$alert(res.message, "加载员工列表", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
//
selectListType({ type: 0 }).then((res) => {
if (res.code == "000000") {
res.rows.forEach((item) => {
item.label = item.brandNumber + "-" + item.staffName;
item.ratio = 100;
delete item.state;
});
this.adminOptions = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
//
QuerCompetent({ type: 0, pageSize: 999 }).then((res) => {
if (res.code == "000000") {
res.pageInfo.list.forEach((item) => {
item.label = item.brandNumber + "-" + item.staffName;
item.ratio = 100;
delete item.state;
});
this.managerOptions = res.pageInfo.list;
} else {
this.$alert(res.message, "加载高管提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
});
}
});
//
ctlist({ id: "" }).then((res) => {
if (res.code == "000000") {

@ -35,6 +35,7 @@ export default {
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
nums:'',
};
},
methods: {
@ -48,6 +49,7 @@ export default {
num += item.ratio * 1;
}
});
this.nuns=this.staffLists[0].ratio
this.staffLists[0].ratio = 100 - num;
},
//
@ -91,26 +93,73 @@ export default {
//
endStaffRatio(row, index) {
if (index != 0) {
this.setRatio();
this.setRatio();
if (this.staffLists[0].ratio < 1) {
this.$message.error({
message: "第一位员工占比过低",
});
this.staffLists.forEach((item) => {
if (item.ratio > 100) {
if (item.ratio >= this.nums) {
item.ratio = 0;
}
});
} else {
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
console.l
}
this.staffLists[0].ratio = 100 - number
});
} else if (this.staffLists[0].ratio > 100) {
this.$message.error({
message: "第一位员工占比过高",
});
this.staffLists.forEach((item) => {
if (item.ratio < 0) {
item.ratio = 0;
}
});
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
console.l
}
this.staffLists[0].ratio = 100 - number
});
}
else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
if (row.ratio < 0) {
// this.staffLists.forEach((item, index) => {
this.$message.error({
message: "输入不能小于0",
});
row.ratio = 0;
// });
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
this.staffLists[0].ratio = 100 - number
});
} else {
row.ratio = row.ratio * 1;
}
}
let form = this.staffLists[index];
this.editIndex = -1;
this.staffLists.splice(index, 1, form);
}
this.editIndex = -1;
}
this.confirm();
this.changeStaff();

@ -3,25 +3,32 @@
<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(scope.$index)" 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-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear(scope.$index)"
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)">
<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>
<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" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index==0"></el-input>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio"
@blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index == 0"></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>
<el-button size="mini" type="primary" plain
@click="(staffLists.push({ brandNumber: '', staffName: '', ratio: 0 }))">增加
</el-button>
</div>
</div>
</template>
@ -34,6 +41,7 @@ export default {
staffLists: [{ ratio: 100 }], // //
editIndex: -1, //
staffListCopy: [], //
nums:"",
};
},
methods: {
@ -47,6 +55,7 @@ export default {
num += item.ratio * 1;
}
});
this.nums=this.staffLists[0].ratio;
this.staffLists[0].ratio = 100 - num;
},
//
@ -93,18 +102,60 @@ export default {
this.setRatio();
if (this.staffLists[0].ratio < 1) {
this.$message.error({
message: "第一位占比过低",
message: "第一位员工占比过低",
});
this.staffLists.forEach((item) => {
if (item.ratio > 100) {
if (item.ratio >= this.nums) {
item.ratio = 0;
}
});
} else {
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
});
this.staffLists[0].ratio = 100 - number
} else if (this.staffLists[0].ratio > 100) {
this.$message.error({
message: "第一位员工占比过高",
});
this.staffLists.forEach((item) => {
if (item.ratio < 0) {
item.ratio = 0;
}
});
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
});
this.staffLists[0].ratio = 100 - number
}
else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
if (row.ratio < 0) {
// this.staffLists.forEach((item, index) => {
this.$message.error({
message: "输入不能小于0",
});
row.ratio = 0;
// });
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
this.staffLists[0].ratio = 100 - number
});
} else {
row.ratio = row.ratio * 1;
}
}
let form = this.staffLists[index];
this.editIndex = -1;
@ -199,7 +250,7 @@ export default {
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
callback: (action) => { },
});
}
});

@ -3,25 +3,32 @@
<el-table :data="staffLists" max-height="300" class="margin-xs" style="width:280px" :row-class-name="rowClassName">
<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(scope.$index)" 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-select style="width:180px" v-model="scope.row.staffNames" clearable @clear="clear(scope.$index)"
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)">
<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>
<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" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index==0"></el-input>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio"
@blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index == 0"></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>
<el-button size="mini" type="primary" plain
@click="(staffLists.push({ brandNumber: '', staffName: '', ratio: 0 }))">增加
</el-button>
</div>
</div>
</template>
@ -36,6 +43,7 @@ export default {
editIndex: -1, //
staffListCopy: [], //
storeId: null, //id
nums:"",
};
},
methods: {
@ -73,6 +81,7 @@ export default {
num += item.ratio * 1;
}
});
this.nums=this.staffLists[0].ratio;
this.staffLists[0].ratio = 100 - num;
},
//
@ -99,15 +108,62 @@ export default {
message: "第一位员工占比过低",
});
this.staffLists.forEach((item) => {
if (item.ratio > 100) {
if (item.ratio >= this.nums) {
item.ratio = 0;
}
});
} else {
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
console.l
}
this.staffLists[0].ratio = 100 - number
});
} else if (this.staffLists[0].ratio > 100) {
this.$message.error({
message: "第一位员工占比过高",
});
this.staffLists.forEach((item) => {
if (item.ratio < 1) {
item.ratio = 0;
}
});
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
console.l
}
this.staffLists[0].ratio = 100 - number
});
}
else {
if (!row.ratio) {
row.ratio = 0;
} else {
row.ratio = row.ratio * 1;
if (row.ratio < 0) {
// this.staffLists.forEach((item, index) => {
this.$message.error({
message: "输入不能小于0",
});
row.ratio = 0;
// });
let number = 0;
this.staffLists.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
this.staffLists[0].ratio = 100 - number
});
} else {
row.ratio = row.ratio * 1;
}
}
let form = this.staffLists[index];
this.editIndex = -1;
@ -214,7 +270,7 @@ export default {
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => {},
callback: (action) => { },
});
}
});

@ -353,14 +353,14 @@ export default {
icon: "el-icon-sort",
route: "/transfer",
index: "transfer",
number: "4001500",
number: "5001500",
},
{
name: "会员转门店",
name: "疗程转门店",
icon: "el-icon-sort",
route: "/transferstore",
index: "transferstore",
number: "4001600",
number: "5001600",
},
// {
// name: "",
@ -588,14 +588,14 @@ export default {
icon: "el-icon-s-order",
route: "/managers",
index: "managers",
number: "4001200",
number: "6001200",
},
{
name: "管理层业绩",
icon: "el-icon-s-order",
route: "/admins",
index: "admins",
number: "4001300",
number: "6001300",
},
{
@ -603,7 +603,7 @@ export default {
icon: "el-icon-s-finance",
route: "/dept",
index: "dept",
number: "4001400",
number: "6001400",
},
// {
// name: "",

@ -113,7 +113,7 @@
</div>
<div style="width:280px;" class="border-radius-10 border bg-white padding-xs">
<el-table :data="proForm.payLists" show-summary max-height="350">
<el-table :data="proForm.payLists" max-height="350">
<el-table-column align="center" prop="payName" label="支付方式" min-width="100"></el-table-column>
<el-table-column align="center" prop="payMoney" fixed="right" label="本次支付" min-width="80">
<template slot-scope="scope">
@ -211,6 +211,7 @@ export default {
debtMoney: 0,
isAddition: 0,
loading: false,
TransactionNum:0
};
},
methods: {
@ -363,6 +364,7 @@ export default {
row.index = rowIndex;
},
projectData(form) {
console.log(form)
form.memberId = this.proForm.memberId;
form.memberName = this.proForm.memberName;
form.mobilePhone = this.proForm.mobilePhone;
@ -444,24 +446,29 @@ export default {
//.
editPay(row, index) {
if (this.debtMoney < 0) {
this.$message.error({
message: "支付金额已超出 , 无需进行现付 !",
});
} else {
// if (this.debtMoney < 0) {
// this.$message.error({
// message: " , !",
// });
// } else {
console.log(row)
var form = {
...row,
};
console.log()
var payLists = [...this.proForm.payLists];
payLists[index] = form;
form.isShow = true;
form.payMoney = (this.debtMoney + form.payMoney).toFixed(2) * 1;
this.proForm.payLists = [];
this.proForm.payLists = payLists;
this.sumMoney();
}
this.sumMoney()
// }
},
endEdit(row) {
console.log(row);
console.log(this.inList);
if (row.payMoney) {
row.payMoney = row.payMoney * 1;
} else {
@ -473,9 +480,13 @@ export default {
this.openProText = num;
if (num == 0) {
this.$refs.project.show(0);
this.TransactionNum=this.inList.transactionMoney;
}
if (num == 1) {
this.$refs.project.show(this.proForm);
console.log(this.inList)
}
},
delOldPro(index) {

@ -788,6 +788,7 @@ export default {
this.form.mobilePhone = mobilePhone;
if (res.code == "000000") {
this.vip = res.data;
console.log(this.vip);
this.form.memberName = res.data.memberName;
this.form.minumumTimes = res.data.minumumTimes;
this.debtMoneys = res.data.debtMoney;

@ -25,7 +25,7 @@
<br />
<el-form-item prop="courseProjectNum" label="疗程编码:">
<div class="form-width-ms">
<div :title="refund.courseProjectNum" style="cursor: pointer;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" v-show="refund.courseProjectName!=''" @click="openAccountDialog=true">
<div :title="refund.courseProjectNum" style="cursor: pointer;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" v-show="refund.courseProjectName !=''" @click="openAccountDialog=true">
<span>{{refund.courseProjectNum}}</span>
</div>
<el-button v-show="refund.courseProjectName==''" :disabled="refund.memberName==''" size="mini" type="text" @click="openAccountDialog=true"></el-button>

@ -29,7 +29,7 @@
<div style="cursor: pointer;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" :title="refund.rechargeTypeNum" v-show="refund.rechargeTypeName!=''">
<span>{{refund.rechargeTypeNum}}</span>
</div>
<el-button v-show="refund.rechargeTypeName" :disabled="refund.memberName==''" size="mini" type="text"></el-button>
<el-button v-show="refund.rechargeTypeName=='' " :disabled="refund.memberName==''" size="mini" type="text"></el-button>
</div>
</el-form-item>
<el-form-item prop="rechNumber" label="充值账户:">
@ -37,7 +37,7 @@
<div style="cursor: pointer;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" :title="refund.rechargeTypeName" v-show="refund.rechargeTypeName!=''">
<span>{{refund.rechargeTypeName}}</span>
</div>
<el-button v-show="refund.rechargeTypeName" :disabled="refund.memberName==''" size="mini" type="text"></el-button>
<el-button v-show="refund.rechargeTypeName==''" :disabled="refund.memberName==''" size="mini" type="text"></el-button>
</div>
</el-form-item>
<el-form-item prop="rechDate" label="账户余额:">

@ -213,7 +213,7 @@
<!-- fixed="right" -->
<template slot-scope="scope">
<el-button :disabled="scope.row.editNumber==1" icon="el-icon-delete" circle size="mini" type="primary" @click.stop="delPro(scope.row)"></el-button>
<!-- </el-tooltip> -->
</template>
</el-table-column>
</el-table>
@ -362,12 +362,11 @@ export default {
openList() {
this.$refs.orders.show();
},
clear(row, text) {
console.log(text);
let form = { ...row };
form[text] = [];
console.log(form);
this.list.splice(row.index, 1, form);
},
@ -400,7 +399,7 @@ export default {
form.spendMoney = form.cardOver;
form.discoutMoney =
(form.cardOver * (form.discount / 100)).toFixed(2) * 1;
form.giftSpendMoney =
(
(debtMoney - form.discoutMoney) *
@ -498,7 +497,7 @@ export default {
row.spendMoney = 0;
}
row.spendMoney = row.spendMoney * 1;
if (0 <= row.spendMoney * 1 > row.cardOver * 1) {
this.$message.info({
message: "支付金额不能大于可用金额!",
@ -539,7 +538,7 @@ export default {
console.log(spendMoney);
this.recForm.collectionRechargeAmount = spendNumber.toFixed(2) * 1;
this.recForm.collRecAmonnt = spendMoney.toFixed(2) * 1;
this.recForm.cashAmount =
(
this.recForm.collectionCashAmount +
@ -574,9 +573,9 @@ export default {
});
}
});
this.recListCopy = JSON.parse(JSON.stringify(rList));
this.list.forEach((item) => {
if (item.index != this.editProIndex) {
console.log(this.setRecList(item));
@ -656,14 +655,14 @@ export default {
});
}
},
openAddMember() {
this.$refs.addmember.show("添加");
},
getRowKeys(row) {
return row.index;
},
endEditMoney(row) {
let form = { ...row };
console.log(row);
@ -731,10 +730,8 @@ export default {
form.texts = item.label;
}
});
console.log(form);
}
this.list.splice(row.index, 1, form);
console.log(this.list)
},
goPayDebt() {
this.$refs.repayment.show(this.memberForm);
@ -888,7 +885,7 @@ export default {
}
form.memberName = this.memberForm.memberName;
form.mobilePhone = this.memberForm.mobilePhone;
if (form.courseAccountId == null) {
form.cashAmount = 0;
form.collectionAmount = 0;
@ -1001,7 +998,7 @@ export default {
// flag = false;
// }
});
if (
this.balance <=
(this.form.collectionCashAmount - sumMoney).toFixed(2) * 1 ||
@ -1070,7 +1067,7 @@ export default {
item.collectionCashAmount
).toFixed(2) * 1;
}
item.isAddition = this.isAddition;
if (this.isAddition == 1) {
item.additionDate = this.additionDate;
@ -1141,9 +1138,7 @@ export default {
},
openStaffRatio(row, index, text) {
this.editIndex = index;
// row.text.ratio=100;
this.$refs.staffratio.show(row, text);
},
staffratioData(v) {
let form = this.list[this.editIndex];
@ -1164,7 +1159,7 @@ export default {
payLists: this.payLists,
rechargeAccountList: [], //
};
this.list.push(list);
},
delPro(row) {
@ -1218,7 +1213,7 @@ export default {
rowClassName({ row, rowIndex }) {
row.index = rowIndex;
},
expandSelect: function (row, expandedRows) {
var that = this;
this.expandedRows = JSON.parse(JSON.stringify(expandedRows));
@ -1315,7 +1310,7 @@ export default {
callback: (action) => {},
});
}
let list = [];
this.list.forEach((itemList, index) => {
var itemLists = {
@ -1379,7 +1374,7 @@ export default {
itemList.cardAchievementTechnician,
cardAchievementZhonggong: itemList.cardAchievementZhonggong,
};
if (itemLists.courseAccountId == null) {
itemLists.cashAmount = 0;
itemLists.collectionAmount = 0;
@ -1519,7 +1514,7 @@ export default {
}
});
},
goBack() {
if (this.isAddition == 0) {
this.orderNumber = 1;
@ -1561,7 +1556,7 @@ export default {
item.ratio = 100;
delete item.state;
});
this.adminOptions = res.rows;
} else {
this.$alert(res.message, "加载员工提示", {
@ -1778,7 +1773,7 @@ export default {
created() {},
};
</script>
<style scoped>
.el-icon-edit-outline {
padding-left: 5px;
@ -1794,4 +1789,4 @@ export default {
.el-form-item {
margin-bottom: 5px;
}
</style>
</style>

@ -19,47 +19,54 @@
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<!-- -->
<el-button size="mini" type="primary" plain @click="handleClose"> </el-button>
<el-button size="mini" type="primary" @click="confirms()">
</el-button>
</span>
</el-dialog>
</template>
<script>
import { selectList, selectListType, QuerCompetent } from "@/api/eashier.js";
import { create } from "domain";
export default {
data() {
return {
dialogVisible: false, //
staffList: [],
ratios:100,
list: [], //
form: {}, //
openList: [],
staffText: "",
staffTitle: "",
staffListCopy: [],
ratioscontent:0,
len:0,
};
},
methods: {
handleClose() {
Object.assign(this.$data, this.$options.data.call(this));
},
add() {
this.list.push({});
this.changeStaff();
},
endEdit(row, index) {
if (row.ratio || row.ratio * 1 < 101) {
row.ratio = row.ratio * 1;
} else {
row.ratio = 0;
}
let number = 0;
this.list.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
});
this.list[0].ratio = 100 - number;
this.changeStaff();
},
editChange(e, index) {
let row = this.list[index];
let form = {};
@ -72,30 +79,9 @@ export default {
form.ratio = row.ratio;
}
this.list.splice(index, 1, form);
// console.log(this.openList);
console.log(this.openList);
this.changeStaff();
// this.openList.forEach((item) => {
// if (item.id == e) {
// item.ratio = this.staffLists[index].ratio;
// item.staffNames = item.brandNumber + "--" + item.staffName;
// this.staffLists.splice(index, 1, item);
// }
// });
// this.staffLists.forEach((item, indexs) => {
// if (index != indexs && v == item.id) {
// this.staffLists.splice(index, 1, { ratio: 0 });
// this.setRatio();
// this.$message.warning({ message: "" });
// }
// });
// let length = this.staffLists.length - 1;
// if (this.staffLists[length].id) {
// this.staffLists.push({ ratio: 0 });
// }
// this.confirms();
// this.changeStaff();
},
del() {
let index = this.list.length - 1;
@ -108,7 +94,6 @@ export default {
this.$nextTick(() => {
this.list = JSON.parse(JSON.stringify([]));
this.form = { ...form };
console.log(this.form)
this.staffText = text;
if (text == "zhonggongList") {
this.staffTitle = "美发师";
@ -136,41 +121,18 @@ export default {
});
this.dialogVisible = true;
this.getData();
this.list.push({});
console.log(this.list)
if(this.list.length==1){
this.list[0].ratio=100;
}
// else{
// this.list[0].ratio=this.ratioscontents;
// }
// this.len=this.list.length;
// else{
// this.list[0].ratio=this.ratioscontent
// }
// console.log(this.list)
// this.endEdit();
// console.log(form)
// this.endEdits();
this.changeStaff();
// console.log(this.list)
// this.list.push({});
// let number = 0;
// this.list.forEach((item, index) => {
// if (index != 0) {
// number += item.ratio * 1;
// }
// });
// if (this.list.length > 0) {
// this.list[0].ratio = (100 - number).toFixed(2) * 1;
// }
let number = 0;
this.list.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
});
if (this.list.length > 0) {
this.list[0].ratio = (100 - number).toFixed(2) * 1;
}
});
// console.log(this.list);
console.log(this.list);
}, 300);
},
changeStaff() {
@ -266,39 +228,13 @@ export default {
}
return true;
},
endEdit(row, index) {
if (row.ratio < 101 || row.ratio * 1 < 101) {
row.ratio = row.ratio * 1;
} else {
row.ratio = 0;
}
// console.log(row.ratio)
let number = 0;
this.list.forEach((item, index) => {
if (index != 0) {
number += item.ratio * 1;
}
});
this.list[0].ratio = 100 - number;
this.ratioscontent=this.list[0].ratio
this.changeStaff();
},
confirms() {
this.list.forEach((item, index) => {
var objectlength=Object.keys(item)
if (objectlength.length<= 1) {
this.list.splice(index, 1);
}
});
let flag = this.isRepeat(this.list, "brandNumber");
let form = {
text: this.staffText,
list: this.list,
};
this.ratioscontents=this.list[0].ratio
// console.log(flag);
console.log(flag);
if (flag) {
this.$emit("staffratioData", form);
this.dialogVisible = false;
@ -312,21 +248,9 @@ export default {
});
}
},
handleClose() {
//
this.list.forEach((item, index) => {
var objectlength=Object.keys(item)
if (objectlength.length<= 1) {
this.list.splice(index, 1);
}
});
// this.list.splice(this.len+1),
this.dialogVisible = false;
},
},
};
</script>
<style>
</style>
</style>

@ -16,7 +16,7 @@
</div>
</template>
<script>
import { storeMemberpage } from "@/api/storeManage.js";
import { storeMemberpages } from "@/api/storeManage.js";
export default {
data() {
return {
@ -89,13 +89,13 @@ export default {
},
//
async getData() {
storeMemberpage({ id: "" }).then((res) => {
storeMemberpages({ id: "" }).then((res) => {
var reg = /^(\d{3})\d{4}(\d{4})$/;
res.pageInfo.list.forEach((item) => {
res.data.forEach((item) => {
item.key = item.mobilePhone;
item.phone = item.mobilePhone.replace(reg, "$1****$2");
});
this.data = res.pageInfo.list;
this.data = res.data;
});
},
},

@ -78,7 +78,7 @@
</template>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column align="center" label="技师">
<el-table-column align="center" label="技师">
<el-table-column align="center" min-width="80" prop="footMassageChia" label="现付业绩">
<template slot-scope="scope">
{{scope.row.footMassageChia?scope.row.footMassageChia:'--'}}
@ -94,7 +94,7 @@
{{scope.row.marketChia?scope.row.marketChia:'--'}}
</template>
</el-table-column>
</el-table-column> -->
</el-table-column>
<el-table-column align="center" min-width="80" prop="tkyj" label="退款业绩">
<template slot-scope="scope">
{{scope.row.tkyj?scope.row.tkyj:'--'}}

@ -68,10 +68,10 @@
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入点钟卡付提成' v-model="form.cardClockComm" autocomplete="on"></el-input>
</el-form-item>
<el-form-item label="轮钟现付提成:">
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入轮钟现付提成' v-model="form.roundClock" autocomplete="on"></el-input>
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入轮钟现付提成' v-model="form.roundClockComm" autocomplete="on"></el-input>
</el-form-item>
<el-form-item label="轮钟卡付提成:">
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入轮钟卡付提成' v-model="form.cardrRoundClock" autocomplete="on"></el-input>
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入轮钟卡付提成' v-model="form.cardRoundClockComm" autocomplete="on"></el-input>
</el-form-item>
<el-form-item label="推销现付提成:" prop="marketComm">
<el-input class="form-width" :disabled="title=='明细'" oninput="this.value=this.value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3')" pattern="[0-9]*\.?[0-9]1{0,2}" placeholder='请输入推销现付提成' v-model="form.marketComm" autocomplete="on"></el-input>

@ -620,7 +620,7 @@ const router = new VueRouter({
component: () =>
import("../pages/statistics/memberRanking/memberRanking.vue"),
meta: {
title: "会员排行榜",
title: "员工业绩提成表",
index: "memberRanking"
}
},
@ -785,7 +785,7 @@ const router = new VueRouter({
path: "/transferstore",
component: () => import("../pages/storeManage/transferStore/index"), //会员转门店
meta: {
title: "会员转门店",
title: "疗程转门店",
index: "transferstore"
}
},

Loading…
Cancel
Save