index.vue 8.4 KB

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