selfBuiltPickOrderDetail.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar
  4. fixed="true"
  5. statusBar="true"
  6. left-icon="back"
  7. :title="title"
  8. background-color="#F7F9FA"
  9. color="#000"
  10. @clickLeft="back"
  11. ></uni-nav-bar>
  12. <view class="list_box">
  13. <view class="card_box cx-sc">
  14. <view class="content_table">
  15. <view class="item">
  16. <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
  17. <view class="content rx-bc" style="color: #157a2c">
  18. {{ dataList.code }}
  19. </view>
  20. </view>
  21. <view class="item">
  22. <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
  23. <view class="content rx-bc" style="color: #157a2c">
  24. {{ dataList.createTime }}
  25. </view>
  26. </view>
  27. <view class="item">
  28. <view class="lable rx-cc" style="color: #157a2c">领料人</view>
  29. <view class="content rx-bc" style="color: #157a2c">
  30. {{ dataList.executorName }}
  31. </view>
  32. </view>
  33. <view class="item">
  34. <view class="lable rx-cc" style="color: #157a2c">类型</view>
  35. <view
  36. class="content rx-bc"
  37. style="color: #157a2c"
  38. v-if="dataList.type == 1"
  39. >
  40. 自建领料
  41. </view>
  42. <view
  43. class="content rx-bc"
  44. style="color: #157a2c"
  45. v-if="dataList.type == 2"
  46. >
  47. 工单领料
  48. </view>
  49. <view
  50. class="content rx-bc"
  51. style="color: #157a2c"
  52. v-if="dataList.type == 3"
  53. >
  54. 委外领料
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <u-list @scrolltolower="scrolltolower" key="dataList" v-if="status == 1">
  60. <view
  61. class="card_box cx-sc"
  62. v-for="(item, index) in dataList.detailList"
  63. :key="index"
  64. >
  65. <instanceBom :item="item" :isDetails="true"></instanceBom>
  66. </view>
  67. <u-list-item
  68. v-if="dataList.detailList.length === 0"
  69. style="margin-top: 20vh"
  70. >
  71. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  72. </u-list-item>
  73. </u-list>
  74. <u-list @scrolltolower="scrolltolower" key="dataList2" v-if="status == 2">
  75. <view
  76. class="card_box cx-sc"
  77. v-for="(item, index) in dataList.detailList"
  78. :key="index"
  79. >
  80. <outInstanceBom :item="item" :isDetails="true"></outInstanceBom>
  81. </view>
  82. <u-list-item
  83. v-if="dataList.detailList.length === 0"
  84. style="margin-top: 20vh"
  85. >
  86. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  87. </u-list-item>
  88. <!-- <view class="card_box cx-sc">
  89. <outInstanceBom :list="dataList" :isDetails="true"></outInstanceBom>
  90. </view>
  91. <u-list-item v-if="dataList.length === 0" style="margin-top: 20vh">
  92. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  93. </u-list-item> -->
  94. </u-list>
  95. </view>
  96. <view class="bottom-wrapper">
  97. <!-- <view class="btn_box" @click="save">一键报工</view> -->
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. import { workorderPage } from "@/api/pda/workOrder.js";
  103. import {
  104. pickDetails,
  105. pickOutInOrder,
  106. queryOutWordDetail,
  107. } from "@/api/pda/picking.js";
  108. import instanceBom from "./instanceBom.vue";
  109. import outInstanceBom from "@/pages/pda/picking/bill/components/outInstanceBom.vue";
  110. export default {
  111. components: {
  112. instanceBom,
  113. outInstanceBom,
  114. },
  115. data() {
  116. return {
  117. ids: [],
  118. dataList: null,
  119. title: null,
  120. status: 1,
  121. item: null,
  122. };
  123. },
  124. onLoad(option) {
  125. this.status = option.status || 1;
  126. this.title =
  127. option.status == 1 ? "领料详情" : option.status == 2 ? " 出库详情" : "";
  128. this.dataList = JSON.parse(option.item);
  129. },
  130. methods: {
  131. async getList() {
  132. let list = [];
  133. if (this.status == 1) {
  134. const res = await pickDetails(this.ids);
  135. list = res;
  136. list.forEach((m) => {
  137. if (m.orderInfoList.length > 0) {
  138. m.orderInfoList.forEach((o) => {
  139. let _arr = [];
  140. _arr = [...o.bomDetailDTOS, ...o.instanceList];
  141. _arr = _arr.sort(
  142. (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
  143. );
  144. o["arr"] = _arr;
  145. });
  146. }
  147. });
  148. this.dataList = list;
  149. } else if (this.status == 2) {
  150. console.log(this.ids.join(","));
  151. const res = await queryOutWordDetail({
  152. pickOrderId: this.ids.join(","),
  153. });
  154. }
  155. },
  156. scrolltolower() {},
  157. save() {},
  158. },
  159. };
  160. </script>
  161. <style lang="scss" scoped>
  162. .content-box {
  163. height: 100vh;
  164. overflow: hidden;
  165. display: flex;
  166. flex-direction: column;
  167. }
  168. .list_box {
  169. flex: 1;
  170. overflow: hidden;
  171. padding: 16rpx 0;
  172. .u-list {
  173. height: 100% !important;
  174. }
  175. }
  176. .bottom-wrapper {
  177. .btn_box {
  178. width: 750rpx;
  179. height: 88rpx;
  180. line-height: 88rpx;
  181. background: $theme-color;
  182. text-align: center;
  183. font-size: 36rpx;
  184. font-style: normal;
  185. font-weight: 400;
  186. color: #fff;
  187. }
  188. }
  189. .card_box {
  190. margin-top: 10rpx;
  191. .word_order {
  192. height: 64rpx;
  193. width: 706rpx;
  194. background: $theme-color;
  195. font-size: 28rpx;
  196. color: #fff;
  197. line-height: 64rpx;
  198. padding-left: 40rpx;
  199. box-sizing: border-box;
  200. }
  201. .content_table {
  202. margin-top: 10rpx;
  203. width: 702rpx;
  204. border: 2rpx solid $border-color;
  205. .item {
  206. display: flex;
  207. border-bottom: 2rpx solid $border-color;
  208. .lable {
  209. width: 132rpx;
  210. text-align: center;
  211. background-color: #f7f9fa;
  212. font-size: 26rpx;
  213. border-right: 2rpx solid $border-color;
  214. flex-shrink: 0;
  215. }
  216. .ww80 {
  217. width: 80rpx;
  218. }
  219. .content {
  220. width: 518rpx;
  221. min-height: 64rpx;
  222. font-size: 28rpx;
  223. line-height: 28rpx;
  224. font-style: normal;
  225. font-weight: 400;
  226. padding: 18rpx 8rpx;
  227. box-sizing: border-box;
  228. word-wrap: break-word;
  229. flex-grow: 1 !important;
  230. }
  231. .content_num {
  232. display: flex;
  233. align-items: center;
  234. padding: 0 4rpx;
  235. /deep/ .uni-input-input {
  236. width: 480rpx;
  237. border: 2rpx solid #f0f8f2;
  238. background: #f0f8f2;
  239. color: $theme-color;
  240. }
  241. .unit {
  242. padding: 0 4rpx;
  243. font-size: 24rpx;
  244. color: #404446;
  245. }
  246. }
  247. .pd4 {
  248. padding: 4rpx 8rpx;
  249. }
  250. &:last-child {
  251. border-bottom: none;
  252. }
  253. }
  254. .ww55 {
  255. width: 55%;
  256. }
  257. .ww45 {
  258. width: 45%;
  259. }
  260. }
  261. }
  262. </style>