Ver código fonte

[dev]
1、优化复核处方中的字体显示
2、增加科室查询
3、完善查询逻辑

Neo 1 ano atrás
pai
commit
df7431d1b8
3 arquivos alterados com 65 adições e 21 exclusões
  1. 54 20
      pages/index/index.vue
  2. 1 0
      pages/review/review.vue
  3. 10 1
      static/js/api.js

+ 54 - 20
pages/index/index.vue

@@ -22,7 +22,9 @@
 							<view class="row1">
 								<view class="timequan">
 									<text class="time_t">时间区间:</text>
-									<uni-datetime-picker v-model="searchTime" type="datetimerange" :hide-second="true" class="datepick" rangeSeparator=" - " />
+									<uni-datetime-picker v-model="searchTime[0]" placeholder="开始时间" type="datetime" :hide-second="true" class="datepick"/>
+									 到 
+									<uni-datetime-picker v-model="searchTime[1]"  placeholder="结束时间" type="datetime" :hide-second="true" class="datepick"/>
 									<!-- <timeSlot 
 									    ref="timeslot"
 									    :title="'选择时间段'"
@@ -43,7 +45,7 @@
 									<view class="time_t">
 										科室:
 									</view>
-									<picker @change="handleGetOffice" :value="officeIndex" :range="officeArr">
+									<picker @change="handleGetOffice" placeholder="请选择" :value="officeIndex" :range="officeArr">
 										<view class="uni-input">{{officeArr[officeIndex]}}</view>
 									</picker>
 								</view>
@@ -102,7 +104,7 @@ import NavBar from "@/components/nav-bar/nav-bar.vue"
 import OrderCard from "@/components/order-card/order-card.vue"
 import { onMounted,ref, getCurrentInstance } from 'vue'
 import { onLoad } from "@dcloudio/uni-app"
-import {receiveOrderList } from "@/static/js/api.js"
+import {receiveOrderList, selectDepartment } from "@/static/js/api.js"
 import {releaseOrder} from "@/static/js/request.js"
 
 // import { ID_INJECTION_KEY } from 'element-plus'
@@ -131,7 +133,7 @@ const orderList = ref([
 const isBottom = ref(false) // 是否触底
 
 
-const officeArr = ref(['全部','中医骨伤科门诊一','中医内科门诊一','中医儿科门诊'])
+const officeArr = ref(['全部'])
 const officeIndex = ref(0)
 
 const typeArr = ref(['姓名:','处方号:'])
@@ -145,6 +147,7 @@ const searchPreNo = ref('')
 const searchSex = ref('')
 const searchPreMzZy = ref('')
 const searchStatus = ref('')
+const searchPrescriptionStatus = ref('')
 
 const searchTags = ref([])
 const tags = ref(['全部','门诊','住院','男','女','煎煮','发药'])
@@ -206,13 +209,14 @@ onLoad(async () => {
 
 const reset = ()=>{
 	searchTime.value =[]
-	searchDepartment.value =''
+	officeIndex.value =0
 	searchName.value =''
 	searchPreNo.value =''
 	searchSex.value =''
 	searchPreMzZy.value =''
 	searchStatus.value =''
 	searchVal.value = ''
+	officeArr.value = ['全部']
 }
 
 // 子传父,更新userInfo
@@ -236,7 +240,7 @@ const emitSelect = (v)=>{
 const handleSearch = async()=>{
 	
 	
-	if(tabActive.value ===0 && searchVal.value) {
+	if(tabActive.value ===0) {
 		const params = {
 			token: uni.getStorageSync('token'),
 			data: JSON.stringify({
@@ -244,7 +248,8 @@ const handleSearch = async()=>{
 				name: searchVal.value.trim(),
 				page: page.value,
 				pageSize: pageSize.value,
-				status: tabList.value[tabActive.value].status
+				status: tabList.value[tabActive.value].status,
+				
 			})
 		}
 		const {data:res} = await receiveOrderList(params)
@@ -262,15 +267,16 @@ const handleSearch = async()=>{
 				endTime:  searchTime.value[1] || '',
 				name: searchName.value.trim() || '',
 				preNo: searchPreNo.value || '',
-				prescriptionStatus: searchStatus.value || '',
+				department: officeArr.value[officeIndex.value] || '',
+				prescriptionStatus: searchStatus.value || '',//煎煮发药
 				sex: searchSex.value || '',
-				preMzZy: searchPreMzZy.value || '',
+				preMzZy: searchPreMzZy.value || '',//门诊住院
 				page: page.value,
 				pageSize: pageSize.value,
 				status: tabList.value[tabActive.value].status
 			})
 		}
-		console.log('params',params)
+		console.log('历史记录查询params',params)
 		const {data:res} = await receiveOrderList(params)
 		if (res.code === 200) {
 			total.value = res.total
@@ -399,7 +405,7 @@ const handleGetTags = (v)=>{
 			if(searchTags.value.includes('全部')){
 				searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
 			}
-			searchStatus.value = '煎煮'
+			searchStatus.value = '2'
 			break
 		case '发药':
 			if(searchTags.value.includes(v) && searchTags.value.includes('煎煮')){
@@ -408,7 +414,7 @@ const handleGetTags = (v)=>{
 			if(searchTags.value.includes('全部')){
 				searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
 			}
-			searchStatus.value = '发药'
+			searchStatus.value = '3'
 			break
 		default:
 			searchTags.value = ['全部']
@@ -443,6 +449,23 @@ const checkIndex = async(index) => {
 			tabList.value[0].leng = orderList.value.length
 		}
 	}
+	if(tabActive.value==1) {
+		const param = {
+			token: uni.getStorageSync('token'),
+			// data:JSON.stringify({
+			// 	currentUserId: parseInt(uni.getStorageSync('userId')),
+			// 	page: page.value,
+			// 	pageSize: pageSize.value,
+			// 	status: tabList.value[tabActive.value].status
+			// })
+		}
+		console.log('checkIndex param',param)
+		const {data:res} = await selectDepartment(param)
+		if (res.code === 200) {
+			officeArr.value.push(...res.data)
+			console.log('selectDepartment officeArr.value', officeArr.value)
+		}
+	}
 }
 
 const openTime = ()=>{
@@ -451,6 +474,9 @@ const openTime = ()=>{
 
 const loadMoreList =async()=>{
 	console.log('loadMoreList>>>')
+	if(isBottom){
+		return
+	}
 	page.value = page.value +1
 	const params = {
 		token: uni.getStorageSync('token'),
@@ -466,6 +492,9 @@ const loadMoreList =async()=>{
 	console.log('orderList.value before',orderList.value)
 	if (res.code === 200) {
 		total.value = res.total
+		if(total.value< pageSize.value){
+			isBottom.value = true
+		}
 		console.log('res.rows after',res.rows)
 		res.rows.forEach(item=>{
 			orderList.value.push(item)
@@ -610,7 +639,8 @@ const loadPreList = async()=>{
 								}
 								.datepick {
 									z-index: 999;
-									width: 627.5rpx;
+									width: 300rpx;
+									margin:0 10rpx;
 								}
 							}
 							
@@ -631,7 +661,7 @@ const loadPreList = async()=>{
 									justify-content:center;
 									align-items: center;
 									border:1px solid #e1e5f1;
-									font-size: 15rpx;
+									// font-size: 15rpx;
 									width:190rpx;
 									// height: 40rpx;
 									border-radius: 5rpx;
@@ -653,18 +683,22 @@ const loadPreList = async()=>{
 							}
 							.search{
 								width: 187.5rpx;
-								height: 40rpx;								
-								:deep(.easyinput__content-input){
-									height: 40rpx!important;
-								}
+								// height: 40rpx;								
+								// :deep(.easyinput__content-input){
+								// 	// height: 40rpx!important;
+								// }
 								:deep(.uni-easyinput__placeholder-class){
-									font-size: 15rpx;
+									font-size: 14rpx;
 								}
 							}
 							.search-button{
+								display: flex;
+								justify-content:center;
+								align-items: center;
 								width:120rpx;
 								margin: 8rpx 12rpx;
-								font-size: 15rpx;
+								font-size: 14rpx;
+								height: 40rpx!important;
 								color: #fff;
 								background-color: #18C7B0;
 							}

+ 1 - 0
pages/review/review.vue

@@ -641,6 +641,7 @@ const dialogClose = ()=>{
 						align-items: center;
 						font-size: 15rpx;
 						padding: 6rpx 6rpx;
+						font-weight: 500;
 					}
 					.rig{
 						display: flex;

+ 10 - 1
static/js/api.js

@@ -80,4 +80,13 @@ export const sendToUser = (data) => {
 		method: 'POST',
 		data: data
 	})
-}
+}
+
+// 查询部门数据
+export const selectDepartment = (data) => {
+	return service({
+		url: '/prescription/prescriptionCore/selectDepartment',
+		method: 'POST',
+		data: data
+	})
+}