details.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <template>
  2. <view class="content-box">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料" background-color="#F7F9FA"
  4. color="#404446" @clickLeft="back"></uni-nav-bar>
  5. <view class="list_box">
  6. <u-list @scrolltolower="scrolltolower">
  7. <view v-for="(item,index) in List" :key="index" class="card_box">
  8. <view class="title_box rx-bc">
  9. <view class="left rx-sc">
  10. <view class="round">{{index + 1}}</view>
  11. <view class="code">工单编号:{{item.code}}</view>
  12. </view>
  13. <view class="right_box rx-ec">
  14. <u-button type="success" size="small" class="u-reset-button" @click="addPicking(item.id)"
  15. text="添加物料"></u-button>
  16. </view>
  17. </view>
  18. <view class="material rx-ss" v-for="(mate, idx) in item.bomDetailDTOS">
  19. <view class="left rx-ss" @click="mate.checked = ! mate.checked">
  20. <view class="zdy_check rx-cc" :class="{ check_active : mate.checked }">
  21. <u-icon size="28" v-if='mate.checked' name='checkbox-mark'></u-icon>
  22. </view>
  23. </view>
  24. <view class="content_table">
  25. <view class="item">
  26. <view class="lable rx-cc">物料编码</view>
  27. <view class="content">
  28. {{mate.categoryCode}}
  29. </view>
  30. </view>
  31. <view class="item">
  32. <view class="lable rx-cc">名称</view>
  33. <view class="content">{{mate.categoryName}}</view>
  34. </view>
  35. <view class="item rx-sc">
  36. <view class="rx ww55 ">
  37. <view class="lable rx-cc">牌号</view>
  38. <view class="content ">{{mate.brandNum}}</view>
  39. </view>
  40. <view class="rx ww45">
  41. <view class="lable rx-cc ww80">数量</view>
  42. <view class="content content_num">
  43. <input class="uni-input" v-model="mate.needNum" type="digit"></input>
  44. <view class="unit">{{mate.unit}}</view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="item">
  49. <view class="lable rx-cc">领料仓库</view>
  50. <view class="content pd4">
  51. <zxz-uni-data-select :localdata="mate.warehouseList" v-model="mate.warehouseId"
  52. dataValue='id' format='{name}' :clear='false'></zxz-uni-data-select>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <view >
  58. <instanceBom :list='item.instanceList'></instanceBom>
  59. </view>
  60. </view>
  61. </u-list>
  62. </view>
  63. <view class="bottom-wrapper">
  64. <view class="btn_box" @click="save">确认</view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import instanceBom from './components/instanceBom.vue'
  70. import {
  71. workorderList
  72. } from '@/api/pda/workOrder.js'
  73. export default {
  74. components: {
  75. instanceBom
  76. },
  77. data() {
  78. return {
  79. idsList: [],
  80. List: [],
  81. classificationList: [], //分类数据
  82. }
  83. },
  84. onLoad(options) {
  85. let queryArray = decodeURIComponent(options.arr);
  86. this.idsList = JSON.parse(queryArray);
  87. this.getList()
  88. },
  89. onShow() {
  90. uni.$off("setSelectList");
  91. uni.$on("setSelectList", (selectList, id) => {
  92. this.List.forEach(m => {
  93. if (m.id == id) {
  94. this.$set(m, 'instanceList', selectList)
  95. }
  96. })
  97. });
  98. },
  99. methods: {
  100. scrolltolower() {},
  101. save() {
  102. console.log(this.idsList)
  103. },
  104. getList() {
  105. workorderList(this.idsList).then(res => {
  106. this.List = res
  107. })
  108. },
  109. handleUserChange(e) {
  110. console.log(e)
  111. },
  112. addPicking(id) {
  113. uni.navigateTo({
  114. url: '/pages/pda/workOrder/search/index?id=' + id
  115. })
  116. },
  117. },
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .content-box {
  122. height: 100vh;
  123. overflow: hidden;
  124. display: flex;
  125. flex-direction: column;
  126. }
  127. .list_box {
  128. flex: 1;
  129. overflow: hidden;
  130. padding: 4rpx 0;
  131. .u-list {
  132. height: 100% !important;
  133. }
  134. .card_box {
  135. padding: 16rpx 24rpx;
  136. }
  137. .title_box {
  138. .round {
  139. width: 32rpx;
  140. height: 32rpx;
  141. line-height: 32rpx;
  142. border-radius: 50%;
  143. background: $theme-color;
  144. color: #fff;
  145. text-align: center;
  146. font-size: 20rpx;
  147. }
  148. .code {
  149. margin-left: 16rpx;
  150. font-family: PingFang SC;
  151. font-size: 28rpx;
  152. font-style: normal;
  153. font-weight: 400;
  154. color: $theme-color;
  155. }
  156. }
  157. .right_box {}
  158. .material {
  159. margin-top: 10rpx;
  160. .left {
  161. width: 40rpx;
  162. }
  163. .zdy_check {
  164. width: 30rpx;
  165. height: 30rpx;
  166. border: 2rpx solid #c8c9cc;
  167. border-radius: 4rpx;
  168. }
  169. .check_active {
  170. background: $theme-color;
  171. border: 2rpx solid $theme-color;
  172. /deep/ .u-icon__icon {
  173. color: #fff !important;
  174. }
  175. }
  176. .content_table {
  177. width: 652rpx;
  178. border: 2rpx solid $border-color;
  179. .item {
  180. display: flex;
  181. border-bottom: 2rpx solid $border-color;
  182. .lable {
  183. width: 132rpx;
  184. text-align: center;
  185. background-color: #F7F9FA;
  186. font-size: 26rpx;
  187. border-right: 2rpx solid $border-color;
  188. flex-shrink: 0;
  189. }
  190. .ww80 {
  191. width: 80rpx;
  192. }
  193. .content {
  194. width: 518rpx;
  195. min-height: 64rpx;
  196. font-size: 28rpx;
  197. line-height: 28rpx;
  198. font-style: normal;
  199. font-weight: 400;
  200. padding: 18rpx 8rpx;
  201. box-sizing: border-box;
  202. word-wrap: break-word;
  203. flex-grow: 1 !important;
  204. }
  205. .content_num {
  206. display: flex;
  207. align-items: center;
  208. padding: 0 4rpx;
  209. /deep/ .uni-input-input {
  210. border: 2rpx solid #F0F8F2;
  211. background: #F0F8F2;
  212. color: $theme-color;
  213. }
  214. .unit {
  215. padding: 0 4rpx;
  216. font-size: 24rpx;
  217. color: #404446;
  218. }
  219. }
  220. .pd4 {
  221. padding: 4rpx 8rpx;
  222. }
  223. &:last-child {
  224. border-bottom: none;
  225. }
  226. }
  227. .ww55 {
  228. width: 55%;
  229. }
  230. .ww45 {
  231. width: 45%;
  232. }
  233. }
  234. }
  235. }
  236. .bottom-wrapper {
  237. .btn_box {
  238. width: 750rpx;
  239. height: 88rpx;
  240. line-height: 88rpx;
  241. background: $theme-color;
  242. text-align: center;
  243. font-size: 36rpx;
  244. font-style: normal;
  245. font-weight: 400;
  246. color: #fff;
  247. }
  248. }
  249. </style>