index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#157A2C"
  4. color="#fff" @clickLeft="back"></uni-nav-bar>
  5. <view class="top-wrapper cx">
  6. <stepsNav :stepsList="stepsList"></stepsNav>
  7. <view class="tab_box rx-sc">
  8. <view class="tab_item" :class="{active: tabType == 1}" @click="handTab(1)">基本信息</view>
  9. <view class="tab_item" :class="{active: tabType == 2}" @click="handTab(2)">生产明细</view>
  10. </view>
  11. </view>
  12. <view class="list_box">
  13. <u-list @scrolltolower="scrolltolower" key="info" v-if="tabType == 1">
  14. <view class="item_list rx-bc">
  15. <text class="lable">生产工单号</text>
  16. <text>21122403906633005</text>
  17. </view>
  18. <view class="item_list rx-bc">
  19. <text class="lable">计划编号</text>
  20. <text>211224039</text>
  21. </view>
  22. <view class="item_list rx-bc">
  23. <text class="lable">工艺路线版本</text>
  24. <text>2.0</text>
  25. </view>
  26. <view class="item_list rx-bc">
  27. <text class="lable">产品编码</text>
  28. <text>W05363955011</text>
  29. </view>
  30. <view class="item_list rx-bc">
  31. <text class="lable">产品名称</text>
  32. <text>木工刀</text>
  33. </view>
  34. <view class="item_list rx-bc">
  35. <text class="lable">牌号</text>
  36. <text>H25.5</text>
  37. </view>
  38. <view class="item_list rx-bc">
  39. <text class="lable">型号</text>
  40. <text>H25.5</text>
  41. </view>
  42. <view class="item_list rx-bc">
  43. <text class="lable">要求成型数量</text>
  44. <text>1000 PCS</text>
  45. </view>
  46. <view class="item_list rx-bc">
  47. <text class="lable">要求成型重量</text>
  48. <text>850.5 KG</text>
  49. </view>
  50. <view class="item_list rx-bc">
  51. <text class="lable">已完成生产数量</text>
  52. <text>293 PCS</text>
  53. </view>
  54. <view class="item_list rx-bc">
  55. <text class="lable">已完成生产重量</text>
  56. <text>85.5 KG</text>
  57. </view>
  58. <view class="item_list rx-bc">
  59. <text class="lable">计划开始时间</text>
  60. <text>2023/08/10 02:00:00</text>
  61. </view>
  62. </u-list>
  63. <u-list @scrolltolower="scrolltolower" key="detail" v-if="tabType == 2">
  64. <view v-for="(item,index) in detailList" :key="index" class="detail-list">
  65. <view class="name">{{item.name}}</view>
  66. <view class="list rx-bc" v-for="(it, idx) in item.list">
  67. <view class="title rx-sc">
  68. <image v-if="it.state == 1" class="icon" src="~@/static/pda/layers.svg"></image>
  69. <image v-if="it.state == 2" class="icon" src="~@/static/pda/check-square.svg"></image>
  70. <image v-if="it.state == 3" class="icon" src="~@/static/pda/target.svg"></image>
  71. {{it.title}}
  72. </view>
  73. <view class="rx-ec">
  74. {{it.num}}
  75. <image class="arrow_right2" src="~@/static/pda/arrow_right2.svg"></image>
  76. </view>
  77. </view>
  78. </view>
  79. </u-list>
  80. </view>
  81. <view class="bottom-wrapper">
  82. <bottomOperate state='1'></bottomOperate>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import bottomOperate from '../../components/bottomOperate.vue'
  88. import stepsNav from '../../components/stepsNav.vue'
  89. import { getTaskInstanceList } from '@/api/pda/workOrder.js'
  90. export default {
  91. components: {
  92. bottomOperate,
  93. stepsNav
  94. },
  95. data() {
  96. return {
  97. title: '',
  98. tabType: 1,
  99. id: null,
  100. stepsList: [],
  101. detailList: [{
  102. name: '挤压成型',
  103. list: [{
  104. state: 1,
  105. title: '待投料数量',
  106. num: 333
  107. },
  108. {
  109. state: 2,
  110. title: '已报工数量',
  111. num: 666
  112. }
  113. ]
  114. },
  115. {
  116. name: '自然干燥',
  117. list: [{
  118. state: 3,
  119. title: '生产中数量',
  120. num: 555
  121. },
  122. {
  123. state: 2,
  124. title: '已报工数量',
  125. num: 666
  126. }
  127. ]
  128. }
  129. ]
  130. }
  131. },
  132. onLoad(options) {
  133. this.title = options.title
  134. this.id = options.id
  135. this.getSteps()
  136. },
  137. methods: {
  138. scrolltolower() {},
  139. handTab(type) {
  140. if (type != this.tabType) {
  141. this.tabType = type
  142. }
  143. },
  144. getSteps() {
  145. getTaskInstanceList(this.id).then(res => {
  146. this.stepsList = res
  147. if(!this.title && this.stepsList.length) {
  148. this.title = this.stepsList[0].taskTypeName
  149. }
  150. })
  151. }
  152. }
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .content-box {
  157. height: 100vh;
  158. overflow: hidden;
  159. display: flex;
  160. flex-direction: column;
  161. background-color: $page-bg;
  162. }
  163. .top-wrapper {
  164. background-color: #fff;
  165. display: flex;
  166. width: 750rpx;
  167. background: #fff;
  168. align-items: center;
  169. }
  170. .tab_box {
  171. width: 100%;
  172. height: 68rpx;
  173. .tab_item {
  174. height: 68rpx;
  175. line-height: 68rpx;
  176. padding: 0 20rpx;
  177. font-size: 32rpx;
  178. color: #979C9E;
  179. }
  180. .active {
  181. box-sizing: border-box;
  182. border-bottom: 6rpx solid $theme-color;
  183. color: $theme-color;
  184. }
  185. }
  186. .list_box {
  187. flex: 1;
  188. overflow: hidden;
  189. padding: 4rpx 0;
  190. .u-list {
  191. height: 100% !important;
  192. }
  193. .item_list {
  194. width: 100%;
  195. height: 80rpx;
  196. box-sizing: border-box;
  197. padding: 0 32rpx;
  198. font-size: 32rpx;
  199. color: #979C9E;
  200. font-weight: 400;
  201. border-bottom: 1rpx solid #E3E5E5;
  202. .lable {
  203. color: #090A0A;
  204. font-weight: 500;
  205. }
  206. }
  207. .detail-list {
  208. line-height: 80rpx;
  209. .name {
  210. color: #090A0A;
  211. font-size: 32rpx;
  212. font-weight: 600;
  213. padding: 0 32rpx;
  214. box-sizing: border-box;
  215. border-bottom: 1rpx solid #E3E5E5;
  216. }
  217. .list {
  218. padding: 0 32rpx;
  219. box-sizing: border-box;
  220. border-bottom: 1rpx solid #E3E5E5;
  221. .title {
  222. font-weight: 400;
  223. color: #090A0A;
  224. }
  225. .icon {
  226. width: 36rpx;
  227. height: 36rpx;
  228. margin-right: 8rpx;
  229. }
  230. .arrow_right2{
  231. width: 12rpx;
  232. height: 24rpx;
  233. margin-left: 8rpx;
  234. }
  235. }
  236. }
  237. }
  238. .bottom-wrapper {}
  239. </style>