|
|
|
@ -16,7 +16,7 @@ |
|
|
|
<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="creatorName" label="创建人员" width="100" /> |
|
|
|
<el-table-column prop="creationTime" label="创建日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.creationTime"> |
|
|
|
@ -24,7 +24,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"> |
|
|
|
@ -42,7 +42,7 @@ |
|
|
|
<el-button type="primary" class="btnClass" @click="edit">编辑</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="danger" class="btnClass" @click="edit">删除</el-button> |
|
|
|
<el-button type="danger" class="btnClass" @click="del">删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -56,7 +56,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="卡模式" prop="cardmModeId"> |
|
|
|
<el-form-item label="卡模式" prop="cardModeId"> |
|
|
|
<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> |
|
|
|
@ -74,12 +74,7 @@ |
|
|
|
<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-col :span="16"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input v-model="form.remark" /> |
|
|
|
</el-form-item> |
|
|
|
@ -120,7 +115,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"; |
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
|
@ -144,13 +139,12 @@ export default { |
|
|
|
displayOrder: 0, |
|
|
|
remark: '', |
|
|
|
}, |
|
|
|
formInit: {}, |
|
|
|
|
|
|
|
formInit:{}, |
|
|
|
rules: { |
|
|
|
displayName: [ |
|
|
|
{ required: true, message: "请填写卡类别名称", trigger: "blur" }, |
|
|
|
], |
|
|
|
cardmModeId: [ |
|
|
|
cardModeId: [ |
|
|
|
{ required: true, message: "请填写卡模式", trigger: "blur" }, |
|
|
|
], |
|
|
|
discount: [ |
|
|
|
@ -165,16 +159,19 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
curChoosedRow: {}, //当前选择的行数据 |
|
|
|
curChoosedId:'', //当前选中的ID |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
this.formInit = { ...this.form }; |
|
|
|
this.formInit = deepCopy(this.form); |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { }, |
|
|
|
mounted() { |
|
|
|
this.query(); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict"]), |
|
|
|
}, |
|
|
|
@ -188,15 +185,17 @@ export default { |
|
|
|
|
|
|
|
rowClick(row) { |
|
|
|
this.curChoosedRow = row; |
|
|
|
this.curChoosedId = row.id; |
|
|
|
}, |
|
|
|
|
|
|
|
add() { |
|
|
|
this.form = { ...this.formInit }; |
|
|
|
async add() { |
|
|
|
|
|
|
|
objCopy(this.formInit,this.form); |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
edit() { |
|
|
|
if (!this.curChoosedRow.id) { |
|
|
|
if (!this.curChoosedId) { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -206,14 +205,21 @@ export default { |
|
|
|
|
|
|
|
del() { |
|
|
|
let lfind = -1; |
|
|
|
if (!this.curChoosedRow.id) { |
|
|
|
if (!this.curChoosedId) { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
//执行删除操作 |
|
|
|
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedRow.id); |
|
|
|
if (lfind > - 1) this.dataList.splice(lfind, 1); |
|
|
|
this.curChoosedRow.id = null; |
|
|
|
|
|
|
|
postapi(`/api/app/cardtype/delete?id=${this.curChoosedId}`).then(res =>{ |
|
|
|
if(res.code != -1){ |
|
|
|
this.$message.success("操作成功!"); |
|
|
|
|
|
|
|
lfind = arrayExistObj(this.dataList, 'id', this.curChoosedId); |
|
|
|
if (lfind > - 1) this.dataList.splice(lfind, 1); |
|
|
|
this.curChoosedId = null; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -235,59 +241,48 @@ export default { |
|
|
|
|
|
|
|
//提交 |
|
|
|
onSubmit(formName) { |
|
|
|
let body={},lfind=-1; |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
body = deepCopy(this.form) |
|
|
|
delete body.id; |
|
|
|
delete body.displayOrder; |
|
|
|
|
|
|
|
//编辑 |
|
|
|
if (this.form.id) { |
|
|
|
|
|
|
|
postapi(`/api/app/cardtype/update?id=${this.form.id}`,body).then(res =>{ |
|
|
|
if(res.code != -1){ |
|
|
|
this.$message.success("操作成功!"); |
|
|
|
lfind = arrayExistObj(this.dataList,'id',this.form.id); |
|
|
|
if(lfind > -1) objCopy(this.form,this.dataList[lfind]); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
//新增 |
|
|
|
postapi('/api/app/cardtype/create',body).then(res =>{ |
|
|
|
if(res.code != -1){ |
|
|
|
this.$message.success("操作成功!"); |
|
|
|
objCopy(res.data,this.form); |
|
|
|
this.dataList.push(deepCopy(this.form)); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//查询 |
|
|
|
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 { |
|
|
|
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
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") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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) |
|
|
|
console.log('/api/app/cardtype/getcardtypelist') |
|
|
|
getapi('/api/app/cardtype/getcardtypelist') |
|
|
|
.then((res) => { |
|
|
|
this.dataList = res.data; |
|
|
|
if(res.code != -1){ |
|
|
|
this.dataList = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|