From 7c68b5b04615626166bd1b933408ed82063192ff Mon Sep 17 00:00:00 2001 From: wanglizhong <wlz> Date: 星期四, 01 五月 2025 13:45:33 +0800 Subject: [PATCH] feat:add order --- doc/订单详情.png | 0 sql/ry_20250417.sql | 3 ruoyi-admin/src/main/resources/application-druid.yml | 2 doc/订单详情.rp | 0 ruoyi-ui/src/views/system/order/detail.vue | 221 ++++++++++++++++++++++++++++++++++++++++++++ ruoyi-ui/src/api/system/order.js | 8 + ruoyi-ui/src/router/index.js | 7 + 7 files changed, 239 insertions(+), 2 deletions(-) diff --git "a/doc/\350\256\242\345\215\225\350\257\246\346\203\205.png" "b/doc/\350\256\242\345\215\225\350\257\246\346\203\205.png" new file mode 100644 index 0000000..9a75e7d --- /dev/null +++ "b/doc/\350\256\242\345\215\225\350\257\246\346\203\205.png" Binary files differ diff --git "a/doc/\350\256\242\345\215\225\350\257\246\346\203\205.rp" "b/doc/\350\256\242\345\215\225\350\257\246\346\203\205.rp" new file mode 100644 index 0000000..3ac2e97 --- /dev/null +++ "b/doc/\350\256\242\345\215\225\350\257\246\346\203\205.rp" Binary files differ diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 963268b..ac810e6 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,7 +6,7 @@ druid: # 涓诲簱鏁版嵁婧� master: - url: jdbc:mysql://120.25.98.119:3307/rouyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://120.25.98.119:3307/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: abcd1234 # 浠庡簱鏁版嵁婧� diff --git a/ruoyi-ui/src/api/system/order.js b/ruoyi-ui/src/api/system/order.js index ccb017e..c055a8e 100644 --- a/ruoyi-ui/src/api/system/order.js +++ b/ruoyi-ui/src/api/system/order.js @@ -59,4 +59,12 @@ method: 'get', params: query }) +} + +// 鏌ヨ璁㈠崟璇︽儏 +export function getOrderDetail(orderId) { + return request({ + url: '/system/order/' + orderId, + method: 'get' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 4550b66..00013cc 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -93,6 +93,13 @@ meta: { title: '涓汉涓績', icon: 'user' } } ] + }, + { + path: 'order/detail/:id', + component: () => import('@/views/system/order/detail'), + name: 'OrderDetail', + meta: { title: '璁㈠崟璇︽儏' }, + hidden: true } ] diff --git a/ruoyi-ui/src/views/system/order/detail.vue b/ruoyi-ui/src/views/system/order/detail.vue new file mode 100644 index 0000000..2dad341 --- /dev/null +++ b/ruoyi-ui/src/views/system/order/detail.vue @@ -0,0 +1,221 @@ +<template> + <div class="app-container"> + <el-card class="box-card"> + <div slot="header" class="clearfix"> + <span>璁㈠崟缂栧彿锛歿{ orderInfo.orderNo }}</span> + </div> + + <el-row :gutter="20"> + <!-- 璁㈠崟鍩烘湰淇℃伅 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>璁㈠崟鍩烘湰淇℃伅</b></div> + <el-descriptions :column="isMobile ? 1 : 2" border> + <el-descriptions-item label="澶栭儴缂栧彿">{{ orderInfo.externalNo }}</el-descriptions-item> + <el-descriptions-item label="涓嬪崟鏃堕棿">{{ orderInfo.orderTime }}</el-descriptions-item> + <el-descriptions-item label="璁㈠崟鐘舵��">{{ orderInfo.orderStatus }}</el-descriptions-item> + <el-descriptions-item label="璁㈠崟鏉ユ簮">{{ orderInfo.orderSource }}</el-descriptions-item> + <el-descriptions-item label="鍗曟嵁鐘舵��">{{ orderInfo.documentStatus }}</el-descriptions-item> + <el-descriptions-item label="鎴愪氦浠锋牸">{{ orderInfo.price }}鍏�</el-descriptions-item> + <el-descriptions-item label="瀹㈡埛棰勭害鏃堕棿">{{ orderInfo.appointmentTime }}</el-descriptions-item> + <el-descriptions-item label="娲惧崟鏃堕棿">{{ orderInfo.dispatchTime }}</el-descriptions-item> + </el-descriptions> + </el-card> + </el-col> + + <!-- 瀹㈡埛淇℃伅 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>瀹㈡埛淇℃伅</b></div> + <el-descriptions :column="isMobile ? 1 : 2" border> + <el-descriptions-item label="鑱旂郴浜�">{{ patientInfo.contactName }}</el-descriptions-item> + <el-descriptions-item label="鑱旂郴鐢佃瘽">{{ patientInfo.contactPhone }}</el-descriptions-item> + <el-descriptions-item label="鎮h�呭鍚�">{{ patientInfo.patientName }}</el-descriptions-item> + <el-descriptions-item label="鎮h�呭勾榫�">{{ patientInfo.patientAge }}</el-descriptions-item> + <el-descriptions-item label="鎮h�呮�у埆">{{ patientInfo.patientGender }}</el-descriptions-item> + <el-descriptions-item label="鎮h�呬綋閲�">{{ patientInfo.patientWeight }}</el-descriptions-item> + </el-descriptions> + </el-card> + </el-col> + </el-row> + + <el-row :gutter="20"> + <!-- 鏈嶅姟瑕佹眰 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>鏈嶅姟瑕佹眰</b></div> + <el-descriptions :column="1" border> + <el-descriptions-item label="鍑哄彂鍦�">{{ serviceInfo.startAddress }}</el-descriptions-item> + <el-descriptions-item label="鍑哄彂鍦颁綅缃�">{{ serviceInfo.startLocation }}</el-descriptions-item> + <el-descriptions-item label="鐩殑鍦�">{{ serviceInfo.endAddress }}</el-descriptions-item> + <el-descriptions-item label="鐩殑鍦颁綅缃�">{{ serviceInfo.endLocation }}</el-descriptions-item> + <el-descriptions-item label="杞繍閲岀▼">{{ serviceInfo.distance }}</el-descriptions-item> + <el-descriptions-item label="鎼姮鏈嶅姟">{{ serviceInfo.liftService }}</el-descriptions-item> + <el-descriptions-item label="鎼姮妤煎眰">{{ serviceInfo.liftFloor }}</el-descriptions-item> + <el-descriptions-item label="鍖绘姢瑕佹眰">{{ serviceInfo.medicalStaff }}</el-descriptions-item> + </el-descriptions> + </el-card> + </el-col> + + <!-- 鐥呭巻 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>鐥呭巻</b></div> + <el-descriptions :column="1" border> + <el-descriptions-item label="鏄惁鏈夋剰璇�">{{ medicalInfo.hasConsciousness }}</el-descriptions-item> + <el-descriptions-item label="鐥呬汉鎯呭喌">{{ medicalInfo.patientCondition }}</el-descriptions-item> + <el-descriptions-item label="浣跨敤鍛煎惛鏈�">{{ medicalInfo.useVentilator }}</el-descriptions-item> + <el-descriptions-item label="璇婃柇鐥呮儏">{{ medicalInfo.diagnosis }}</el-descriptions-item> + </el-descriptions> + </el-card> + </el-col> + </el-row> + + <el-row :gutter="20"> + <!-- 璋冨害淇℃伅 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>璋冨害淇℃伅</b></div> + <el-descriptions :column="isMobile ? 1 : 2" border> + <el-descriptions-item label="璋冨害鏃堕棿">{{ dispatchInfo.dispatchTime }}</el-descriptions-item> + <el-descriptions-item label="璋冨害鐘舵��">{{ dispatchInfo.dispatchStatus }}</el-descriptions-item> + <el-descriptions-item label="鍙告満">{{ dispatchInfo.driver }}</el-descriptions-item> + <el-descriptions-item label="杞︾墝">{{ dispatchInfo.carNo }}</el-descriptions-item> + <el-descriptions-item label="鍖荤敓">{{ dispatchInfo.doctor }}</el-descriptions-item> + <el-descriptions-item label="鑱屼綅">{{ dispatchInfo.doctorPosition }}</el-descriptions-item> + <el-descriptions-item label="鎶ゅ+">{{ dispatchInfo.nurse }}</el-descriptions-item> + </el-descriptions> + </el-card> + </el-col> + + <!-- 鏀舵淇℃伅 --> + <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"> + <el-card class="inner-card"> + <div slot="header"><b>鏀舵淇℃伅</b></div> + <el-table + :data="paymentInfo" + border + style="width: 100%" + :size="isMobile ? 'mini' : 'medium'" + class="responsive-table"> + <el-table-column prop="paymentNo" label="鏀舵娴佹按" min-width="120" /> + <el-table-column prop="paymentTime" label="鏀舵鏃堕棿" min-width="140" /> + <el-table-column prop="amount" label="閲戦" min-width="100" /> + <el-table-column prop="method" label="鏂瑰紡" min-width="100" /> + <el-table-column prop="remark" label="澶囨敞" min-width="120" /> + </el-table> + </el-card> + </el-col> + </el-row> + + <!-- 杩愯鎯呭喌 --> + <el-row> + <el-col :span="24"> + <el-card class="inner-card"> + <div slot="header"> + <b>杩愯鎯呭喌</b> + <span style="float: right">绮102311</span> + </div> + <el-table + :data="operationInfo" + border + style="width: 100%" + :size="isMobile ? 'mini' : 'medium'" + class="responsive-table"> + <el-table-column prop="status" label="鍑鸿溅鐘舵��" min-width="100" /> + <el-table-column prop="operator" label="鎿嶄綔浜�" min-width="100" /> + <el-table-column prop="operateTime" label="鎿嶄綔鏃堕棿" min-width="140" /> + <el-table-column prop="location" label="鍧愭爣浣嶇疆" min-width="200" show-overflow-tooltip /> + </el-table> + </el-card> + </el-col> + </el-row> + </el-card> + </div> +</template> + +<script> +import { getOrderDetail } from '@/api/system/order' + +export default { + name: 'OrderDetail', + data() { + return { + // 鍒濆鍖栦负绌哄璞� + orderInfo: {}, + patientInfo: {}, + serviceInfo: {}, + medicalInfo: {}, + dispatchInfo: {}, + paymentInfo: [], + operationInfo: [], + screenWidth: document.documentElement.clientWidth // 灞忓箷瀹藉害 + } + }, + computed: { + isMobile() { + return this.screenWidth <= 768 + } + }, + created() { + const orderId = this.$route.params.id + this.getDetail(orderId) + // 鐩戝惉绐楀彛澶у皬鍙樺寲 + window.addEventListener('resize', this.handleResize) + }, + beforeDestroy() { + // 缁勪欢閿�姣佸墠绉婚櫎鐩戝惉鍣� + window.removeEventListener('resize', this.handleResize) + }, + methods: { + /** 鑾峰彇璁㈠崟璇︽儏 */ + getDetail(orderId) { + getOrderDetail(orderId).then(response => { + const { data } = response + // 鏍规嵁鍚庣杩斿洖鐨勬暟鎹粨鏋勮缃悇涓璞$殑鍊� + this.orderInfo = data.orderInfo || {} + this.patientInfo = data.patientInfo || {} + this.serviceInfo = data.serviceInfo || {} + this.medicalInfo = data.medicalInfo || {} + this.dispatchInfo = data.dispatchInfo || {} + this.paymentInfo = data.paymentInfo || [] + this.operationInfo = data.operationInfo || [] + }) + }, + // 澶勭悊绐楀彛澶у皬鍙樺寲 + handleResize() { + this.screenWidth = document.documentElement.clientWidth + } + } +} +</script> + +<style scoped> +.inner-card { + margin-bottom: 20px; +} +.el-card ::v-deep .el-card__header { + padding: 10px 20px; + background-color: #f5f7fa; +} +.el-descriptions { + margin: 10px 0; +} +.el-descriptions-item { + margin-bottom: 0; +} +/* 鍝嶅簲寮忚〃鏍兼牱寮� */ +.responsive-table { + width: 100%; + overflow-x: auto; +} +@media screen and (max-width: 768px) { + .el-card { margin: 10px 0; } + .el-row { margin-left: 0 !important; margin-right: 0 !important; } + .el-col { padding-left: 0 !important; padding-right: 0 !important; } + .box-card { border-radius: 0; } + .inner-card { margin-bottom: 10px; } + .el-descriptions-item { padding: 8px !important; } + .el-descriptions-item__label { width: 100px !important; } +} +</style> \ No newline at end of file diff --git a/sql/ry_20250417.sql b/sql/ry_20250417.sql index 37e9a96..20e843f 100644 --- a/sql/ry_20250417.sql +++ b/sql/ry_20250417.sql @@ -186,7 +186,8 @@ insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '鐧诲綍鏃ュ織鑿滃崟'); -- 鏂板鏈嶅姟鍗曡彍鍗� insert into sys_menu values('2000', '鏈嶅姟鍗曠鐞�', '1', '10', 'serviceOrder', 'system/serviceOrder/index', '', 'serviceOrder', 1, 0, 'C', '0', '0', 'system:serviceOrder:list', 'service-order', 'admin', sysdate(), '', null, '鏈嶅姟鍗曠鐞嗚彍鍗�'); - +--鏂板璁㈠崟璇︽儏 +insert into sys_menu values('2001', '鏈嶅姟鍗曠鐞�', '1', '10', 'serviceOrder', 'system/order/detail', '', 'serviceOrder', 1, 0, 'C', '0', '0', 'system:serviceOrder:detail', 'service-order', 'admin', sysdate(), '', null, '璁㈠崟璇︽儏'); -- 鐢ㄦ埛绠$悊鎸夐挳 insert into sys_menu values('1000', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, ''); insert into sys_menu values('1001', '鐢ㄦ埛鏂板', '100', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); -- Gitblit v1.9.1