packingBomDetails.vue 6.5 KB

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