充值页面字符修改

master
十七 4 years ago
parent 280a76982a
commit 936e971144

File diff suppressed because it is too large Load Diff

@ -1,327 +1,327 @@
<template> <template>
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="detailDialog" width="80%" append-to-body :before-close="handleClose"> <el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="detailDialog" width="80%" append-to-body :before-close="handleClose">
<!-- 明细 --> <!-- 明细 -->
<div class="flex justify-start align-start flex-wrap padding-top"> <div class="flex justify-start align-start flex-wrap padding-top">
<el-form :inline="true" :model="form" ref="form" label-width="80px"> <el-form :inline="true" :model="form" ref="form" label-width="80px">
<el-form-item label="单号:"> <el-form-item label="单号:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.rechargeNum }}</span> <span>{{ form.rechargeNum }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="单据日期:"> <el-form-item label="单据日期:">
<div class="form-width-sm text-cut"> <div class="form-width-sm text-cut">
{{ form.rechargeDate }} {{ form.rechargeDate }}
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="名字:"> <el-form-item label="名字:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.memberName }}</span> <span>{{ form.memberName }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="手机号码:"> <el-form-item label="手机号码:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.mobilePhone }}</span> <span>{{ form.mobilePhone }}</span>
</div> </div>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item label="充值方式:"> <el-form-item label="充值方式:">
<div class="form-width-sm "> <div class="form-width-sm ">
<el-tag v-if="form.liftType==0"></el-tag> <el-tag v-if="form.liftType==0"></el-tag>
<el-tag v-if="form.liftType==1"></el-tag> <el-tag v-if="form.liftType==1"></el-tag>
<el-tag v-if="form.liftType==2"></el-tag> <el-tag v-if="form.liftType==2"></el-tag>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="充前类别:"> <el-form-item label="充前类别:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.rawRechargeTypeName }}</span> <span>{{ form.rawRechargeTypeName }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="充值类别:"> <el-form-item label="充值类别:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.rechargeTypeName }}</span> <span>{{ form.rechargeTypeName }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="标准金额:"> <el-form-item label="标准金额:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.rechargeAmount }}</span> <span>{{ form.rechargeAmount }}</span>
</div> </div>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item label="充前金额:"> <el-form-item label="充前金额:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.beforeMoney }}</span> <span>{{ form.beforeMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="充后金额:"> <el-form-item label="充后金额:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.afterMoney }}</span> <span>{{ form.afterMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="充前赠送:"> <el-form-item label="充前赠送:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.giftBeforeMoney }}</span> <span>{{ form.giftBeforeMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="充后赠送:"> <el-form-item label="充后赠送:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.giftAfterMoney }}</span> <span>{{ form.giftAfterMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item label="欠款:"> <el-form-item label="欠款:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.debtMoney }}</span> <span>{{ form.debtMoney }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-show="form.collectionIntegralAmount != 0" label="积分支付:"> <el-form-item v-show="form.collectionIntegralAmount != 0" label="积分支付:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.collectionIntegralAmount }}</span> <span>{{ form.collectionIntegralAmount }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="实付金额金额:"> <el-form-item label="实付金额:">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.collectionCashAmount }}</span> <span>{{ form.collectionCashAmount }}</span>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="补单日期:" v-show="form.isAddition == 1"> <el-form-item label="补单日期:" v-show="form.isAddition == 1">
<div class="form-width-sm"> <div class="form-width-sm">
<span>{{ form.additionDate }}</span> <span>{{ form.additionDate }}</span>
</div> </div>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item label="说明:"> <el-form-item label="说明:">
<span>{{ form.description }}</span> <span>{{ form.description }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="width:280px" class="border-radius-10 border margin-right-xs bg-white padding-xs"> <div style="width:280px" class="border-radius-10 border margin-right-xs bg-white padding-xs">
<el-table :data=" form.payLists" :summary-method="getSummaries" show-summary> <el-table :data=" form.payLists" :summary-method="getSummaries" show-summary>
<el-table-column align="center" prop="payName" label="支付方式" min-width="150"></el-table-column> <el-table-column align="center" prop="payName" label="支付方式" min-width="150"></el-table-column>
<el-table-column align="center" prop="payMoney" label="支付金额" width="120"></el-table-column> <el-table-column align="center" prop="payMoney" label="支付金额" width="120"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<br /> <br />
<!-- <el-collapse v-model="activeNames" @change="collChange($event)"> <!-- <el-collapse v-model="activeNames" @change="collChange($event)">
<el-collapse-item title="员工/门店管理层/高管业绩" name="员工"> --> <el-collapse-item title="员工/门店管理层/高管业绩" name="员工"> -->
<div class="flex justify-center align-start flex-wrap padding-top"> <div class="flex justify-center align-start flex-wrap padding-top">
<staffsles ref="staffsles" @staffslesData="staffslesData"></staffsles> <staffsles ref="staffsles" @staffslesData="staffslesData"></staffsles>
<admin ref="admin" @adminData="adminData"></admin> <admin ref="admin" @adminData="adminData"></admin>
<manager ref="manager" @managerData="managerData"></manager> <manager ref="manager" @managerData="managerData"></manager>
</div> </div>
<!-- </el-collapse-item> <!-- </el-collapse-item>
</el-collapse> --> </el-collapse> -->
<span slot="footer" class="dialog-footer" v-if="title=='明细'"> <span slot="footer" class="dialog-footer" v-if="title=='明细'">
<el-button size="mini" type="primary" @click="detailDialog=false"></el-button> <el-button size="mini" type="primary" @click="detailDialog=false"></el-button>
</span> </span>
<span v-else slot="footer" class="dialog-footer"> <span v-else slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" plain @click="cancel()"> </el-button> <el-button size="mini" type="primary" plain @click="cancel()"> </el-button>
<el-button v-if="form.isCancel==0" size="mini" type="primary" @click="subStaffRatio()"> </el-button> <el-button v-if="form.isCancel==0" size="mini" type="primary" @click="subStaffRatio()"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { recEditStaff, selectOne } from "@/api/eashier.js"; import { recEditStaff, selectOne } from "@/api/eashier.js";
import admin from "@/components/staffList/admin/index"; import admin from "@/components/staffList/admin/index";
import manager from "@/components/staffList/manager/index"; import manager from "@/components/staffList/manager/index";
import staffsles from "@/components/staffList/staff/index"; import staffsles from "@/components/staffList/staff/index";
export default { export default {
components: { components: {
staffsles, staffsles,
manager, manager,
admin, admin,
}, },
data() { data() {
return { return {
detailDialog: false, detailDialog: false,
activeNames: "员工", activeNames: "员工",
title: "", // title: "", //
form: {}, // form: {}, //
}; };
}, },
methods: { methods: {
// //
handleClose() { handleClose() {
this.form = Object.assign({}); this.form = Object.assign({});
this.$refs.form.clearValidate(); this.$refs.form.clearValidate();
this.detailDialog = false; this.detailDialog = false;
}, },
collChange(e) { collChange(e) {
if (e.indexOf("员工")) { if (e.indexOf("员工")) {
this.setStaff(); this.setStaff();
} }
}, },
setStaff() { setStaff() {
var that = this; var that = this;
setTimeout(() => { setTimeout(() => {
console.log(that.$refs.staffsles); console.log(that.$refs.staffsles);
that.$refs.staffsles.show(that.form.entities); that.$refs.staffsles.show(that.form.entities);
that.$refs.admin.show(that.form.adminList); that.$refs.admin.show(that.form.adminList);
that.$refs.manager.show(that.form.managerList); that.$refs.manager.show(that.form.managerList);
}, 800); }, 800);
}, },
// //
staffslesData(v) { staffslesData(v) {
this.form.entities = [...v]; this.form.entities = [...v];
}, },
// //
managerData(v) { managerData(v) {
this.form.managerList = [...v]; this.form.managerList = [...v];
}, },
// //
adminData(v) { adminData(v) {
this.form.adminList = [...v]; this.form.adminList = [...v];
}, },
cancel() { cancel() {
this.detailDialog = false; this.detailDialog = false;
this.$emit("detailData"); this.$emit("detailData");
}, },
// //
show(form, text) { show(form, text) {
if (text == "明细") { if (text == "明细") {
this.title = text; this.title = text;
} else { } else {
this.title = "明细/修改"; this.title = "明细/修改";
} }
this.detailDialog = true; this.detailDialog = true;
this.getData(form); this.getData(form);
}, },
getData(row) { getData(row) {
this.form = { this.form = {
...row, ...row,
}; };
this.form.entities.forEach((item) => { this.form.entities.forEach((item) => {
item.staffName = item.saleStaffName; item.staffName = item.saleStaffName;
item.editStaffRatioShow = false; item.editStaffRatioShow = false;
item.id = item.saleStaffId; item.id = item.saleStaffId;
item.identityCard = item.saleIdentityCard; item.identityCard = item.saleIdentityCard;
item.ratio = item.saleRatio; item.ratio = item.saleRatio;
item.staffNames = item.brandNumber + "--" + item.staffName; item.staffNames = item.brandNumber + "--" + item.staffName;
}); });
selectOne({ type: 1, orderId: row.id }).then((res) => { selectOne({ type: 1, orderId: row.id }).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
let managerList = []; let managerList = [];
let adminList = []; let adminList = [];
res.rows.forEach((item) => { res.rows.forEach((item) => {
if (item.staffType == 0) { if (item.staffType == 0) {
item.staffNames = item.brandNumber + "--" + item.staffName; item.staffNames = item.brandNumber + "--" + item.staffName;
managerList.push(item); managerList.push(item);
} }
if (item.staffType == 1) { if (item.staffType == 1) {
item.staffNames = item.brandNumber + "--" + item.staffName; item.staffNames = item.brandNumber + "--" + item.staffName;
adminList.push(item); adminList.push(item);
} }
}); });
if (managerList.length == 0) { if (managerList.length == 0) {
managerList.push({ ratio: 100 }); managerList.push({ ratio: 100 });
} }
if (adminList.length == 0) { if (adminList.length == 0) {
adminList.push({ ratio: 100 }); adminList.push({ ratio: 100 });
} }
if (this.form.entities.length == 0) { if (this.form.entities.length == 0) {
this.form.entities.push({ ratio: 100 }); this.form.entities.push({ ratio: 100 });
} }
this.form.managerList = managerList; this.form.managerList = managerList;
this.form.adminList = adminList; this.form.adminList = adminList;
this.setStaff(); this.setStaff();
} else { } else {
this.$alert(res.message, "加载门店高管", { this.$alert(res.message, "加载门店高管", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
// //
// //
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = "合计"; sums[index] = "合计";
return; return;
} }
const values = data.map((item) => Number(item[column.property])); const values = data.map((item) => Number(item[column.property]));
if (column.property == "payMoney") { if (column.property == "payMoney") {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return prev + curr; return prev + curr;
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}, 0); }, 0);
sums[index] += " "; sums[index] += " ";
} else { } else {
sums[index] = "--"; sums[index] = "--";
} }
}); });
return sums; return sums;
}, },
subStaffRatio() { subStaffRatio() {
let staffLists = []; let staffLists = [];
this.form.entities.forEach((item) => { this.form.entities.forEach((item) => {
let items = { let items = {
ratio: item.ratio, ratio: item.ratio,
id: item.id, id: item.id,
identityCard: item.identityCard, identityCard: item.identityCard,
staffName: item.staffName, staffName: item.staffName,
brandNumber: item.brandNumber, brandNumber: item.brandNumber,
}; };
staffLists.push(items); staffLists.push(items);
}); });
let salesmens = []; let salesmens = [];
this.form.managerList.forEach((item) => { this.form.managerList.forEach((item) => {
if (item.id) { if (item.id) {
item.staffType = 0; item.staffType = 0;
salesmens.push(item); salesmens.push(item);
} }
}); });
this.form.adminList.forEach((item) => { this.form.adminList.forEach((item) => {
if (item.id) { if (item.id) {
item.staffType = 1; item.staffType = 1;
salesmens.push(item); salesmens.push(item);
} }
}); });
let form = { let form = {
rechargeDate: this.form.rechargeDate, rechargeDate: this.form.rechargeDate,
collectionAmount: this.form.collectionAmount, collectionAmount: this.form.collectionAmount,
rechargeAmount: this.form.rechargeAmount, rechargeAmount: this.form.rechargeAmount,
typeRatio: this.form.typeRatio, typeRatio: this.form.typeRatio,
id: this.form.id, id: this.form.id,
staffLists: staffLists, staffLists: staffLists,
collectionCashAmount: this.form.collectionCashAmount, collectionCashAmount: this.form.collectionCashAmount,
collectionIntegralAmount: this.form.collectionIntegralAmount, collectionIntegralAmount: this.form.collectionIntegralAmount,
}; };
form.salesmens = salesmens; form.salesmens = salesmens;
recEditStaff(form).then((res) => { recEditStaff(form).then((res) => {
if (res.code == "000000") { if (res.code == "000000") {
this.$message.success({ this.$message.success({
message: res.message, message: res.message,
}); });
this.detailDialog = false; this.detailDialog = false;
this.$emit("detailData"); this.$emit("detailData");
} else { } else {
this.$alert(res.message, "提示", { this.$alert(res.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => {},
}); });
} }
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
</style> </style>

Loading…
Cancel
Save