packingBom.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view>
  3. <view class="material ">
  4. <view class="title_box rx-bc">
  5. <view class="name">外包装</view>
  6. </view>
  7. <!-- 外包装 列表-->
  8. <view class="content_table2" v-if="objData.packingReportList.length> 0">
  9. <view class="head row rx-sc">
  10. <view class="item ww10">序号</view>
  11. <view class="item ww30">数量</view>
  12. <view class="item ww50">发货条码</view>
  13. <view class="item ww10 selectAll" @click="handOneCheck">{{ oneCheck ? '取消' : '全选'}}</view>
  14. </view>
  15. <view class="table">
  16. <view class="tr row rx-sc " v-for="(it, idx) in objData.packingReportList" :key='idx'
  17. @click="handleCheck(idx, it)">
  18. <view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
  19. <view class="item ww30 content_num rx-sc">
  20. {{it.packingNum}} / {{ it.unit }} {{it.quantity}}/ {{ it.childList[0].unit }}
  21. </view>
  22. <view class="item ww50">
  23. {{ it.code }}
  24. </view>
  25. <view class="item ww10 rx-cc">
  26. <image class="check" v-if='it.check' src='@/static/check.png'>
  27. </image>
  28. <image class="check" v-if=' !it.check' src='@/static/check_no.png'>
  29. </image>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="material ">
  36. <view class="title_box rx-bc">
  37. <view class="name">内包装</view>
  38. </view>
  39. <view class="content_table2" v-if='objData.packingReportMarginList.length'>
  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 selectAll" @click="handTwoCheck">{{ twoCheck ? '取消' : '全选'}}</view>
  45. </view>
  46. <view class="table">
  47. <u-list @scrolltolower="scrolltolower" class="z_list">
  48. <view class="tr row rx-sc" v-for="(it, idx) in objData.packingReportMarginList" :key='idx'
  49. @click="handleCheckTwo(idx, it)">
  50. <view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
  51. <view class="item ww30 content_num rx-sc">
  52. <view>{{ it.quantity }}/ {{it.unit}} </view>
  53. </view>
  54. <view class="item ww50">
  55. {{ it.code }}
  56. </view>
  57. <view class="item ww10 rx-cc">
  58. <image class="check" v-if='it.check' src='@/static/check.png'>
  59. </image>
  60. <image class="check" v-if=' !it.check' src='@/static/check_no.png'>
  61. </image>
  62. </view>
  63. </view>
  64. </u-list>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. props: {
  73. objData: {
  74. type: Object,
  75. default: () => {}
  76. },
  77. },
  78. data() {
  79. return {
  80. oneCheck: false,
  81. twoCheck: false,
  82. clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
  83. }
  84. },
  85. created() {
  86. },
  87. methods: {
  88. handOneCheck() {
  89. if (this.oneCheck) {
  90. this.oneCheck = false
  91. this.objData.packingReportList.forEach(e => {
  92. e.check = false
  93. })
  94. } else {
  95. this.oneCheck = true
  96. this.objData.packingReportList.forEach(e => {
  97. e.check = true
  98. })
  99. }
  100. this.$forceUpdate()
  101. },
  102. handleCheck(idx, it) {
  103. this.$set(this.objData.packingReportList[idx], 'check', !it.check)
  104. this.$forceUpdate()
  105. },
  106. handTwoCheck() {
  107. if (this.twoCheck) {
  108. this.twoCheck = false
  109. this.objData.packingReportMarginList.forEach(e => {
  110. e.check = false
  111. })
  112. } else {
  113. this.twoCheck = true
  114. this.objData.packingReportMarginList.forEach(e => {
  115. e.check = true
  116. })
  117. }
  118. this.$forceUpdate()
  119. },
  120. handleCheckTwo(idx, it) {
  121. this.$set(this.objData.packingReportMarginList[idx], 'check', !it.check)
  122. this.$forceUpdate()
  123. },
  124. scrolltolower() {
  125. },
  126. },
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. .title_box {
  131. margin-top: 20rpx;
  132. .name {
  133. font-size: 28rpx;
  134. font-style: normal;
  135. font-weight: 400;
  136. color: $theme-color;
  137. padding-left: 20rpx;
  138. position: relative;
  139. &:before {
  140. position: absolute;
  141. content: '';
  142. left: 0rpx;
  143. top: 0rpx;
  144. bottom: 0rpx;
  145. width: 4rpx;
  146. height: 28rpx;
  147. background: $theme-color;
  148. margin: auto;
  149. }
  150. }
  151. }
  152. .material {
  153. margin-top: 10rpx;
  154. }
  155. .content_table2 {
  156. width: 100%;
  157. margin-top: 16rpx;
  158. .row {
  159. width: 100%;
  160. .item {
  161. color: #404446;
  162. font-size: 28rpx;
  163. padding-left: 12rpx;
  164. }
  165. .color157 {
  166. color: $theme-color;
  167. }
  168. .ww30 {
  169. width: 30%;
  170. }
  171. .ww50 {
  172. width: 50%;
  173. }
  174. .ww90 {
  175. width: 90%;
  176. }
  177. .ww15 {
  178. width: 15%;
  179. }
  180. .ww10 {
  181. width: 10%;
  182. }
  183. .ww30 {
  184. width: 30%;
  185. }
  186. }
  187. .head {
  188. height: 64rpx;
  189. background: #F7F9FA;
  190. border-top: 2rpx solid #E3E5E5;
  191. border-left: 2rpx solid #E3E5E5;
  192. .item {
  193. height: 64rpx;
  194. line-height: 64rpx;
  195. border-right: 2rpx solid #E3E5E5;
  196. box-sizing: border-box;
  197. }
  198. .selectAll {
  199. color: $theme-color;
  200. font-size: 24rpx;
  201. }
  202. }
  203. .tr {
  204. border-top: 2rpx solid #E3E5E5;
  205. border-left: 2rpx solid #E3E5E5;
  206. .item {
  207. font-size: 24rpx;
  208. min-height: 64rpx;
  209. display: flex;
  210. align-items: center;
  211. border-right: 2rpx solid #E3E5E5;
  212. box-sizing: border-box;
  213. white-space: normal;
  214. word-break: break-all;
  215. }
  216. &:last-child {
  217. border-bottom: 2rpx solid #E3E5E5;
  218. }
  219. }
  220. }
  221. .content_num {
  222. display: flex;
  223. align-items: center;
  224. padding: 0 4rpx;
  225. /deep/ .uni-input-input {
  226. border: 2rpx solid #F0F8F2;
  227. background: #F0F8F2;
  228. color: $theme-color;
  229. }
  230. }
  231. .penalize {
  232. width: 86rpx;
  233. line-height: 60rpx;
  234. background: $theme-color;
  235. font-size: 24rpx;
  236. text-align: center;
  237. color: #fff;
  238. }
  239. .check {
  240. width: 30rpx;
  241. height: 30rpx;
  242. }
  243. .z_list {
  244. max-height: 300rpx;
  245. }
  246. </style>