details.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. classificationList: [], //分类数据
  77. }
  78. },
  79. onLoad(options) {
  80. let queryArray = decodeURIComponent(options.arr);
  81. this.idsList = JSON.parse(queryArray);
  82. this.getList()
  83. },
  84. methods: {
  85. scrolltolower() {},
  86. save() {
  87. console.log(this.idsList)
  88. },
  89. getList() {
  90. workorderList(this.idsList).then(res => {
  91. this.List = res
  92. })
  93. },
  94. handleUserChange(e) {
  95. console.log(e)
  96. },
  97. addPicking() {
  98. uni.navigateTo({
  99. url: '/pages/pda/picking/add'
  100. })
  101. },
  102. },
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .content-box {
  107. height: 100vh;
  108. overflow: hidden;
  109. display: flex;
  110. flex-direction: column;
  111. }
  112. .list_box {
  113. flex: 1;
  114. overflow: hidden;
  115. padding: 4rpx 0;
  116. .u-list {
  117. height: 100% !important;
  118. }
  119. .card_box {
  120. padding: 16rpx 24rpx;
  121. }
  122. .title_box {
  123. .round {
  124. width: 32rpx;
  125. height: 32rpx;
  126. line-height: 32rpx;
  127. border-radius: 50%;
  128. background: $theme-color;
  129. color: #fff;
  130. text-align: center;
  131. font-size: 20rpx;
  132. }
  133. .code {
  134. margin-left: 16rpx;
  135. font-family: PingFang SC;
  136. font-size: 28rpx;
  137. font-style: normal;
  138. font-weight: 400;
  139. color: $theme-color;
  140. }
  141. }
  142. .right_box {
  143. }
  144. .material {
  145. margin-top: 10rpx;
  146. .left {
  147. width: 40rpx;
  148. }
  149. .zdy_check {
  150. width: 30rpx;
  151. height: 30rpx;
  152. border: 2rpx solid #c8c9cc;
  153. border-radius: 4rpx;
  154. }
  155. .check_active {
  156. background: $theme-color;
  157. border: 2rpx solid $theme-color;
  158. /deep/ .u-icon__icon {
  159. color: #fff !important;
  160. }
  161. }
  162. .content_table {
  163. width: 652rpx;
  164. border: 2rpx solid $border-color;
  165. .item {
  166. display: flex;
  167. border-bottom: 2rpx solid $border-color;
  168. .lable {
  169. width: 132rpx;
  170. text-align: center;
  171. background-color: #F7F9FA;
  172. font-size: 26rpx;
  173. border-right: 2rpx solid $border-color;
  174. flex-shrink: 0;
  175. }
  176. .ww80 {
  177. width: 80rpx;
  178. }
  179. .content {
  180. width: 518rpx;
  181. min-height: 64rpx;
  182. font-size: 28rpx;
  183. line-height: 28rpx;
  184. font-style: normal;
  185. font-weight: 400;
  186. padding: 18rpx 8rpx;
  187. box-sizing: border-box;
  188. word-wrap: break-word;
  189. flex-grow: 1 !important;
  190. }
  191. .content_num {
  192. display: flex;
  193. align-items: center;
  194. padding: 0 4rpx;
  195. /deep/ .uni-input-input {
  196. border: 2rpx solid #F0F8F2;
  197. background: #F0F8F2;
  198. color: $theme-color;
  199. }
  200. .unit {
  201. padding: 0 4rpx;
  202. font-size: 24rpx;
  203. color: #404446;
  204. }
  205. }
  206. .pd4{
  207. padding: 4rpx 8rpx;
  208. }
  209. &:last-child {
  210. border-bottom: none;
  211. }
  212. }
  213. .ww55 {
  214. width: 55%;
  215. }
  216. .ww45 {
  217. width: 45%;
  218. }
  219. }
  220. }
  221. }
  222. .bottom-wrapper {
  223. .btn_box {
  224. width: 750rpx;
  225. height: 88rpx;
  226. line-height: 88rpx;
  227. background: $theme-color;
  228. text-align: center;
  229. font-size: 36rpx;
  230. font-style: normal;
  231. font-weight: 400;
  232. color: #fff;
  233. }
  234. }
  235. </style>