leaf 4 ماه پیش
والد
کامیت
37ab707e91
8فایلهای تغییر یافته به همراه143 افزوده شده و 73 حذف شده
  1. 27 9
      pages/address/add.vue
  2. 14 12
      pages/address/index.vue
  3. 9 3
      pages/cfList/index.vue
  4. 49 31
      pages/index/CfAppraise.vue
  5. 8 4
      pages/index/CfContent.vue
  6. 18 7
      pages/index/CfLogistics.vue
  7. 17 6
      pages/index/TopCard.vue
  8. 1 1
      stores/rest.ts

+ 27 - 9
pages/address/add.vue

@@ -25,8 +25,8 @@
 							:area="formData.area" @change="onChangeArea" />
 					</uni-forms-item>
 					<uni-forms-item label="详细地址(例如**街**号)" name="shrdzxxdz">
-						<uni-easyinput class="pub-input" :inputBorder="false" trim="all" v-model="formData.shrdzxxdz"
-							placeholder="请输入"></uni-easyinput>
+						<uni-easyinput class="pub-input" :inputBorder="false" autoHeight trim="all" type="textarea"
+							v-model="formData.shrdzxxdz" placeholder="请输入"></uni-easyinput>
 					</uni-forms-item>
 				</uni-forms>
 				<view class="address-new-default">
@@ -50,7 +50,7 @@
 	import * as link from '@/lib/link'
 	import { onLoad } from "@dcloudio/uni-app";
 	import PickerAddress from './PickerAddress.vue'
-import { ConsigneeInfoVO } from '../../lib/type';
+	import { ConsigneeInfoVO } from '../../lib/type';
 
 	const formRules = reactive({
 		shrxm: {
@@ -153,10 +153,10 @@ import { ConsigneeInfoVO } from '../../lib/type';
 			console.log('表单错误信息:', err);
 		})
 	}
-	
-	const getInfo = async (shrxxid:string)=> {
+
+	const getInfo = async (shrxxid : string) => {
 		try {
-			let res = await rest.get('/default/consignee-info/get', {id:shrxxid}) as ConsigneeInfoVO
+			let res = await rest.get('/default/consignee-info/get', { id: shrxxid }) as ConsigneeInfoVO
 			formData.value.shrxm = res.shrxm
 			formData.value.shrsjh = res.shrsjh
 			formData.value.province = res.province
@@ -166,7 +166,7 @@ import { ConsigneeInfoVO } from '../../lib/type';
 			formData.value.hzid = res.hzid
 			formData.value.shrxxid = res.shrxxid
 			popupText.value = res.province + res.city + res.area
-			console.log("内容",formData.value)
+			console.log("内容", formData.value)
 		} catch (e) {
 			dlg.error(e)
 		}
@@ -175,10 +175,10 @@ import { ConsigneeInfoVO } from '../../lib/type';
 
 	onLoad((data) => {
 		formData.value.hzid = aesDecrypt(data.hzid)
-		if (data.shrxxid){
+		if (data.shrxxid) {
 			let shrxxid = aesDecrypt(data.shrxxid)
 			let defaulted = aesDecrypt(data.defaulted)
-			console.log("内容",defaulted)
+			console.log("内容", defaulted)
 			uni.setNavigationBarTitle({
 				title: '编辑地址'
 			})
@@ -260,6 +260,24 @@ import { ConsigneeInfoVO } from '../../lib/type';
 				}
 			}
 
+			:deep(.uni-easyinput__content-textarea) {
+				margin: 8rpx 0 4rpx;
+				height: 60rpx;
+				min-height: 60rpx;
+
+				.uni-easyinput__placeholder-class {
+					font-size: $uni-font-size-lg;
+					line-height: $uni-line-height-lg;
+					color: $uni-text-color-light;
+				}
+
+				.uni-textarea-textarea {
+					font-size: $uni-font-size-lg;
+					line-height: $uni-line-height-lg;
+					color: $uni-text-color;
+				}
+			}
+
 			.address-new-default {
 				// border-top: 1px solid $uni-border-color;
 				// margin-top: 24rpx;

+ 14 - 12
pages/address/index.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="address-page">
 		<view class="address-section">
-			<pub-list-scroll ref="pubListScrollRef" @next="onScrollTolower" :loaded="loaded" :text="loadText" :status="status">
+			<pub-list-scroll ref="pubListScrollRef" @next="onScrollTolower" :loaded="loaded" :text="loadText"
+				:status="status">
 				<view class="no-data" v-if="(!list || list.length == 0)&&!loaded">
 					<image mode="heightFix" src="/static/image/no-data.png" />
 					暂无数据
@@ -50,7 +51,7 @@
 	import { ref } from 'vue'
 	import dlg from '@/lib/dlg'
 	import { aesEncrypt, aesDecrypt } from "@/lib/encryption";
-	import { onLoad,onShow } from "@dcloudio/uni-app";
+	import { onLoad, onShow } from "@dcloudio/uni-app";
 	import rest from '@/stores/rest'
 	import * as link from '@/lib/link'
 	import { BasicInfoVO } from '../../lib/type';
@@ -88,8 +89,8 @@
 	}
 
 	const onClickItem = (id : string) => {
-		console.log("onClickItem",ptwybh.value)
-		if (ptwybh.value){
+		console.log("onClickItem", ptwybh.value)
+		if (ptwybh.value) {
 			selAddressId.value = id
 			confirmPopup.value.open('center')
 		}
@@ -127,6 +128,7 @@
 			}
 			await rest.put('/default/consignee-info/bindShrxxid', data);
 			dlg.success('操作成功')
+			link.back()
 		}
 	}
 
@@ -164,7 +166,7 @@
 				status.value = "noMore"
 			}
 			// 重置滚动位置 
-			if (queryParams.value.pageNo === 1) { 
+			if (queryParams.value.pageNo === 1) {
 				pubListScrollRef.value.goTop()
 			}
 		} catch (e) {
@@ -188,13 +190,13 @@
 		queryParams.value.pageNo++;
 		getList();
 	}
-	
-	
+
+
 	const openDetails = (action, item = null) => {
-		console.log("内容",item)
-		if (item){
-			link.addAddress(aesEncrypt(queryParams.value.hzid),aesEncrypt(item.shrxxid),aesEncrypt(item.isDefaulted ? 'true' : 'false'))
-		}else {
+		console.log("内容", item)
+		if (item) {
+			link.addAddress(aesEncrypt(queryParams.value.hzid), aesEncrypt(item.shrxxid), aesEncrypt(item.isDefaulted ? 'true' : 'false'))
+		} else {
 			link.addAddress(aesEncrypt(queryParams.value.hzid))
 		}
 	}
@@ -202,7 +204,7 @@
 
 	onLoad((data) => {
 		queryParams.value.hzid = aesDecrypt(data.hzid)
-		if (data.ptwybh){
+		if (data.ptwybh) {
 			console.log("进入了嘛")
 			ptwybh.value = aesDecrypt(data.ptwybh)
 		}

+ 9 - 3
pages/cfList/index.vue

@@ -34,7 +34,7 @@
 
 <script lang="ts" setup>
 	import { ref, onMounted } from 'vue'
-	import { onLoad } from "@dcloudio/uni-app";
+	import { onLoad, onShow } from "@dcloudio/uni-app";
 	import { aesEncrypt, aesDecrypt } from "@/lib/encryption";
 	import dlg from '@/lib/dlg'
 	import rest from '@/stores/rest'
@@ -53,7 +53,7 @@
 		pageNo: 1,
 		pageSize: 10,
 		zjhm: '',
-		hzxm:'',
+		hzxm: '',
 	})
 	const total = ref(0)
 
@@ -99,7 +99,7 @@
 	}
 
 	const cardClick = (item) => {
-		link.goCFDetails(aesEncrypt(item.ptwybm),aesEncrypt(queryParams.value.zjhm),aesEncrypt(queryParams.value.hzxm))
+		link.goCFDetails(aesEncrypt(item.ptwybm), aesEncrypt(queryParams.value.zjhm), aesEncrypt(queryParams.value.hzxm))
 	}
 	const isShowTag = (item) => {
 		if (['3', '5'].includes(item.fyfslx) && ['00', '001', '01', '02', '05', '06', '07', '08'].includes(item.cfzt)) {
@@ -113,10 +113,16 @@
 		link.goAddressList(aesEncrypt(queryParams.value.zjhm), aesEncrypt(item.ptwybm))
 	}
 	onLoad((data) => {
+		console.log("onLoad", data)
 		queryParams.value.zjhm = aesDecrypt(data.hzsfzh)
 		queryParams.value.hzxm = aesDecrypt(data.hzxm)
 		getList()
 	})
+	onShow(() => {
+		console.log("onShow", queryParams.value)
+		queryParams.value.pageNo = 1;
+		getList()
+	})
 </script>
 
 <style lang="scss" scoped>

+ 49 - 31
pages/index/CfAppraise.vue

@@ -28,16 +28,19 @@
 					<view class="cf-appraise-view" v-if="isEdit">
 						<view class="cf-appraise-view-text">{{info.text}}</view>
 						<view class="cf-appraise-view-imgs">
-							<image mode="heightFix" :src="item" v-for="(item,index) in info.imgList" :key="index" />
+							<uni-file-picker readonly :value="info.imgList" file-mediatype="image">
+							</uni-file-picker>
 						</view>
 					</view>
 					<view class="cf-appraise-edit" v-else>
 						<view class="cf-appraise-edit-textarea">
-							<textarea v-model="info.text" class="textarea" :disabled="false" placeholder-style="color:#B3B5B9"
-								maxlength="-1" placeholder="展开说说您对“中医用药一件事”的想法吧..." />
+							<!-- <textarea v-model="info.text" class="textarea" :disabled="false" placeholder-style="color:#B3B5B9"
+								maxlength="-1" placeholder="展开说说您对“中医用药一件事”的想法吧..." /> -->
+							<uni-easyinput class="pub-input" :inputBorder="false" autoHeight trim="all" :adjust-position="false"
+								type="textarea" maxlength="-1" v-model="info.text" placeholder="展开说说您对“中医用药一件事”的想法吧..."></uni-easyinput>
 						</view>
 						<!-- 最多三张 -->
-						<view class="picture-item" v-if="true">
+						<view class="picture-item">
 							<uni-file-picker class="file-picker" limit="3" :auto-upload="false" :del-icon="true"
 								file-extname='png,git,jpeg,pdf,jpg' file-mediatype="image" v-model="fileList" @select="onSelectFile"
 								@delete="onDelFile">
@@ -46,12 +49,6 @@
 								</view>
 							</uni-file-picker>
 						</view>
-						<view class="echoPicture" v-else>
-							<view v-for="item in fileList" :key="item" class="loop-item">
-								{{ item }}
-								<image class="image-sty" :src="item"></image>
-							</view>
-						</view>
 
 					</view>
 					<view class="cf-appraise-anonymous">
@@ -66,7 +63,7 @@
 	</view>
 </template>
 <script lang="ts" setup>
-	import { ref, PropType,watch } from 'vue'
+	import { ref, PropType, watch } from 'vue'
 	import dlg from '@/lib/dlg.ts'
 	import rest from '@/stores/rest'
 
@@ -88,7 +85,7 @@
 			default: false
 		}
 	})
-	
+
 
 	const loaded = ref(false)
 	const starText = [
@@ -99,7 +96,7 @@
 	]
 	const info = ref({
 		starVal: [0, 0, 0, 0],
-		comprehensiveVal: 1,
+		comprehensiveVal: 3,
 		text: '',
 		imgList: [],
 		anonymous: true
@@ -107,7 +104,6 @@
 	const fileList = ref([])//用于显示图片列表
 	const files = ref([]) //上传post
 
-
 	// 上传图片
 	const onSelectFile = async (res) => {
 		if (!res.tempFilePaths.length) return;
@@ -136,10 +132,12 @@
 	}
 	// 修改
 	const updateAnonymity = () => {
+		if (props.isEdit) return
 		info.value.anonymous = !info.value.anonymous
 	}
 
 	const onClickComprehensive = (val : number) => {
+		if (props.isEdit) return
 		info.value.comprehensiveVal = val
 	}
 
@@ -172,31 +170,31 @@
 			}
 		}
 		console.log("processedData", formData, files.value)
-		await rest.post('/app-api/zyyp/prescription-evaluate/create',formData)
+		await rest.post('/app-api/zyyp/prescription-evaluate/create', formData)
 		dlg.success('操作成功')
 		emits('update');
 	}
-	
-	const getInfo = async()=> {
+
+	const getInfo = async () => {
 		info.value.comprehensiveVal = props.dataList.zhpj
-		info.value.starVal = [props.dataList.jyxg,props.dataList.kfys,props.dataList.jyzl,props.dataList.wlfw]
+		info.value.starVal = [props.dataList.jyxg, props.dataList.kfys, props.dataList.jyzl, props.dataList.wlfw]
 		info.value.text = props.dataList.content
-		info.value.imgList = props.dataList.imgList
+		info.value.imgList = props.dataList.imgList.map((item : string) => {
+			return { url: item }
+		})
 		info.value.anonymous = props.dataList.anonymity == 1 ? true : false
 	}
-	
+
 	watch(() => props.isEdit, (newValue) => {
-	  // console.log("watch isEdit", newValue);
-	  if (newValue) {
-	    getInfo();
-	  }
+		if (newValue) {
+			getInfo();
+		}
 	}, { immediate: true });
-	
+
 	watch(() => props.dataList, (newValue) => {
-	  // console.log("watch dataList", newValue);
-	  if (props.isEdit) {
-	    getInfo();
-	  }
+		if (props.isEdit) {
+			getInfo();
+		}
 	}, { immediate: true });
 </script>
 
@@ -215,6 +213,7 @@
 				flex: 1;
 				box-sizing: border-box;
 				overflow-y: auto;
+				min-height: 100rpx;
 
 				.cf-appraise-top {
 					background: #fff;
@@ -274,10 +273,11 @@
 
 					.cf-appraise-view-imgs {
 						margin-top: 16rpx;
+
 						image {
 
-							width: 200rpx;
-							height: 200rpx;
+							width: 200rpx !important;
+							height: 200rpx !important;
 							border-radius: 8rpx;
 
 							&+image {
@@ -305,6 +305,24 @@
 								color: $uni-text-color-light !important;
 							}
 						}
+
+						:deep(.uni-easyinput__content-textarea) {
+							margin: 8rpx 0 4rpx;
+							height: 120rpx;
+							min-height: 120rpx;
+
+							.uni-easyinput__placeholder-class {
+								font-size: $uni-font-size-lg;
+								line-height: $uni-line-height-lg;
+								color: $uni-text-color-light;
+							}
+
+							.uni-textarea-textarea {
+								font-size: $uni-font-size-lg;
+								line-height: $uni-line-height-lg;
+								color: $uni-text-color;
+							}
+						}
 					}
 
 					.picture-item {

+ 8 - 4
pages/index/CfContent.vue

@@ -5,13 +5,13 @@
 				<view class="cf-content-title">{{dataList.hosName}}</view>
 				<view class="cf-content-info">
 					<view class="cf-content-info-left">
-						<view>患者</view>
+						<view class="label">患者</view>
 						<view>{{dataList.name}}</view>
 						<view>{{dataList.sex}}</view>
 						<view>{{dataList.age}}</view>
 					</view>
 					<view class="cf-content-info-right">
-						<view>处方号</view>
+						<view class="label">处方号</view>
 						<view>{{dataList.cfNo}}</view>
 					</view>
 				</view>
@@ -40,7 +40,7 @@
 </template>
 <script lang="ts" setup>
 	import { ref, PropType } from 'vue'
-	
+
 	const props = defineProps({
 		dataList: {
 			type: Object as PropType<any>,
@@ -48,7 +48,6 @@
 		},
 	})
 	const loaded = ref(false)
-	
 </script>
 
 <style lang="scss" scoped>
@@ -71,6 +70,10 @@
 			border-bottom: 1px dashed $uni-border-color;
 			padding: 32rpx 24rpx;
 
+			.label {
+				color: $uni-text-color-grey;
+			}
+
 			.cf-content-info-left,
 			.cf-content-info-right {
 				@include flex;
@@ -96,6 +99,7 @@
 				width: calc((100% - 48rpx)/3);
 				text-align: left;
 				display: flex;
+
 				>view {
 					&+view {
 						margin-left: 8rpx;

+ 18 - 7
pages/index/CfLogistics.vue

@@ -9,7 +9,7 @@
 				<view class="cf-logistics-top">
 					<view class="icon"><text class="iconfont">&#xe674;</text></view>
 					{{dataList.no}}
-					<view class="copy-icon"> <text class="iconfont">&#xe620;</text></view>
+					<view class="copy-icon" @click="onCopy(dataList.no)"> <text class="iconfont">&#xe620;</text></view>
 				</view>
 				<view class="logistics-list">
 					<view class="logistics-item" :class="item.className" v-for="item in dataList.statusList" :key="item.id">
@@ -26,7 +26,7 @@
 						<view class="logistics-item-right">
 							<view class="logistics-item-title" v-if="item.title">{{item.title}}</view>
 							<view class="logistics-item-time">{{item.time}}</view>
-							<view>{{item.text}}</view>
+							<view>{{item.message}}</view>
 						</view>
 					</view>
 				</view>
@@ -35,18 +35,29 @@
 	</view>
 </template>
 <script lang="ts" setup>
-	import { ref, onMounted,PropType } from 'vue'
-	
+	import { ref, onMounted, PropType } from 'vue'
+
 	const props = defineProps({
 		dataList: {
 			type: Object as PropType<any>,
 			default: () => ({})
 		},
 	})
-	
-	
+
+
 	const loaded = ref(false)
-	
+
+	const onCopy = (value : string) => {
+		uni.setClipboardData({
+			data: value, //要被复制的内容
+			success: () => { //复制成功的回调函数
+				uni.showToast({ //提示
+					title: '复制成功'
+				})
+			}
+		});
+	}
+
 	onMounted(() => {
 	})
 </script>

+ 17 - 6
pages/index/TopCard.vue

@@ -26,7 +26,7 @@
 <script lang="ts" setup>
 	import { ref, onMounted, PropType } from 'vue'
 	import rest from '@/stores/rest'
-	import { onLoad,onShow } from "@dcloudio/uni-app";
+	import { onLoad, onShow } from "@dcloudio/uni-app";
 	import { aesEncrypt, aesDecrypt } from "@/lib/encryption";
 	import * as link from '@/lib/link'
 	import {
@@ -37,7 +37,7 @@
 	} from '@/lib/util'
 	import { BasicInfoVO } from '@/lib/type';
 	import { globalState } from '@/lib/util'
-	
+
 	const props = defineProps({
 		data: {
 			type: Object as PropType<any>,
@@ -76,7 +76,18 @@
 		if (isShow) {
 			return basic + details;
 		} else {
-			return basic + '*'.repeat(details.length);
+			if (basic) {
+				return basic + '*'.repeat(details.length);
+			} else {
+				//别的地方新增的地址没有basic,只有details,查找‘区’,有则隐藏区后的值,无则显示一半的地址
+				let index = details.indexOf('区');
+				if (index == -1) {
+					index = Math.floor(details.length / 2)
+				}
+				let firstStr = details.substring(0, index + 1)
+				let nextStr = details.substring(index + 1)
+				return firstStr + '*'.repeat(nextStr.length)
+			}
 		}
 	}
 
@@ -116,12 +127,12 @@
 		link.goAddressList(aesEncrypt(originalInfo.value.idCard))
 	}
 
-	
-	onShow (()=> {
+
+	onShow(() => {
 		showIcon.value = globalState.showIcon
 		dataList.value.hzxm = props.data.hzxm
 		dataList.value.hzsfzh = props.data.zjhm
-		setTimeout(()=>getInfo(), 5)
+		setTimeout(() => getInfo(), 5)
 	})
 </script>
 

+ 1 - 1
stores/rest.ts

@@ -67,7 +67,7 @@ const fetch = async (method : any, url : string, data : any, loading = false) =>
 				header: getHeader(),
 				success: res => {
 					let statusCode = res.statusCode;
-					console.log("res", res)
+					// console.log("res", res)
 					if (statusCode == 200) {
 						let { code, msg, data, message } = res.data
 						// console.log(method + "[" + url + "]success", res);