details.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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="item.checked = ! item.checked">
  19. <view class="zdy_check rx-cc" :class="{ check_active : item.checked }">
  20. <u-icon size="28" v-if='item.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="localdata" v-model="value" 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. value: 2,
  71. localdata: [{
  72. id: 1,
  73. name: '测试'
  74. },
  75. {
  76. id: 2,
  77. name: '测试2'
  78. }
  79. ],
  80. }
  81. },
  82. onLoad(options) {
  83. let queryArray = decodeURIComponent(options.arr);
  84. this.idsList = JSON.parse(queryArray);
  85. this.getList()
  86. },
  87. methods: {
  88. scrolltolower() {},
  89. save() {
  90. console.log(this.idsList)
  91. },
  92. getList() {
  93. workorderList(this.idsList).then(res => {
  94. this.List = res
  95. })
  96. },
  97. handleUserChange(e) {
  98. console.log(e)
  99. },
  100. addPicking() {
  101. uni.navigateTo({
  102. url: '/pages/pda/picking/add'
  103. })
  104. },
  105. },
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .content-box {
  110. height: 100vh;
  111. overflow: hidden;
  112. display: flex;
  113. flex-direction: column;
  114. }
  115. .list_box {
  116. flex: 1;
  117. overflow: hidden;
  118. padding: 4rpx 0;
  119. .u-list {
  120. height: 100% !important;
  121. }
  122. .card_box {
  123. padding: 16rpx 24rpx;
  124. }
  125. .title_box {
  126. .round {
  127. width: 32rpx;
  128. height: 32rpx;
  129. line-height: 32rpx;
  130. border-radius: 50%;
  131. background: $theme-color;
  132. color: #fff;
  133. text-align: center;
  134. font-size: 20rpx;
  135. }
  136. .code {
  137. margin-left: 16rpx;
  138. font-family: PingFang SC;
  139. font-size: 28rpx;
  140. font-style: normal;
  141. font-weight: 400;
  142. color: $theme-color;
  143. }
  144. }
  145. .right_box {
  146. .btn {
  147. height: 40rpx;
  148. line-height: 40rpx;
  149. padding: 4rpx 8rpx;
  150. background: #157A2C;
  151. font-size: 24rpx;
  152. font-style: normal;
  153. font-weight: 400;
  154. color: #fff;
  155. border-radius: 4rpx;
  156. }
  157. }
  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>