packingBomDetails.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. <template>
  2. <view>
  3. <view class="col userInp " style="display: flex; align-items: center;border: 1px solid #E3E5E5;border-top: 0;">
  4. <text class="label lable150 rx-cc" style="border-right: 1px solid #E3E5E5;">规格名称:</text>
  5. <!-- multiple -->
  6. <view style="padding-left: 5rpx;">{{ specText }}</view>
  7. </view>
  8. <view v-for="(item, i) in list" :key="i">
  9. <view class="title_box rx-bc">
  10. <view class="name">{{ item.title }}
  11. </view>
  12. </view>
  13. <view class="material">
  14. <view class="content_table">
  15. <view class="item">
  16. <view class="lable rx-cc">包装总数 </view>
  17. <view class="content content_num">
  18. <input class="uni-input" v-model="item.formedNumLast" type="number" disabled></input>
  19. <view class="unit">{{ item.packageUnit }}</view>
  20. </view>
  21. </view>
  22. <view class="item rx-sc">
  23. <view class="rx ww55 ">
  24. <view class="lable lable150 rx-cc ">{{ item.title }}单元</view>
  25. <view class="content content_num">
  26. <input class="uni-input" v-model="item.packageCell" disabled></input>
  27. <view style="max-width: 100rpx; font-size: 24rpx;">{{ item.packageUnit }}</view>
  28. </view>
  29. </view>
  30. <view class="rx ww45">
  31. <view class="rx-cc ww80">
  32. /<view style="max-width: 100rpx; font-size: 24rpx;">{{ item.conversionUnit }}</view>
  33. </view>
  34. <view class="content rx-sc">
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="content_table2" v-if='item.splitList.length > 0'>
  40. <view class="head row rx-sc">
  41. <view class="item ww10">序号</view>
  42. <view class="item ww30">数量</view>
  43. <view class="item ww50">条码</view>
  44. <view class="item ww10"></view>
  45. </view>
  46. <view class="table">
  47. <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
  48. <view class="tr row rx-sc" v-for="(it, idx) in item.splitList" :key='idx'>
  49. <view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
  50. <view class="item ww30 content_num rx-sc">
  51. {{ it.quantity }}/ {{ it.unit }}
  52. </view>
  53. <view class="item ww50">
  54. {{ it.code }}
  55. </view>
  56. <view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck(idx, it)">
  57. </view>
  58. </view>
  59. </u-list>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. props: {
  69. packInfo: {
  70. type: Object,
  71. default: () => { }
  72. },
  73. },
  74. watch: {
  75. packInfo: {
  76. handler(val) {
  77. this.specText = val.specText||'';
  78. let minimumObj = {
  79. title: '最小包装',
  80. splitList: val.minimumPackage,
  81. packageCell: val.minimumPackageCell,
  82. packageUnit: val.minimumPackageUnit,
  83. conversionUnit: val.minimumConversionUnit,
  84. formedNumLast: val.minimumFormedNumLast
  85. }
  86. let withinObj = {
  87. title: '内包装',
  88. splitList: val.withinPackage,
  89. packageCell: val.withinPackageCell,
  90. packageUnit: val.withinPackageUnit,
  91. conversionUnit: val.withinConversionUnit,
  92. formedNumLast: val.withinFormedNumLast
  93. }
  94. let outsideObj = {
  95. title: '外包装',
  96. splitList: val.outsidePackage,
  97. packageCell: val.outsidePackageCell,
  98. packageUnit: val.outsidePackageUnit,
  99. conversionUnit: val.outsideConversionUnit,
  100. formedNumLast: val.outsideFormedNumLast
  101. }
  102. let arr = [minimumObj, withinObj, outsideObj];
  103. this.list = arr;
  104. console.log(this.list);
  105. },
  106. deep: true,
  107. immediate: true,
  108. },
  109. },
  110. data() {
  111. return {
  112. specText:'',
  113. list: [],
  114. }
  115. },
  116. created() {
  117. },
  118. methods: {
  119. scrolltolower() {
  120. },
  121. },
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .title_box {
  126. margin-top: 20rpx;
  127. .name {
  128. font-size: 28rpx;
  129. font-style: normal;
  130. font-weight: 400;
  131. color: $theme-color;
  132. padding-left: 20rpx;
  133. position: relative;
  134. &:before {
  135. position: absolute;
  136. content: '';
  137. left: 0rpx;
  138. top: 0rpx;
  139. bottom: 0rpx;
  140. width: 4rpx;
  141. height: 28rpx;
  142. background: $theme-color;
  143. margin: auto;
  144. }
  145. }
  146. }
  147. .content_table {
  148. width: 100%;
  149. border: 2rpx solid $border-color;
  150. .item {
  151. display: flex;
  152. border-bottom: 2rpx solid $border-color;
  153. .lable {
  154. width: 132rpx;
  155. text-align: center;
  156. background-color: #F7F9FA;
  157. font-size: 26rpx;
  158. border-right: 2rpx solid $border-color;
  159. flex-shrink: 0;
  160. }
  161. .lable220 {
  162. width: 220rpx !important;
  163. font-size: 24rpx;
  164. }
  165. .lable150 {
  166. width: 156rpx !important;
  167. font-size: 24rpx;
  168. }
  169. .ww80 {
  170. width: 80rpx;
  171. }
  172. .content {
  173. width: 518rpx;
  174. min-height: 64rpx;
  175. font-size: 28rpx;
  176. line-height: 28rpx;
  177. font-style: normal;
  178. font-weight: 400;
  179. // padding: 18rpx 8rpx;
  180. box-sizing: border-box;
  181. word-wrap: break-word;
  182. flex-grow: 1 !important;
  183. .unit {
  184. padding: 0 4rpx;
  185. font-size: 24rpx;
  186. color: #404446;
  187. }
  188. }
  189. &:last-child {
  190. border-bottom: none;
  191. }
  192. }
  193. .ww55 {
  194. width: 55%;
  195. }
  196. .ww45 {
  197. width: 45%;
  198. }
  199. }
  200. .material {
  201. margin-top: 10rpx;
  202. }
  203. .label {
  204. display: flex;
  205. height: 70rpx;
  206. width: 86px !important;
  207. font-size: 13px;
  208. align-items: center;
  209. justify-content: center;
  210. background-color: #F7F9FA;
  211. }
  212. .content_table2 {
  213. width: 100%;
  214. margin-top: 16rpx;
  215. .row {
  216. width: 100%;
  217. .item {
  218. color: #404446;
  219. font-size: 28rpx;
  220. padding-left: 12rpx;
  221. }
  222. .color157 {
  223. color: $theme-color;
  224. }
  225. .ww30 {
  226. width: 30%;
  227. }
  228. .ww50 {
  229. width: 50%;
  230. }
  231. .ww90 {
  232. width: 90%;
  233. }
  234. .ww15 {
  235. width: 15%;
  236. }
  237. .ww10 {
  238. width: 10%;
  239. }
  240. .ww30 {
  241. width: 30%;
  242. }
  243. }
  244. .head {
  245. height: 64rpx;
  246. background: #F7F9FA;
  247. border-top: 2rpx solid #E3E5E5;
  248. border-left: 2rpx solid #E3E5E5;
  249. .item {
  250. height: 64rpx;
  251. line-height: 64rpx;
  252. border-right: 2rpx solid #E3E5E5;
  253. box-sizing: border-box;
  254. }
  255. }
  256. .tr {
  257. border-top: 2rpx solid #E3E5E5;
  258. border-left: 2rpx solid #E3E5E5;
  259. .item {
  260. font-size: 24rpx;
  261. min-height: 64rpx;
  262. display: flex;
  263. align-items: center;
  264. border-right: 2rpx solid #E3E5E5;
  265. box-sizing: border-box;
  266. white-space: normal;
  267. word-break: break-all;
  268. }
  269. &:last-child {
  270. border-bottom: 2rpx solid #E3E5E5;
  271. }
  272. }
  273. }
  274. .content_num {
  275. display: flex;
  276. align-items: center;
  277. padding: 0 4rpx;
  278. /deep/ .uni-input-input {
  279. border: 2rpx solid #F0F8F2;
  280. background: #F0F8F2;
  281. color: $theme-color;
  282. }
  283. }
  284. .penalize {
  285. width: 86rpx;
  286. line-height: 60rpx;
  287. background: $theme-color;
  288. font-size: 24rpx;
  289. text-align: center;
  290. color: #fff;
  291. }
  292. .check {
  293. width: 30rpx;
  294. height: 30rpx;
  295. }
  296. .z_list {
  297. max-height: 500rpx;
  298. }
  299. </style>