details.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <view class="mould-page">
  3. <navigation title="工单管理"></navigation>
  4. <view class="list-box">
  5. <view class="list-item">
  6. <view class="item-text flex-box">
  7. <view class="item-text-left">订单名称:</view>
  8. <view>{{form.taskName}}</view>
  9. </view>
  10. <view class="item-text flex-box">
  11. <view class="item-text-left">订单编号:</view>
  12. <view>{{form.taskNum}}</view>
  13. </view>
  14. <view class="item-text flex-box">
  15. <view class="item-text-left">工单编号:</view>
  16. <view>{{form.orderNum}}</view>
  17. </view>
  18. <view class="item-text flex-box">
  19. <view class="item-text-left">工单计划数量:</view>
  20. <view>{{form.orderAmounts || 0}}</view>
  21. </view>
  22. <view class="item-text flex-box">
  23. <view class="item-text-left">工单完成数量:</view>
  24. <view>{{form.orderFinishNum || 0}}</view>
  25. </view>
  26. <view class="item-text flex-box">
  27. <view class="item-text-left">工单状态:</view>
  28. <view v-if="form.orderStatus == 0">执行</view>
  29. <view v-if="form.orderStatus == 1">待质检</view>
  30. <view v-if="form.orderStatus == 2">完成</view>
  31. </view>
  32. <view class="item-text flex-box">
  33. <view class="item-text-left">客户名称:</view>
  34. <view>{{form.customerName || '-'}}</view>
  35. </view>
  36. <!-- <view class="item-text flex-box">
  37. <view class="item-text-left">工单类型:</view>
  38. <view>工单转任务</view>
  39. </view> -->
  40. <view class="item-text flex-box">
  41. <view class="item-text-left">车间名称:</view>
  42. <view>{{form.workShop}}</view>
  43. </view>
  44. <view class="item-text flex-box">
  45. <view class="item-text-left">工艺名称:</view>
  46. <view v-for="item of processGroupData" :key="item.id" v-if="form.processGroupId == item.id">
  47. {{item.groupName}}
  48. </view>
  49. </view>
  50. <view class="item-text flex-box">
  51. <view class="item-text-left">工单交付周期:</view>
  52. <view>{{form.deliveryCycle}}天</view>
  53. </view>
  54. <view class="item-text flex-box">
  55. <view class="item-text-left">工单创建人:</view>
  56. <view>{{form.createUserName }}</view>
  57. </view>
  58. <view class="item-text flex-box">
  59. <view class="item-text-left">工单开始时间:</view>
  60. <view>{{form.createTime}}</view>
  61. </view>
  62. <view class="item-text flex-box">
  63. <view class="item-text-left">工单结束时间:</view>
  64. <view>{{form.completeTime || '-'}}</view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- <empty v-else text="暂无数据"></empty> -->
  69. </view>
  70. </template>
  71. <script>
  72. export default {
  73. data() {
  74. return {
  75. form:{},
  76. orderId:0,
  77. processGroupData:[], // 工艺字典数据
  78. }
  79. },
  80. onLoad(e) {
  81. this.processGrouplistfun()
  82. this.orderId = e.orderId
  83. this.productOrderIdfun()
  84. },
  85. onShow() {
  86. },
  87. methods: {
  88. // 详情数据
  89. productOrderIdfun(){
  90. uni.showLoading({
  91. title: '加载中',
  92. mask: true
  93. });
  94. this.$api.productOrderId(this.orderId).then(res=>{
  95. this.form = res.data
  96. uni.hideLoading();
  97. })
  98. },
  99. // 获取工艺名称字典
  100. processGrouplistfun(){
  101. this.$api.processGrouplist().then(res=>{
  102. this.processGroupData = res.rows
  103. })
  104. },
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .mould-page {
  110. .white-card {
  111. background-color: $uni-bg-color;
  112. }
  113. .list-box {
  114. padding: 0 20rpx;
  115. color: $uni-text-color-list; // #666
  116. .list-item {
  117. background-color: $uni-bg-color; // #ffffff
  118. padding: 20rpx;
  119. border-radius: 20rpx;
  120. margin-top: 28rpx;
  121. .item-text {
  122. // margin-top: 10rpx;
  123. font-size: 30rpx;
  124. margin: 20rpx 0;
  125. .item-text-left {
  126. // width: 200rpx;
  127. text-align: right;
  128. }
  129. }
  130. }
  131. }
  132. .flex-box {
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-between;
  136. }
  137. }
  138. </style>