pickWorkCard.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view>
  3. <checkbox-group
  4. v-for="(item, index) in list"
  5. :key="index"
  6. @change="(e) => selectVal(e, item, index)"
  7. >
  8. <label>
  9. <view class="card_box" @click="openDetails(item.status, item)">
  10. <view class="item_box rx-bc">
  11. <view class="rx-sc">
  12. <view class="round">{{ index + 1 }}</view>
  13. <view class="orderId">{{ item.code }} </view>
  14. </view>
  15. <view class="status" :class="[item.status != 0 ? 'FAA' : '']">
  16. {{
  17. item.status == 0
  18. ? "未领料"
  19. : item.status == 1
  20. ? "领料中"
  21. : item.status == 2
  22. ? "已出库"
  23. : ""
  24. }}</view
  25. >
  26. </view>
  27. <view class="item_box rx-bc">
  28. <view class="item_one rx-sc">
  29. <view class="lable">关联工单号:</view>
  30. <view>{{ item.joinWorkOrderCode }}</view>
  31. </view>
  32. </view>
  33. <view class="item_box rx-bc">
  34. <view class="item_one perce50 rx-sc">
  35. <view class="lable">领料人:</view>
  36. <view class="gylx">{{ item.executorName }}</view>
  37. </view>
  38. <view class="item_one perce50 rx-sc">
  39. <view>关联审核人:</view>
  40. <view class="gylx">{{ item.joinReviewerName }}</view>
  41. </view>
  42. </view>
  43. <view class="item_box rx-bc">
  44. <view class="item_one rx-sc">
  45. <view class="lable">领料仓库:</view>
  46. <view>{{ item.joinWarehouseName }}</view>
  47. </view>
  48. </view>
  49. <view class="item_box rx-bc">
  50. <view class="item_one rx-sc">
  51. <view class="lable">类型:</view>
  52. <view class="gylx" v-if="item.type == 1">自建领料</view>
  53. <view class="gylx" v-if="item.type == 2">工单领料</view>
  54. <view class="gylx" v-if="item.type == 3">委外领料</view>
  55. </view>
  56. </view>
  57. <view class="item_box rx-sc">
  58. <view class="item_one rx-sc">
  59. <view class="lable">领料时间:</view>
  60. <view>{{ item.createTime }}</view>
  61. </view>
  62. </view>
  63. </view>
  64. </label>
  65. </checkbox-group>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. props: {
  71. list: {
  72. type: Array,
  73. default: () => [],
  74. },
  75. },
  76. data() {
  77. return {
  78. statusList: {
  79. 4: "待生产",
  80. 5: "生产中",
  81. 6: "已完成",
  82. 7: "已延期",
  83. 8: "待下达",
  84. },
  85. };
  86. },
  87. created() {
  88. console.log(this.list, "领料单数据");
  89. },
  90. methods: {
  91. selectVal(e, val, index) {
  92. this.list[index].checked = !this.list[index].checked;
  93. },
  94. openDetails(pickStatus, item) {
  95. if (pickStatus == 1 || pickStatus == 2) {
  96. let url = "/pages/pda/picking/bill/index";
  97. url += `?item=${JSON.stringify(item)}&status=${pickStatus}`;
  98. uni.navigateTo({
  99. url,
  100. });
  101. // let url = `/pages/pda/picking/bill/index?id=${id}&status=${pickStatus}`;
  102. // uni.navigateTo({
  103. // url,
  104. // });
  105. }
  106. },
  107. },
  108. };
  109. </script>
  110. <style lang="scss" scoped>
  111. .card_box {
  112. width: 100%;
  113. margin: 20rpx 24rpx;
  114. padding: 24rpx;
  115. box-sizing: border-box;
  116. background: #ffffff;
  117. border-radius: 16rpx;
  118. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
  119. transition: all 0.3s ease;
  120. &:active {
  121. transform: scale(0.98);
  122. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
  123. }
  124. .item_box {
  125. margin-top: 20rpx;
  126. &:first-child {
  127. margin-top: 0;
  128. }
  129. .round {
  130. width: 44rpx;
  131. height: 44rpx;
  132. line-height: 44rpx;
  133. border-radius: 50%;
  134. background: linear-gradient(135deg, $theme-color 0%, lighten($theme-color, 10%) 100%);
  135. color: #fff;
  136. text-align: center;
  137. font-size: 22rpx;
  138. font-weight: 600;
  139. flex-shrink: 0;
  140. box-shadow: 0 2rpx 8rpx rgba($theme-color, 0.3);
  141. }
  142. .orderId {
  143. color: #333333;
  144. font-size: 30rpx;
  145. font-weight: 600;
  146. margin-left: 16rpx;
  147. flex: 1;
  148. line-height: 44rpx;
  149. }
  150. .item_one {
  151. width: 100%;
  152. font-size: 26rpx;
  153. font-weight: 400;
  154. line-height: 40rpx;
  155. color: #666666;
  156. word-wrap: break-word;
  157. display: flex;
  158. align-items: center;
  159. .lable {
  160. color: #999999;
  161. flex-shrink: 0;
  162. }
  163. }
  164. .gylx {
  165. color: $theme-color;
  166. font-weight: 500;
  167. }
  168. .perce50 {
  169. width: 50%;
  170. padding-right: 12rpx;
  171. box-sizing: border-box;
  172. }
  173. .status {
  174. padding: 8rpx 20rpx;
  175. font-size: 24rpx;
  176. font-weight: 500;
  177. border-radius: 24rpx;
  178. background: #f0f0f0;
  179. color: #666666;
  180. flex-shrink: 0;
  181. &.FAA {
  182. background: linear-gradient(135deg, #fff3e6 0%, #ffe8cc 100%);
  183. color: #ff8800;
  184. border: 1rpx solid #ffd699;
  185. }
  186. }
  187. /deep/ .uni-checkbox-input-checked {
  188. background-color: $theme-color !important;
  189. border-color: $theme-color !important;
  190. }
  191. }
  192. }
  193. // 响应式适配
  194. @media screen and (max-width: 375px) {
  195. .card_box {
  196. margin: 16rpx 20rpx;
  197. padding: 20rpx;
  198. .item_box {
  199. .orderId {
  200. font-size: 28rpx;
  201. }
  202. .item_one {
  203. font-size: 24rpx;
  204. line-height: 36rpx;
  205. }
  206. }
  207. }
  208. }
  209. </style>