上线提交
parent
11eb932e29
commit
05efa8b001
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="detailDialog" width="40%" append-to-body :before-close="handleClose">
|
||||
<el-descriptions :column="3" size="medium" border>
|
||||
<el-descriptions-item label="门店">{{ form.storeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="日期">{{ form.rechargeDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单据号">{{ form.rechargeNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="收银员">{{ form.inputNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ form.memberName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">{{ form.mobilePhone }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="card">
|
||||
<div class="card-detail">
|
||||
<p v-for="(item,index) in card" :key="index">{{ item }}</p>
|
||||
</div>
|
||||
<div class="card-detail-special">
|
||||
<p style="width: 48.5%;">{{ form.rechargeTypeName }}</p>
|
||||
<p style="width: 46.5%;">{{ form.collectionCashAmount }}</p>
|
||||
<p>{{ form.afterMoney }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-detail">
|
||||
<p v-for="(item,index) in payList" :key="index">{{ item }}</p>
|
||||
</div>
|
||||
<div class="card-detail" v-for="item in form.payLists">
|
||||
<p>{{ item.payName }}</p>
|
||||
<p>{{ item.payMoney }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="cancel">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { recpage } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detailDialog: false,
|
||||
title: "充值记录单",
|
||||
form: {},
|
||||
card:['类别','金额','余额'],
|
||||
payList:['付款方式','金额'],
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
cancel() {
|
||||
this.detailDialog = false;
|
||||
this.form = Object.assign({});
|
||||
},
|
||||
handleClose(){
|
||||
this.detailDialog = false;
|
||||
this.form = Object.assign({});
|
||||
},
|
||||
init(){
|
||||
let params = {
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
selectDate:this.formatTime(new Date(), "YYYYMM")
|
||||
}
|
||||
recpage(params).then(res=>{
|
||||
if(res.code = '000000'){
|
||||
this.detailDialog = true
|
||||
if(res.pageInfo.list.length){
|
||||
this.form = res.pageInfo.list[0]
|
||||
this.list = [{
|
||||
rechargeTypeName:this.form.rechargeTypeName,
|
||||
collectionCashAmount:this.form.collectionCashAmount,
|
||||
afterMoney:this.form.afterMoney
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-descriptions--medium.is-bordered .el-descriptions-item__cell{
|
||||
width: 100px;
|
||||
}
|
||||
.card{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
-webkit-box-shadow: 3px 3px 10px #888888;
|
||||
box-shadow: 3px 3px 10px #888888;
|
||||
}
|
||||
.card-detail{
|
||||
display: flex;
|
||||
margin-bottom: 5px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-detail-special{
|
||||
display: flex;
|
||||
}
|
||||
.card-detail-special p:nth-last-child(1){
|
||||
text-align: right;
|
||||
}
|
||||
.card-detail:nth-child(1){
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="detailDialog" width="40%" append-to-body :before-close="handleClose">
|
||||
<el-descriptions :column="3" size="medium" border>
|
||||
<el-descriptions-item label="门店">{{ form.storeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="日期">{{ form.date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单据号">{{ form.courseReatmentNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="收银员">{{ form.inputNum }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{ form.memberName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">{{ form.mobilePhone }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="card">
|
||||
<div class="card-detail">
|
||||
<p v-for="(item,index) in card" :key="index">{{ item }}</p>
|
||||
</div>
|
||||
<div class="card-detail-special" v-for="item in form.courseLists" :key="item.id">
|
||||
<p style="width: 48.5%;">{{ item.projectName }}</p>
|
||||
<p style="width: 46.5%;">{{ item.amount }}</p>
|
||||
<p>{{ item.numberTimes }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-detail">
|
||||
<p v-for="(item,index) in payList" :key="index">{{ item }}</p>
|
||||
</div>
|
||||
<div class="card-detail" v-for="item in form.payLists">
|
||||
<p>{{ item.payName }}</p>
|
||||
<p>{{ item.payMoney }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" plain @click="cancel">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { coursepage,selectCourseOne } from "@/api/eashier.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detailDialog: false,
|
||||
title: "疗程记录单",
|
||||
form: {},
|
||||
card:['项目','金额','次数'],
|
||||
payList:['付款方式','金额'],
|
||||
};
|
||||
},
|
||||
created(){
|
||||
// this.init()
|
||||
},
|
||||
methods:{
|
||||
cancel() {
|
||||
this.detailDialog = false;
|
||||
this.form = Object.assign({});
|
||||
},
|
||||
handleClose(){
|
||||
this.detailDialog = false;
|
||||
this.form = Object.assign({});
|
||||
},
|
||||
getDetail(form){
|
||||
let params = {
|
||||
docId:form.courseReatmentNum,
|
||||
date:form.date
|
||||
}
|
||||
selectCourseOne(params).then(res=>{
|
||||
if(res.code == '000000'){
|
||||
this.form.courseLists = res.data.courseLists
|
||||
let list = []
|
||||
res.data.rechargeConsumeList.forEach(item=>{
|
||||
let index = list.findIndex( items=>items.id == item.id )
|
||||
if( index == -1 ){
|
||||
list.push(item)
|
||||
}else{
|
||||
list[index].spendMoney += item.spendMoney
|
||||
}
|
||||
})
|
||||
this.form.payLists = res.data.payLists.concat(list.map(item=>{return {payName:item.rechargeTypeName,payMoney:item.spendMoney }}))
|
||||
}
|
||||
})
|
||||
this.detailDialog = true
|
||||
},
|
||||
init(){
|
||||
let params = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
params.selectDate = this.formatTime(new Date(), "YYYYMM");
|
||||
coursepage(params).then(res=>{
|
||||
if( res.code == '000000' ){
|
||||
if(res.pageInfo.list.length){
|
||||
this.form = res.pageInfo.list[0]
|
||||
this.getDetail(this.form)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-descriptions--medium.is-bordered .el-descriptions-item__cell{
|
||||
width: 100px;
|
||||
}
|
||||
.card{
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
-webkit-box-shadow: 3px 3px 10px #888888;
|
||||
box-shadow: 3px 3px 10px #888888;
|
||||
}
|
||||
.card-detail{
|
||||
display: flex;
|
||||
margin-bottom: 5px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-detail-special{
|
||||
display: flex;
|
||||
}
|
||||
.card-detail-special p:nth-last-child(1){
|
||||
text-align: right;
|
||||
}
|
||||
.card-detail:nth-child(1){
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue