刘翔宇-旅管家 3 years ago
parent 4e62398ebe
commit a0db39946b

@ -606,7 +606,8 @@
this.toCaculate();
},
bindDateChange: function(e) {
this.sdate = e.target.value
this.sdate = e.target.value
this.toCalEDate(this.sdate, this.days);
},
getDate(type) {
const date = new Date();

@ -136,8 +136,8 @@
<view class="listBoxItem-right-r" style="display: flex;">
<text class="txtbottom">{{item.manager_name}}</text>
<view class="btn btnPay" v-if="item.refunds_count==0" :data-id='item.id'>
<!--@click="toback(item.id,item.money,item.payment)"-->
<!-- <text class="btnTxt btnConfirmTxt">退款</text> -->
<text @click="toback(item.id,item.money,item.payment)" class="btnTxt btnConfirmTxt">退款</text>
</view>
<text v-else style="color: #000;">已退款</text>
</view>
@ -677,7 +677,16 @@
for (var mod of listAllItems) {
if (mod.paramedic_id == id)
listSelect.push(mod)
}
}
var _GroupList = this.groupBy(listSelect, function(item) {
return [item.total];
})
console.log("_GroupList",_GroupList)
that.fillline();
console.log("print", print)
@ -701,19 +710,21 @@
for (var mod of listSelect) {
if (parseFloat(mod.total) > 0) {//0
that.fillAround('服务日期 ' + mod.service_date);
that.inline('护工', mod.paramedic.name + ' ' + mod.total + '元');
if (parseFloat(mod.total) > 0) { //0
//that.fillAround(' ' + mod.service_date);
that.inline("病床信息", mod.bed.building_name + " " + mod.bed.area_name + " " + mod.bed.room_name +
" " +
mod.bed.name);
that.inline('收款', mod.paid_status);
//that.inline("", mod.bed.building_name + " " + mod.bed.area_name + " " + mod.bed.room_name +
// " " +
// mod.bed.name);
that.inline(mod.service_date, mod.paid_status);
totlMoney += parseFloat(mod.total);
totalDays += 1;
}
}
that.fillline()
that.inline('护工', mod.paramedic.name);
that.inline('合计金额', totlMoney + '元')
that.inline('天数', totalDays + '天')
that.inline('打印时间', util.formatTimeAll(nt))
@ -724,6 +735,17 @@
this.printMore(5);
},
groupBy: function(array, f) {
let groups = {};
array.forEach(function(o) {
let group = JSON.stringify(f(o));
groups[group] = groups[group] || [];
groups[group].push(o);
});
return Object.keys(groups).map(function(group) {
return groups[group];
});
},
doprintreAmt: function(type) {
var nt = new Date();
var that = this;

@ -5,12 +5,12 @@
<view class="content">
<block v-for="(item,index) in info">
<view >
<view>
<view class="indexbox">
<boxtitle :title="item.name">
<text>{{item.data.recharge==null?0:item.data.recharge.total}}</text>
</boxtitle>
<view class="statBox" @click="toinfo(item,'recharge')">
<view class="statBox" @click="toinfo(item,'recharge')">
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader">
<view class="statItemCBar "></view>
@ -19,6 +19,15 @@
<view class="statNum mf-26">{{item.data.recharge==null?0:item.data.recharge.cash}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar green"></view>
<text class="statItemTitele">扫码</text>
</view>
<view class="statNum mf-26">
{{item.data.recharge==null?0:item.data.recharge.total_online}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar blue"></view>
@ -26,46 +35,72 @@
</view>
<view class="statNum mf-26">{{item.data.recharge==null?0:item.data.recharge.pos}}</view>
</view>
</view>
<boxtitle title="退款">
<text style="color: crimson;">{{item.data.refund}}</text>
</boxtitle>
<view class="statBox" @click="toinfo(item,'refund')">
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader">
<view class="statItemCBar "></view>
<text class="statItemTitele">现金</text>
</view>
<view class="statNum mf-26">
{{item.data.refund_by_methods==null?0:item.data.refund_by_methods.cash}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar green"></view>
<view class="statItemCBar blue"></view>
<text class="statItemTitele">扫码</text>
</view>
<view class="statNum mf-26">
{{item.data.recharge==null?0:item.data.recharge.total_online}}
{{item.data.refund_by_methods==null?0:(item.data.refund_by_methods.weixin+item.data.refund_by_methods.alipay)}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar green"></view>
<text class="statItemTitele"></text>
</view>
<view class="statNum mf-26">
</view>
</view>
</view>
<boxtitle title="退款">
<text style="color: crimson;">{{item.data.refund}}</text>
</boxtitle>
<view class="statBox" @click="toinfo(item,'refund')">
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader">
<view class="statItemCBar "></view>
<text class="statItemTitele">现金</text>
</view>
<view class="statNum mf-26">{{item.data.refund_by_methods==null?0:item.data.refund_by_methods.cash}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar blue"></view>
<text class="statItemTitele">微信</text>
</view>
<view class="statNum mf-26">{{item.data.refund_by_methods==null?0:item.data.refund_by_methods.weixin}}</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar green"></view>
<text class="statItemTitele">扫码</text>
</view>
<view class="statNum mf-26">
{{item.data.refund_by_methods==null?0:item.data.refund_by_methods.alipay}}
</view>
</view>
<boxtitle title="交账">
<text style="color: blue;">{{item.data.budget.total}}</text>
</boxtitle>
<view class="statBox">
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader">
<view class="statItemCBar "></view>
<text class="statItemTitele">现金</text>
</view>
<view class="statNum mf-26">{{item.data.budget.cash}}
</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar blue"></view>
<text class="statItemTitele">扫码</text>
</view>
<view class="statNum mf-26">{{item.data.budget.online}}</view>
</view>
<view class="statItem" style="width: 33.33%;">
<view class="statItemHeader ">
<view class="statItemCBar green"></view>
<text class="statItemTitele"></text>
</view>
<view class="statNum mf-26">
</view>
</view>
</view>
<view class="lCircle lc_1"></view>
<view class="lCircle lc_2"></view>
</view>
@ -106,16 +141,27 @@
var that = this;
var i = 0;
for (var m of that.info) {
that.loadData(m.type, i, function(r, i) {
that.info[i].data = r;
})
that.loadData(m.type, i,
function(r, i) {
console.log(r.recharge)
that.info[i].data = r;
that.info[i].data.budget = {
total: r.recharge.total - r.refund,
cash: r.recharge.cash - r.refund_by_methods.cash,
online: r.recharge.total_online - r.refund_by_methods.weixin-r.refund_by_methods.alipay
};
})
i++;
}
},
methods: {
toinfo: function(item,type) {
toinfo: function(item, type) {
uni.navigateTo({
url:"../statinfo/statinfo?type="+type+"&from=" + item.type
url: "../statinfo/statinfo?type=" + type + "&from=" + item.type
})
},
tohome: function() {

@ -421,7 +421,7 @@
var that = this;
for (var i = 1; i <= 6; i++) {
var c = false;
if (i == 3) {
if (this.order.total-this.order.paid_total==i*price) {
c = true;
that.totalPrice = i * price;

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save