Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

stockUserDetail.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div class="filter-container">
  8. <span style="font-size: 18px;color: #606266">商品使用明细</span>
  9. </div>
  10. <div class="cell clearfix">
  11. <span style="width: 300px;color: #606266">商品类型: {{userList[0].type.type_name}} </span>
  12. <span style="width: 300px;color: #606266">规格名称: {{userList[0].info.specification_name}}</span>
  13. </div>
  14. <el-row :gutter="12" style="margin-top: 10px">
  15. <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
  16. border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
  17. >
  18. <el-table-column min-width="35" align="center">
  19. <template slot="header" slot-scope="scope">
  20. <span>序号</span>
  21. </template>
  22. <template slot-scope="scope">
  23. <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
  24. <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
  25. </template>
  26. </el-table-column>
  27. <el-table-column min-width="35" align="center">
  28. <template slot="header" slot-scope="scope">
  29. <span>使用人</span>
  30. </template>
  31. <template slot-scope="scope">
  32. <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
  33. <span v-if="scope.row.is_total == 1"></span>
  34. </template>
  35. </el-table-column>
  36. <el-table-column min-width="35" align="center">
  37. <template slot="header" slot-scope="scope">
  38. <span>使用数量</span>
  39. </template>
  40. <template slot-scope="scope">
  41. <span v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
  42. <span v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column min-width="35" align="center">
  46. <template slot="header" slot-scope="scope">
  47. <span>使用时间</span>
  48. </template>
  49. <template slot-scope="scope">
  50. <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
  51. </template>
  52. </el-table-column>
  53. </el-table>
  54. </el-row>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import { uParseTime } from '@/utils/tools'
  60. import { getWarehouseOutUser } from '@/api/stock'
  61. import BreadCrumb from '../components/bread-crumb'
  62. export default {
  63. name: 'stockInOrderDetail',
  64. components: { BreadCrumb },
  65. created() {
  66. const order_id = this.$route.query.id
  67. this.GetOrderDetail(order_id)
  68. },
  69. data() {
  70. return {
  71. crumbs: [
  72. { path: false, name: '库存管理' },
  73. { path: false, name: '耗材出库单' },
  74. { path: false, name: '出库单详情' },
  75. { path: false, name: '使用明细' }
  76. ],
  77. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  78. userList:[]
  79. }
  80. },
  81. methods: {
  82. getSpecificationName: function(id) {
  83. let name = ''
  84. for (let i = 0; i < this.goodInfo.length; i++) {
  85. if (this.goodInfo[i].id == id) {
  86. name = this.goodInfo[i].specification_name
  87. }
  88. }
  89. return name
  90. }, getTypeName: function(id) {
  91. let name = ''
  92. for (let i = 0; i < this.goodType.length; i++) {
  93. if (this.goodType[i].id == id) {
  94. name = this.goodType[i].type_name
  95. }
  96. }
  97. return name
  98. },
  99. GetOrderDetail: function(order_id) {
  100. const params = {
  101. 'id': order_id
  102. }
  103. getWarehouseOutUser(params).then(response => {
  104. if (response.data.state == 0) {
  105. this.$message.error(response.data.msg)
  106. return false
  107. } else {
  108. var total = 0
  109. var list = response.data.data.list
  110. console.log("list",list)
  111. var arrList = this.unique(list)
  112. for (let i = 0; i < arrList.length; i++) {
  113. var obj = arrList[i]
  114. obj['is_total'] = 0
  115. this.userList.push(obj)
  116. total = total + arrList[i].count
  117. }
  118. this.userList.push({
  119. is_total: 1,
  120. total: total,
  121. })
  122. }
  123. })
  124. },
  125. unique(arr) {
  126. const res = new Map();
  127. return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
  128. }
  129. }
  130. }
  131. </script>
  132. <style rel="stylesheet/css" lang="scss" scoped>
  133. .information {
  134. border: 1px #dcdfe6 solid;
  135. padding: 30px 20px 30px 20px;
  136. .border {
  137. border-bottom: 1px #dcdfe6 solid;
  138. margin: 0px 0 20px 0;
  139. }
  140. }
  141. .edit_separater {
  142. border-top: 1px solid rgb(233, 233, 233);
  143. margin-top: 15px;
  144. margin-bottom: 15px;
  145. }
  146. </style>
  147. <style>
  148. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  149. font-size: 12px;
  150. }
  151. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  152. background: #6fb5fa;
  153. }
  154. .count {
  155. color: #bd2c00;
  156. }
  157. </style>