taskDetail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="inventory-task-detail">
  3. <!-- 导航栏 -->
  4. <u-navbar
  5. title="盘点任务详情"
  6. :autoBack="true"
  7. fixed
  8. safe-area-inset-top
  9. placeholder
  10. bgColor="#FFFFFF"
  11. ></u-navbar>
  12. <!-- 任务信息卡片 -->
  13. <view class="info-card">
  14. <view class="task-title">
  15. {{ taskInfo.title }}
  16. <view
  17. class="task-status"
  18. :class="{ 'status-completed': taskInfo.status === '已完成' }"
  19. >
  20. {{ taskInfo.status }}
  21. </view>
  22. </view>
  23. <view class="task-number"> 盘点单号:{{ taskInfo.number }} </view>
  24. <!-- 统计信息 -->
  25. <view class="statistics">
  26. <view class="stat-item">
  27. <view class="stat-label">盘点商品</view>
  28. <view class="stat-value highlight">
  29. {{ taskInfo.inventoryCount }}/{{ taskInfo.totalCount }}
  30. </view>
  31. </view>
  32. <view class="stat-item">
  33. <view class="stat-label">差异率</view>
  34. <view class="stat-value">{{ taskInfo.differenceRate }}</view>
  35. </view>
  36. <view class="stat-item">
  37. <view class="stat-label">准确率</view>
  38. <view class="stat-value">{{ taskInfo.accuracyRate }}</view>
  39. </view>
  40. </view>
  41. <!-- 详情按钮 -->
  42. <view class="action-btn" @click="viewDetail"> 查看盘点详情 </view>
  43. <!-- 详细信息列表 -->
  44. <view class="info-list">
  45. <view class="info-item">
  46. <text class="info-label">盘点类型</text>
  47. <text class="info-value">{{ taskInfo.type }}</text>
  48. </view>
  49. <view class="info-item">
  50. <text class="info-label">盘点仓库</text>
  51. <text class="info-value">{{ taskInfo.warehouse }}</text>
  52. </view>
  53. <view class="info-item">
  54. <text class="info-label">盘点范围</text>
  55. <text class="info-value">{{ taskInfo.scope }}</text>
  56. </view>
  57. <view class="info-item">
  58. <text class="info-label">参与人员</text>
  59. <text class="info-value">{{ taskInfo.participants }}</text>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. taskInfo: {
  70. title: "2023年中心仓第三季度食品盘点",
  71. status: "已完成",
  72. number: "2024202244",
  73. inventoryCount: "604",
  74. totalCount: "604",
  75. differenceRate: "6.29%",
  76. accuracyRate: "97.80%",
  77. type: "盘点类型",
  78. warehouse: "中心仓",
  79. scope: "A区-B区",
  80. participants: "张三、李四",
  81. },
  82. };
  83. },
  84. methods: {
  85. viewDetail() {
  86. // 跳转到盘点详情页面
  87. uni.navigateTo({
  88. url: "/pages/inventory-task/inventory-detail",
  89. });
  90. },
  91. },
  92. };
  93. </script>
  94. <style lang="scss">
  95. .inventory-task-detail {
  96. min-height: 100vh;
  97. background-color: #f5f7fa;
  98. padding-bottom: 30rpx;
  99. .info-card {
  100. padding: 30rpx;
  101. background-color: #ffffff;
  102. border-radius: 20rpx;
  103. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
  104. .task-title {
  105. font-size: 32rpx;
  106. font-weight: 500;
  107. color: #333333;
  108. line-height: 44rpx;
  109. display: flex;
  110. justify-content: space-between;
  111. align-items: center;
  112. .task-status {
  113. font-size: 24rpx;
  114. padding: 4rpx 16rpx;
  115. background-color: #e3f2fd;
  116. color: #2196f3;
  117. border-radius: 20rpx;
  118. font-weight: normal;
  119. &.status-completed {
  120. background-color: #e8f5e9;
  121. color: #4caf50;
  122. }
  123. }
  124. }
  125. .task-number {
  126. font-size: 28rpx;
  127. color: #666666;
  128. margin-top: 16rpx;
  129. margin-bottom: 30rpx;
  130. }
  131. .statistics {
  132. display: flex;
  133. justify-content: space-between;
  134. background-color: #f7f8fa;
  135. border-radius: 10rpx;
  136. padding: 30rpx 0;
  137. margin-bottom: 30rpx;
  138. .stat-item {
  139. flex: 1;
  140. display: flex;
  141. flex-direction: column;
  142. align-items: center;
  143. .stat-label {
  144. font-size: 24rpx;
  145. color: #999999;
  146. margin-bottom: 10rpx;
  147. }
  148. .stat-value {
  149. font-size: 28rpx;
  150. color: #333333;
  151. font-weight: 500;
  152. &.highlight {
  153. color: #4080ff;
  154. }
  155. }
  156. }
  157. }
  158. .action-btn {
  159. height: 88rpx;
  160. background-color: #4080ff;
  161. border-radius: 16rpx;
  162. color: #ffffff;
  163. font-size: 30rpx;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. margin-bottom: 40rpx;
  168. }
  169. .info-list {
  170. padding: 20rpx;
  171. .info-item {
  172. display: flex;
  173. justify-content: space-between;
  174. padding: 20rpx 0;
  175. &:last-child {
  176. border-bottom: none;
  177. }
  178. .info-label {
  179. font-size: 28rpx;
  180. color: #666666;
  181. }
  182. .info-value {
  183. font-size: 28rpx;
  184. color: #333333;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. </style>