details.vue 5.6 KB

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