check-item.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <view class="check-item">
  3. <view class="header-box">
  4. <view class="header-box-l">
  5. <view class="header-box-name">{{ info.taskName }}</view>
  6. <view>盘点单号:{{ info.number }}</view>
  7. </view>
  8. <view>
  9. <view :class="['tips-box', curTaskStatusInfo.className]">{{
  10. curTaskStatusInfo.name
  11. }}</view>
  12. <!-- <view class="tips-box tips-green">已盘点</view>
  13. <view class="tips-box tips-hui">已取消</view>
  14. <view class="tips-box tips-yellow">盘点中</view> -->
  15. </view>
  16. </view>
  17. <view class="cont-box">
  18. <view class="cont-item">
  19. <view class="item-label">盘点仓库</view>
  20. <view class="item-val">{{ info.depotName }}</view>
  21. </view>
  22. <view class="cont-item">
  23. <view class="item-label">创建人</view>
  24. <view class="item-val">{{ info.createByName }}</view>
  25. </view>
  26. <view class="cont-item">
  27. <view class="item-label">盘点负责人</view>
  28. <view class="item-val">{{ info.creatorName }}</view>
  29. </view>
  30. <view class="cont-item">
  31. <view class="item-label">货物种类</view>
  32. <view class="item-val">{{ info.categoryCount }}</view>
  33. </view>
  34. <view class="cont-item">
  35. <view class="item-label">货物总量</view>
  36. <view class="item-val">{{ info.materialCount }}</view>
  37. </view>
  38. <view class="cont-item">
  39. <view class="item-label">库位范围</view>
  40. <view class="item-val">{{ info.positionRange }}</view>
  41. </view>
  42. <view class="cont-item">
  43. <view class="item-label">创建时间</view>
  44. <view class="item-val">{{ info.createTime }}</view>
  45. </view>
  46. <view class="cont-item">
  47. <view class="item-label">盘点时间</view>
  48. <view class="item-val">{{ info.operTime }}</view>
  49. </view>
  50. <view class="cont-item">
  51. <view class="item-label">盘点人</view>
  52. <view class="item-val">{{ info.operName }}</view>
  53. </view>
  54. </view>
  55. <view class="btn-box">
  56. <u-button
  57. class="detail-btn"
  58. type="primary"
  59. text="详情"
  60. :customStyle="customBtnStyle"
  61. @click="handleCick('详情')"
  62. v-if="status === 3 || status === 4"
  63. ></u-button>
  64. <u-button
  65. class="detail-btn"
  66. type="primary"
  67. text="去盘点"
  68. :customStyle="customBtnStyle"
  69. @click="handleCick('去盘点')"
  70. v-if="status === 1 || status === 2"
  71. ></u-button>
  72. <u-button
  73. class="detail-btn"
  74. type="primary"
  75. text="去提交"
  76. :customStyle="customBtnStyle"
  77. @click="handleCick('去提交')"
  78. v-if="status === 2"
  79. ></u-button>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. import { getTaskStatusInfoByVal } from "../../inventory-task/utils/index.js";
  85. export default {
  86. props: {
  87. info: {
  88. type: Object,
  89. default: () => {},
  90. },
  91. },
  92. computed: {
  93. status() {
  94. return this.info.taskStatus;
  95. },
  96. curTaskStatusInfo() {
  97. return getTaskStatusInfoByVal(this.info.taskStatus);
  98. },
  99. },
  100. data() {
  101. return {
  102. customBtnStyle: {
  103. width: "144rpx",
  104. height: "56rpx",
  105. borderRadius: "28rpx",
  106. background: "#0256ff",
  107. fontSize: "32rpx",
  108. borderRadius: "8rpx",
  109. },
  110. };
  111. },
  112. methods: {
  113. handleCick(btnName) {
  114. const params = {
  115. ...this.info,
  116. btnName,
  117. };
  118. this.$emit("btnClick", params);
  119. },
  120. },
  121. };
  122. </script>
  123. <style lang="scss" scoped>
  124. .check-item {
  125. padding: 24rpx 24rpx 0 24rpx;
  126. // border-radius: 16px;
  127. background: #fff;
  128. border-bottom: 4rpx solid #f0f6fb;
  129. .header-box {
  130. display: flex;
  131. justify-content: space-between;
  132. .header-box-l {
  133. color: #999;
  134. font-size: 28rpx;
  135. font-weight: 400;
  136. .header-box-name {
  137. color: #333;
  138. font-size: 28rpx;
  139. font-weight: 500;
  140. }
  141. }
  142. .tips-box {
  143. width: 120rpx;
  144. height: 44rpx;
  145. font-size: 22rpx;
  146. text-align: center;
  147. line-height: 44rpx;
  148. border-radius: 8rpx;
  149. }
  150. .tips-red {
  151. color: #ff3b1d;
  152. background: rgba(255, 59, 29, 0.2);
  153. }
  154. .tips-green {
  155. color: #00b97b;
  156. background: rgba(0, 185, 123, 0.2);
  157. }
  158. .tips-hui {
  159. color: #bfc8db;
  160. background: rgba(173, 181, 189, 0.26);
  161. }
  162. .tips-yellow {
  163. color: #f59701;
  164. background: rgba(245, 151, 1, 0.2);
  165. }
  166. }
  167. .cont-box {
  168. border-radius: 16rpx;
  169. background: #f6f8fa;
  170. margin-top: 16rpx;
  171. padding: 24rpx;
  172. display: grid;
  173. grid-template-columns: 33.3% 33.3% 33.3%;
  174. .cont-item {
  175. margin-bottom: 20rpx;
  176. .item-label {
  177. color: #999;
  178. font-size: 24rpx;
  179. font-weight: 400;
  180. margin-bottom: 6rpx;
  181. }
  182. .item-val {
  183. color: #000;
  184. font-size: 28rpx;
  185. font-weight: 400;
  186. }
  187. }
  188. }
  189. .btn-box {
  190. display: flex;
  191. align-items: center;
  192. justify-content: flex-end;
  193. padding: 16rpx 0 24rpx;
  194. .detail-btn {
  195. width: 144rpx;
  196. height: 56rpx;
  197. border-radius: 28rpx;
  198. background: #0256ff;
  199. font-size: 32rpx;
  200. border-radius: 8rpx;
  201. }
  202. }
  203. }
  204. </style>