check-item.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. marginLeft: "20rpx",
  110. },
  111. };
  112. },
  113. methods: {
  114. handleCick(btnName) {
  115. const params = {
  116. ...this.info,
  117. btnName,
  118. };
  119. this.$emit("btnClick", params);
  120. },
  121. },
  122. };
  123. </script>
  124. <style lang="scss" scoped>
  125. .check-item {
  126. padding: 24rpx 24rpx 0 24rpx;
  127. // border-radius: 16px;
  128. background: #fff;
  129. border-bottom: 4rpx solid #f0f6fb;
  130. .header-box {
  131. display: flex;
  132. justify-content: space-between;
  133. .header-box-l {
  134. color: #999;
  135. font-size: 28rpx;
  136. font-weight: 400;
  137. .header-box-name {
  138. color: #333;
  139. font-size: 28rpx;
  140. font-weight: 500;
  141. }
  142. }
  143. .tips-box {
  144. width: 120rpx;
  145. height: 44rpx;
  146. font-size: 22rpx;
  147. text-align: center;
  148. line-height: 44rpx;
  149. border-radius: 8rpx;
  150. }
  151. .tips-red {
  152. color: #ff3b1d;
  153. background: rgba(255, 59, 29, 0.2);
  154. }
  155. .tips-green {
  156. color: #00b97b;
  157. background: rgba(0, 185, 123, 0.2);
  158. }
  159. .tips-hui {
  160. color: #bfc8db;
  161. background: rgba(173, 181, 189, 0.26);
  162. }
  163. .tips-yellow {
  164. color: #f59701;
  165. background: rgba(245, 151, 1, 0.2);
  166. }
  167. }
  168. .cont-box {
  169. border-radius: 16rpx;
  170. background: #f6f8fa;
  171. margin-top: 16rpx;
  172. padding: 24rpx;
  173. display: grid;
  174. grid-template-columns: 33.3% 33.3% 33.3%;
  175. .cont-item {
  176. margin-bottom: 20rpx;
  177. .item-label {
  178. color: #999;
  179. font-size: 24rpx;
  180. font-weight: 400;
  181. margin-bottom: 6rpx;
  182. }
  183. .item-val {
  184. color: #000;
  185. font-size: 28rpx;
  186. font-weight: 400;
  187. }
  188. }
  189. }
  190. .btn-box {
  191. display: flex;
  192. align-items: center;
  193. justify-content: flex-end;
  194. padding: 16rpx 0 24rpx;
  195. .detail-btn {
  196. width: 144rpx;
  197. height: 56rpx;
  198. border-radius: 28rpx;
  199. background: #0256ff;
  200. font-size: 32rpx;
  201. border-radius: 8rpx;
  202. }
  203. }
  204. }
  205. </style>