index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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 class="card_box cx-sc">
  61. <view class="content_table">
  62. <view class="item">
  63. <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
  64. <view class="content rx-bc" style="color: #157a2c">
  65. {{ dataList.code }}
  66. </view>
  67. </view>
  68. <view class="item">
  69. <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
  70. <view class="content rx-bc" style="color: #157a2c">
  71. {{ dataList.createTime }}
  72. </view>
  73. </view>
  74. <view class="item">
  75. <view class="lable rx-cc" style="color: #157a2c">领料人</view>
  76. <view class="content rx-bc" style="color: #157a2c">
  77. {{ dataList.executorName }}
  78. </view>
  79. </view>
  80. </view>
  81. </view> -->
  82. <view
  83. class="card_box cx-sc"
  84. v-for="(item, index) in dataList.orderInfoList"
  85. :key="index"
  86. >
  87. <instanceBom :item="item" :isDetails="true"></instanceBom>
  88. </view>
  89. <u-list-item
  90. v-if="dataList.orderInfoList.length === 0"
  91. style="margin-top: 20vh"
  92. >
  93. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  94. </u-list-item>
  95. </u-list>
  96. <u-list @scrolltolower="scrolltolower" key="dataList2" v-if="status == 2">
  97. <!-- <view class="card_box cx-sc">
  98. <view class="content_table">
  99. <view class="item">
  100. <view class="lable rx-cc" style="color: #157a2c">领料单号</view>
  101. <view class="content rx-bc" style="color: #157a2c">
  102. {{ dataList.code }}
  103. </view>
  104. </view>
  105. <view class="item">
  106. <view class="lable rx-cc" style="color: #157a2c">领料时间</view>
  107. <view class="content rx-bc" style="color: #157a2c">
  108. {{ dataList.createTime }}
  109. </view>
  110. </view>
  111. <view class="item">
  112. <view class="lable rx-cc" style="color: #157a2c">领料人</view>
  113. <view class="content rx-bc" style="color: #157a2c">
  114. {{ dataList.executorName }}
  115. </view>
  116. </view>
  117. </view>
  118. </view> -->
  119. <view
  120. class="card_box cx-sc"
  121. v-for="(item, index) in dataList.orderInfoList"
  122. :key="index"
  123. >
  124. <outInstanceBom :item="item" :isDetails="true"></outInstanceBom>
  125. </view>
  126. <u-list-item
  127. v-if="dataList.orderInfoList.length === 0"
  128. style="margin-top: 20vh"
  129. >
  130. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  131. </u-list-item>
  132. <!-- <view class="card_box cx-sc">
  133. <outInstanceBom :list="dataList" :isDetails="true"></outInstanceBom>
  134. </view>
  135. <u-list-item v-if="dataList.length === 0" style="margin-top: 20vh">
  136. <u-empty iconSize="150" textSize="32" text="暂无数据"> </u-empty>
  137. </u-list-item> -->
  138. </u-list>
  139. </view>
  140. <view class="bottom-wrapper">
  141. <!-- <view class="btn_box" @click="save">一键报工</view> -->
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. import { tableHeader } from "../../common.js";
  147. import { workorderPage } from "@/api/pda/workOrder.js";
  148. import {
  149. pickDetails,
  150. pickOutInOrder,
  151. queryOutWordDetail,
  152. } from "@/api/pda/picking.js";
  153. import instanceBom from "./components/instanceBom.vue";
  154. import outInstanceBom from "./components/outInstanceBom.vue";
  155. export default {
  156. components: {
  157. instanceBom,
  158. outInstanceBom,
  159. },
  160. data() {
  161. return {
  162. ids: [],
  163. dataList: null,
  164. title: null,
  165. status: 1,
  166. item: null,
  167. };
  168. },
  169. onLoad(option) {
  170. this.status = option.status || 1;
  171. this.title =
  172. option.status == 1 ? "领料详情" : option.status == 2 ? " 出库详情" : "";
  173. this.dataList = JSON.parse(option.item);
  174. console.log(this.dataList, "领料详情数据");
  175. // this.ids = [option.id];
  176. // this.getList();
  177. },
  178. methods: {
  179. async getList() {
  180. let list = [];
  181. if (this.status == 1) {
  182. const res = await pickDetails(this.ids);
  183. list = res;
  184. list.forEach((m) => {
  185. if (m.orderInfoList.length > 0) {
  186. m.orderInfoList.forEach((o) => {
  187. let _arr = [];
  188. _arr = [...o.bomDetailDTOS, ...o.instanceList];
  189. _arr = _arr.sort(
  190. (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
  191. );
  192. o["arr"] = _arr;
  193. });
  194. }
  195. });
  196. this.dataList = list;
  197. } else if (this.status == 2) {
  198. console.log(this.ids.join(","));
  199. const res = await queryOutWordDetail({
  200. pickOrderId: this.ids.join(","),
  201. });
  202. console.log(res, "11111");
  203. // const res = await pickOutInOrder({
  204. // workOrderIds: this.ids,
  205. // });
  206. // this.dataList = res;
  207. }
  208. },
  209. scrolltolower() {},
  210. tableH(type) {
  211. return tableHeader(type);
  212. },
  213. save() {},
  214. },
  215. };
  216. </script>
  217. <style lang="scss" scoped>
  218. .content-box {
  219. height: 100vh;
  220. overflow: hidden;
  221. display: flex;
  222. flex-direction: column;
  223. }
  224. .list_box {
  225. flex: 1;
  226. overflow: hidden;
  227. padding: 16rpx 0;
  228. .u-list {
  229. height: 100% !important;
  230. }
  231. }
  232. .bottom-wrapper {
  233. .btn_box {
  234. width: 750rpx;
  235. height: 88rpx;
  236. line-height: 88rpx;
  237. background: $theme-color;
  238. text-align: center;
  239. font-size: 36rpx;
  240. font-style: normal;
  241. font-weight: 400;
  242. color: #fff;
  243. }
  244. }
  245. .card_box {
  246. margin-top: 10rpx;
  247. .word_order {
  248. height: 64rpx;
  249. width: 706rpx;
  250. background: $theme-color;
  251. font-size: 28rpx;
  252. color: #fff;
  253. line-height: 64rpx;
  254. padding-left: 40rpx;
  255. box-sizing: border-box;
  256. }
  257. .content_table {
  258. margin-top: 10rpx;
  259. width: 702rpx;
  260. border: 2rpx solid $border-color;
  261. .item {
  262. display: flex;
  263. border-bottom: 2rpx solid $border-color;
  264. .lable {
  265. width: 132rpx;
  266. text-align: center;
  267. background-color: #f7f9fa;
  268. font-size: 26rpx;
  269. border-right: 2rpx solid $border-color;
  270. flex-shrink: 0;
  271. }
  272. .ww80 {
  273. width: 80rpx;
  274. }
  275. .content {
  276. width: 518rpx;
  277. min-height: 64rpx;
  278. font-size: 28rpx;
  279. line-height: 28rpx;
  280. font-style: normal;
  281. font-weight: 400;
  282. padding: 18rpx 8rpx;
  283. box-sizing: border-box;
  284. word-wrap: break-word;
  285. flex-grow: 1 !important;
  286. }
  287. .content_num {
  288. display: flex;
  289. align-items: center;
  290. padding: 0 4rpx;
  291. /deep/ .uni-input-input {
  292. width: 480rpx;
  293. border: 2rpx solid #f0f8f2;
  294. background: #f0f8f2;
  295. color: $theme-color;
  296. }
  297. .unit {
  298. padding: 0 4rpx;
  299. font-size: 24rpx;
  300. color: #404446;
  301. }
  302. }
  303. .pd4 {
  304. padding: 4rpx 8rpx;
  305. }
  306. &:last-child {
  307. border-bottom: none;
  308. }
  309. }
  310. .ww55 {
  311. width: 55%;
  312. }
  313. .ww45 {
  314. width: 45%;
  315. }
  316. }
  317. }
  318. </style>