safePruductInspect.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="content">
  3. <view class="search-bar">
  4. <u--form :model="searchForm" ref="searchForm">
  5. <u-form-item label="仓房名称:" prop="storehouseName" label-width="80px">
  6. <u--input v-model="searchForm.storehouseName"></u--input>
  7. <u-button type="primary" text="查询" class="btn" @tap="search"></u-button>
  8. <u-button text="重置" class="btn" @tap="reset"></u-button>
  9. </u-form-item>
  10. </u--form>
  11. </view>
  12. <uni-table border stripe emptyText="暂无更多数据" :loading="this.loading">
  13. <!-- 表头行 -->
  14. <uni-tr>
  15. <uni-th align="center">序号</uni-th>
  16. <uni-th align="center">库点名称</uni-th>
  17. <uni-th align="center">仓房名称</uni-th>
  18. <uni-th align="center">货位名称</uni-th>
  19. <uni-th align="center">检查人</uni-th>
  20. <uni-th align="center">检查日期</uni-th>
  21. <uni-th align="center" width="200">操作</uni-th>
  22. </uni-tr>
  23. <!-- 表格数据行 -->
  24. <uni-tr v-for="(item, index) in tableData" :key="item.id">
  25. <uni-td align="center">{{ index + 1 }}</uni-td>
  26. <uni-td align="center">{{ item.orgName }}</uni-td>
  27. <uni-td align="center">{{ item.storehouseName }}</uni-td>
  28. <uni-td align="center">{{ item.warehouseName }}</uni-td>
  29. <uni-td align="center">{{ item.checkPeople }}</uni-td>
  30. <uni-td align="center">{{ item.checkDate }}</uni-td>
  31. <uni-td align="center">
  32. <view class="opts">
  33. <u-button text="查看" @tap="view(item)" class="btn"></u-button>
  34. <u-button v-if="couldEdit(item)" text="修改" @tap="edit(item)" class="btn"></u-button>
  35. </view>
  36. </uni-td>
  37. </uni-tr>
  38. </uni-table>
  39. <uni-pagination show-icon="true" :total="pageInfo.total" :current="pageInfo.current" class="pagination"
  40. @change="paginationChang"></uni-pagination>
  41. </view>
  42. </template>
  43. <script>
  44. import simpleList from '@/components/simple-list/index'
  45. import {
  46. getList,
  47. } from '@/api/safePruductInspect.js'
  48. import {
  49. server_host
  50. } from '@/config/system'
  51. import {
  52. errorMsg, isNull
  53. } from '@/utils/tools'
  54. export default {
  55. mixins: [simpleList],
  56. data() {
  57. return {
  58. editPath: '/pages/safePruductInspect/safePruductInspectEdit',
  59. searchForm: {
  60. storehouseName: null,
  61. },
  62. }
  63. },
  64. methods: {
  65. getListFun() {
  66. return getList
  67. },
  68. couldEdit(data) {
  69. return isNull(data.storehouseName) && isNull(data.warehouseName) && isNull(data.inspector) && isNull(data.inspectionDate)
  70. },
  71. }
  72. }
  73. </script>
  74. <style scoped lang="scss">
  75. .content {
  76. padding: 10px;
  77. .btn {
  78. width: 100px;
  79. margin-left: 5px;
  80. }
  81. .tip {
  82. color: red;
  83. }
  84. .exports {
  85. margin-bottom: 10px;
  86. }
  87. }
  88. .msg {
  89. padding-left: 10px;
  90. }
  91. .opts {
  92. width: 100%;
  93. display: flex;
  94. justify-content: center;
  95. align-items: center;
  96. }
  97. .search-bar {}
  98. </style>