check.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="check-page">
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. title="盘点记录"
  8. @clickLeft="back"
  9. >
  10. </uni-nav-bar>
  11. <uni-section title="盘点记录" type="line">
  12. <uni-table border stripe emptyText="暂无更多数据">
  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-tr>
  19. <!-- 表格数据行 -->
  20. <uni-tr v-for="(item, index) in tableData" :key="index">
  21. <uni-td>{{ item.workOrderCode }}</uni-td>
  22. <uni-td>{{ item.workOrderExecutorName }}</uni-td>
  23. <uni-td>{{ item.finishTime }}</uni-td>
  24. </uni-tr>
  25. </uni-table>
  26. </uni-section>
  27. </view>
  28. </template>
  29. <script>
  30. import { get, postJ } from '@/utils/api.js'
  31. export default {
  32. data () {
  33. return {
  34. tableData: [],
  35. info: {}
  36. }
  37. },
  38. onLoad (option) {
  39. this.info = JSON.parse(decodeURIComponent(option.info))
  40. console.log(this.info)
  41. this.getData()
  42. },
  43. methods: {
  44. async getData () {
  45. const res = await postJ(
  46. this.apiUrl +
  47. `/repertoryCheck/equiCheckRecordList?assetCode=${this.info.assetCode}`
  48. )
  49. if (res?.success) {
  50. this.tableData = res.data
  51. }
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .check-page {
  58. /deep/.uni-table {
  59. min-width: 100vw !important;
  60. .uni-table-td,
  61. .uni-table-th {
  62. padding: 20rpx 10rpx !important;
  63. text-align: center !important;
  64. }
  65. }
  66. }
  67. </style>