packingBomDetails.vue 7.6 KB

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