details.vue 5.5 KB

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