diff --git a/src/components/patientRegister/MergeAsbitem.vue b/src/components/patientRegister/MergeAsbitem.vue index 5c97990..fa7ae36 100644 --- a/src/components/patientRegister/MergeAsbitem.vue +++ b/src/components/patientRegister/MergeAsbitem.vue @@ -191,7 +191,7 @@ export default { } else { this.tableData = []; this.tableDataAll.forEach(e => { - if (itemTypeIdsChild.indexOf(e.itemTypeId) < 0) { + if (itemTypeIdsChild.indexOf(e.itemTypeId) > -1 ) { this.tableData.push(e); } }); @@ -234,7 +234,7 @@ export default { this.getFinalSelected(); this.finalSelected.forEach(e => { - if(itemTypes.indexOf(e.itemTypeName) < 0) itemTypes.push(e.itemTypeName); + if(itemTypes.indexOf(e.itemTypeId) < 0) itemTypes.push(e.itemTypeId); registerAsbitemIds.push(e.registerAsbitemId); }); diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 8631dea..f00b9f9 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -586,12 +586,7 @@ export default { //查询 async query() { this.patientRegister.prList = []; - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }); + let body = {} @@ -611,9 +606,13 @@ export default { 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.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -625,6 +624,13 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if (res.code != -1) { diff --git a/src/components/patientRegister/PatientRegisterRecoverList.vue b/src/components/patientRegister/PatientRegisterRecoverList.vue index 9744d5e..96b5150 100644 --- a/src/components/patientRegister/PatientRegisterRecoverList.vue +++ b/src/components/patientRegister/PatientRegisterRecoverList.vue @@ -251,9 +251,13 @@ export default { 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.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -265,11 +269,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/PatientRegisterRefuseList.vue b/src/components/patientRegister/PatientRegisterRefuseList.vue index be93b18..aa63d9f 100644 --- a/src/components/patientRegister/PatientRegisterRefuseList.vue +++ b/src/components/patientRegister/PatientRegisterRefuseList.vue @@ -374,9 +374,13 @@ export default { 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.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -388,11 +392,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/PatientRegisterSignList.vue b/src/components/patientRegister/PatientRegisterSignList.vue index 020c5d9..db1d3f2 100644 --- a/src/components/patientRegister/PatientRegisterSignList.vue +++ b/src/components/patientRegister/PatientRegisterSignList.vue @@ -256,9 +256,13 @@ export default { 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.startDate && this.patientRegister.query.endDate) { + body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") + body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") + if(body.startDate > body.endDate){ + this.$message.warning("起始日期不能大于截止日期,数据校验不通过!") + return + } } @@ -270,11 +274,21 @@ export default { console.log('/api/app/patientregister/getlistinfilter', body) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); postapi('/api/app/patientregister/getlistinfilter', body) .then((res) => { if(res.code != - 1){ this.dataList = res.data.items; } + loading.close(); + }) + .catch((err) => { + loading.close(); }); }, }, diff --git a/src/components/patientRegister/patientRegisterQuery.vue b/src/components/patientRegister/patientRegisterQuery.vue index 1f521c1..3afe9d7 100644 --- a/src/components/patientRegister/patientRegisterQuery.vue +++ b/src/components/patientRegister/patientRegisterQuery.vue @@ -5,10 +5,9 @@
登记日期: - - + + +
条码号: @@ -75,42 +74,14 @@ export default { data() { return { dialogVisible: false, - - 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() { + let ldate = new Date(); + this.patientRegister.query.startDate = ldate; + this.patientRegister.query.endDate = ldate; + }, //挂载完成 mounted() { }, @@ -134,6 +105,19 @@ export default {