123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <template>
- <view class="container" v-if="(props.s=='1' || props.c=='1')" @click="handleDetail">
- <view class="t">
- <view class="d1"></view>
- <view class="d2">
- <view class="dtim">时间:{{props.v.prescriptionTime}}</view>
- </view>
- <view class="d3"><view class="presno">处方号:{{props.v.preNo}}</view></view>
- <view class="d4"><view class="source" :class="{'zy':props.v.preMzZy==='1'}">{{props.v.preMzZy==='1'?'门诊':'住院'}}</view></view>
- </view>
- <view class="m">
- <image class="faceu" aspectFill :src="props.v.sex==='男'?'/static/hz.png':'/static/hy.png'" />
- <view class="patie">
- <view class="name">{{props.v.name}}</view>
- <view class="seage">
- <image class="img" aspectFill :src="props.v.sex==='男'?'/static/male.png':'/static/female.png'" />
- <view class="sex">{{props.v.sex}}</view>
- <view class="sep">|</view>
- <view class="age">{{v.age}}岁</view>
- </view>
- <view class="case">{{props.v.disName}} - {{props.v.symName}}</view>
- </view>
- <view class="pres">
- <view class="department">就诊科室:{{props.v.department}}</view>
- <view class="presInfo">
- 处方信息:
- <text class="tips">
- {{props.v.dosageForm}},{{props.v.number}}剂
- </text>
- </view>
- </view>
- </view>
- <view class="b">
- <view class="zt">当前处方状态: {{deployStateName}}</view>
- <view class="je">处方金额:{{props.v.prescriptionSum}}元</view>
- </view>
- </view>
- <view class="container" v-if="props.workStatus=='1' && props.s=='0' &&props.c=='0'" > <!-- @click="handleSelect" -->
- <view class="t">
- <view class="d1"></view>
- <view class="d2">
- <view class="dtim">时间:{{props.v.prescriptionTime}}</view>
- </view>
- <view class="d3"><view class="presno">处方号:{{props.v.preNo}}</view></view>
- <view class="d4"><view class="source" :class="{'zy':props.v.preMzZy==='1'}">{{props.v.preMzZy==='1'?'门诊':'住院'}}</view></view>
- </view>
- <view class="m">
- <view class="radio">
- <label><radio @click="handleSelect" color="#18C7B0" :checked="selected"/></label>
- <!-- <label><uni-data-checkbox v-model="selected" @change="handleSelect" /></label> -->
- <!-- <label><uni-data-checkbox v-model="selected"></uni-data-checkbox></label> -->
- <!-- <label> -->
- <!-- <uni-icons v-if="selected==false" :type="filled" color="#18C7B0" size="30" style="margin-right: 10rpx;"></uni-icons>
- <uni-icons v-else type="checkbox-filled" color="#18C7B0" size="30" style="margin-right: 10rpx;"></uni-icons> -->
- <!-- <uni-icons :type="filled" color="#18C7B0" size="30" style="margin-right: 10rpx;"></uni-icons> -->
- <!-- </label> -->
- </view>
- <image class="faceu" aspectFill :src="props.v.sex==='男'?'/static/hz.png':'/static/hy.png'" />
- <view class="patie">
- <view class="name">{{props.v.name}}</view>
- <view class="seage">
- <image class="img" aspectFill :src="props.v.sex==='男'?'/static/male.png':'/static/female.png'" />
- <view class="sex">{{props.v.sex}}</view>
- <view class="sep">|</view>
- <view class="age">{{v.age}}岁</view>
- </view>
- <view class="case">{{props.v.disName}} - {{props.v.symName}}</view>
- </view>
- <view class="pres">
- <view class="department">就诊科室:{{props.v.department}}</view>
- <view class="presInfo">
- 处方信息:
- <text class="tips">
- {{props.v.dosageForm}},{{props.v.number}}剂
- </text>
- </view>
- </view>
- </view>
- <view class="b">
- <view class="zt">当前处方状态: {{deployStateName}}</view>
- <view class="je">处方金额:{{props.v.prescriptionSum}}元</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'OrderCard'
- }
- </script>
- <script setup>
- import { onMounted, onBeforeUpdate, ref,computed } from 'vue'
- const props = defineProps({
- s:{
- default:'1',
- type: String
- },
-
- v: {
- default: function() {
- return {
- name: '',
- deployState:0,
- preNo:'',
- selected: false
- }
- },
- type: Object
- },
- workStatus: {
- default:'0',
- type: String
- },
- // 当前tab
- c: {
- default: 0,
- type: Number
- }
- })
- const selected = ref(false)
- // const filled = ref('circle')
- // console.log('in order-card selected:', selected.value)
- const emit = defineEmits(['emitSelect'])
- // console.log('props.workStatus',props.workStatus)
- onBeforeUpdate(()=>{
- selected.value = props.v.selected
- // filled.value = 'circle'
- // console.log('selected.value', props.v.preNo,selected.value)
- })
- const deployStateName = computed(()=>{
- switch(props.v.state) {
- case '1':
- return '抓药';
- case '2':
- return '复核';
- case '3':
- return '浸泡';
- case '4':
- return '煎煮';
- case '5':
- return '打包';
- default:
- return '异常状态';
- }
- })
- const handleDetail = ()=>{
- console.log("handleDetail", props.v, props.c)
- // const initPrint = uni.getStorageSync('hasPrinter')
- if(props.c===0){
- // if(initPrint !== '1'){
- // uni.$showMsg('请先连接打印机!然后进行调配', 2000)
- // } else {
- // uni.navigateTo({
- // url:`/pages/edit/edit?id=${props.v.id}`
- // // url:`/pages/review/review?id=&preNo=${props.v.preNo}&deployState=${props.v.deployState}`
- // })
- // }
- uni.navigateTo({
- url:`/pages/edit/edit?id=${props.v.id}`
- // url:`/pages/review/review?id=&preNo=${props.v.preNo}&deployState=${props.v.deployState}`
- })
- } else {
- uni.navigateTo({
- url:`/pages/detail/detail?id=${props.v.id}`
- })
- }
- }
- const handleSelect = ()=>{
- console.log('handleSelect>>',props.v.id)
- selected.value = !selected.value
- emit('emitSelect',{
- id:props.v.id,
- selected:selected.value
- })
-
- console.log('handleSelect>>selected.value',selected.value)
- // if(selected.value){
- // filled.value = 'checkbox-filled'
-
- // } else {
- // filled.value = 'circle'
- // }
- // uni.$showMsg('选中了'+filled.value, 2000)
- // console.log('选中了>>>',filled.value)
- }
- </script>
- <style lang="scss">
- .container{
- display: flex;
- width: 100%;
- display: flex;
- flex-direction:column;
- width: 100%;
- margin-top: 10rpx;
- .t{
- display: flex;
- background-color: #EBF8F7;
- height: 33.75rpx;
- width: 709.38rpx;
- font-size: 13.75rpx;
- color: #999999;
- justify-content:flex-start;
- align-items:center;
- .d1::before{
- content: '';
- display: inline-block;
- width: 20px;
- height: 20px;
- background: "#18C7B0";
- }
- .d2{
- margin-left: 16rpx;
- }
- .d3{
- margin-left: 200rpx;
- }
- .d4{
- margin-left: auto;
- .source{
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 25rpx 0 0 25rpx;
- font-size: 13.75rpx;
- width: 50rpx;
- height: 21.25rpx;
- background-color: #18C7B0;
- color: #fff;
- }
- .zy{
- background-color: #82ABE1!important;
- }
- }
- }
- .m{
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin: 11.88rpx 25rpx 15.75rpx;
- .radio{
-
- }
- .faceu{
- width: 73.13rpx;
- height: 73.13rpx;
- margin-right: 10rpx;
- }
- .patie{
- display: flex;
- flex-direction:column;
- justify-content: flex-start;
- align-items: flex-start;
- height: 73.13rpx;
- width: 270rpx;
- .name{
- font-size: 17.5rpx;
- color: #333333;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- }
- .seage{
- display: flex;
- margin-top: 8rpx;
- .img{
- height: 15rpx;
- width: 15rpx;
- }
- .sex{
- font-size: 12rpx;
- color: #999999;
- padding-right: 8.75rpx;
- }
- .sep{
- font-size: 10rpx;
- color: #999999;
- }
- .age{
- font-size: 12rpx;
- color: #999999;
- padding-left: 8.75rpx;
- }
- }
- .case{
- margin-top: 3rpx;
- font-size: 15rpx;
- color: #333333;
- }
- }
- .pres{
- display: flex;
- flex-direction:column;
- justify-content: flex-start;
- align-items: flex-start;
- margin-left: 4rpx;
- height: 73.13rpx;
- .department{
- margin-top: 5rpx;
- font-size: 15rpx;
- color: #999999;
- }
- .presInfo{
- margin-top: 10rpx;
- font-size: 15rpx;
- color: #333333;
- .tips{}
- }
- }
- }
- .b{
- display: flex;
- flex-direction:row;
- justify-content: space-between;
- align-items: center;
- height: 33.75rpx;
- width: 709.38rpx;
- color: #999999;
- padding: 4rpx 48.78rpx;
- margin-bottom: 2rpx;
- .zt{
- display: flex;
- width: 200rpx;
- font-size: 13.75rpx;
- }
- .je{
- display: flex;
- width: 200rpx;
- font-size: 15rpx;
- }
- }
- }
- </style>
|