Browse Source

card

master
pengjun 2 years ago
parent
commit
87febdff06
  1. 6
      src/store/index.js
  2. 82
      src/views/fee-settings/SysParmSet.vue
  3. 522
      src/views/fee-settings/cardBill.vue
  4. 518
      src/views/fee-settings/cardRegister.vue
  5. 389
      src/views/fee-settings/cardType.vue

6
src/store/index.js

@ -189,6 +189,12 @@ export default new Vuex.Store({
{ id: "1", displayName: "单位支付" },
{ id: "2", displayName: "赠送" },
],
cardMode:[
{ id: "0", displayName: "充值卡" },
{ id: "1", displayName: "积分卡" },
],
cardType:[], //会员卡类别
billFlag:[],
checkTypeFlag: [
{ id: "0", displayName: "检验" },
{ id: "1", displayName: "功能检查" },

82
src/views/fee-settings/SysParmSet.vue

@ -3,30 +3,15 @@
<el-card>
<div style="display: flex">
<div class="leftTree">
<el-tree
:data="sysParmTypesTree"
:props="treeProps"
@node-click="nodeClick"
/>
<el-tree :data="sysParmTypesTree" :props="treeProps" @node-click="nodeClick" />
</div>
<div class="midBlock">
<div style="display: flex">
<div>
<span>体检中心</span>
<el-select
v-model="organizationId"
placeholder="请选择体检中心"
style="margin-left: 15px"
filterable
size="small"
@change="changeOrganization"
>
<el-option
v-for="item in organization"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
<el-select v-model="organizationId" placeholder="请选择体检中心" style="margin-left: 15px" filterable size="small"
@change="changeOrganization">
<el-option v-for="item in organization" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</div>
@ -39,57 +24,28 @@
</div>
</div>
<div style="margin-top: 2px">
<el-table
:data="sysParms"
border
:height="window.pageHeight < 600 ? 420 : window.pageHeight - 190"
size="small"
highlight-current-row
>
<el-table :data="sysParms" border :height="window.pageHeight < 600 ? 420 : window.pageHeight - 190"
size="small" highlight-current-row>
<el-table-column prop="id" label="参数ID" />
<el-table-column
prop="displayName"
label="参数名称"
width="120"
/>
<el-table-column prop="displayName" label="参数名称" width="120" />
<el-table-column prop="organizationUnitId" label="体检中心">
<template slot-scope="scope">
<el-select
v-model="scope.row.organizationUnitId"
placeholder="请选择体检中心"
filterable
size="small"
>
<el-option
v-for="item in organization"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
<el-select v-model="scope.row.organizationUnitId" placeholder="请选择体检中心" filterable size="small">
<el-option v-for="item in organization" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="sysParmValueName" label="参数值">
<template slot-scope="scope">
<el-input
type="textarea"
v-model="scope.row.sysParmValueName"
:autosize="{ minRows: 1, maxRows: 100 }"
maxlength="100"
size="small"
/>
<el-input type="textarea" v-model="scope.row.sysParmValueName" :autosize="{ minRows: 1, maxRows: 100 }"
maxlength="100" size="small" />
</template>
</el-table-column>
<el-table-column prop="valueRemark" label="备注">
<template slot-scope="scope">
<el-input
type="textarea"
v-model="scope.row.valueRemark"
:autosize="{ minRows: 1, maxRows: 100 }"
maxlength="500"
size="small"
/>
<el-input type="textarea" v-model="scope.row.valueRemark" :autosize="{ minRows: 1, maxRows: 100 }"
maxlength="500" size="small" />
</template>
</el-table-column>
<el-table-column prop="remark" label="参数说明" />
@ -124,7 +80,7 @@ export default {
};
},
created() {},
created() { },
//
mounted() {
@ -221,15 +177,13 @@ export default {
overflow: scroll;
border: 1px solid;
width: 200px;
height: v-bind(
"(window.pageHeight < 600 ? 450 : window.pageHeight - 150) + 'px'"
);
height: v-bind("(window.pageHeight < 600 ? 450 : window.pageHeight - 150) + 'px'"
);
}
.midBlock {
margin-left: 5px;
width: v-bind(
"(window.pageWidth < 500 ? 300 : window.pageWidth - 270) + 'px'"
);
width: v-bind("(window.pageWidth < 500 ? 300 : window.pageWidth - 270) + 'px'"
);
}
</style>

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

@ -1,251 +1,386 @@
<template>
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'">
<el-table :data="dataList" border
width="100%"
:height="window.pageHeight < 600 ? 350:window.pageHeight-250"
row-key="id" size="small" highlight-current-row ref="dataList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="40"/>
<el-table-column prop="isMedicalStart" label="签到" width="50">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isMedicalStart == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="medicalStartDate" label="签到日期" width="90">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.medicalStartDate, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住" width="50">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgName" label="部门" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
</template>
</el-table-column>
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
<el-table-column label="分组/套餐" width="150">
<template slot-scope="scope">
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
<div>
<el-card>
<div style="display: flex">
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<div class="query">
<span>记账日期</span>
<el-date-picker v-model="query.dateRange" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
</div>
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
<div class="query">
<span>记账标志</span>
<el-select v-model="query.billFlag" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option v-for="item in dict.billFlag" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
<div class="query">
<span>支付方式</span>
<el-select v-model="query.payModeId" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
<div class="query">
<span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 150px" />
</div>
</template>
</el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" />
<el-table-column prop="medicalCardNo" label="体检卡号" />
<el-table-column prop="jobCardNo" label="工卡号" />
<el-table-column prop="maritalStatusId" label="婚姻状况">
<template slot-scope="scope">
<div>
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
<div class="query">
<span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 100px" />
</div>
</template>
</el-table-column>
<el-table-column prop="medicalTypeId" label="体检类别">
<template slot-scope="scope">
<div v-if="scope.row.medicalTypeId !== dict.personOrgId">
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 200px" />
</div>
</template>
</el-table-column>
<el-table-column prop="personnelTypeId" label="人员类别">
<template slot-scope="scope">
<div v-if="scope.row.personnelTypeId !== dict.personOrgId">
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
<div class="query">
<span>手机号</span>
<el-input placeholder="手机号" v-model="query.mobileTelephone" size="small" clearable style="width: 150px" />
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" />
<el-table-column prop="creationTime" label="登记日期" width="100">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="isUpload" label="是否上传">
<template slot-scope="scope">
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button type="success" class="btnClass" @click="sign">签到</el-button>
</div>
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 370 : window.pageHeight - 230"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="cardNo" label="会员卡号" width="150" />
<el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="mobileTelephone" label="手机号" width="150" />
<el-table-column prop="payModeId" label="支付方式" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="billMoney" label="记账金额" width="80" />
<el-table-column prop="billFlag" label="记账标志" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.billFlag, "id", scope.row.billFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.creationTime">
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="lastModifierId" label="修改人员" width="100" />
<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>
</el-table>
</div>
<div style=" margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button class="btnClass" @click="btnQuery">查询</el-button>
</div>
<div class="listBtn">
<el-button type="success" class="btnClass" @click="add">新增</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" class="btnClass" @click="edit">删除</el-button>
</div>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="scanSign">扫码签到</el-button>
</div>
</div>
<el-dialog title="扫/输入条码签到" :visible.sync="dialogVisible">
<el-form :model="form">
<el-form-item label="条码" label-width="100px">
<el-input v-model="form.patientRegisterNo" @change="signByPatientRegisterNo"></el-input>
</el-form-item>
</el-card>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="卡类别" prop="cardTypeId">
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员卡号" prop="cardNo">
<el-input v-model="form.cardNo" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="折扣率" prop="discount">
<el-input type="number" v-model="form.discount" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效期限" prop="expiryDate">
<el-input type="date" v-model="form.expiryDate" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主姓名" prop="customerName">
<el-input v-model="form.customerName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主身份证" prop="idNo">
<el-input v-model="form.idNo" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="卡主电话" prop="telephone">
<el-input type="tel" v-model="form.telephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主手机号" prop="mobileTelephone">
<el-input type="tel" v-model="form.mobileTelephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="启用" prop="cardFlag">
<el-radio v-model="form.cardFlag" label="1"></el-radio>
<el-radio v-model="form.cardFlag" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="创建人员" label-width="80px">
<el-input v-model="form.creatorId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改人员" label-width="80px">
<el-input v-model="form.lastModifierId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" @click="signByPatientRegisterNo">确定</el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
export default {
components: {
PatientRegisterEdit,
Camera,
},
data() {
return {
query: {
dateType:'createDate',
dateType:'createDate',
}, //
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form:{
patientRegisterNo:''
}
dialogVisible: false,
form: {
id: null,
cardTypeId: null,
cardNo: '',
discount: 100,
expiryDate: null,
customerName: '',
idNo: '',
telephone: '',
mobileTelephone: '',
cardFlag: '0',
remark: '',
},
formInit: {},
rules: {
cardTypeId: [
{ required: true, message: "请填写卡类别", trigger: "blur" },
],
cardNo: [
{ required: true, message: "请填写卡号", trigger: "blur" },
],
discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" },
],
expiryDate: [
{ required: true, message: "请填写卡有效期", trigger: "blur" },
],
customerName: [
{ required: true, message: "请填写卡主姓名", trigger: "blur" },
],
idNo: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
mobileTelephone: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
cardFlag: [
{ required: true, message: "请填写卡启用状态", trigger: "blur" },
]
},
curChoosedRow: {}, //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() { },
created() {
this.formInit = { ...this.form };
},
//
mounted() { },
mounted() {
this.dicInit();
},
computed: {
...mapState(["window","dict", "patientRegister", "customerOrg"]),
...mapState(["window", "dict"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
handleSelectionChange(val) {
this.multipleSelection = val;
},
signCore(body){
postapi(`/api/app/patientregister/updatesigninmany`, body)
.then((res) => {
if (res.code != -1){
this.$message.success("操作成功");
}
})
.catch(() => {
this.$message({type: "error",message: "已取消删除",});
});
rowClick(row) {
this.curChoosedRow = row;
},
add() {
this.form = { ...this.formInit };
this.dialogVisible = true;
},
//
sign() {
if (!this.multipleSelection || this.multipleSelection.length < 1 ) {
alert("请选择体检人员,再进行此操作");
edit() {
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
let body = []
this.multipleSelection.forEach(e =>{
body.push(e.id)
});
this.signCore(body)
this.form = { ...this.curChoosedRow };
this.dialogVisible = true;
},
scanSign(){
this.dialogVisible = true
del() {
let lfind = -1;
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
//
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id);
if (lfind > - 1) this.dataList.splice(lfind, 1);
this.curChoosedRow.id = null;
},
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if(res.data){
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
.then((res) => {
if (res.code != -1) {
if (res.data) {
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display);
},
//
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
//console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message);
return;
}
//
if (this.form.id) {
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
} else {
//
}
});
},
//
query() {
btnQuery() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else{
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
}
}
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
@ -274,6 +409,15 @@ export default {
this.dataList = res.data;
});
},
dicInit(){
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
}
},
//
@ -285,23 +429,25 @@ export default {
this.query();
}
},
},
};
</script>
<style scoped>
.box {
display: flex;
.query {
margin-left: 10px;
}
.listBtn {
margin-top: 10px;
margin-top: 20px;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
text-align: center;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
}
</style>

518
src/views/fee-settings/cardRegister.vue

@ -1,251 +1,391 @@
<template>
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'">
<el-table :data="dataList" border
width="100%"
:height="window.pageHeight < 600 ? 350:window.pageHeight-250"
row-key="id" size="small" highlight-current-row ref="dataList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="40"/>
<el-table-column prop="isMedicalStart" label="签到" width="50">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isMedicalStart == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="medicalStartDate" label="签到日期" width="90">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.medicalStartDate, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住" width="50">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgName" label="部门" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
</template>
</el-table-column>
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
<el-table-column label="分组/套餐" width="150">
<template slot-scope="scope">
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
<div>
<el-card>
<div style="display: flex">
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'">
<div style="display: flex; flex-wrap: wrap; height:80px;">
<div class="query">
<el-select v-model="query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option label="登记日期" value="createDate" />
<el-option label="有效日期" value="expiryDate" />
</el-select>
<el-date-picker v-model="query.dateRange" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" size="small"
style="width: 240px">
</el-date-picker>
</div>
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
<div class="query">
<span>卡类别</span>
<el-select v-model="query.cardTypeId" placeholder="请选择" filterable clearable size="small" style="width: 100px">
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
<div class="query">
<span>卡号</span>
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 150px" />
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
<div class="query">
<span>卡主姓名</span>
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 100px" />
</div>
</template>
</el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" />
<el-table-column prop="medicalCardNo" label="体检卡号" />
<el-table-column prop="jobCardNo" label="工卡号" />
<el-table-column prop="maritalStatusId" label="婚姻状况">
<template slot-scope="scope">
<div>
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
<div class="query">
<span>身份证号</span>
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 200px" />
</div>
</template>
</el-table-column>
<el-table-column prop="medicalTypeId" label="体检类别">
<template slot-scope="scope">
<div v-if="scope.row.medicalTypeId !== dict.personOrgId">
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
<div class="query">
<span>手机号</span>
<el-input placeholder="手机号" v-model="query.mobileTelephone" size="small" clearable style="width: 150px" />
</div>
</template>
</el-table-column>
<el-table-column prop="personnelTypeId" label="人员类别">
<template slot-scope="scope">
<div v-if="scope.row.personnelTypeId !== dict.personOrgId">
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" />
<el-table-column prop="creationTime" label="登记日期" width="100">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="isUpload" label="是否上传">
<template slot-scope="scope">
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button type="success" class="btnClass" @click="sign">签到</el-button>
</div>
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 370 : window.pageHeight - 230"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="cardTypeId" label="卡类别" width="100">
<template slot-scope="scope">
<div>{{ dddw(dict.cardType, "id", scope.row.cardTypeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="cardNo" label="会员卡号" width="150" />
<el-table-column prop="discount" label="折扣率" width="80" />
<el-table-column prop="expiryDate" label="有效期限" width="120">
<template slot-scope="scope">
<div v-if="scope.row.expiryDate">
{{ moment(scope.row.expiryDate).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="customerName" label="卡主姓名" width="80" />
<el-table-column prop="idNo" label="卡主身份证号" width="200" />
<el-table-column prop="telephone" label="卡主电话" width="150" />
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" />
<el-table-column prop="cardFlag" label="启用" width="80">
<template slot-scope="scope">
<div>{{ scope.row.cardFlag == '0' ? '否' : '是' }}</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.creationTime">
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="lastModifierId" label="修改人员" width="100" />
<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>
</el-table>
</div>
<div style=" margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button class="btnClass" @click="btnQuery">查询</el-button>
</div>
<div class="listBtn">
<el-button type="success" class="btnClass" @click="add">新增</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" class="btnClass" @click="edit">删除</el-button>
</div>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="scanSign">扫码签到</el-button>
</div>
</div>
<el-dialog title="扫/输入条码签到" :visible.sync="dialogVisible">
<el-form :model="form">
<el-form-item label="条码" label-width="100px">
<el-input v-model="form.patientRegisterNo" @change="signByPatientRegisterNo"></el-input>
</el-form-item>
</el-card>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="卡类别" prop="cardTypeId">
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable>
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员卡号" prop="cardNo">
<el-input v-model="form.cardNo" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="折扣率" prop="discount">
<el-input type="number" v-model="form.discount" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效期限" prop="expiryDate">
<el-input type="date" v-model="form.expiryDate" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主姓名" prop="customerName">
<el-input v-model="form.customerName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主身份证" prop="idNo">
<el-input v-model="form.idNo" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="卡主电话" prop="telephone">
<el-input type="tel" v-model="form.telephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡主手机号" prop="mobileTelephone">
<el-input type="tel" v-model="form.mobileTelephone" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="启用" prop="cardFlag">
<el-radio v-model="form.cardFlag" label="1"></el-radio>
<el-radio v-model="form.cardFlag" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="创建人员" label-width="80px">
<el-input v-model="form.creatorId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改人员" label-width="80px">
<el-input v-model="form.lastModifierId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" @click="signByPatientRegisterNo">确定</el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
export default {
components: {
PatientRegisterEdit,
Camera,
},
data() {
return {
query: {
dateType:'createDate',
dateType:'createDate',
}, //
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form:{
patientRegisterNo:''
}
dialogVisible: false,
form: {
id: null,
cardTypeId: null,
cardNo: '',
discount: 100,
expiryDate: null,
customerName: '',
idNo: '',
telephone: '',
mobileTelephone: '',
cardFlag: '0',
remark: '',
},
formInit: {},
rules: {
cardTypeId: [
{ required: true, message: "请填写卡类别", trigger: "blur" },
],
cardNo: [
{ required: true, message: "请填写卡号", trigger: "blur" },
],
discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" },
],
expiryDate: [
{ required: true, message: "请填写卡有效期", trigger: "blur" },
],
customerName: [
{ required: true, message: "请填写卡主姓名", trigger: "blur" },
],
idNo: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
mobileTelephone: [
{ required: true, message: "请填写卡主身份证", trigger: "blur" },
],
cardFlag: [
{ required: true, message: "请填写卡启用状态", trigger: "blur" },
]
},
curChoosedRow: {}, //
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
created() { },
created() {
this.formInit = { ...this.form };
},
//
mounted() { },
computed: {
...mapState(["window","dict", "patientRegister", "customerOrg"]),
...mapState(["window", "dict"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
handleSelectionChange(val) {
this.multipleSelection = val;
},
signCore(body){
postapi(`/api/app/patientregister/updatesigninmany`, body)
.then((res) => {
if (res.code != -1){
this.$message.success("操作成功");
}
})
.catch(() => {
this.$message({type: "error",message: "已取消删除",});
});
rowClick(row) {
this.curChoosedRow = row;
},
add() {
this.form = { ...this.formInit };
this.dialogVisible = true;
},
//
sign() {
if (!this.multipleSelection || this.multipleSelection.length < 1 ) {
alert("请选择体检人员,再进行此操作");
edit() {
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
let body = []
this.multipleSelection.forEach(e =>{
body.push(e.id)
});
this.signCore(body)
this.form = { ...this.curChoosedRow };
this.dialogVisible = true;
},
scanSign(){
this.dialogVisible = true
del() {
let lfind = -1;
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
//
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id);
if (lfind > - 1) this.dataList.splice(lfind, 1);
this.curChoosedRow.id = null;
},
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if(res.data){
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
.then((res) => {
if (res.code != -1) {
if (res.data) {
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display);
},
//
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
//console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message);
return;
}
//
if (this.form.id) {
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
} else {
//
}
});
},
//
query() {
btnQuery() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else{
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
}
}
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
@ -285,23 +425,25 @@ export default {
this.query();
}
},
},
};
</script>
<style scoped>
.box {
display: flex;
.query {
margin-left: 10px;
}
.listBtn {
margin-top: 10px;
margin-top: 20px;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
text-align: center;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
}
</style>

389
src/views/fee-settings/cardType.vue

@ -1,152 +1,125 @@
<template>
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'">
<el-table :data="dataList" border
width="100%"
:height="window.pageHeight < 600 ? 350:window.pageHeight-250"
row-key="id" size="small" highlight-current-row ref="dataList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="40"/>
<el-table-column prop="isMedicalStart" label="签到" width="50">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isMedicalStart == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="medicalStartDate" label="签到日期" width="90">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.medicalStartDate, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁住" width="50">
<template slot-scope="scope">
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgParentName" label="单位" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
</template>
</el-table-column>
<el-table-column prop="customerOrgName" label="部门" width="180">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
</template>
</el-table-column>
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="sexId" label="性别">
<template slot-scope="scope">
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="age" label="年龄" />
<el-table-column prop="patientRegisterNo" label="条码号" width="150" />
<el-table-column prop="patientNo" label="档案号" />
<el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
<el-table-column label="分组/套餐" width="150">
<template slot-scope="scope">
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
</div>
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="nationId" label="民族">
<template slot-scope="scope">
<div>
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证" width="150" />
<el-table-column prop="birthDate" label="出生日期" width="100">
<template slot-scope="scope">
<div v-if="scope.row.birthDate">
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" />
<el-table-column prop="medicalCardNo" label="体检卡号" />
<el-table-column prop="jobCardNo" label="工卡号" />
<el-table-column prop="maritalStatusId" label="婚姻状况">
<template slot-scope="scope">
<div>
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="medicalTypeId" label="体检类别">
<template slot-scope="scope">
<div v-if="scope.row.medicalTypeId !== dict.personOrgId">
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="personnelTypeId" label="人员类别">
<template slot-scope="scope">
<div v-if="scope.row.personnelTypeId !== dict.personOrgId">
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
</div>
</template>
</el-table-column>
<el-table-column prop="jobPost" label="职务" />
<el-table-column prop="jobTitle" label="职称" />
<el-table-column prop="salesman" label="介绍人" />
<el-table-column prop="isVip" label="是否VIP">
<template slot-scope="scope">
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" />
<el-table-column prop="creationTime" label="登记日期" width="100">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
</template>
</el-table-column>
<el-table-column prop="isUpload" label="是否上传">
<template slot-scope="scope">
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button type="success" class="btnClass" @click="sign">签到</el-button>
<div>
<el-card>
<div style="display: flex">
<div :style="'width:' + (window.pageWidth - 120 - 70) + 'px;'">
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 450 : window.pageHeight - 150"
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"
@row-click="rowClick">
<el-table-column prop="displayName" label="卡类别名称" width="120" />
<el-table-column prop="cardModeId" label="卡模式" width="80">
<template slot-scope="scope">
<div>{{ dddw(dict.cardMode, "id", scope.row.cardModeId, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="discount" label="折扣率" width="90" />
<el-table-column prop="expiryDay" label="有效天数" width="90" />
<el-table-column prop="remark" label="备注" width="200" />
<el-table-column prop="creatorId" label="创建人员" width="100" />
<el-table-column prop="creationTime" label="创建日期" width="150">
<template slot-scope="scope">
<div v-if="scope.row.creationTime">
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
</div>
</template>
</el-table-column>
<el-table-column prop="lastModifierId" label="修改人员" width="100" />
<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>
</el-table>
</div>
<div style="margin-left: 10px;width:110px;">
<div class="listBtn">
<el-button type="success" class="btnClass" @click="add">新增</el-button>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
</div>
<div class="listBtn">
<el-button type="danger" class="btnClass" @click="edit">删除</el-button>
</div>
</div>
<div class="listBtn">
<el-button type="primary" class="btnClass" @click="scanSign">扫码签到</el-button>
</div>
</div>
<el-dialog title="扫/输入条码签到" :visible.sync="dialogVisible">
<el-form :model="form">
<el-form-item label="条码" label-width="100px">
<el-input v-model="form.patientRegisterNo" @change="signByPatientRegisterNo"></el-input>
</el-form-item>
</el-card>
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false">
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small">
<el-row>
<el-col :span="8">
<el-form-item label="卡类别名称" prop="displayName">
<el-input v-model="form.displayName" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="卡模式" prop="cardmModeId">
<el-select v-model="form.cardModeId" placeholder="请选择" filterable >
<el-option v-for="item in dict.cardMode" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="折扣率" prop="discount">
<el-input type="number" v-model="form.discount" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效期(天)" prop="expiryDay">
<el-input type="number" v-model="form.expiryDay" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="显示顺序" prop="displayOrder">
<el-input type="number" v-model="form.displayOrder" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="form.remark" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="创建人员" label-width="80px">
<el-input v-model="form.creatorId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间" label-width="80px">
<el-input :value="form.creationTime ? moment(form.creationTime).format('yyyy-MM-DD') : ''" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改人员" label-width="80px">
<el-input v-model="form.lastModifierId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间" label-width="80px">
<el-input :value="form.lastModificationTime
? moment(form.lastModificationTime).format('yyyy-MM-DD') : '' " disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" @click="signByPatientRegisterNo">确定</el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
import Camera from "../../components/patientRegister/Camera.vue";
@ -160,92 +133,134 @@ export default {
return {
dataList: [], //
multipleSelection: [], //
dialogVisible: false,
form:{
patientRegisterNo:''
}
dialogVisible: false,
form: {
id: null,
displayName: null,
cardModeId: '0',
discount: 100,
expiryDay: 3650,
displayOrder: 0,
remark: '',
},
formInit: {},
rules: {
displayName: [
{ required: true, message: "请填写卡类别名称", trigger: "blur" },
],
cardmModeId: [
{ required: true, message: "请填写卡模式", trigger: "blur" },
],
discount: [
{ required: true, message: "请填写卡折扣", trigger: "blur" },
],
expiryDay: [
{ required: true, message: "请填写卡有效期", trigger: "blur" },
],
displayOrder: [
{ required: true, message: "请填写显示顺序", trigger: "blur" },
]
},
curChoosedRow: {}, //
};
},
created() { },
created() {
this.formInit = { ...this.form };
},
//
mounted() { },
computed: {
...mapState(["window","dict", "patientRegister", "customerOrg"]),
...mapState(["window", "dict"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
dddw, moment,
handleSelectionChange(val) {
this.multipleSelection = val;
},
signCore(body){
postapi(`/api/app/patientregister/updatesigninmany`, body)
.then((res) => {
if (res.code != -1){
this.$message.success("操作成功");
}
})
.catch(() => {
this.$message({type: "error",message: "已取消删除",});
});
rowClick(row) {
this.curChoosedRow = row;
},
add() {
this.form = { ...this.formInit };
this.dialogVisible = true;
},
//
sign() {
if (!this.multipleSelection || this.multipleSelection.length < 1 ) {
alert("请选择体检人员,再进行此操作");
edit() {
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
let body = []
this.multipleSelection.forEach(e =>{
body.push(e.id)
});
this.signCore(body)
this.form = { ...this.curChoosedRow };
this.dialogVisible = true;
},
scanSign(){
this.dialogVisible = true
del() {
let lfind = -1;
if (!this.curChoosedRow.id) {
this.$message.warning("请先选择要操作的数据!");
return;
}
//
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id);
if (lfind > - 1) this.dataList.splice(lfind, 1);
this.curChoosedRow.id = null;
},
//
signByPatientRegisterNo() {
let val = this.form.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
if(res.data){
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
.then((res) => {
if (res.code != -1) {
if (res.data) {
this.signCore([res.data.id])
this.form.patientRegisterNo = ''
}
}
});
},
ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display);
},
//
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
//console.log('fields',fields,Object.keys(fields));
this.$message.error(fields[Object.keys(fields)[0]][0].message);
return;
}
//
if (this.form.id) {
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
} else {
//
}
});
},
//
query() {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else{
} else {
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
}
}
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
@ -285,7 +300,7 @@ export default {
this.query();
}
},
},
};
</script>
@ -297,11 +312,13 @@ export default {
.listBtn {
margin-top: 10px;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
text-align: center;
}
.btnClass{
width:110px;
.btnClass {
width: 110px;
}
</style>
Loading…
Cancel
Save