pengjun 3 months ago
parent
commit
fdf32ef65e
  1. 3
      src/components/report/TurnoverReport.vue
  2. 3
      src/components/report/TurnoverReportM.vue
  3. 3
      src/components/report/TurnoverReportP.vue
  4. 153
      src/components/report/TurnoverReportS.vue
  5. 6
      src/router/index.js
  6. 104
      src/views/fee-settings/cardBill.vue
  7. 332
      src/views/fee-settings/cardBillSum.vue

3
src/components/report/TurnoverReport.vue

@ -94,6 +94,7 @@
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" /> <el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" /> <el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" /> <el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -281,7 +282,7 @@ export default {
// } // }
const { columns, data } = param; const { columns, data } = param;
const sumCol = [2, 3, 4, 7, 8] //
const sumCol = [2, 3, 4, 7, 8, 9] //
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data) //console.log('column, index,data',column, index,data)

3
src/components/report/TurnoverReportM.vue

@ -56,6 +56,7 @@
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" /> <el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" /> <el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" /> <el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -218,7 +219,7 @@ export default {
// } // }
const { columns, data } = param; const { columns, data } = param;
const sumCol = [2,3,4, 7,8] //
const sumCol = [2,3,4, 7,8, 9] //
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data) //console.log('column, index,data',column, index,data)

3
src/components/report/TurnoverReportP.vue

@ -56,6 +56,7 @@
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" /> <el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" /> <el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" /> <el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -219,7 +220,7 @@ export default {
// } // }
const { columns, data } = param; const { columns, data } = param;
const sumCol = [2,3,4, 7,8] //
const sumCol = [2,3,4, 7,8,9] //
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data) //console.log('column, index,data',column, index,data)

153
src/components/report/TurnoverReportS.vue

@ -6,160 +6,63 @@
<span class="contenttitleBold">营业额统计业务员</span> <span class="contenttitleBold">营业额统计业务员</span>
</div> </div>
</div> </div>
<div
style="
<div style="
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;
border-radius: 8px; border-radius: 8px;
margin-bottom: 10px; margin-bottom: 10px;
"
>
">
<div style="display: block"> <div style="display: block">
<div
style="
<div style="
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
height: 32px; height: 32px;
align-items: center; align-items: center;
"
>
">
<div class="query"> <div class="query">
<el-select
v-model="query.dateType"
placeholder="请选择"
style="width: 80px"
size="small"
>
<el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
<el-option label="登记日期" :value="'1'" /> <el-option label="登记日期" :value="'1'" />
<el-option label="体检日期" :value="'2'" /> <el-option label="体检日期" :value="'2'" />
<el-option label="总检日期" :value="'3'" /> <el-option label="总检日期" :value="'3'" />
<el-option label="收费日期" :value="'6'" /> <el-option label="收费日期" :value="'6'" />
</el-select> </el-select>
<!-- dateType 1 登记2 体检3 总检日期--> <!-- dateType 1 登记2 体检3 总检日期-->
<el-date-picker
v-model="query.startDate"
type="date"
placeholder="起始日期"
size="small"
style="width: 90px"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
/>
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width: 90px"
value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
<span class="spanClass"></span> <span class="spanClass"></span>
<el-date-picker
v-model="query.endDate"
type="date"
placeholder="截止日期"
size="small"
style="width: 90px"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
/>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width: 90px"
value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
</div> </div>
<div class="query"> <div class="query">
<span class="spanClass">业务员</span> <span class="spanClass">业务员</span>
<el-input
v-model="salesmans"
placeholder="请输入业务员姓名"
size="small"
style="width: 150px; margin-left: 10px"
/>
<el-input v-model="salesmans" placeholder="请输入业务员姓名" size="small" style="width: 150px; margin-left: 10px" />
</div> </div>
<div class="query"> <div class="query">
<span class="spanClass">是否包含预登记</span> <span class="spanClass">是否包含预登记</span>
<el-checkbox
v-model="query.isPreRegistration"
true-label="Y"
false-label="N"
/>
<el-checkbox v-model="query.isPreRegistration" true-label="Y" false-label="N" />
</div> </div>
</div> </div>
</div> </div>
<div> <div>
<el-button
type="primary"
class="commonbutton"
@click="btnQuery"
size="small"
>查询</el-button
>
<el-button
class="commonbutton"
@click="btnExport('tableData')"
size="small"
>导出</el-button
>
<el-button type="primary" class="commonbutton" @click="btnQuery" size="small">查询</el-button>
<el-button class="commonbutton" @click="btnExport('tableData')" size="small">导出</el-button>
</div> </div>
</div> </div>
<div id="tableData"> <div id="tableData">
<el-table
:data="tableData"
border
:height="window.pageHeight - 160"
highlight-current-row
size="small"
row-key="id"
:summary-method="getSummaries"
show-summary
ref="refTable"
>
<el-table :data="tableData" border :height="window.pageHeight - 160" highlight-current-row size="small"
row-key="id" :summary-method="getSummaries" show-summary ref="refTable">
<el-table-column type="index" label="序号" width="50" align="center" /> <el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column
prop="salesman"
label="业务员"
min-width="80"
align="center"
/>
<el-table-column
prop="registerCount"
label="登记人数"
min-width="80"
align="center"
/>
<el-table-column
prop="startMedical"
label="检查人数"
min-width="80"
align="center"
/>
<el-table-column
prop="checkCount"
label="总检人数"
min-width="80"
align="center"
/>
<el-table-column
prop="avgStandardPrice"
label="标准平均单价"
min-width="100"
align="center"
/>
<el-table-column
prop="avgChargePrice"
label="应收平均单价"
min-width="100"
align="center"
/>
<el-table-column
prop="sumStandardPrice"
label="标准金额"
min-width="100"
align="center"
/>
<el-table-column
prop="sumChargePrice"
label="应收金额"
min-width="100"
align="center"
/>
<el-table-column
prop="sumReceivedPrice"
label="实收金额"
min-width="100"
align="center"
/>
<el-table-column prop="salesman" label="业务员" min-width="80" align="center" />
<el-table-column prop="registerCount" label="登记人数" min-width="80" align="center" />
<el-table-column prop="startMedical" label="检查人数" min-width="80" align="center" />
<el-table-column prop="checkCount" label="总检人数" min-width="80" align="center" />
<el-table-column prop="avgStandardPrice" label="标准平均单价" min-width="100" align="center" />
<el-table-column prop="avgChargePrice" label="应收平均单价" min-width="100" align="center" />
<el-table-column prop="sumStandardPrice" label="标准金额" min-width="100" align="center" />
<el-table-column prop="sumChargePrice" label="应收金额" min-width="100" align="center" />
<el-table-column prop="sumReceivedPrice" label="实收金额" min-width="100" align="center" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -196,7 +99,7 @@ export default {
// isMedicalTypeId: 'Y', // isMedicalTypeId: 'Y',
isPreRegistration: "N", isPreRegistration: "N",
}, },
salesmans:"",
salesmans: "",
tableData: [], tableData: [],
pickerOptions: { pickerOptions: {
@ -231,7 +134,7 @@ export default {
}; };
}, },
created() {},
created() { },
// //
mounted() { mounted() {
@ -298,8 +201,8 @@ export default {
// //
btnQuery() { btnQuery() {
this.query.salesmans = [];
if (this.salesmans.replace(/\s+/g, '')!='') {
this.query.salesmans = [];
if (this.salesmans.replace(/\s+/g, '') != '') {
this.query.salesmans.push(this.salesmans.replace(/\s+/g, '')); this.query.salesmans.push(this.salesmans.replace(/\s+/g, ''));
} }
postapi( postapi(

6
src/router/index.js

@ -304,6 +304,12 @@ const routes = [{
component: () => component: () =>
import ("../views/fee-settings/cardBill.vue"), import ("../views/fee-settings/cardBill.vue"),
}, },
{
path: "/cardBillSum",
name: "会员卡记账统计",
component: () =>
import ("../views/fee-settings/cardBillSum.vue"),
},
//---------------------- 收费设置 start ---------------------- //---------------------- 收费设置 start ----------------------
{ {
path: "/item-type", path: "/item-type",

104
src/views/fee-settings/cardBill.vue

@ -13,9 +13,9 @@
<div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:80px;margin-top: 7px;"> <div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:80px;margin-top: 7px;">
<div class="query"> <div class="query">
<span>记账日期</span> <span>记账日期</span>
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" />
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" value-format="yyyy-MM-dd"/>
<span>--</span> <span>--</span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"/>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" value-format="yyyy-MM-dd"/>
</div> </div>
<div class="query"> <div class="query">
<span>记账标志</span> <span>记账标志</span>
@ -25,7 +25,7 @@
</div> </div>
<div class="query"> <div class="query">
<span>支付方式</span> <span>支付方式</span>
<el-select v-model="query.payModeId" placeholder="请选择" filterable clearable size="small">
<el-select v-model="query.payModeIds" placeholder="请选择" filterable clearable size="small" multiple collapse-tags>
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" /> <el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select> </el-select>
</div> </div>
@ -51,36 +51,34 @@
</div> </div>
<div style="background-color: #fff; padding: 15px; border-radius: 8px;"> <div style="background-color: #fff; padding: 15px; border-radius: 8px;">
<el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 330 : window.pageHeight - 250" <el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 330 : window.pageHeight - 250"
row-key="id" highlight-current-row ref="dataList">
<el-table-column prop="cardNo" label="会员卡号" width="150" />
row-key="id" highlight-current-row ref="dataList" border show-summary :summary-method="getSummaries">
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="cardNo" label="会员卡号" width="150" align="center"/>
<el-table-column prop="customerName" label="卡主姓名" /> <el-table-column prop="customerName" label="卡主姓名" />
<el-table-column prop="mobileTelephone" label="手机号" />
<el-table-column prop="payModeId" label="支付方式">
<el-table-column prop="mobileTelephone" label="手机号" align="center"/>
<el-table-column prop="payModeId" label="支付方式" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div> <div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="billMoney" label="记账金额" />
<el-table-column prop="billFlag" label="记账标志">
<el-table-column prop="billMoney" label="记账金额" align="center"/>
<el-table-column prop="billFlag" label="记账标志" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ dddw(dict.billFlag, "id", scope.row.billFlag, "displayName") }}</div> <div>{{ dddw(dict.billFlag, "id", scope.row.billFlag, "displayName") }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorName" label="创建人员" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<!--
<el-table-column prop="creatorName" label="创建人员" align="center"/>
<el-table-column prop="creationTime" label="创建日期" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.creationTime"> <div v-if="scope.row.creationTime">
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifierName" label="修改人员" />
<el-table-column prop="lastModificationTime" label="修改日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.lastModificationTime">
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
</div>
</template>
-->
<el-table-column prop="lastModifierName" label="修改人员" align="center"/>
<el-table-column prop="lastModificationTime" label="修改日期" width="150" align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -92,7 +90,7 @@
import moment from "moment"; import moment from "moment";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc";
export default { export default {
@ -105,7 +103,7 @@ export default {
startDate:'', startDate:'',
endDate:'', endDate:'',
billFlag:'', billFlag:'',
payModeId:'',
payModeIds:[],
cardNo:'', cardNo:'',
customerName:'', customerName:'',
idNo:'', idNo:'',
@ -116,7 +114,7 @@ export default {
}, },
created() { created() {
this.query.startDate = new Date();
this.query.startDate = moment(new Date()).format("yyyy-MM-DD");
this.query.endDate = this.query.startDate; this.query.endDate = this.query.startDate;
}, },
@ -125,6 +123,13 @@ export default {
this.dicInit(); this.dicInit();
this.enterToQuery() this.enterToQuery()
}, },
updated() {
this.$nextTick(() => {
this.$refs['dataList'].doLayout() //
})
},
computed: { computed: {
...mapState(["window", "dict"]), ...mapState(["window", "dict"]),
}, },
@ -135,7 +140,7 @@ export default {
// //
btnQuery(queryType) { btnQuery(queryType) {
let body = {}
let body = deepCopy(this.query)
switch (queryType) { switch (queryType) {
case 'idNo': case 'idNo':
@ -158,14 +163,12 @@ export default {
this.$message.error("数据不合法,起始日期不能大于截止日期!"); this.$message.error("数据不合法,起始日期不能大于截止日期!");
return; return;
} }
body.startDate = moment(this.query.startDate).format('yyyy-MM-DD');
body.endDate = moment(this.query.endDate).format('yyyy-MM-DD');
if(this.query.cardModeId) body.cardModeId = this.query.cardModeId;
if(this.query.cardTypeId) body.cardTypeId = this.query.cardTypeId;
if(this.query.customerName) body.customerName = this.query.customerName;
if(this.query.cardFlag) body.cardFlag = this.query.cardFlag;
if(this.query.mobileTelephone) body.mobileTelephone = this.query.mobileTelephone;
if(!body.cardNo) delete body.cardNo
if(!body.billFlag) delete body.billFlag
if(!body.customerName) delete body.customerName
if(!body.idNo) delete body.idNo
if(!body.mobileTelephone) delete body.mobileTelephone
if(body?.payModeIds.length == 0) delete body.payModeIds
} }
break; break;
} }
@ -188,6 +191,47 @@ export default {
}); });
}, },
//
getSummaries(param) {
//console.log('getSummaries param', param)
// if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
// data:this.customerOrgGroupAsbitems
// }
// }
const { columns, data } = param;
const sumCol = [5] //
const sums = [];
columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data)
//
if (index === 1) {
sums[index] = '合计';
return;
}
//
if (sumCol.indexOf(index) == -1) {
sums[index] = '';
return;
}
sums[index] = 0
data.forEach(e => {
if (!isNaN(e[column.property])) sums[index] += Number(e[column.property])// * e['amount']
})
sums[index] = sums[index].toFixed(2) //+ ' ';
});
// this.groupPrice = sums[7];
//console.log('getSummaries',sums)
// if (!this.totalFoucs) this.total = sums[5];
// if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2);
return sums;
},
dicInit(){ dicInit(){
// //
getapi("/api/app/pay-mode").then((res) => { getapi("/api/app/pay-mode").then((res) => {

332
src/views/fee-settings/cardBillSum.vue

@ -0,0 +1,332 @@
<template>
<div>
<div style="position: relative">
<div class="middlebox">
<div class="contenttitle">
收费 /
<span class="contenttitleBold"
>会员卡记账统计</span
>
</div>
</div>
<div style="margin-top:7px">
<div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:80px;margin-top: 7px;">
<div class="query">
<span>记账日期</span>
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" value-format="yyyy-MM-dd"/>
<span>--</span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" value-format="yyyy-MM-dd"/>
</div>
<div class="query">
<span>记账标志</span>
<el-select v-model="query.billFlag" placeholder="请选择" filterable clearable size="small">
<el-option v-for="item in dict.billFlag" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div class="query">
<span>支付方式</span>
<el-select v-model="query.payModeIds" placeholder="请选择" filterable clearable size="small" multiple collapse-tags>
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div class="query">
<span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 190px"/>
</div>
<div class="query">
<span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 190px"/>
</div>
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 190px"/>
</div>
<div class="query">
<span>电话</span>
<el-input placeholder="手机号/电话" v-model="query.mobileTelephone" size="small" clearable style="width: 190px"/>
</div>
<div class="query">
<el-button class="commonbutton" @click="btnQuery">查询</el-button>
</div>
</div>
<div style="background-color: #fff; padding: 15px; border-radius: 8px;">
<el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 330 : window.pageHeight - 250"
row-key="id" highlight-current-row ref="dataList" border show-summary :summary-method="getSummaries">
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="cardNo" label="会员卡号" width="150" align="center"/>
<el-table-column prop="customerName" label="卡主姓名" />
<el-table-column prop="mobileTelephone" label="手机号" align="center"/>
<el-table-column prop="payModeNams" label="支付方式" align="center" />
<el-table-column prop="billMoney" label="充值金额" align="center"/>
<el-table-column prop="billMoney" label="扣费金额" align="center"/>
<el-table-column prop="billMoney" label="退费金额" align="center"/>
</el-table>
</div>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc";
export default {
components: {
},
data() {
return {
query: {
startDate:'',
endDate:'',
billFlag:'',
payModeIds:[],
cardNo:'',
customerName:'',
idNo:'',
mobileTelephone:''
}, //
dataList: [], //
};
},
created() {
this.query.startDate = moment(new Date()).format("yyyy-MM-DD");
this.query.endDate = this.query.startDate;
},
//
mounted() {
this.dicInit();
this.enterToQuery()
},
updated() {
this.$nextTick(() => {
this.$refs['dataList'].doLayout() //
})
},
computed: {
...mapState(["window", "dict"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
//
btnQuery(queryType) {
let body = deepCopy(this.query)
switch (queryType) {
case 'idNo':
if(!this.query.idNo) return;
body = { idNo: this.query.idNo };
break;
case 'cardNo':
if(!this.query.cardNo) return;
body = { cardNo: this.query.cardNo };
break;
default:
if(this.query.idNo){
body = { idNo: this.query.idNo };
}else if(this.query.cardNo){
body = { cardNo: this.query.cardNo };
}else{
// if(!this.query.startDate) this.query.startDate = moment(new Date()).format('yyyy-MM-DD');
// if(!this.query.endDate) this.query.endDate = moment(new Date()).format('yyyy-MM-DD');
if(this.query.startDate > this.query.endDate){
this.$message.error("数据不合法,起始日期不能大于截止日期!");
return;
}
if(!body.cardNo) delete body.cardNo
if(!body.billFlag) delete body.billFlag
if(!body.customerName) delete body.customerName
if(!body.idNo) delete body.idNo
if(!body.mobileTelephone) delete body.mobileTelephone
if(body?.payModeIds.length == 0) delete body.payModeIds
}
break;
}
// {
// "cardNo": "string",
// "customerName": "string",
// "idNo": "string",
// "mobileTelephone": "string",
// "billFlag": "string",
// "startDate": "string",
// "endDate": "string"
// }
postapi('/api/app/cardbill/getcardbilllist', body)
.then((res) => {
if (res.code != -1) {
this.dataList = res.data;
}
});
},
//
getSummaries(param) {
//console.log('getSummaries param', param)
// if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
// data:this.customerOrgGroupAsbitems
// }
// }
const { columns, data } = param;
const sumCol = [5,6,7] //
const sums = [];
columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data)
//
if (index === 1) {
sums[index] = '合计';
return;
}
//
if (sumCol.indexOf(index) == -1) {
sums[index] = '';
return;
}
sums[index] = 0
data.forEach(e => {
if (!isNaN(e[column.property])) sums[index] += Number(e[column.property])// * e['amount']
})
sums[index] = sums[index].toFixed(2) //+ ' ';
});
// this.groupPrice = sums[7];
//console.log('getSummaries',sums)
// if (!this.totalFoucs) this.total = sums[5];
// if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2);
return sums;
},
dicInit(){
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
},
//
enterToQuery() {
// console.log('enterToTab');
this.$nextTick(() => {
let inputs = document.querySelectorAll(["input"]); // //.inline-input
//
inputs.forEach((input, i) => {
// console.log('input',input);
input.addEventListener('keydown', (event) => {
if (event.keyCode === 13) {
//
event.preventDefault();
//
// console.log(input.getAttribute('placeholder'),input.value)
let placeholder = input.getAttribute('placeholder')
switch (placeholder) {
case '卡号':
if (input.value) this.btnQuery()
input.select()
break;
case '身份证号':
if (input.value) this.btnQuery()
input.select()
break;
}
}
});
input.addEventListener('click', (event) => {
let placeholder = input.getAttribute('placeholder')
switch (placeholder) {
case '卡号':
input.select()
break;
case '身份证号':
input.select()
break;
}
});
});
});
},
},
//
watch: {
//
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('')
this.query();
}
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_button.css";
@import "../../assets/css/global_dialog.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 5px;
padding-right: 25px;
}
::v-deep .el-icon-date:before {
content: ""
}
.query{
margin-right: 15px;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
color: #232748;
font-size: 400;
font-family: "NotoSansSC-Regular";
}
.box {
display: flex;
flex-direction: column;
}
:deep .el-form-item {
margin-bottom: 14px;
}
/* el-dialog的头部样式 */
:deep .el-dialog__header {
padding: 11px 20px 11px;
}
/* el-dialog的主体样式 */
:deep .el-dialog__body {
padding: 0px 20px 0px;
}
/* el-divider样式 */
:deep .el-divider--horizontal {
margin: 0px 0 12px;
}
/* el-dialog的底部样式 */
:deep .el-dialog__footer {
padding: 0px 20px 14px;
}
.query:last-child{
margin-right: 0;
}
</style>
Loading…
Cancel
Save