infoPage.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div class="chemicalInventory-info-page">
  3. <div class="title-box">
  4. <p>盘点详情</p>
  5. <p class="reset-button-one" @click="outButton">返回</p>
  6. </div>
  7. <div class="info-text-box">
  8. <div class="info-text-min-box">
  9. <div>
  10. <p>标题:</p>
  11. <p>{{infoData.takeTitle}}</p>
  12. </div>
  13. <div>
  14. <p>盘点人:</p>
  15. <p>{{infoData.createBy}}</p>
  16. </div>
  17. <div>
  18. <p>盘点时间:</p>
  19. <p>{{infoData.createTimeStr}}</p>
  20. </div>
  21. </div>
  22. <div class="info-text-min-box">
  23. <div>
  24. <p>所属部门:</p>
  25. <p>{{infoData.takeDpetName}}</p>
  26. </div>
  27. <div>
  28. <p>楼栋:</p>
  29. <p>{{infoData.takeBuildName}}</p>
  30. </div>
  31. <div>
  32. <p>实验室:</p>
  33. <p>{{infoData.subName}}</p>
  34. </div>
  35. </div>
  36. <div class="info-text-min-box">
  37. <div>
  38. <p>盘点类型:</p>
  39. <p>{{infoData.takeType==1?'按照实验室盘点':'按照化学品柜盘点'}}</p>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="table-data-list-box">
  44. <el-table border :data="tableData" ref="multipleTable">
  45. <el-table-column label="序号" width="50" align="center" type="index"/>
  46. <el-table-column label="化学品" prop="chemicalName" show-overflow-tooltip/>
  47. <el-table-column label="CAS号" prop="casNum" width="130" show-overflow-tooltip/>
  48. <el-table-column label="学院" prop="chemicalDpetName" width="200" show-overflow-tooltip>
  49. <template slot-scope="scope">
  50. <span :class="scope.row.dpetFlag == 0?'abnormalColor':''">{{scope.row.chemicalDpetName}}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="楼栋" prop="chemicalBuildName" width="150" show-overflow-tooltip>
  54. <template slot-scope="scope">
  55. <span :class="scope.row.buildFlag == 0?'abnormalColor':''">{{scope.row.chemicalBuildName}}</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="实验室" prop="chemicalSubName" width="200" show-overflow-tooltip>
  59. <template slot-scope="scope">
  60. <span :class="scope.row.subFlag == 0?'abnormalColor':''">{{scope.row.chemicalSubName}}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="盘点结果" prop="takeResult" width="230"
  64. show-overflow-tooltip v-if="infoData.takeType == 1"/>
  65. <el-table-column label="化学品柜" prop="chemicalCabinetName" width="140"
  66. show-overflow-tooltip v-if="infoData.takeType == 2">
  67. <template slot-scope="scope">
  68. <span :class="scope.row.cabinetFlag == 0?'abnormalColor':''">{{scope.row.chemicalCabinetName}}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="盘点结果" prop="takeResult" width="160" s
  72. how-overflow-tooltip v-if="infoData.takeType == 2"/>
  73. <el-table-column label="备注" prop="remark" width="120" show-overflow-tooltip/>
  74. <el-table-column label="结果" prop="chemicalType" width="80" show-overflow-tooltip>
  75. <template slot-scope="scope">
  76. <span :class="scope.row.chemicalType == 0?'abnormalColor':''">{{scope.row.chemicalType == 1?'正常':'异常'}}</span>
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. <pagination :page-sizes="[20, 30, 40, 50]" v-show="total>0" :total="total"
  81. layout="total, prev, pager, next, sizes, jumper"
  82. :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  83. @pagination="getList"/>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. import { hxpTakeStockInfo,hxpTakeStockDetailList } from '@/api/chemicalInventory/index'
  89. export default {
  90. name: 'infoPage',
  91. props:{
  92. infoDataProps:{},
  93. },
  94. data(){
  95. return{
  96. infoData:{},
  97. tableData:[],
  98. total:10,
  99. pageNum:1,
  100. pageSize:20,
  101. queryParams:{
  102. pageNum:1,
  103. pageSize:20,
  104. takeStockId:'',
  105. },
  106. }
  107. },
  108. created(){
  109. },
  110. mounted(){
  111. this.initialization();
  112. },
  113. methods:{
  114. // 初始化
  115. initialization(){
  116. hxpTakeStockInfo(this.infoDataProps.id).then( response => {
  117. this.$set(this,'infoData',response.data);
  118. });
  119. this.getList();
  120. },
  121. outButton(){
  122. this.$parent.controlsButton(1)
  123. },
  124. getList(){
  125. this.queryParams.takeStockId=this.infoDataProps.id
  126. hxpTakeStockDetailList(this.queryParams).then( response => {
  127. this.$set(this,'tableData',response.rows);
  128. this.total = response.total;
  129. });
  130. },
  131. }
  132. }
  133. </script>
  134. <style scoped lang="scss">
  135. .chemicalInventory-info-page{
  136. flex:1;
  137. display: flex!important;
  138. flex-direction: column;
  139. overflow: hidden;
  140. .title-box{
  141. display: flex;
  142. p:nth-child(1){
  143. flex:1;
  144. line-height:80px;
  145. padding-left:20px;
  146. color:#0045AF;
  147. font-size:16px;
  148. }
  149. p:nth-child(2){
  150. margin:20px;
  151. width:90px;
  152. }
  153. border-bottom:1px solid #E0E0E0;
  154. }
  155. .info-text-box{
  156. padding:36px 80px 0;
  157. .info-text-min-box{
  158. display: flex;
  159. div{
  160. flex:1;
  161. font-size:16px;
  162. display: flex;
  163. margin-bottom:36px;
  164. p{
  165. line-height:20px;
  166. }
  167. p:nth-child(1){
  168. width:80px;
  169. text-align: right;
  170. margin-right:10px;
  171. }
  172. p:nth-child(2){
  173. flex:1;
  174. }
  175. }
  176. }
  177. }
  178. .table-data-list-box{
  179. flex:1;
  180. display: flex!important;
  181. flex-direction: column;
  182. overflow: hidden;
  183. margin:0 80px;
  184. .abnormalColor{
  185. color:#FF7300
  186. }
  187. }
  188. }
  189. </style>