detail.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view style="margin-bottom: 100rpx;" v-if="isShowView">
  3. <!-- 处方信息 -->
  4. <view class="prescription-info-box">
  5. <!-- <view class="prescription-state-title">医生/药师正在审方中,请耐心等等...</view> -->
  6. <view class="prescription-state-title">
  7. <view class="prescription-state-title" v-if="detail.state == 0">医生/药师正在审方中,请耐心等等...</view>
  8. <block v-if="detail.state == 1">
  9. <view>医生/药师已根据处方进行报价</view>
  10. <view class="baojia" @click="jumpUrl('mine/orderDet/orderDet?id=' + detail.orderId)">查看报价</view>
  11. </block>
  12. <view class="prescription-state-title" v-if="detail.state == 2">已驳回:{{ detail.reason }}</view>
  13. </view>
  14. <view class="prescription-data">
  15. <text class="prescription-tinfo">服务处方编号</text>
  16. <text class="prescription-dinfo">{{ detail.id }}</text>
  17. </view>
  18. <view class="prescription-data">
  19. <text class="prescription-tinfo">处方提交时间</text>
  20. <text class="prescription-dinfo">{{ detail.createDate }}</text>
  21. </view>
  22. <view class="prescription-data" v-if="detail.phone">
  23. <text class="prescription-tinfo">联系电话</text>
  24. <text class="prescription-dinfo">{{ detail.phone }}</text>
  25. </view>
  26. </view>
  27. <!-- 处方图 -->
  28. <view class="prescription-image-box">
  29. <view>处方图</view>
  30. <view>
  31. <image v-for="(item, index) in drugImgUrl" @click="previewImg(drugImgUrl, index)" :key="index" class="prescription-image" :src="item" mode="widthFix"></image>
  32. </view>
  33. <view class="service-item bottom-border">
  34. <view>是否需要代煎药</view>
  35. <view>{{ detail.isFrying ? '是' : '否' }}</view>
  36. </view>
  37. <view class="service-item bottom-border">
  38. <view>是否是孕妇</view>
  39. <view>{{ detail.isPregnant ? '是' : '否' }}</view>
  40. </view>
  41. <view class="service-item">
  42. <view>备注</view>
  43. <view>{{ detail.remarks }}</view>
  44. </view>
  45. </view>
  46. <!-- 收货地址 -->
  47. <view class="prescription-address-box" v-if="detail.addressDTO">
  48. <view>收获地址</view>
  49. <view class="address ddflex">
  50. <image class="address-icon" src="../static/images/area.png"></image>
  51. <view class="fflex">
  52. <view>{{ detail.addressDTO.address + detail.addressDTO.house }}</view>
  53. <view class="address-user">{{ detail.addressDTO.name }} {{ detail.addressDTO.phone }}</view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. const app = getApp();
  61. const req = require('../../utils/request.js');
  62. const api = require('../../utils/api.js');
  63. const utils = require('../../utils/util.js');
  64. export default {
  65. data() {
  66. return {
  67. isShowView: false,
  68. detail: '',
  69. drugImgUrl: [],
  70. id: ''
  71. };
  72. },
  73. components: {},
  74. onLoad: function(options) {
  75. this.id = options.id;
  76. this.getDetail();
  77. },
  78. onShow() {},
  79. methods: {
  80. jumpUrl(url) {
  81. app.globalData.navigateTo(url);
  82. },
  83. getDetail() {
  84. req.getRequest(
  85. '/api/orderdurg/getOrderDrug',
  86. {
  87. id: this.id
  88. },
  89. data => {
  90. this.detail = data;
  91. if (this.detail.drugImgUrl) {
  92. this.drugImgUrl = this.detail.drugImgUrl.split(',');
  93. }
  94. this.isShowView = true;
  95. },
  96. true
  97. );
  98. },
  99. //预览图片
  100. previewImg(picUrls, index) {
  101. //预览合同图片
  102. var src = picUrls[index];
  103. let imgs = picUrls;
  104. uni.previewImage({
  105. current: src, // 当前显示图片的http链接
  106. urls: imgs
  107. });
  108. }
  109. },
  110. mounted() {}
  111. };
  112. </script>
  113. <style>
  114. @import './detail.css';
  115. </style>