pengjun 3 months ago
parent
commit
44917e5a68
  1. 4
      src/components/report/TurnoverReportDetails.vue
  2. 366
      src/components/report/TurnoverReportReal.vue
  3. 30
      src/views/customerOrg/CustomerOrgGroupEdit.vue

4
src/components/report/TurnoverReportDetails.vue

@ -73,10 +73,6 @@
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname" />
</el-select>
</div>
<div class="query">
<span class="spanClass">包含预登记</span>
<el-checkbox v-model="query.isPreRegistration" true-label="Y" false-label="N" />
</div>
</div>
</div>
<div style="display: block;width: 110px;">

366
src/components/report/TurnoverReportReal.vue

@ -0,0 +1,366 @@
<template>
<div>
<div class="middlebox">
<div class="contenttitle">
体检查询 /
<span class="contenttitleBold">营业额统计实收</span>
</div>
</div>
<div
style="display: flex;justify-content: space-between; padding: 10px;background-color: #fff;border-radius: 8px;margin-bottom: 10px;">
<div style="display:block;">
<div style="display: flex;flex-wrap: wrap;height: 32px;align-items: center;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
<el-option label="登记日期" :value="'1'" />
<el-option label="体检日期" :value="'2'" />
<el-option label="总检日期" :value="'3'" />
<el-option label="收费日期" :value="'6'" />
</el-select>
<!-- 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" />
<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" />
</div>
<div class="query">
<span class="spanClass">体检单位</span>
<el-select v-model="query.customerOrgIds" placeholder="请选择体检单位" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:300px;" size="small" multiple
collapse-tags>
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div class="query">
<span class="spanClass">含预登记</span>
<el-checkbox v-model="query.isPreRegistration" true-label="Y" false-label="N" />
</div>
<div class="query">
<span class="spanClass">含子单位</span>
<el-checkbox v-model="query.isChild" true-label="Y" false-label="N" @change="btnQuery" />
</div>
<div class="query">
<span class="spanClass">单位次数</span>
<el-checkbox v-model="query.isCustomerOrgRegister" true-label="Y" false-label="N" @change="btnQuery" />
</div>
</div>
<div style="display: flex;flex-wrap: wrap;margin-top: 2px; height: 32px;align-items: center;">
<div class="query">
<span class="spanClass">体检类别</span>
<el-select v-model="query.medicalTypeIds" placeholder="请选择体检类别" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in medicalType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div class="query">
<span class="spanClass">人员类别</span>
<el-select v-model="query.personnelTypeIds" placeholder="请选择人员类别" :filter-method="filterMethod"
default-first-option clearable filterable style="margin-left: 10px;width:200px;" size="small" multiple
collapse-tags>
<el-option v-for="item in personnelType" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div class="query">
<span class="spanClass">业务员</span>
<el-select v-model="query.salesmans" placeholder="请输入业务员姓名" default-first-option clearable filterable
style="margin-left: 10px" size="small" multiple collapse-tags>
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname" />
</el-select>
</div>
</div>
</div>
<div style="display: block;width: 110px;">
<div>
<el-button type="primary" class="commonbutton" @click="btnQuery" size="small">查询</el-button>
</div>
<div style="margin-top: 5px;">
<el-button class="commonbutton" @click="btnExport('tableData')" size="small">导出</el-button>
</div>
</div>
</div>
<div id="tableData">
<el-table :data="tableData" border :height="window.pageHeight - 192" 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 prop="customerOrgName" label="单位名称" min-width="240">
<template slot-scope="scope">
<div>{{ query.isChild == 'Y' ? scope.row.customerOrgName + (scope.row.departmentName &&
scope.row.customerOrgName != scope.row.departmentName ?
'--' + scope.row.departmentName : '') : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column v-if="query.isCustomerOrgRegister == 'Y' ? true : false" prop="medicalTimes" 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>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { deepCopy } from "../../utlis/proFunc"
import CusOrgOCX from "./CusOrgOCX.vue"
import moment from "moment";
import FileSaver from 'file-saver';
export default {
components: {
CusOrgOCX,
},
props: ["orgEnable"],
data() {
return {
dialogVisible: false,
local: {
completeFlag: []
},
customerOrg: [],
customerOrgAll: [],
medicalType: [],
personnelType: [],
dictSalesman: [],
query: {
dateType: '1',
startDate: '',
endDate: '',
customerOrgIds: [],
medicalTypeIds: [],
personnelTypeIds: [],
salesmans: [],
// isMedicalTypeId: 'Y',
isPreRegistration: 'N',
isChild: 'Y',
isCustomerOrgRegister: 'N', //
},
tableData: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
},
};
},
created() {
},
//
mounted() {
this.dictInit()
},
updated() {
this.$nextTick(() => {
this.$refs['refTable'].doLayout()
})
},
computed: {
...mapState(["window", "dict", "patientRegister", "report"]),
},
methods: {
//
dictInit() {
let today = moment(new Date()).format("YYYY-MM-DD")
this.query.startDate = today
this.query.endDate = today
//
getapi("/api/app/customer-org/parent-all").then((res) => {
if (res.code != -1) {
this.customerOrgAll = res.data;
this.customerOrg = deepCopy(this.customerOrgAll);
}
});
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code > -1) {
this.dict.medicalType = res.data;
this.medicalType = res.data
}
});
//
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.personnelType = res.data;
this.personnelType = res.data;
}
});
// {
postapi('/api/identity/users/GetUserListBySaleRole')
.then(res => {
if (res.code > -1) {
this.dictSalesman = res.data
}
})
},
//
btnExport(elId) {
let table = document.getElementById(elId);
let tableData = table.innerHTML
let fileName = moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
FileSaver.saveAs(blob, fileName);
},
//
filterMethod(keyWords) {
if (keyWords) {
this.customerOrg = [];
this.customerOrgAll.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
this.customerOrg.push(item);
}
});
} else {
this.customerOrg = deepCopy(this.customerOrgAll);
}
},
//
btnQuery() {
//let body = deepCopy(this.query)
postapi("/api/app/CustomerReport/GetCustomerOrgPhysicalExaminationStatistics", this.query).then(res => {
if (res.code > -1) {
this.tableData = res.data
if (Array.isArray(this.tableData) && this.tableData.length > 0) {
this.tableData.forEach(e => {
e.startMedical = Number(e.partCheckCount) + Number(e.checkCount)
});
}
}
})
},
//
getSummaries(param) {
console.log('getSummaries param', param)
// if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
// data:this.customerOrgGroupAsbitems
// }
// }
const { columns, data } = param;
const sumCol = [2, 3, 4, 7, 8, 9] //
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;
},
},
};
</script>
<style scoped>
@import '../../assets/css/global.css';
@import '../../assets/css/global_font.css';
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 5px;
padding-right: 15px;
}
::v-deep .el-input__icon {
width: 15px;
/* 输入框下拉箭头或清除图标 默认 25 */
}
::v-deep .el-input-group__append {
padding: 0 5px;
/* 控件默认 0 20px;*/
}
::v-deep .el-icon-search:before {
color: #00F;
}
.query {
margin-left: 10px;
font-size: 14px;
color: #232748;
font-weight: 400;
font-family: "NotoSansSC-Regular";
}
.spanClass {
padding: 0 2px 0 0;
}
</style>

30
src/views/customerOrg/CustomerOrgGroupEdit.vue

@ -25,7 +25,8 @@
<el-col :span="8">
<el-form-item label="婚姻状况">
<el-select v-model="form.maritalStatusId" placeholder="请选择" style="width: 100%" size="small">
<el-option v-for="item in dict.forMaritalStatus" :key="item.id" :label="item.displayName" :value="item.id">
<el-option v-for="item in dict.forMaritalStatus" :key="item.id" :label="item.displayName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -110,7 +111,7 @@ export default {
maritalStatusId: "A",
ageLowerLimit: 0,
ageUpperLimit: 200,
canAddMoney:0,
canAddMoney: 0,
jobPost: "",
jobTitle: "",
remark: "",
@ -170,7 +171,7 @@ export default {
}
})
} else {
console.log('this.formInit',this.formInit)
console.log('this.formInit', this.formInit)
this.form = deepCopy(this.formInit)
this.form.customerOrgId = this.params.customerOrgId
this.form.customerOrgRegisterId = this.params.customerOrgRegisterId
@ -310,16 +311,27 @@ export default {
},
//
computePricePerson(){
computePricePerson() {
if (!this.form.id) {
this.$message.warning("尚未保存信息,不可执行此操作!");
return;
}
let customerOrgGroupId = this.form.id; //ID
let customerOrgGroupAsbitems = []; //
this.$message.warning({showClose:true,message:"开发中……"})
// {
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "startDate": "string",
// "endDate": "string",
// "syncMode": "string" // 0- 1- 2-+
// }
let body = {
customerOrgGroupId: this.form.id,
syncMode: '2'
}
postapi('/api/app/CustomerOrgGroup/SyncCustomerOrgGroupAsbitemPrice', body)
.then(res => {
if (res.code > -1) {
this.$message.success({ showClose: true, message: '操作成功!' })
}
})
},
madeNewGroupAsbitems(oldGroupAsbitems, newTotal) {

Loading…
Cancel
Save