最近全部求改内容
parent
010aab9a17
commit
c25170177d
@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-collapse style="width: 100%" v-model="recColl" accordion>
|
||||
<el-collapse-item title="项目:" :name="1">
|
||||
<el-table :data="list" max-height="350" @row-dblclick="rowClick" stripe>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="courseProjectName" label="项目名称"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="price" label="项目单价"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseRestCount" label="剩余次数"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseRestPrice" label="剩余金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseConsumeCount" label="可用次数"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseConsumePrice" label="可用金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="105" align="center" prop="endTime" label="到期日期"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="storeName" label="所属门店"></el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="不可用项目:" :name="2">
|
||||
<el-table :data="lists" max-height="350" stripe>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="courseProjectName" label="项目名称"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="price" label="项目单价"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseRestCount" label="剩余次数"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseRestPrice" label="剩余金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseConsumeCount" label="可用次数"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseConsumePrice" label="可用金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="105" align="center" prop="endTime" label="到期日期"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="75" align="center" prop="storeName" label="所属门店"></el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { couAccountList, couAccountListDisable } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
recColl: 1,
|
||||
list: [], //主数组
|
||||
lists: [],
|
||||
form: {}, //主对象
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
|
||||
if (row.courseConsumeCount > 0) {
|
||||
row.courseAccountId = row.id;
|
||||
if (row.courseConsumeCount == 1) {
|
||||
this.list.forEach((item) => {
|
||||
if (row.id == item.id) {
|
||||
item.courseRestCount = 0;
|
||||
item.courseConsumeCount = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$emit("courseData", row);
|
||||
} else {
|
||||
this.$message.warning({ message: "可用次数小于1" });
|
||||
}
|
||||
},
|
||||
//组件传值
|
||||
show(form) {
|
||||
|
||||
if (form) {
|
||||
this.form = { ...form };
|
||||
this.getData();
|
||||
} else {
|
||||
this.list = [];
|
||||
}
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
var ids = {
|
||||
memberId: this.form.id,
|
||||
};
|
||||
couAccountList(ids).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "查询会员疗程", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
couAccountListDisable(ids).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.lists = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "查询会员疗程", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :visible.sync="dialogVisible" title="收银列表" width="75%">
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<el-date-picker @change="getData" style="width: 200px" v-model="month" format="yyyy年 MM月" type="month" placeholder="选择日期"></el-date-picker>
|
||||
<selec v-if="headOffice==1" ref="selec" @selecData="selecData"></selec>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-input size="medium" class="form-width-ms" v-model="queryForm.cashNum" placeholder="输入要查询的单据号" clearable></el-input>
|
||||
<el-input size="medium" class="form-width-ms" v-model="queryForm.memberName" placeholder="输入要查询的会员名字" clearable></el-input>
|
||||
<el-input maxlength="11" class="form-width-ms" size="medium" v-model="queryForm.mobilePhone" placeholder="输入要查询手机号" oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*" clearable></el-input>
|
||||
<el-button size="mini" type="success" @click="getData">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table class="margin-top-xs" :data="list" max-height="550" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
|
||||
<el-table-column align="center" prop="tag" label="状态" min-width="75">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.isCancel == 1 ? 'danger' : 'success'">
|
||||
{{ scope.row.isCancel == 1?'已作废':'正常' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="cashNum" label="收款单号" min-width="120"></el-table-column>
|
||||
<el-table-column align="center" prop="cashDate" label="收款时间" show-overflow-tooltip min-width="105"></el-table-column>
|
||||
<el-table-column align="center" prop="isAddition" label="是否补单" min-width="75">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.isAddition==1?'是':'否'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="cashNumber" label="类型" min-width="75">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.cashNumber==1?'会员':'散客'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="memberName" label="姓名" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.memberName ? scope.row.memberName : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="mobilePhone" label="手机号码" min-width="110"></el-table-column>
|
||||
<el-table-column align="center" prop="" label="项目数量" min-width="75">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.projectList?scope.row.projectList.length:0}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="" label="人数" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<span class="text-blue">{{scope.row.man?(' 男 '+scope.row.man):''}}</span>
|
||||
<span class="text-red">{{scope.row.woman?(' 女 '+scope.row.woman):''}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="inputBy" label="录单人" show-overflow-tooltip min-width="80"></el-table-column>
|
||||
<el-table-column align="center" prop="storeName" label="所属门店" show-overflow-tooltip min-width="100"></el-table-column>
|
||||
<el-table-column align="center" label="明细" width="76" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" plain @click="edit(scope.row,'修改')">明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="作废" width="76" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="scope.row.isCancel === 1" type="primary" size="mini" @click="edit(scope.row,'作废')" v-role="5002002">作废</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="打印" width="76" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="scope.row.isCancel === 1" type="success" size="mini" @click="print(scope.row)" v-role="5002003">打印</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination align="left" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryForm.pageNum" :page-sizes="[10, 20, 30, 40, 50]" :page-size="queryForm.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="mini" @click="dialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
<printform ref="printform"></printform>
|
||||
<editform ref="editform" @editformData="getData"></editform>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import printform from "./printform";
|
||||
import editform from "./editform";
|
||||
import { cashList, cashsignature } from "@/api/eashier.js";
|
||||
import { organizations } from "@/api/storeManage.js";
|
||||
import selec from "@/components/store/select/index";
|
||||
import { partten } from "@/utils/partten/index";
|
||||
export default {
|
||||
components: { printform, editform, selec },
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false, //弹窗开关
|
||||
form: {}, //主对象
|
||||
list: [], //主数组
|
||||
title: "", //弹窗标题
|
||||
total: 0, //分页总条数
|
||||
headOffice: sessionStorage.getItem("headOffice") * 1,
|
||||
queryForm: {
|
||||
//查询对象
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
type: 1,
|
||||
},
|
||||
printForm: {},
|
||||
month: "",
|
||||
options: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selecData(v) {
|
||||
this.queryForm.storeList = v;
|
||||
this.getData();
|
||||
},
|
||||
edit(row, text) {
|
||||
this.$refs.editform.show(row, text);
|
||||
},
|
||||
|
||||
// 打印方法
|
||||
print(row) {
|
||||
this.printForm = row;
|
||||
this.printForm.printDate = new Date();
|
||||
this.printForm.telephone = JSON.parse(
|
||||
sessionStorage.getItem("storeInfo")
|
||||
).telephone;
|
||||
this.printForm.storeName = JSON.parse(
|
||||
sessionStorage.getItem("storeInfo")
|
||||
).storeName;
|
||||
cashsignature({
|
||||
cashNum: row.cashNum,
|
||||
}).then((res) => {
|
||||
if (res.code == "000000" && res.data) {
|
||||
this.printForm.signature =
|
||||
partten.https + res.data.filePath + "/" + res.data.fileName;
|
||||
}
|
||||
this.$refs.printform.show(this.printForm);
|
||||
console.log(this.printForm)
|
||||
});
|
||||
},
|
||||
handleSizeChange(v) {
|
||||
this.queryForm.pageSize = v;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(v) {
|
||||
this.queryForm.pageNum = v;
|
||||
this.getData();
|
||||
},
|
||||
//组件传值
|
||||
show(month) {
|
||||
this.month = new Date();
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
if (this.headOffice == 1) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.selec.show();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//获取数据
|
||||
async getData() {
|
||||
this.queryForm.selectDate = this.formatTime(this.month, "YYYYMM");
|
||||
cashList(this.queryForm).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.list = res.pageInfo.list;
|
||||
this.total = res.pageInfo.total;
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -0,0 +1,615 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag append-to-body :visible.sync="dialogVisible" :title="title" width="80%" :before-close="handleClose">
|
||||
<div class="detailDivFrom">
|
||||
<el-form :model="form" :inline="true" label-width="80px">
|
||||
<el-form-item label="单 号:">
|
||||
<div class="activeFormDiv">
|
||||
{{ form.cashNum }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="时 间:">
|
||||
<div class="activeFormDiv" style="width: 150px">
|
||||
{{ form.cashDate }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="名 字:">
|
||||
<div class="activeFormDiv">
|
||||
{{ form.memberName }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码:">
|
||||
<div class="activeFormDiv">
|
||||
{{ form.mobilePhone }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="补单日期:" v-show="form.isAddition == 1">
|
||||
<div class="activeFormDiv">
|
||||
{{ form.additionDate }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex justify-start align-start" style="width:100%">
|
||||
<div class="into-table-width">
|
||||
<el-table :data="list" ref="list" @row-click="rowClick" max-height="450" row-key="index">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<div class="flex justify-start align-center flex-wrap">
|
||||
<el-form inline class="margin-top">
|
||||
<el-form-item label='美发师'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.zhonggongLists" clearable @clear="clear(props.row,'zhonggongList')" placeholder="请选择" @change="handleChange($event,props.row,'zhonggongList')">
|
||||
<el-option v-for="(item,index) in options" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'zhonggongList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label='美容师'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.largeLists" clearable @clear="clear(props.row,'largeList')" placeholder="请选择" @change="handleChange($event,props.row,'largeList')">
|
||||
<el-option v-for="(item,index) in options" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'largeList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label='技师'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.technicianLists" clearable @clear="clear(props.row,'technicianList')" placeholder="请选择" @change="handleChange($event,props.row,'technicianList')">
|
||||
<el-option v-for="(item,index) in options" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'technicianList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label='助理'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.smallLists" clearable @clear="clear(props.row,'smallList')" placeholder="请选择" @change="handleChange($event,props.row,'smallList')">
|
||||
<el-option v-for="(item,index) in options" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'smallList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label='高管'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.managerLists" clearable @clear="clear(props.row,'managerList')" placeholder="请选择" @change="handleChange($event,props.row,'managerList')">
|
||||
<el-option v-for="(item,index) in managerOptions" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'managerList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label='管理层'>
|
||||
<div class="flex align-center form-width-m">
|
||||
<el-select filterable default-first-option v-model="props.row.adminLists" clearable @clear="clear(props.row,'adminList')" placeholder="请选择" @change="handleChange($event,props.row,'adminList')">
|
||||
<el-option v-for="(item,index) in adminOptions" :key="index" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="el-icon-edit-outline text-xs text-cyan" @click.stop="openStaffRatio(props.row,props.$index,'adminList')"></div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="border-radius-10 border margin-left-xs bg-white padding-xs" style="width:700px" v-if="props.row.rechargeConsumeList.length!=0">
|
||||
<el-table :data="props.row.rechargeConsumeList" @row-click="rowClick" :summary-method="getSummaries" show-summary max-height="350">
|
||||
<el-table-column align="center" prop="rechargeTypeName" label="卡付名称" min-width="130"></el-table-column>
|
||||
<el-table-column align="center" prop="cardRestMoney" label="剩余金额" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="spendMoney" label="本次支付" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="discoutMoney" label="抵扣支付" width="90"></el-table-column>
|
||||
<el-table-column align="center" prop="cardGiftMoney" label="剩余赠送" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="accountGiftSpendMoney" label="赠送支付" width="100"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="projectNum" label="项目编码"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="center" prop="projectName" label="项目名称"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="transactionPrice" label="项目金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="" label="支付类型">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip v-if="scope.row.courseAccountId!=null" class="item" effect="dark" content="疗程付" placement="top">
|
||||
<div>{{scope.row.courseAccountId!=null?'疗程付':'卡付/现付'}}</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" effect="dark" :content="scope.row.rechargeConsumeLists" placement="top" v-else-if="scope.row.rechargeConsumeList.length!=0">
|
||||
<span>卡付</span>
|
||||
</el-tooltip>
|
||||
<div v-else>现付</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" 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 min-width="75" align="center" prop="collectionAmount" label="性别">
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.sex*1==0?'男':'女'}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="remark" label="备注"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class=' border-radius-10 border margin-left-xs bg-white padding-xs' style="width:280px" v-if="list.length!=0">
|
||||
<el-table :data="form.payLists" :summary-method="getSummaries" show-summary>
|
||||
<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="本次支付"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<staffratio ref="staffratio" @staffratioData="staffratioData"></staffratio>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer" v-if="title=='明细'">
|
||||
<el-button type="primary" plain size="mini" @click="dialogVisible = false">关闭</el-button>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer" v-else>
|
||||
<el-button type="primary" plain size="mini" @click="handleClose">取消</el-button>
|
||||
<el-button :disabled="form.isCancel==1" type="primary" size="mini" @click="confirm()">{{title=='作废'?title:"确定"}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
selectList,
|
||||
cashcancel,
|
||||
cashEditStaff,
|
||||
QuerCompetent,
|
||||
selectListType,
|
||||
selectOne,
|
||||
} from "@/api/eashier.js";
|
||||
import staffratio from "../staffratio";
|
||||
export default {
|
||||
components: { staffratio },
|
||||
data() {
|
||||
return {
|
||||
form: {}, //主对象
|
||||
list: [], //主数组
|
||||
dialogVisible: false, //弹窗开关
|
||||
title: "", //弹窗标题
|
||||
options: [],
|
||||
editIndex: -1,
|
||||
adminOptions: [],
|
||||
managerOptions: [],
|
||||
expand: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//关闭弹窗前的回调方法
|
||||
handleClose() {
|
||||
console.log(123);
|
||||
Object.assign(this.$data, this.$options.data.call(this));
|
||||
this.form = {};
|
||||
this.list = [];
|
||||
this.dialogVisible = false;
|
||||
this.$emit("editformData");
|
||||
},
|
||||
clear(row, text) {
|
||||
console.log(row);
|
||||
console.log(text);
|
||||
let form = { ...row };
|
||||
form[text] = [];
|
||||
console.log(form);
|
||||
this.list.splice(row.index, 1, form);
|
||||
},
|
||||
openStaffRatio(row, index, text) {
|
||||
this.editIndex = index;
|
||||
this.$refs.staffratio.show(row, text);
|
||||
},
|
||||
staffratioData(v) {
|
||||
let form = this.list[this.editIndex];
|
||||
let texts = v.text + "s";
|
||||
form[v.text] = v.list;
|
||||
form[texts] = v.list[0].label;
|
||||
this.list.splice(this.editIndex, 1, form);
|
||||
},
|
||||
handleChange(data, row, text) {
|
||||
let form = { ...row };
|
||||
console.log(data);
|
||||
|
||||
if (text == "managerList") {
|
||||
console.log(this.managerOptions);
|
||||
this.managerOptions.forEach((item, index) => {
|
||||
if (item.id == data) {
|
||||
item.ratio = 100;
|
||||
form[text] = [];
|
||||
form[text].push(item);
|
||||
form.texts = item.label;
|
||||
}
|
||||
});
|
||||
} else if (text == "adminList") {
|
||||
this.adminOptions.forEach((item, index) => {
|
||||
if (item.id == data) {
|
||||
item.ratio = 100;
|
||||
form[text] = [];
|
||||
form[text].push(item);
|
||||
form.texts = item.label;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.options.forEach((item, index) => {
|
||||
if (item.id == data) {
|
||||
item.ratio = 100;
|
||||
form[text] = [];
|
||||
form[text].push(item);
|
||||
form.texts = item.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(form);
|
||||
this.list.splice(row.index, 1, form);
|
||||
// this.$refs.list.toggleRowExpansion(row);
|
||||
},
|
||||
//点击选中
|
||||
rowClick(row) {
|
||||
this.$refs.list.toggleRowExpansion(row);
|
||||
},
|
||||
//组件传值
|
||||
show(form, title) {
|
||||
Object.assign(this.$data, this.$options.data.call(this));
|
||||
console.log(form);
|
||||
this.title = title;
|
||||
this.list = [];
|
||||
this.form = { ...form };
|
||||
this.list = form.projectList;
|
||||
this.list.forEach((item, index) => {
|
||||
item.rechargeConsumeList.forEach((items) => {
|
||||
items.cardOver = items.cardConsumeMoney;
|
||||
items.cardGiftOver = items.giftConsumeMoney;
|
||||
if (items.type == 1) {
|
||||
items.discoutMoney =
|
||||
(items.spendMoney / (items.discount / 100)).toFixed(2) * 1;
|
||||
} else {
|
||||
items.discoutMoney = items.spendMoney;
|
||||
}
|
||||
if (item.rechargeConsumeList.length != 0) {
|
||||
item.rechargeConsumeLists =
|
||||
"卡付: " + items.rechargeTypeName + " - " + items.spendMoney;
|
||||
} else {
|
||||
item.rechargeConsumeLists = "无卡付";
|
||||
}
|
||||
});
|
||||
item.payLists.forEach((items) => {
|
||||
if (item.payLists.length != 0) {
|
||||
item.payListss = "现付 :" + items.payName + " - " + items.payMoney;
|
||||
} else {
|
||||
item.payListss = "无现付";
|
||||
}
|
||||
});
|
||||
|
||||
item.index = index;
|
||||
|
||||
if (item.largeList.length != 0) {
|
||||
item.largeLists =
|
||||
item.largeList[0].brandNumber + "-" + item.largeList[0].staffName;
|
||||
} else {
|
||||
item.largeLists = "";
|
||||
}
|
||||
if (item.zhonggongList.length != 0) {
|
||||
item.zhonggongLists =
|
||||
item.zhonggongList[0].brandNumber +
|
||||
"-" +
|
||||
item.zhonggongList[0].staffName;
|
||||
} else {
|
||||
item.zhonggongLists = "";
|
||||
}
|
||||
if (item.smallList.length != 0) {
|
||||
item.smallLists =
|
||||
item.smallList[0].brandNumber + "-" + item.smallList[0].staffName;
|
||||
} else {
|
||||
item.smallLists = "";
|
||||
}
|
||||
if (item.technicianList.length != 0) {
|
||||
item.technicianLists =
|
||||
item.technicianList[0].brandNumber +
|
||||
"-" +
|
||||
item.technicianList[0].staffName;
|
||||
} else {
|
||||
item.technicianLists = "";
|
||||
}
|
||||
|
||||
selectOne({ type: 1, orderId: item.cashId }).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
let managerList = [];
|
||||
let adminList = [];
|
||||
res.rows.forEach((item) => {
|
||||
if (item.staffType == 0) {
|
||||
item.staffNames = item.brandNumber + "--" + item.staffName;
|
||||
managerList.push(item);
|
||||
}
|
||||
if (item.staffType == 1) {
|
||||
item.staffNames = item.brandNumber + "--" + item.staffName;
|
||||
adminList.push(item);
|
||||
}
|
||||
});
|
||||
if (managerList.length == 0) {
|
||||
managerList.push({ ratio: 100 });
|
||||
}
|
||||
if (adminList.length == 0) {
|
||||
adminList.push({ ratio: 100 });
|
||||
}
|
||||
|
||||
item.managerList = managerList;
|
||||
item.adminList = adminList;
|
||||
|
||||
adminList.forEach((items, index) => {
|
||||
if (items.id) {
|
||||
if (index == 0) {
|
||||
item.adminLists = items.brandNumber + "-" + items.staffName;
|
||||
}
|
||||
} else {
|
||||
item.adminLists = "";
|
||||
}
|
||||
});
|
||||
managerList.forEach((items, index) => {
|
||||
if (items.id) {
|
||||
if (index == 0) {
|
||||
item.managerLists = items.brandNumber + "-" + items.staffName;
|
||||
}
|
||||
} else {
|
||||
item.managerLists = "";
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$alert(res.message, "加载门店高管", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
selectListType({ type: 0, storeId: this.form.storeId }).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
res.rows.forEach((item) => {
|
||||
delete item.state;
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
item.ratio = 100;
|
||||
});
|
||||
this.adminOptions = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "加载员工提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
QuerCompetent({
|
||||
type: 0,
|
||||
pageSize: 999,
|
||||
storeId: this.form.storeId,
|
||||
}).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
res.pageInfo.list.forEach((item) => {
|
||||
delete item.state;
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
item.ratio = 100;
|
||||
});
|
||||
this.managerOptions = res.pageInfo.list;
|
||||
console.log(this.managerOptions);
|
||||
} else {
|
||||
this.$alert(res.message, "加载高管提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
selectList({ storeId: this.form.storeId }).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
res.rows.forEach((item) => {
|
||||
delete item.state;
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
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) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//确定返回方法
|
||||
confirm() {
|
||||
if (this.title == "作废") {
|
||||
var list = [];
|
||||
this.list.forEach((item) => {
|
||||
if (item.payLists != []) {
|
||||
item.payLists.forEach((items) => {
|
||||
delete items.docId;
|
||||
delete items.id;
|
||||
delete items.type;
|
||||
});
|
||||
}
|
||||
var items = {
|
||||
projectId: item.id,
|
||||
id: item.cashId,
|
||||
memberId: item.memberId,
|
||||
memberName: item.memberName,
|
||||
courseAccountId: item.courseAccountId,
|
||||
mobilePhone: item.mobilePhone,
|
||||
menberIdentityCard: item.menberIdentityCard,
|
||||
cashNum: item.cashNum,
|
||||
cashDate: item.cashDate,
|
||||
storeId: item.storeId,
|
||||
numberTimes: 1,
|
||||
storeName: item.storeName,
|
||||
projectName: item.projectName,
|
||||
transactionPrice: item.transactionPrice,
|
||||
payLists: item.payLists,
|
||||
rechargeAccountList: item.rechargeConsumeList,
|
||||
collectionCashAmount: item.collectionCashAmount,
|
||||
largeList: item.largeList,
|
||||
zhonggongList: item.zhonggongList,
|
||||
smallList: item.smallList,
|
||||
technicianList: item.technicianList,
|
||||
};
|
||||
list.push(items);
|
||||
});
|
||||
cashcancel(list).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.$message.success({
|
||||
message: res.message,
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.$emit("editformData");
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var list = [];
|
||||
this.list.forEach((item) => {
|
||||
delete item.index;
|
||||
let salesmens = [];
|
||||
console.log(item);
|
||||
item.managerList.forEach((items) => {
|
||||
if (items.id) {
|
||||
items.staffType = 0;
|
||||
salesmens.push(items);
|
||||
}
|
||||
});
|
||||
item.adminList.forEach((items) => {
|
||||
if (items.id) {
|
||||
items.staffType = 1;
|
||||
salesmens.push(items);
|
||||
}
|
||||
});
|
||||
item.salesmens = salesmens;
|
||||
var item2 = {
|
||||
salesmens: item.salesmens,
|
||||
id: item.cashId,
|
||||
projectId: item.id,
|
||||
cashDate: item.cashDate,
|
||||
largeList: item.largeList,
|
||||
zhonggongList: item.zhonggongList,
|
||||
smallList: item.smallList,
|
||||
technicianList: item.technicianList,
|
||||
courseAccountId: item.courseAccountId,
|
||||
salesAchievement: item.salesAchievement,
|
||||
salesCommission: item.salesCommission,
|
||||
cardSalesAchievement: item.cardSalesAchievement,
|
||||
cardSalesCommission: item.cardSalesCommission,
|
||||
achievementLarge: item.achievementLarge,
|
||||
achievementZhonggong: item.achievementZhonggong,
|
||||
achievementTechnician: item.achievementTechnician,
|
||||
achievementSmall: item.achievementSmall,
|
||||
commissionLarge: item.commissionLarge,
|
||||
commissionZhonggong: item.commissionZhonggong,
|
||||
commissionTechnician: item.commissionTechnician,
|
||||
commissionSmall: item.commissionSmall,
|
||||
cardAchievementLarge: item.cardAchievementLarge,
|
||||
cardAchievementZhonggong: item.cardAchievementZhonggong,
|
||||
cardAchievementTechnician: item.cardAchievementTechnician,
|
||||
cardAchievementSmall: item.cardAchievementSmall,
|
||||
cardCommissionLarge: item.cardCommissionLarge,
|
||||
cardCommissionZhonggong: item.cardCommissionZhonggong,
|
||||
cardCommissionZhonggong: item.cardCommissionZhonggong,
|
||||
cardCommissionTechnician: item.cardCommissionTechnician,
|
||||
cardCommissionSmall: item.cardCommissionSmall,
|
||||
courseAccountId: item.courseAccountId,
|
||||
payLists: item.payLists,
|
||||
storeId: item.storeId,
|
||||
rechargeAccountList: item.rechargeConsumeList,
|
||||
amount: item.amount,
|
||||
cashAmount: item.cashAmount,
|
||||
collectionIntegralAmount: item.collectionIntegralAmount,
|
||||
collectionCashAmount: item.collectionCashAmount,
|
||||
collectionRechargeAmount: item.collectionRechargeAmount,
|
||||
};
|
||||
list.push(item2);
|
||||
});
|
||||
|
||||
cashEditStaff(list).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.$message.success({
|
||||
message: res.message,
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.$emit("editformData");
|
||||
} 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 == "discoutMoney") {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
sums[index] = "--";
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += " ";
|
||||
} else if (column.property == "spendMoney") {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
sums[index] = "--";
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += " ";
|
||||
} else 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>
|
||||
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag title="打印" append-to-body :visible.sync="printDialogVisible"
|
||||
width="60%">
|
||||
<div id="printService" class="printDiv">
|
||||
<div class="text-center text-grey padding-xs">
|
||||
服务
|
||||
</div>
|
||||
<hr>
|
||||
<br>
|
||||
<el-form :model="printForm">
|
||||
<el-form-item label="门店:"> {{ printForm.storeName }} </el-form-item><br>
|
||||
<el-form-item label="时间:"> {{ printForm.cashDate }} </el-form-item><br>
|
||||
<el-form-item label="单号:">{{ printForm.cashNum }} </el-form-item><br>
|
||||
<el-form-item label="顾客:">
|
||||
{{ printForm.memberName ? printForm.memberName : '散客' }}/{{ printForm.mobilePhone ? printForm.mobilePhone : '******'
|
||||
}}
|
||||
</el-form-item><br>
|
||||
<el-form-item label="收银:">
|
||||
<div>{{ staffName }} </div>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<hr class="text-grey">
|
||||
<div style="height:8px"></div>
|
||||
<!-- <el-table :data="printForm.projectList" style="wdith: 180px">
|
||||
<el-table-column align="left" prop="projectName" label="项目"></el-table-column>
|
||||
<el-table-column align="center" prop="transactionPrice" label="价格"></el-table-column>
|
||||
</el-table> -->
|
||||
<div class="print-table flex justify-center align-center">
|
||||
<div class="text-left" style="width:50%">项目 </div>
|
||||
<div class="text-left" style="width:25%">标价 </div>
|
||||
<div class="text-left" style="width:25%">折后 </div>
|
||||
</div>
|
||||
<div style="height:15px"></div>
|
||||
<div class="print-table flex justify-center align-center" v-for="(item, index) in printForm.projectList">
|
||||
<div class="text-left" style="width:50%"> <span class="text-cyan text-out">{{ item.projectName }}</span></div>
|
||||
<div class="text-left" style="width:25%"> <span class="text-red text-price">{{ item.priceMember }}</span></div>
|
||||
<div class="text-left" style="width:25%"> <span class="text-red text-price">{{ item.discountmoney }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:8px"></div>
|
||||
<hr class="text-grey">
|
||||
<div style="height:8px"></div>
|
||||
<div v-if="recList.length != 0">
|
||||
<div class="print-table flex justify-center align-center">
|
||||
<div class="text-left" style="width:50%">充值帐户 </div>
|
||||
<div class="text-left" style="width:25%;padding-right:5px">支付 </div>
|
||||
<div class="text-left" style="width:25%;padding-right:5px">剩余 </div>
|
||||
</div>
|
||||
<div style="height:15px"></div>
|
||||
<div class="print-table flex justify-center align-center" v-for="(item, index) in recList">
|
||||
<div class="text-left" style="width:50%"> <span class="text-cyan text-out">{{ item.rechargeTypeName }}</span>
|
||||
</div>
|
||||
<div class="text-left" style="width:25%"> <span class="text-red text-price">{{ item.spendMoney }}</span></div>
|
||||
<div class="text-left" style="width:25%"> <span class="text-red text-price">{{ item.cardRestMoney }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="printForm.payLists.length != 0">
|
||||
<div class="print-table flex justify-center align-center">
|
||||
<div class="text-left" style="width:50%">支付方式 </div>
|
||||
<div class="text-left" style="width:50%;">支付 </div>
|
||||
</div>
|
||||
<div style="height:15px"></div>
|
||||
<div class="print-table flex justify-center align-center" v-for="(item, index) in printForm.payLists">
|
||||
<div class="text-left" style="width:50%"> <span class="text-cyan text-out">{{ item.payName }}</span></div>
|
||||
<div class="text-left" style="width:50%"> <span class="text-red text-price">{{ item.payMoney }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex justify-start align-center padding-top-xs padding-bottom-xs">
|
||||
<div style="width:33%">卡付: <span class="text-red text-price">{{item.collectionRechargeAmount}}</span></div>
|
||||
<div style="width:33%">现付: <span class="text-red text-price">{{item.collectionCashAmount}}</span></div>
|
||||
<div style="width:33%">疗程付: <span class="text-red text-price" v-if="item.courseAccountId!=null">{{item.transactionPrice}}</span><span class="text-red text-price" v-else>0</span></div>
|
||||
</div> -->
|
||||
<!-- <el-form-item label="卡付:">
|
||||
<div class="form-width-sm">
|
||||
{{ printForm.collectionRechargeAmount }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="现付:">
|
||||
<div style="width: 40px">
|
||||
{{ printForm.collectionCashAmount }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="卡包:">
|
||||
<div class="form-width-sm">
|
||||
<span v-if="printForm.courseAccountId != null">{{
|
||||
printForm.projectName
|
||||
}}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="实付:">
|
||||
<div>{{ printForm.numPayMoney }}</div>
|
||||
</el-form-item> -->
|
||||
<br/>
|
||||
<br/>
|
||||
<el-form-item label="签名:">
|
||||
<div style="height: 30px; width: 80px">
|
||||
<img style="width: 100%" :src="printForm.signature" alt="" />
|
||||
</div>
|
||||
</el-form-item><br />
|
||||
<el-form-item label="服务热线:">
|
||||
{{ printForm.telephone }} </el-form-item><br />
|
||||
<el-form-item>
|
||||
{{ printForm.printDate | dateFormat }}
|
||||
</el-form-item>
|
||||
<br /><br />
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="printDialogVisible = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" v-print="'#printService'">打 印</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
printForm: {},
|
||||
printDialogVisible: false,
|
||||
staffName: sessionStorage.getItem("staffName"),
|
||||
recList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(form) {
|
||||
console.log(form);
|
||||
this.printForm = { ...form };
|
||||
let recList = [];
|
||||
form.projectList.forEach((item) => {
|
||||
recList = recList.concat(item.rechargeConsumeList);
|
||||
});
|
||||
this.printForm.projectList.forEach((item) => {
|
||||
item.discountmoney = ((item.collectionAmount * 1) + (item.collectionRechargeAmount * 1)).toFixed(2) * 1;
|
||||
})
|
||||
this.recList = recList;
|
||||
|
||||
console.log(form.projectList)
|
||||
// console.log(this.recList)
|
||||
this.printDialogVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printDiv .el-form-item {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.printDiv .el-form-item__label,
|
||||
.el-form-item__content {
|
||||
font-size: 12px;
|
||||
color: black;
|
||||
font-family: "宋体";
|
||||
padding: 0 5px 0 0;
|
||||
}
|
||||
|
||||
.printDiv {
|
||||
width: 200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.printDiv .el-table td,
|
||||
.printDiv .el-table th {
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
color: black;
|
||||
font-weight: 300;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div class="flex">
|
||||
<div style="width:100%">
|
||||
<el-table :data="payLists" style="width:280px" class='border' 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 type="number" @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;
|
||||
if (index = 0) {
|
||||
row.payMoney = (this.form.collectionCashAmounts + row.payMoney).toFixed(2) * 1;
|
||||
}
|
||||
else {
|
||||
let money = 0;
|
||||
var that = this;
|
||||
this.payLists.forEach((item) => {
|
||||
money += item.payMoney * 1;
|
||||
});
|
||||
row.payMoney = (this.form.collectionCashAmounts - money).toFixed(2) * 1;
|
||||
}
|
||||
|
||||
},
|
||||
endEdit(row, index) {
|
||||
this.payIndex = -1;
|
||||
let money = 0;
|
||||
var that = this;
|
||||
this.payLists.forEach((item) => {
|
||||
money += item.payMoney * 1;
|
||||
});
|
||||
if (!row.payMoney) {
|
||||
row.payMoney = 0;
|
||||
} else if (money > this.form.collectionCashAmounts) {
|
||||
this.$alert("输入之和不能大于现付金额", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
row.payMoney = 0;
|
||||
} else if (row.payMoney < 0) {
|
||||
this.$alert("输入值不能小于0", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
row.payMoney = 0;
|
||||
} else {
|
||||
row.payMoney = row.payMoney * 1;
|
||||
}
|
||||
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>
|
||||
@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<div>
|
||||
{{form.cashNumber}}
|
||||
{{rechargeAccountList}}
|
||||
<el-table class="padding-right border" v-if="form.cashNumber==1" style="max-width:900px" :data="rechargeAccountList" :summary-method="getSummaries" show-summary max-height="350">
|
||||
<el-table-column align="center" prop="rechargeTypeName" label="卡付名称" width="130"></el-table-column>
|
||||
<el-table-column align="center" prop="cardOver" label="可用金额" width="80"></el-table-column>
|
||||
<!-- <el-table-column align="center" prop="offsetMoney" label="可抵扣额" width="100"></el-table-column> -->
|
||||
<el-table-column align="center" prop="spendMoney" label="本次支付" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="form-input-width" v-if="recIndex!=scope.$index" @click="editcard(scope.row, scope.$index)">
|
||||
{{ scope.row.spendMoney }}
|
||||
<i class="text-cyan el-icon-edit"></i>
|
||||
</div>
|
||||
<el-input v-else v-focus size="samll" class="form-input-width" type="number" @blur="endEditcard(scope.row, scope.$index)" v-model="scope.row.spendMoney"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" prop="discoutMoney" label="抵扣支付" width="100"></el-table-column> -->
|
||||
<el-table-column align="center" prop="cardOvers" label="可用余额" width="80"></el-table-column>
|
||||
<!-- <el-table-column align="center" prop="giftMoney" label="赠送金额" width="100"></el-table-column>
|
||||
<el-table-column align="center" prop="giftMoney" label="赠送支付" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div class="form-input-width" v-if="giftIndex!=scope.$index" @click="editcard(scope.row, scope.$index)">
|
||||
{{ scope.row.giftMoney }}
|
||||
<i class="text-cyan el-icon-edit"></i>
|
||||
</div>
|
||||
<el-input v-else v-focus size="samll" class="form-input-width" type="number" @blur="endEditcard(scope.row, scope.$index)" v-model="scope.row.giftMoney"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="cardOvers" label="可用赠送" width="80"></el-table-column> -->
|
||||
<el-table-column align="center" prop="storeName" label="所属门店" width="120" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [], //主数组
|
||||
recForm: {},
|
||||
payLists: [],
|
||||
rechargeAccountList: [],
|
||||
recIndex: -1,
|
||||
giftIndex: -1,
|
||||
payIndex: -1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
show(form, list) {
|
||||
var that = this;
|
||||
that.recForm = JSON.parse(JSON.stringify(form));
|
||||
that.list = JSON.parse(JSON.stringify(list));
|
||||
that.payLists = [];
|
||||
that.rechargeAccountList = [];
|
||||
that.payLists = that.recForm.payLists;
|
||||
that.rechargeAccountList = that.recForm.rechargeAccountList;
|
||||
},
|
||||
|
||||
//修改卡付金额
|
||||
editcard(row, index) {
|
||||
this.recIndex = index;
|
||||
let debtMoney =
|
||||
(this.recForm.amount * 1 - this.recForm.cashAmount * 1).toFixed(2) * 1;
|
||||
let form = { ...row };
|
||||
if (debtMoney > 0) {
|
||||
if (form.offsetMoney >= debtMoney) {
|
||||
if (this.form.noDiscount == 0) {
|
||||
// 可以打折
|
||||
form.spendMoney =
|
||||
((debtMoney * form.discount) / 100).toFixed(2) * 1;
|
||||
} else {
|
||||
// 不可以打折
|
||||
form.spendMoney = debtMoney;
|
||||
}
|
||||
// 卡抵扣金额 项目金额
|
||||
form.discoutMoney = debtMoney;
|
||||
} else {
|
||||
form.spendMoney = form.cardOver;
|
||||
if (this.recForm.noDiscount == 0) {
|
||||
form.discoutMoney =
|
||||
(form.offsetMoney / (form.discount / 100).toFixed(2)) * 1;
|
||||
} else {
|
||||
form.discoutMoney = form.offsetMoney;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
form.spendMoney = 0;
|
||||
}
|
||||
this.rechargeAccountList.splice(index, 1, form);
|
||||
},
|
||||
endEditcard(row, index) {
|
||||
if (!row.spendMoney) {
|
||||
row.spendMoney = 0;
|
||||
}
|
||||
if (0 <= row.spendMoney * 1 > row.cardOver * 1) {
|
||||
this.$message.info({
|
||||
message: "支付金额不能大于可用金额!",
|
||||
});
|
||||
} else {
|
||||
this.recIndex = -1;
|
||||
if (row.spendMoney * 1 < 0) {
|
||||
} else {
|
||||
if (this.recForm.noDiscount == 0) {
|
||||
row.discoutMoney =
|
||||
((row.spendMoney * 1) / ((row.discount * 1) / 100)).toFixed(2) *
|
||||
1;
|
||||
} else {
|
||||
row.discoutMoney = row.spendMoney;
|
||||
}
|
||||
|
||||
row.cardOvers =
|
||||
(row.cardOver * 1 - row.spendMoney * 1).toFixed(2) * 1;
|
||||
var form = { ...this.recForm };
|
||||
var num = 0;
|
||||
this.recForm.rechargeAccountList.forEach((item) => {
|
||||
num += item.discoutMoney * 1;
|
||||
});
|
||||
form.collectionRechargeAmount = num;
|
||||
form.spendMoneys = num;
|
||||
form.cashAmount =
|
||||
(
|
||||
form.payMoneys * 1 +
|
||||
form.collectionRechargeAmount * 1 +
|
||||
form.integralMoney * 1
|
||||
).toFixed(2) * 1;
|
||||
this.recForm = form;
|
||||
}
|
||||
}
|
||||
this.sumNum();
|
||||
},
|
||||
sumNum() {
|
||||
let spendMoney = 0;
|
||||
let spendNumber = 0;
|
||||
|
||||
this.rechargeAccountList.forEach((item) => {
|
||||
spendMoney += item.discoutMoney * 1;
|
||||
spendNumber += item.spendMoney * 1;
|
||||
});
|
||||
this.recForm.collectionRechargeAmount = spendMoney;
|
||||
//this.recForm.collectionIntegralAmount = this.
|
||||
this.recForm.cashAmount =
|
||||
(
|
||||
this.recForm.collectionCashAmount +
|
||||
this.recForm.collectionRechargeAmount +
|
||||
this.recForm.collectionIntegralAmount
|
||||
).toFixed(2) * 1;
|
||||
this.recForm.payLists = this.payLists;
|
||||
this.recForm.rechargeAccountList = this.rechargeAccountList;
|
||||
this.recForm.collectionAmount =
|
||||
(
|
||||
spendNumber +
|
||||
this.recForm.collectionCashAmount +
|
||||
this.recForm.collectionIntegralAmount
|
||||
).toFixed(2) * 1;
|
||||
|
||||
this.list.splice(this.recForm.index, 1, this.recForm);
|
||||
let form = { form: this.recForm, list: this.list };
|
||||
this.$emit("recashData", form);
|
||||
},
|
||||
//数组按对应字段合计返回方法
|
||||
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 == "discoutMoney") {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
sums[index] = "--";
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += " ";
|
||||
} else if (column.property == "spendMoney") {
|
||||
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>
|
||||
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-collapse style="width: 100%" v-model="recColl" accordion>
|
||||
<el-collapse-item title="充值卡:" :name="1">
|
||||
<el-table :data="list" max-height="350" ref="list" stripe>
|
||||
<el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeTypeName" label="充值卡"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="left" prop="type" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.type==0?'赠送卡':scope.row.type==1?'折扣卡':'活动卡'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardRestMoney" label="剩余金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardConsumeMoney" label="可用金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discount" label="享受优惠(%)"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardGiftMoney" label="赠送金额"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="100" align="center" prop="discountFreeAmount" label="赠送折扣(%)"></el-table-column>
|
||||
</el-table>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recAccountCashList } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
recColl: 1,
|
||||
list: [], //主数组
|
||||
form: {}, //主对象
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//组件传值
|
||||
show(form) {
|
||||
if (form) {
|
||||
this.form = { ...form };
|
||||
this.getData();
|
||||
} else {
|
||||
this.list = [];
|
||||
}
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
recAccountCashList({
|
||||
memberId: this.form.id,
|
||||
}).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
this.list = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "查询会员卡包", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-model="false" v-dialogDrag :title="staffTitle" :visible.sync="dialogVisible" width="500px"
|
||||
append-to-body :before-close="handleClose">
|
||||
<el-button size="mini" type="primary" @click="add()">添加</el-button>
|
||||
<el-button size="mini" type="primary" @click="del()">删除</el-button>
|
||||
<div class="flex">
|
||||
<el-table :data="list" max-height="600">
|
||||
<el-table-column align="center" :label="staffTitle">
|
||||
<el-table-column min-width="140" align="center" label="员工">
|
||||
<template slot-scope="scope">
|
||||
<el-select filterable default-first-option v-model="scope.row.label" placeholder="请选择"
|
||||
@click="editclick($event, scope.$index)" @change="editChange($event, scope.$index)">
|
||||
<el-option v-for="item in openList" :key="item.id" :label="item.label" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="占比">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-focus type="number" @blur="endEdit(scope.row, scope.$index)" :disabled="scope.$index == 0"
|
||||
size="samll" v-model="scope.row.ratio"></el-input>
|
||||
</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";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false, //弹窗开关
|
||||
staffList: [],
|
||||
list: [], //主数组
|
||||
form: {}, //主对象
|
||||
openList: [],
|
||||
staffText: "",
|
||||
staffTexts: "",
|
||||
staffTitle: "",
|
||||
staffTitles: "",
|
||||
staffListCopy: [],
|
||||
lists: [],
|
||||
len: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
|
||||
let forms = {
|
||||
text: this.staffTexts,
|
||||
list: this.lists
|
||||
};
|
||||
|
||||
this.$emit("staffratioData", forms);
|
||||
this.dialogVisible = false;
|
||||
|
||||
},
|
||||
add() {
|
||||
this.list.push({ label: "", ratio: 0 });
|
||||
this.changeStaff();
|
||||
},
|
||||
endEdit(row, index) {
|
||||
|
||||
if (row.ratio * 1 > 100) {
|
||||
this.$alert("输入值不能大于100", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
row.ratio = 0;
|
||||
} else if (row.ratio * 1 < 0) {
|
||||
this.$alert("输入值不能小于0", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
row.ratio = 0;
|
||||
}
|
||||
else {
|
||||
row.ratio = row.ratio * 1;
|
||||
}
|
||||
let number = 0;
|
||||
this.list.forEach((item, index) => {
|
||||
if (index != 0) {
|
||||
number += item.ratio * 1;
|
||||
}
|
||||
});
|
||||
this.list[0].ratio = 100 - number;
|
||||
if (this.list[0].ratio < 0) {
|
||||
this.$alert("第一个人员占比过低", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
this.list[0].ratio = this.list[0].ratio + row.ratio
|
||||
row.ratio = 0;
|
||||
|
||||
}
|
||||
this.changeStaff();
|
||||
},
|
||||
editChange(e, index) {
|
||||
let number = 0;
|
||||
let row = this.list[index];
|
||||
if (this.list.length == 1) {
|
||||
row.ratio = 100;
|
||||
} else {
|
||||
row.ratio = 0
|
||||
this.list.forEach((item, index) => {
|
||||
if (index != 0) {
|
||||
number += item.ratio * 1;
|
||||
}
|
||||
this.list[0].ratio = 100 - number;
|
||||
})
|
||||
|
||||
}
|
||||
let form = {};
|
||||
this.openList.forEach((item) => {
|
||||
if (e == item.id) {
|
||||
form = { ...item };
|
||||
}
|
||||
})
|
||||
form.ratio = row.ratio;
|
||||
this.list.splice(index, 1, form);
|
||||
|
||||
this.changeStaff();
|
||||
},
|
||||
editclick(index) {
|
||||
let row = this.list[index];
|
||||
row.ratio=0
|
||||
let number = 0;
|
||||
this.list.forEach((item, index) => {
|
||||
if (index != 0) {
|
||||
number += item.ratio * 1;
|
||||
}
|
||||
this.list[0].ratio = 100 - number;
|
||||
})
|
||||
|
||||
},
|
||||
del() {
|
||||
let index = this.list.length - 1;
|
||||
this.list[0].ratio += this.list[index].ratio;
|
||||
this.list.splice(index, 1);
|
||||
this.changeStaff();
|
||||
},
|
||||
showdetele() {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
let row = JSON.parse(localStorage.getItem('row'));
|
||||
let text = localStorage.getItem('text')
|
||||
this.lists = JSON.parse(JSON.stringify([]));
|
||||
this.staffTexts = text;
|
||||
this.lists = row[text];
|
||||
this.len = this.lists.length
|
||||
this.lists.forEach((item) => {
|
||||
if (item.id) {
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
}
|
||||
});
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
this.changeStaff();
|
||||
let number = 0;
|
||||
this.lists.forEach((item, index) => {
|
||||
if (index != 0) {
|
||||
number += item.ratio * 1;
|
||||
}
|
||||
});
|
||||
if (this.lists.length > 0) {
|
||||
this.lists[0].ratio = (100 - number).toFixed(2) * 1;
|
||||
}
|
||||
});
|
||||
}, 300);
|
||||
|
||||
},
|
||||
show(form, text) {
|
||||
setTimeout(() => {
|
||||
this.$nextTick(() => {
|
||||
this.list = JSON.parse(JSON.stringify([]));
|
||||
this.form = { ...form };
|
||||
this.staffText = text;
|
||||
if (text == "zhonggongList") {
|
||||
this.staffTitle = "美发师";
|
||||
}
|
||||
if (text == "largeList") {
|
||||
this.staffTitle = "美容师";
|
||||
}
|
||||
if (text == "smallList") {
|
||||
this.staffTitle = "助理";
|
||||
}
|
||||
if (text == "technicianList") {
|
||||
this.staffTitle = "技师";
|
||||
}
|
||||
if (text == "adminList") {
|
||||
this.staffTitle = "门店管理层";
|
||||
}
|
||||
if (text == "managerList") {
|
||||
this.staffTitle = "高管";
|
||||
}
|
||||
this.list = form[text];
|
||||
this.list.forEach((item) => {
|
||||
if (item.id) {
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
}
|
||||
});
|
||||
this.dialogVisible = true;
|
||||
this.getData();
|
||||
this.changeStaff();
|
||||
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;
|
||||
}
|
||||
this.list.push({ label: "", ratio: 0 });
|
||||
});
|
||||
}, 300);
|
||||
},
|
||||
changeStaff() {
|
||||
var that = this;
|
||||
let arr = [];
|
||||
// var list = that.list.concat(that.staffListCopy).filter(function (v) {
|
||||
// return (
|
||||
// that.list.indexOf(v) === -1 || that.staffListCopy.indexOf(v) === -1
|
||||
// );
|
||||
// });
|
||||
// list.forEach((item) => {
|
||||
// if (item.id) {
|
||||
// arr.push(item);
|
||||
// }
|
||||
// });
|
||||
// this.openList = arr;
|
||||
},
|
||||
//获取数据
|
||||
async getData() {
|
||||
if (this.text == "adminList") {
|
||||
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.openList = res.rows;
|
||||
this.staffListCopy = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "加载员工提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (this.text == "managerList") {
|
||||
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.openList = res.pageInfo.list;
|
||||
this.staffListCopy = res.pageInfo.list;
|
||||
} else {
|
||||
this.$alert(res.message, "加载高管提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let form = { id: "" };
|
||||
if (this.staffName) {
|
||||
form.staffName = this.staffName;
|
||||
}
|
||||
selectList(form).then((res) => {
|
||||
if (res.code == "000000") {
|
||||
res.rows.forEach((item) => {
|
||||
item.label = item.brandNumber + "-" + item.staffName;
|
||||
item.ratio = 0;
|
||||
});
|
||||
this.openList = res.rows;
|
||||
this.staffListCopy = res.rows;
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
isRepeat(arr, key) {
|
||||
var obj = {};
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (obj[arr[i][key]]) {
|
||||
return false; // 存在
|
||||
} else {
|
||||
obj[arr[i][key]] = arr[i];
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
confirms() {
|
||||
let flag = this.isRepeat(this.list, "brandNumber");
|
||||
|
||||
|
||||
this.list.forEach((item,index)=>{
|
||||
if(item.label==""){
|
||||
this.list.splice(index,1)
|
||||
}
|
||||
})
|
||||
let form = {
|
||||
text: this.staffText,
|
||||
list: this.list,
|
||||
};
|
||||
|
||||
if (flag) {
|
||||
this.$emit("staffratioData", form);
|
||||
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
this.$alert("选择员工存在重复", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
confirmButtonClass: "confirmbtnFalses",
|
||||
type: "warning",
|
||||
center: true,
|
||||
callback: (action) => { },
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,876 @@
|
||||
<template>
|
||||
<div class="accountSet">
|
||||
<div class="header_flex" v-show="changeshow">
|
||||
<div></div>
|
||||
<div style="display: inline-block;">
|
||||
<el-input
|
||||
style="width:150px"
|
||||
type="primary"
|
||||
v-model="accountName"
|
||||
maxlength="11"
|
||||
oninput="this.value=this.value.replace(/\D/g,'')"
|
||||
pattern="[0-9]*"
|
||||
placeholder="帐户名称搜索"
|
||||
></el-input>
|
||||
<el-date-picker
|
||||
v-model="additionDate"
|
||||
type="date"
|
||||
:picker-options="pickerOptions"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button size="mini" type="primary" @click="search">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs
|
||||
style="margin-top: 10px;"
|
||||
v-model="activeName"
|
||||
type="border-card"
|
||||
@tab-click="handleClick"
|
||||
>
|
||||
<!-- 0:封存删除1:插入2:异常3:正常4:已初始化 -->
|
||||
<el-tab-pane label="店铺项目评价" name="0"></el-tab-pane>
|
||||
<el-tab-pane label="个人评价" name="1"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-table
|
||||
:data="pageInfo.memberAccount"
|
||||
v-if="activeName == 0"
|
||||
:header-cell-style="{
|
||||
background: 'linear-gradient(#6cb3ff, #1873d4)',
|
||||
color: '#eeeeee'
|
||||
}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="docNum"
|
||||
label="收银单号"
|
||||
align="center"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeTypeName"
|
||||
label="项目信息"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
min-width="140"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="memberName"
|
||||
label="会员信息"
|
||||
align="center"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.memberName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="docTypes"
|
||||
label="充值类型"
|
||||
align="center"
|
||||
min-width="80"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.type == 1 ? "折扣卡" : "赠送卡"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="原账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoney"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoney"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoney"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoney"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="修改账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoneyModify"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoneyModify"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoneyModify"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoneyModify"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="新账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoneyNew"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoneyNew"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoneyNew"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoneyNew"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="原账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCount"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCount"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="修改账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCountModify"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCountModify"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="新账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCountNew"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCountNew"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modifyBy"
|
||||
label="修改人"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="modifyTime"
|
||||
label="修改时间"
|
||||
align="center"
|
||||
min-width="160"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="pageInfo.memberAccount"
|
||||
v-if="activeName == 1"
|
||||
:header-cell-style="{
|
||||
background: 'linear-gradient(#6cb3ff, #1873d4)',
|
||||
color: '#eeeeee'
|
||||
}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="docNum"
|
||||
label="修改记录单号"
|
||||
align="center"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseProjectName"
|
||||
label="帐户名称"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
min-width="140"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="memberName"
|
||||
label="会员信息"
|
||||
align="center"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.memberName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="docTypes"
|
||||
label="充值类型"
|
||||
align="center"
|
||||
min-width="80"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.type == 1 ? "折扣卡" : "赠送卡"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="原账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoney"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoney"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoney"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoney"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="修改账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoneyModify"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoneyModify"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoneyModify"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoneyModify"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="新账户金额信息"
|
||||
v-if="activeName == 0"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cardRestMoneyNew"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoneyNew"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoneyNew"
|
||||
label="赠送剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoneyNew"
|
||||
label="赠送可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="原账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCount"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCount"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="修改账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCountModify"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCountModify"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="新账户项目次数"
|
||||
v-if="activeName == 1"
|
||||
>
|
||||
<el-table-column
|
||||
prop="courseRestCountNew"
|
||||
label="剩余"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCountNew"
|
||||
label="可用"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modifyBy"
|
||||
label="修改人"
|
||||
align="center"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="modifyTime"
|
||||
label="修改时间"
|
||||
align="center"
|
||||
min-width="160"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block" style="margin-top:15px;">
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
align="left"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="pageInfo.pageNum"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageInfo.total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
v-dialogDrag
|
||||
title="修改账户"
|
||||
width="80%"
|
||||
:visible.sync="dialogFormVisible"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="form">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
class="form-width-ms"
|
||||
style="padding-left:0px;"
|
||||
ref=""
|
||||
oninput="this.value=this.value.replace(/\D/g,'')"
|
||||
pattern="[0-9]*"
|
||||
maxlength="11"
|
||||
v-model="mobilePhone"
|
||||
@blur="query"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="openMember"
|
||||
></el-button>
|
||||
</el-input>
|
||||
<el-radio-group v-model="radioAccount" @change="radioChange">
|
||||
<el-radio :label="0">充值账户</el-radio>
|
||||
<el-radio :label="1">疗程账户</el-radio>
|
||||
</el-radio-group>
|
||||
<el-button
|
||||
:disabled="radioAccount == null"
|
||||
style="margin-left: 30px;"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="query"
|
||||
>查询</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="accountList"
|
||||
:header-cell-style="{
|
||||
background: 'linear-gradient(#6cb3ff, #1873d4)',
|
||||
color: '#eeeeee'
|
||||
}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="accountName"
|
||||
align="center"
|
||||
width="90"
|
||||
label="帐户标识"
|
||||
v-if="radioAccount != null"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="scuccess"
|
||||
><span>{{
|
||||
scope.$index == 0
|
||||
? "原账户"
|
||||
: scope.$index == 1
|
||||
? "修改账户"
|
||||
: "新账户"
|
||||
}}</span>
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeTypeName"
|
||||
label="账户名称"
|
||||
v-if="radioAccount == 0"
|
||||
align="center"
|
||||
min-width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.$index == 2
|
||||
? scope.row.rechargeTypeNameNew
|
||||
: scope.row.rechargeTypeName
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="充值类别"
|
||||
v-if="radioAccount == 0"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.type == 0 ? "赠送卡" : "折扣卡" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseProjectName"
|
||||
label="账户名称"
|
||||
v-if="radioAccount == 1"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.$index == 2
|
||||
? scope.row.courseProjectNameNew
|
||||
: scope.row.courseProjectName
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="radioAccount == 1"
|
||||
label="剩余次数"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
@blur="
|
||||
scope.row.courseRestCountNew == ''
|
||||
? (scope.row.courseRestCountNew = 0)
|
||||
: scope.row.courseRestCountNew
|
||||
"
|
||||
oninput="this.value=this.value.replace(/[^\-?\d.]/g,'')"
|
||||
v-if="scope.$index == 1"
|
||||
v-model="scope.row.courseRestCountModify"
|
||||
></el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.courseRestCount
|
||||
: scope.row.courseRestCountNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="radioAccount == 1"
|
||||
label="可用次数"
|
||||
align="center"
|
||||
width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
oninput="this.value=this.value.replace(/[^\-?\d.]/g,'')"
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
v-if="scope.$index == 1"
|
||||
v-model="scope.row.courseConsumeCountModify"
|
||||
></el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.courseConsumeCount
|
||||
: scope.row.courseConsumeCountNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="tradeMoney"
|
||||
v-if="radioAccount == 0"
|
||||
label="剩余金额"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
v-if="scope.$index == 1"
|
||||
v-model="scope.row.cardRestMoneyModify"
|
||||
></el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.cardRestMoney
|
||||
: scope.row.cardRestMoneyNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="tradeMoney"
|
||||
v-if="radioAccount == 0"
|
||||
label="可用金额"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
v-if="scope.$index == 1"
|
||||
v-model="scope.row.cardConsumeMoneyModify"
|
||||
></el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.cardConsumeMoney
|
||||
: scope.row.cardConsumeMoneyNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="tradeMoney"
|
||||
v-if="radioAccount == 0"
|
||||
label="赠送剩余金额"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
v-if="scope.$index == 1 && scope.row.type == 0"
|
||||
v-model="scope.row.cardGiftMoneyModify"
|
||||
>
|
||||
</el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.cardGiftMoney
|
||||
: scope.row.cardGiftMoneyNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoney"
|
||||
v-if="radioAccount == 0"
|
||||
label="赠送可用金额"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@change="changeInput(scope.row, scope.$index)"
|
||||
v-if="scope.$index == 1 && scope.row.type == 0"
|
||||
v-model="scope.row.giftConsumeMoneyModify"
|
||||
>
|
||||
</el-input>
|
||||
<span v-else>{{
|
||||
scope.$index == 0
|
||||
? scope.row.giftConsumeMoney
|
||||
: scope.row.giftConsumeMoneyNew
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="handleClose"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="confirm((dialogFormVisible = false))"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
v-dialogDrag
|
||||
:title="radioAccount == 0 ? '选择充值账户' : '选择疗程账户'"
|
||||
:width="radioAccount == 0 ? '800px' : '600px'"
|
||||
:visible.sync="dialogVisible"
|
||||
>
|
||||
<div class="selectDialog">
|
||||
<el-table
|
||||
:data="projectList"
|
||||
@row-click="rowClick"
|
||||
@row-dblclick="electConfirm"
|
||||
v-if="radioAccount == 1"
|
||||
max-height="550"
|
||||
>
|
||||
<el-table-column label="选择" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-radio
|
||||
v-model="radioRowValue"
|
||||
:label="scope.row.id"
|
||||
@change.native="scope.row"
|
||||
>
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseProjectName"
|
||||
label="疗程名称"
|
||||
align="center"
|
||||
min-width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="courseRestCount"
|
||||
label="剩余次数"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseConsumeCount"
|
||||
label="可用次数"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="rechargeList"
|
||||
@row-click="rowClick"
|
||||
@row-dblclick="electConfirm"
|
||||
v-if="radioAccount == 0"
|
||||
max-height="550"
|
||||
>
|
||||
<el-table-column label="选择" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-radio
|
||||
v-model="radioRowValue"
|
||||
:label="scope.row.id"
|
||||
@change.native="scope.row"
|
||||
>
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeTypeName"
|
||||
label="充值名称"
|
||||
align="center"
|
||||
min-width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardRestMoney"
|
||||
label="剩余金额"
|
||||
align="center"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="cardConsumeMoney"
|
||||
label="可用金额"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardGiftMoney"
|
||||
label="赠送剩余金额"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftConsumeMoney"
|
||||
label="赠送可用金额"
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
@click="dialogVisible = false"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button size="mini" type="primary" @click="electConfirm()"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<member ref="member" @memberData="memberData"></member>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import member from "@/components/member/index";
|
||||
|
||||
import {
|
||||
storeMemberOne,
|
||||
recAccountList,
|
||||
couAccountList,
|
||||
recAccountCashList,
|
||||
courseAdd,
|
||||
recAdd,
|
||||
courseEditPage,
|
||||
recEditPage
|
||||
} from "../../../api/eashier.js";
|
||||
import { partten } from "../../../../partten/index.js";
|
||||
export default {
|
||||
components: { member },
|
||||
data() {
|
||||
return {
|
||||
activeName: 0,
|
||||
changeshow: false,
|
||||
additionDate: null,
|
||||
//选择列表对象
|
||||
pageInfo: {
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
total: 0, //分页总条数
|
||||
memberAccount: []
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
if (this.activeName == 0) {
|
||||
this.changeshow = false;
|
||||
} else {
|
||||
this.changeshow = true;
|
||||
}
|
||||
console.log(this.activeName);
|
||||
}
|
||||
},
|
||||
created() {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.selectDialog .el-radio__label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.accountSet .el-tabs__content {
|
||||
padding: 0px;
|
||||
margin: 1px 0;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue