dpTaskDetail.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="djTaskDetail">
  3. <!-- 代煎作业质控标题 -->
  4. <view class="djTaskDetail_progress">
  5. <text class="djTaskDetail_progress_title">任务进度:<text class="djTaskDetail_progress_text">{{props.dpWcCount+'/'+props.dpCyCount}}</text></text>
  6. <text class="djTaskDetail_progress_title">不合格数<text class="djTaskDetail_progress_text">{{bhgNumber()}}</text></text>
  7. </view>
  8. <!-- 代煎表格 -->
  9. <view v-if="props.dpTaskList.length!=0">
  10. <uni-table class="djDetail_table">
  11. <!-- 表头行 -->
  12. <uni-tr>
  13. <uni-th align="center" width="155rpx">处方编号</uni-th>
  14. <uni-th align="center" width="150rpx">贴数(贴)</uni-th>
  15. <uni-th align="center" width="155rpx">平均误差(%)</uni-th>
  16. </uni-tr>
  17. <!-- 表格数据行 -->
  18. <uni-tr v-for="(item, index) in props.dpTaskList" :key="index" @click="toDetail(item)">
  19. <uni-td align="center">{{item.yncfbh}}</uni-td>
  20. <uni-td align="center">{{item.ts}}</uni-td>
  21. <uni-td align="center">{{item.wc}}
  22. <uni-icons type="right"></uni-icons>
  23. </uni-td>
  24. </uni-tr>
  25. </uni-table>
  26. </view>
  27. <view v-else>
  28. <dataEmpty></dataEmpty>
  29. </view>
  30. <!-- 开始质控 -->
  31. <view class="finish_button"
  32. v-if="props.taskStatus!='7004' && props.taskStatus!='7007' && props.taskStatus!='7008' && props.taskStatus!='7009' && props.taskStatus!='7010'">
  33. <button class="button" @click="startTask()">开始质控</button>
  34. </view>
  35. </view>
  36. </template>
  37. <script setup>
  38. import http from '@/utils/request';
  39. import { reactive,ref } from "vue";
  40. import {onLoad,onShow,onUnload,onPullDownRefresh} from "@dcloudio/uni-app";
  41. import dataEmpty from "@/pages/ypczk/zkTask/zkTaskDetail/noStartTaskDetail.vue";
  42. const props = defineProps({
  43. // 代配质控详情列表
  44. dpTaskList: Array,
  45. // 代配不合格数
  46. dpbhg:String,
  47. // 任务状态
  48. taskStatus:String,
  49. // 代配抽样数量
  50. dpCyCount: Number,
  51. // 代配完成数量
  52. dpWcCount: Number,
  53. });
  54. // 开始质控
  55. const startTask=()=>{
  56. uni.$emit("startTaskInfo")
  57. }
  58. // 跳转详情界面
  59. const toDetail=(e)=>{
  60. uni.navigateTo({
  61. url:"/pages/ypczk/zkTask/dpTask?status=get"+'&ptwybh='+e.ptwybm+'&fyfslx=3'+'&cfbh='+e.cfbh+'&id='+e.id+'&taskStatus='+props.taskStatus
  62. })
  63. }
  64. // 代配不合格数
  65. const bhgNumber=()=>{
  66. let number=0
  67. props.dpTaskList.forEach(item=>{
  68. if (item.cfbhg == 1 || item.mxbhg > 0){
  69. number ++;
  70. }
  71. })
  72. return number
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. @import './index.scss'
  77. </style>