workCard.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view class="card_box" @click="handleDetail">
  3. <!-- 头部编号 + 单号 -->
  4. <view class="header rx-sc">
  5. <view class="round">{{ index + 1 }}</view>
  6. <view class="orderId">{{ item.code }}</view>
  7. </view>
  8. <!-- 主要信息区 -->
  9. <view class="info_box">
  10. <view class="row"
  11. ><text class="label">委外名称:</text
  12. ><text class="value">{{ item.name }}</text></view
  13. >
  14. <view class="row"
  15. ><text class="label">委外单编码:</text
  16. ><text class="value">{{ item.code }}</text></view
  17. >
  18. <view class="row"
  19. ><text class="label">工单编码:</text
  20. ><text class="value">{{ item.workOrderCode }}</text></view
  21. >
  22. <view class="row"
  23. ><text class="label">型号 :</text
  24. ><text class="value">{{ item.modelType }} </text></view
  25. >
  26. <view class="row"
  27. ><text class="label"> 规格:</text
  28. ><text class="value"> {{ item.specification }}</text></view
  29. >
  30. <view class="row"
  31. ><text class="label">委外工序:</text
  32. ><text class="value highlight">{{ item.taskNames }}</text></view
  33. >
  34. <view class="row"
  35. ><text class="label">数量:</text
  36. ><text class="value"
  37. >{{ item.totalCount }}{{ item.measuringUnit }}</text
  38. ></view
  39. >
  40. <view class="row"
  41. ><text class="label">重量:</text
  42. ><text class="value">{{
  43. item.totalWeight ? item.totalWeight + item.weightUnit : "无"
  44. }}</text></view
  45. >
  46. <view class="row"
  47. ><text class="label">类型:</text
  48. ><text class="value">{{
  49. item.type == 4 ? "带料委外" : "不带料委外"
  50. }}</text></view
  51. >
  52. <view class="row"
  53. ><text class="label">批次号:</text
  54. ><text class="value">{{ item.batchNo }}</text></view
  55. >
  56. <view class="row"
  57. ><text class="label">委外单位:</text
  58. ><text class="value">{{ item.supplierName }}</text></view
  59. >
  60. <view class="row"
  61. ><text class="label">状态:</text
  62. ><text class="value highlight">
  63. {{
  64. item.status == 0 ? "未提交" : item.status == 1 ? "已提交" : "已发布"
  65. }}
  66. </text></view
  67. >
  68. <view class="row"
  69. ><text class="label">委外状态:</text>
  70. <text class="value">{{
  71. item.purchaseStatus == 0 || !item.purchaseStatus
  72. ? "未入库"
  73. : item.purchaseStatus == 1
  74. ? "原料入库"
  75. : item.purchaseStatus == 3
  76. ? "委外完成"
  77. : ""
  78. }}</text>
  79. </view>
  80. <view class="row"
  81. ><text class="label">审核状态:</text>
  82. <text class="value">{{
  83. ["未提交", "审核中", "审核通过", "审核不通过"][item.approvalStatus]
  84. }}</text>
  85. </view>
  86. <view class="row"
  87. ><text class="label">申请人:</text
  88. ><text class="value">{{ item.createUserName }}</text></view
  89. >
  90. <view class="row"
  91. ><text class="label">创建时间:</text
  92. ><text class="value">{{ item.createTime }}</text></view
  93. >
  94. <view class="row"
  95. ><text class="label">预计到货:</text
  96. ><text class="value">{{ item.requireDeliveryTime }}</text></view
  97. >
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. export default {
  103. props: {
  104. item: {
  105. type: Object,
  106. default: () => ({}),
  107. },
  108. index: {
  109. type: Number,
  110. default: 0,
  111. },
  112. },
  113. data() {
  114. return {
  115. statusList: {
  116. 4: "待生产",
  117. 5: "生产中",
  118. 6: "已完成",
  119. 7: "已延期",
  120. 8: "待下达",
  121. },
  122. };
  123. },
  124. methods: {
  125. handleDetail() {
  126. this.$emit("handleDetail", this.item);
  127. },
  128. },
  129. };
  130. </script>
  131. <!-- <style lang="scss" scoped>
  132. .card_box {
  133. width: 750rpx;
  134. padding: 16rpx 32rpx;
  135. box-sizing: border-box;
  136. border-bottom: 2rpx solid #e1e1e1;
  137. .item_box {
  138. margin-top: 10rpx;
  139. .round {
  140. width: 40rpx;
  141. height: 40rpx;
  142. line-height: 40rpx;
  143. border-radius: 50%;
  144. background: $theme-color;
  145. color: #fff;
  146. text-align: center;
  147. font-size: 20rpx;
  148. }
  149. .orderId {
  150. color: #000;
  151. font-family: PingFang HK;
  152. font-size: 28rpx;
  153. font-style: normal;
  154. font-weight: 600;
  155. margin-left: 16rpx;
  156. }
  157. .item_one {
  158. width: 100%;
  159. font-size: 26rpx;
  160. font-style: normal;
  161. font-weight: 400;
  162. line-height: 38rpx;
  163. word-wrap: break-word;
  164. }
  165. .item-right {
  166. flex: 1;
  167. }
  168. .gylx {
  169. color: $theme-color;
  170. }
  171. .perce50 {
  172. width: 50%;
  173. }
  174. }
  175. }
  176. </style> -->
  177. <style lang="scss" scoped>
  178. .card_box {
  179. width: 710rpx;
  180. margin: 20rpx auto;
  181. padding: 22rpx 24rpx;
  182. background: #fff;
  183. border-radius: 16rpx;
  184. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.06);
  185. transition: all 0.2s ease-in-out;
  186. &:active {
  187. transform: scale(0.98);
  188. }
  189. .header {
  190. margin-bottom: 18rpx;
  191. .round {
  192. width: 40rpx;
  193. height: 40rpx;
  194. line-height: 40rpx;
  195. border-radius: 50%;
  196. background: $theme-color;
  197. color: #fff;
  198. text-align: center;
  199. font-size: 22rpx;
  200. }
  201. .orderId {
  202. margin-left: 14rpx;
  203. font-size: 28rpx;
  204. font-weight: 600;
  205. color: #333;
  206. }
  207. }
  208. .info_box {
  209. .row {
  210. display: flex;
  211. font-size: 24rpx;
  212. padding: 8rpx 0;
  213. line-height: 32rpx;
  214. .label {
  215. width: 180rpx;
  216. color: #666;
  217. }
  218. .value {
  219. flex: 1;
  220. text-align: right;
  221. color: #333;
  222. word-break: break-all;
  223. }
  224. .highlight {
  225. color: $theme-color;
  226. font-weight: 500;
  227. }
  228. }
  229. }
  230. }
  231. </style>