store-check-detail.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="container py2">
  3. <view class="mx3 p3 bg-color-white" style="border-radius: 16rpx">
  4. <!-- <view class="f-size-32 f-weight-6 py2 mb-2 title">任务信息</view> -->
  5. <equipment-line title="计划名称" :content="infoData.planName" />
  6. <equipment-line title="盘点仓库" :content="infoData.storeName" />
  7. <equipment-line title="盘点备件" :content="infoData.spareName" />
  8. <equipment-line title="任务开始时间" :content="infoData.startTime" />
  9. <equipment-line title="任务结束时间" :content="infoData.endTime" />
  10. <equipment-line title="任务状态" :content="statusMap[infoData.status]" />
  11. <equipment-line title="待盘数量" :content="infoData.checkNum + ''" />
  12. <equipment-line title="实际数量" :content="infoData.realNum + ''" />
  13. <equipment-line title="备注" :content="infoData.remark" />
  14. </view>
  15. <view class="p-fixed d-flex j-around a-center footer">
  16. <view class="main-color-bg text-color-white common" @tap="handleUpdate"
  17. >执行</view
  18. >
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. infoData: {},
  27. detailId: "",
  28. statusMap: null,
  29. imagesList: []
  30. };
  31. },
  32. onLoad(options) {
  33. this.detailId = options.detailId;
  34. this.statusMap = this.$DictCache.getLabelByValueMapByType(
  35. this.$DictCache.TYPE.STORE_CHECK_JOB_STATUS
  36. );
  37. },
  38. onShow() {
  39. this.initData();
  40. },
  41. methods: {
  42. handleUpdate() {
  43. this.$Http.executeStoreCheckJob(this.infoData).then((res) => {
  44. uni.navigateTo({
  45. url: "/pages/store-check/store-check-add?detailId=" + this.detailId,
  46. });
  47. });
  48. },
  49. handlePre(index) {
  50. uni.previewImage({
  51. urls: this.imagesList,
  52. current:this.imagesList[index],
  53. success() {
  54. }
  55. });
  56. },
  57. initData() {
  58. this.$Http
  59. .fetchStoreCheckJob({
  60. id: this.detailId,
  61. })
  62. .then((res) => {
  63. this.infoData = res.data;
  64. if(res.data.fileList != null && res.data.fileList.length >0){
  65. this.imagesList = res.data.fileList.map(item => {
  66. return this.$BaseTool.UserUtil.getFileUrl(item.url);
  67. })
  68. }
  69. });
  70. },
  71. },
  72. };
  73. </script>
  74. <style lang="less">
  75. page {
  76. background-color: #f4f4f4;
  77. }
  78. .container {
  79. padding-bottom: 100rpx;
  80. .footer {
  81. bottom: 0;
  82. left: 0;
  83. right: 0;
  84. background-color: #fff;
  85. z-index: 10000;
  86. }
  87. .title {
  88. border-bottom: 1rpx solid #f4f4f4;
  89. }
  90. .img {
  91. width: 100rpx;
  92. height: 100rpx;
  93. }
  94. .p-fixed {
  95. border-top: 1rpx solid #f4f4f4;
  96. height: 100rpx;
  97. .common {
  98. padding: 15rpx 200rpx;
  99. border-radius: 30rpx;
  100. background-color: #0082ff;
  101. color: #fff;
  102. }
  103. }
  104. }
  105. </style>