From c73e25f07d63165512965022b9f06b149127eeab Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Thu, 5 Sep 2024 15:05:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E6=A3=80-=E4=BD=93=E6=A3=80=E6=8A=A5?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 4 +- pages.json | 10 +- .../appointment/appointment.vue | 3 +- pages/HealthExaminationApp/index/index.vue | 11 +- .../jobAppointment/jobAppointment.vue | 105 +------- .../myAppointment/healthExamDetails.vue | 38 +-- .../myAppointment/myAppointment.vue | 214 +++++++++++----- pages/HealthExaminationApp/report/pdfView.vue | 104 ++++++++ pages/HealthExaminationApp/report/report.vue | 230 +++++++++++++++++- pages/gzt/index.vue | 4 +- 10 files changed, 511 insertions(+), 212 deletions(-) create mode 100644 pages/HealthExaminationApp/report/pdfView.vue diff --git a/config.js b/config.js index 7cc9c74..fd91051 100644 --- a/config.js +++ b/config.js @@ -36,7 +36,9 @@ module.exports = { uploadUrl: 'http://192.168.0.14:19999/exam-file/file/uploadBase64', bmwUrl: 'http://192.168.0.14:19999/exam-bmw', // 体检-基础路径 - tjBaseUrl: 'http://192.168.0.14:20000/AppPeaManager', + // tjBaseUrl: 'http://192.168.0.14:20000/AppPeaManager', + tjBaseUrl: 'http://192.168.2.147:20000/AppPeaManager', + tjFile: 'http://112.29.103.165:1616/medicalDocumentation/statics/', // 应用信息 appInfo: { // 应用名称 diff --git a/pages.json b/pages.json index cfcaa42..14eb1d7 100644 --- a/pages.json +++ b/pages.json @@ -213,13 +213,19 @@ { "path": "pages/HealthExaminationApp/report/report", "style": { - "navigationBarTitleText": "提交报告" + "navigationBarTitleText": "体检报告" + } + }, + { + "path": "pages/HealthExaminationApp/report/pdfView", + "style": { + "navigationBarTitleText": "体检报告" } }, { "path": "pages/HealthExaminationApp/myAppointment/myAppointment", "style": { - "navigationBarTitleText": "我的预约" + "navigationStyle": "custom" } }, { diff --git a/pages/HealthExaminationApp/appointment/appointment.vue b/pages/HealthExaminationApp/appointment/appointment.vue index d5772a5..225d8d4 100644 --- a/pages/HealthExaminationApp/appointment/appointment.vue +++ b/pages/HealthExaminationApp/appointment/appointment.vue @@ -107,7 +107,7 @@
联系方式: {{ hospitalInfo.telPhone }}
-
+
@@ -351,6 +351,7 @@ export default { res = res.data console.log('🚀 ~ handleSave ~ res:', res) if (res.res == 1) { + uni.setStorageSync('appoint', true) uni.showToast({ title: '预约成功', icon: 'success' diff --git a/pages/HealthExaminationApp/index/index.vue b/pages/HealthExaminationApp/index/index.vue index 9f5c90e..eb6f8fa 100644 --- a/pages/HealthExaminationApp/index/index.vue +++ b/pages/HealthExaminationApp/index/index.vue @@ -72,6 +72,16 @@ export default { }, // 跳转页面 handlePage(url) { + if ( + (url == 'appointment' && uni.getStorageSync('appoint')) || + (url == 'jobAppointment' && uni.getStorageSync('jobAppoint')) + ) { + uni.showToast({ + title: '您已经预约过,无法再次预约!', + icon: 'none' + }) + return + } uni.navigateTo({ url: `/pages/HealthExaminationApp/${url}/${url}?params=${JSON.stringify(this.userInfo)}` }) @@ -126,7 +136,6 @@ export default { if (res.res === 1) { this.userInfo = res.obj[0] } - }, fail: err => { console.log('🚀 ~ getapplogininfo ~ err:', err) diff --git a/pages/HealthExaminationApp/jobAppointment/jobAppointment.vue b/pages/HealthExaminationApp/jobAppointment/jobAppointment.vue index 3fe727b..0d5a284 100644 --- a/pages/HealthExaminationApp/jobAppointment/jobAppointment.vue +++ b/pages/HealthExaminationApp/jobAppointment/jobAppointment.vue @@ -34,67 +34,6 @@ @confirm="confirmHospital" > - - -
-

请选择套餐

-
-
-
请选择
-
-
-
-
{{ checkType }}
-
-
-
- -
-
- -
-
- -
-
{{ checkTypeContent }}
-
-
展开
-
- -
-
-
-
收起
-
- -
-
-
-
- -
-
-
{{ item.combinName }}
-
项目内容:{{ item.combinContent }}
-
- 项目价格: - {{ item.combinPrice }}元 -
-
-
- -
- -
-
-
- @@ -109,7 +48,7 @@
联系方式: {{ hospitalInfo.telPhone }}
-
+
@@ -161,7 +100,7 @@ export default { this.getCheckType() }, methods: { - // 获取医院列表 app/getCareerHospital + // 获取医院列表 getHospitalList() { const params = { token: this.token, @@ -169,7 +108,7 @@ export default { } console.log('🚀 ~ getHospitalList ~ params:', params) uni.request({ - url: config.tjBaseUrl + '/app/getCareerHospital', + url: config.tjBaseUrl + '/app/getOccupationHospital', method: 'post', data: params, header: { @@ -230,43 +169,6 @@ export default { if (this.hospitalInfo.id) this.isDisabled = false this.show = false }, - // 选择检查类型 - handleCheckType(item, index) { - console.log('🚀 ~ handleCheckType ~ item:', item) - this.active = index - this.checkType = item.combName - this.getCheckTypeContent(item) - }, - // 获取套餐内容 - getCheckTypeContent(item) { - const params = { - token: this.token, - checkId: item.id, - combType: 2 - } - console.log('🚀 ~ getCheckTypeContent ~ params:', params) - uni.request({ - url: config.tjBaseUrl + '/app/getexamination', - method: 'post', - data: params, - header: { - 'Content-Type': 'application/x-www-form-urlencoded', - token: this.token - }, - success: res => { - res = res.data - console.log('🚀 ~ getCheckTypeContent ~ res:', res) - if (res.res == 1) { - this.setMealId = res.obj.tibean[0].id - this.checkTypeContent = res.obj.tibean[0].combName - this.checkTypeContentList = res.obj.tibeanson - } - }, - fail: err => { - console.log('🚀 ~ getCheckTypeContent ~ err:', err) - } - }) - }, handleShowTime() { if (this.isDisabled) { uni.showToast({ @@ -356,6 +258,7 @@ export default { res = res.data console.log('🚀 ~ handleSave ~ res:', res) if (res.res == 1) { + uni.setStorageSync('jobAppoint', true) uni.showToast({ title: '预约成功', icon: 'success' diff --git a/pages/HealthExaminationApp/myAppointment/healthExamDetails.vue b/pages/HealthExaminationApp/myAppointment/healthExamDetails.vue index fb53fe7..bb29a8c 100644 --- a/pages/HealthExaminationApp/myAppointment/healthExamDetails.vue +++ b/pages/HealthExaminationApp/myAppointment/healthExamDetails.vue @@ -14,7 +14,7 @@
{{ item.mealName }}:{{ item.mealContent }}
{{ item.mealPrice }} 元
- +
体检总价:{{ totalPrice }} 元
@@ -33,28 +33,11 @@ export default { // 套餐名称 combName: '', // 体检项目 - combItem: '项目1、项目2、项目3', + combItem: '', // 体检内容 - combContent: [ - { - mealName: '项目1', - mealContent: - '项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容项目1内容', - mealPrice: '100' - }, - { - mealName: '项目2', - mealContent: '项目2内容', - mealPrice: '200' - }, - { - mealName: '项目3', - mealContent: '项目3内容', - mealPrice: '300' - } - ], - // 体检总价 - totalPrice: 0 + combContent: [], + // 体检总价 + totalPrice: 0 } }, onLoad(opt) { @@ -65,14 +48,14 @@ export default { this.token = uni.getStorageSync('tjToken') }, mounted() { - // this.getDetail() + this.getDetail() }, methods: { // 获取详情 getDetail() { const params = { - token: this.token, - cancelId: this.cancelId + cancelId: String(this.cancelId), + token: this.token } console.log('🚀 ~ getDetail ~ params:', params) uni.request({ @@ -80,6 +63,7 @@ export default { method: 'post', data: params, header: { + 'Content-Type': 'application/x-www-form-urlencoded', token: this.token }, success: res => { @@ -88,7 +72,7 @@ export default { if (res.res == 1) { this.combContent = res.obj this.combItem = res.obj.map(item => item.mealName).join('、') - this.totalPrice = res.obj.reduce((total, item) => total + Number(item.mealPrice), 0) + this.totalPrice = res.obj.reduce((total, item) => total + Number(item.mealPrice), 0) } } }) @@ -117,7 +101,5 @@ export default { margin-bottom: 10px; word-break: break-all; } - - } diff --git a/pages/HealthExaminationApp/myAppointment/myAppointment.vue b/pages/HealthExaminationApp/myAppointment/myAppointment.vue index a8593fe..e2c0344 100644 --- a/pages/HealthExaminationApp/myAppointment/myAppointment.vue +++ b/pages/HealthExaminationApp/myAppointment/myAppointment.vue @@ -1,49 +1,52 @@ @@ -55,16 +58,31 @@ export default { return { token: '', show: false, - columns: [['全部', '已取消', '待体检', '已体检']], + columns: [ + [ + { label: '全部', value: 4 }, + { label: '已取消', value: 1 }, + { label: '待体检', value: 2 }, + { label: '已体检', value: 3 } + ] + ], // 体检状态 makeStatus: '', + makeStatusValue: 4, // 列表 makeList: [], + // 全部列表 + allList: [], + // 已取消列表 + canceledList: [], + // 待体检列表 + readyList: [], + // 已体检 + examList: [], isDisabled: false, options: [ { - text: '删除', - // disabled: isDisabled, + text: '取消', style: { backgroundColor: '#f56c6c' } @@ -81,9 +99,21 @@ export default { methods: { handleSearch(e) { console.log('🚀 ~ handleSearch ~ e:', e) - this.makeStatus = e.value[0] + this.makeStatus = e.value[0].label + this.makeStatusValue = e.value[0].value this.show = false }, + handleQuery(){ + if (this.makeStatusValue == 4) { + this.makeList = this.allList + } else if (this.makeStatusValue == 1) { + this.makeList = this.canceledList + } else if (this.makeStatusValue == 2) { + this.makeList = this.readyList + } else if (this.makeStatusValue == 3) { + this.makeList = this.examList + } + }, // 获取列表 getpersonappointInfo getList() { console.log('🚀 ~ 列表 ~ this.token:', this.token) @@ -99,7 +129,10 @@ export default { res = res.data console.log('🚀 ~ 列表 ~ res:', res) if (res.res == 1) { - this.makeList = res.obj + this.makeList = this.allList = res.obj + this.canceledList = res.obj.filter(item => item.ifCancel == 1) + this.readyList = res.obj.filter(item => item.ifCancel == 2) + this.examList = res.obj.filter(item => item.ifCancel == 3) } }, fail: err => { @@ -107,23 +140,72 @@ export default { } }) }, - // 操作-删除 - handleDelete(item) { - console.log('🚀 ~ handleDelete ~ item:', item) - - }, - // - handleOption(item) { - console.log('🚀 ~ handleOption ~ item:', item) - const params = { - id: item.id, - combName: item.combName, - } - console.log('🚀 ~ handleOption ~ params:', params) - uni.navigateTo({ - url: '/pages/HealthExaminationApp/myAppointment/healthExamDetails?params=' + JSON.stringify(params) - }) - } + // 操作-删除 cancelpoint + handleDelete(item) { + console.log('🚀 ~ handleDelete ~ item:', item) + const params = { + cancelId: item.id, + mealType: item.setMealType, + token: this.token + } + // 弹框确认 + uni.showModal({ + title: '提示', + content: '确认取消预约吗?', + success: res => { + console.log('🚀 ~ handleDelete ~ res:', res) + if (res.confirm) { + uni.request({ + url: config.tjBaseUrl + '/app/cancelpoint', + method: 'post', + data: params, + header: { + 'Content-Type': 'application/x-www-form-urlencoded', + token: this.token + }, + success: res => { + res = res.data + console.log('🚀 ~ 取消预约 ~ res:', res) + if (res.res == 1) { + if (item.setMealType == '2') { + uni.removeStorageSync('appoint') + } else if (item.setMealType == '3') { + uni.removeStorageSync('jobAppoint') + } + // 刷新 - 重定向 + uni.redirectTo({ + url: '/pages/HealthExaminationApp/myAppointment/myAppointment' + }) + } + }, + fail: err => { + console.log('🚀 ~ 列表 ~ err:', err) + } + }) + } + }, + fail: err => { + console.log('🚀 ~ handleDelete ~ err:', err) + } + }) + }, + // + handleOption(item) { + console.log('🚀 ~ handleOption ~ item:', item) + const params = { + id: item.id, + combName: item.combName + } + console.log('🚀 ~ handleOption ~ params:', params) + uni.navigateTo({ + url: '/pages/HealthExaminationApp/myAppointment/healthExamDetails?params=' + JSON.stringify(params) + }) + }, + leftClick() { + uni.reLaunch({ + url: '/pages/HealthExaminationApp/index/index' + }) + } } } diff --git a/pages/HealthExaminationApp/report/pdfView.vue b/pages/HealthExaminationApp/report/pdfView.vue new file mode 100644 index 0000000..41088f8 --- /dev/null +++ b/pages/HealthExaminationApp/report/pdfView.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/pages/HealthExaminationApp/report/report.vue b/pages/HealthExaminationApp/report/report.vue index 748742a..d6cf40f 100644 --- a/pages/HealthExaminationApp/report/report.vue +++ b/pages/HealthExaminationApp/report/report.vue @@ -1,19 +1,229 @@ diff --git a/pages/gzt/index.vue b/pages/gzt/index.vue index 75259dd..32e0cc0 100644 --- a/pages/gzt/index.vue +++ b/pages/gzt/index.vue @@ -197,7 +197,7 @@ jwtToken: uni.getStorageSync('App-Token') } const tjparams = { - username: '13708411772', // 15912575796 + username: '17681010134', // 15912575796 password: 'YNsbd@123456' } console.log('🚀 ~ gotoYy ~ tjparams:', tjparams) @@ -262,7 +262,7 @@ }, 500) } else { uni.showToast({ - title: req.message, + title: res.msg, icon: 'none' }) }