Browse Source

card

master
pengjun 2 years ago
parent
commit
ce26a3d859
  1. 13
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 4
      src/components/patientRegister/PatientRegisterList.vue
  3. 4
      src/views/charge/charge.vue
  4. 115
      src/views/fee-settings/cardType.vue

13
src/components/patientRegister/PatientRegisterEdit.vue

@ -186,7 +186,7 @@
<el-row>
<el-col :span="5">
<el-form-item label="体检中心" prop="organizationUnitId">
<el-select v-model="form.organizationUnitId" placeholder="请选择" filterable
<el-select v-model="form.organizationUnitId" placeholder="请选择" filterable :disabled="peisid ? true:false"
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
<el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName"
:value="item.id">
@ -475,6 +475,7 @@ export default {
apiurl: mm.apiurl,
brushTimes: 0,
payTypeFlag:'',
peisid:null,
form: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
@ -554,7 +555,12 @@ export default {
};
},
created() { },
created() {
this.peisid = window.sessionStorage.getItem('peisid');
if(!this.form.id){
this.form.organizationUnitId = this.peisid;
}
},
//
mounted() {
@ -683,6 +689,9 @@ export default {
this.form.isLockBox = false;
}
if(!this.form.id){
this.form.organizationUnitId = this.peisid;
}
},
//

4
src/components/patientRegister/PatientRegisterList.vue

@ -306,7 +306,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";
@ -484,7 +484,7 @@ export default {
// this.patientRegister.addTimes++;
// this.patientRegister.patientRegisterTimes++;
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
this.formInitData = { ...this.patientRegister.patientRegisterRdInit };
this.formInitData = deepCopy(this.patientRegister.patientRegisterRdInit );
this.patientRegister.patientRegisterAbs = [];
this.dialogVisible = true;
this.editTimes++; //

4
src/views/charge/charge.vue

@ -225,6 +225,10 @@
<el-button type="success" class="btnClass" @click="chargePrint('0007', false, form.id)"
:disabled="query.chargeFlag == 'B' ? true : false">打印</el-button>
</div>
<div class="btnListClass">
<el-button type="success" class="btnClass" @click="chargePrint('0007', true, form.id)"
:disabled="query.chargeFlag == 'B' ? true : false">打印预览</el-button>
</div>
</div>
</div>
</el-card>

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

@ -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;
}
});
},
},

Loading…
Cancel
Save