|
|
|
@ -3,42 +3,57 @@ |
|
|
|
<el-card> |
|
|
|
<div class="publiccss">会员卡登记</div> |
|
|
|
<div style="display: flex;margin-top:20px"> |
|
|
|
<div :style="'display: block; width:' + (window.pageWidth - 120 - 70) + 'px;'"> |
|
|
|
<div style="display: flex; flex-wrap: wrap; height:80px;"> |
|
|
|
<div :style="'display: block; width:' + (window.pageWidth - 120 - 80) + 'px;'"> |
|
|
|
<div style="display: flex; flex-wrap: wrap; height:70px;"> |
|
|
|
<div class="query"> |
|
|
|
<el-select v-model="query.dateType" placeholder="请选择" filterable clearable size="small" style="width: 100px"> |
|
|
|
<el-select v-model="query.dateType" placeholder="请选择" filterable size="small" |
|
|
|
style="width: 90px"> |
|
|
|
<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> |
|
|
|
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width: 100px" /> |
|
|
|
<span>--</span> |
|
|
|
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width: 100px"/> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡类别:</span> |
|
|
|
<el-select v-model="query.cardTypeId" placeholder="请选择" filterable clearable size="small" style="width: 100px"> |
|
|
|
<el-select v-model="query.cardTypeId" placeholder="请选择" clearable size="small" |
|
|
|
style="width: 80px"> |
|
|
|
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡状态:</span> |
|
|
|
<!-- |
|
|
|
<el-radio-group v-model="query.cardFlag"> |
|
|
|
<el-radio :label="1">启用</el-radio> |
|
|
|
<el-radio :label="0">停用</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
--> |
|
|
|
<el-select v-model="query.cardFlag" placeholder="请选择" clearable size="small" |
|
|
|
style="width: 80px"> |
|
|
|
<el-option label="启用" value="1" /> |
|
|
|
<el-option label="停用" value="0" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡号:</span> |
|
|
|
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 150px" /> |
|
|
|
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 120px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡主姓名:</span> |
|
|
|
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 100px" /> |
|
|
|
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 80px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>身份证号:</span> |
|
|
|
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 200px" /> |
|
|
|
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 180px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>手机号:</span> |
|
|
|
<el-input placeholder="手机号" v-model="query.mobileTelephone" size="small" clearable style="width: 150px" /> |
|
|
|
<span>电话:</span> |
|
|
|
<el-input placeholder="手机号/电话" v-model="query.mobileTelephone" size="small" clearable style="width: 120px" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 200 : window.pageHeight - 400" |
|
|
|
<el-table :data="dataList" border width="100%" :height="window.pageHeight < 600 ? 160 : window.pageHeight - 440" |
|
|
|
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" |
|
|
|
@row-click="rowClick"> |
|
|
|
<el-table-column prop="cardTypeId" label="卡类别" width="100"> |
|
|
|
@ -65,7 +80,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" width="200" /> |
|
|
|
<el-table-column prop="creatorId" label="创建人员" width="100" /> |
|
|
|
<el-table-column prop="creatorName" label="创建人员" width="100" /> |
|
|
|
<el-table-column prop="creationTime" label="创建日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.creationTime"> |
|
|
|
@ -73,7 +88,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierId" label="修改人员" width="100" /> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" width="100" /> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
@ -82,9 +97,8 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-table :data="cardBillList" border width="100%" height="170" |
|
|
|
row-key="id" size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" |
|
|
|
@row-click="rowClick"> |
|
|
|
<el-table :data="cardBillList" border width="100%" height="170" 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" /> |
|
|
|
@ -99,7 +113,7 @@ |
|
|
|
<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="creatorName" label="创建人员" width="100" /> |
|
|
|
<el-table-column prop="creationTime" label="创建日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.creationTime"> |
|
|
|
@ -107,7 +121,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierId" label="修改人员" width="100" /> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" width="100" /> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
@ -233,7 +247,7 @@ |
|
|
|
import moment from "moment"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
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 { |
|
|
|
@ -244,8 +258,17 @@ export default { |
|
|
|
return { |
|
|
|
query: { |
|
|
|
dateType: 'createDate', |
|
|
|
dateType:'createDate', |
|
|
|
cardModeId: '', |
|
|
|
cardTypeId:null, |
|
|
|
cardNo:'', |
|
|
|
customerName:'', |
|
|
|
cardFlag:'', |
|
|
|
startDate:'', |
|
|
|
endDate:'', |
|
|
|
mobileTelephone:'', |
|
|
|
}, //查询条件 |
|
|
|
|
|
|
|
|
|
|
|
dataList: [], //列表数据 |
|
|
|
cardBillList: [], //卡记账数据 |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
@ -294,46 +317,21 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
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]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
curChoosedId:'', //当前选择的行ID |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
this.formInit = { ...this.form }; |
|
|
|
this.query.startDate = new Date(); |
|
|
|
this.query.endDate = this.query.startDate; |
|
|
|
this.formInit = deepCopy(this.form); |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { }, |
|
|
|
mounted() { |
|
|
|
this.dictInit(); |
|
|
|
this.btnQuery(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict"]), |
|
|
|
}, |
|
|
|
@ -341,31 +339,44 @@ export default { |
|
|
|
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), |
|
|
|
dddw, moment, |
|
|
|
|
|
|
|
//初始化字典数据 |
|
|
|
dictInit(){ |
|
|
|
//获取卡类别 |
|
|
|
getapi('/api/app/cardtype/getcardtypelist') |
|
|
|
.then((res) => { |
|
|
|
if(res.code != -1){ |
|
|
|
this.dict.cardType = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
|
|
|
|
rowClick(row) { |
|
|
|
this.curChoosedRow = row; |
|
|
|
this.curChoosedId = row.id; |
|
|
|
}, |
|
|
|
|
|
|
|
add() { |
|
|
|
this.form = { ...this.formInit }; |
|
|
|
this.form = deepCopy(this.formInit); |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
edit() { |
|
|
|
if (!this.curChoosedRow.id) { |
|
|
|
if (!this.curChoosedId) { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.form = { ...this.curChoosedRow }; |
|
|
|
objCopy(this.curChoosedRow,this.form); |
|
|
|
console.log('this.form',this.form); |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
del() { |
|
|
|
let lfind = -1; |
|
|
|
if (!this.curChoosedRow.id) { |
|
|
|
if (!this.curChoosedId) { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -377,21 +388,6 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//按条码号查个人数据 |
|
|
|
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 = '' |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//提交 |
|
|
|
onSubmit(formName) { |
|
|
|
this.$refs[formName].validate((valid, fields) => { |
|
|
|
@ -411,42 +407,60 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
//查询 |
|
|
|
btnQuery() { |
|
|
|
btnQuery(queryType) { |
|
|
|
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 |
|
|
|
console.log('this.query',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.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId |
|
|
|
// 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; |
|
|
|
} |
|
|
|
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 (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName |
|
|
|
|
|
|
|
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag |
|
|
|
|
|
|
|
//StartDate EndDate |
|
|
|
if (this.patientRegister.query.dateRange) { |
|
|
|
body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD") |
|
|
|
body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD") |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo } |
|
|
|
|
|
|
|
|
|
|
|
console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
|
// { |
|
|
|
// "cardModeId": "string", |
|
|
|
// "cardTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "cardNo": "string", |
|
|
|
// "customerName": "string", |
|
|
|
// "idNo": "string", |
|
|
|
// "cardFlag": "string", |
|
|
|
// "startDate": "string", |
|
|
|
// "endDate": "string" |
|
|
|
// } |
|
|
|
|
|
|
|
console.log('/api/app/cardregister/getcardregisterlist', body) |
|
|
|
postapi('/api/app/cardregister/getcardregisterlist', body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.dataList = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -465,6 +479,15 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
::v-deep .el-input__inner { |
|
|
|
/*text-align: center;*/ |
|
|
|
padding-left: 5px; |
|
|
|
padding-right: 25px; |
|
|
|
} |
|
|
|
::v-deep .el-icon-date:before { |
|
|
|
content: "" |
|
|
|
} |
|
|
|
|
|
|
|
.query { |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|