packingBom.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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.childList[0].unit }} / {{ it.unit }},{{it.quantity}} {{ measuringUnit}}
  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.isChecked' src='@/static/check.png'>
  27. </image>
  28. <image class="check" v-if=' !it.isChecked' 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.isChecked' src='@/static/check.png'>
  59. </image>
  60. <image class="check" v-if=' !it.isChecked' 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. measuringUnit: {
  78. type: String,
  79. default: ''
  80. }
  81. },
  82. data() {
  83. return {
  84. oneCheck: false,
  85. twoCheck: false,
  86. clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId, // *1 主环境-601环境 2 soll-索尔环境 3 tg-碳谷环境
  87. }
  88. },
  89. created() {
  90. },
  91. methods: {
  92. handOneCheck() {
  93. if (this.oneCheck) {
  94. this.oneCheck = false
  95. this.objData.packingReportList.forEach(e => {
  96. e.isChecked = false
  97. })
  98. } else {
  99. this.oneCheck = true
  100. this.objData.packingReportList.forEach(e => {
  101. e.isChecked = true
  102. })
  103. }
  104. this.$forceUpdate()
  105. },
  106. handleCheck(idx, it) {
  107. this.$set(this.objData.packingReportList[idx], 'isChecked', !it.isChecked)
  108. this.$forceUpdate()
  109. },
  110. handTwoCheck() {
  111. if (this.twoCheck) {
  112. this.twoCheck = false
  113. this.objData.packingReportMarginList.forEach(e => {
  114. e.isChecked = false
  115. })
  116. } else {
  117. this.twoCheck = true
  118. this.objData.packingReportMarginList.forEach(e => {
  119. e.isChecked = true
  120. })
  121. }
  122. this.$forceUpdate()
  123. },
  124. handleCheckTwo(idx, it) {
  125. this.$set(this.objData.packingReportMarginList[idx], 'isChecked', !it.isChecked)
  126. this.$forceUpdate()
  127. },
  128. scrolltolower() {
  129. },
  130. },
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .title_box {
  135. margin-top: 20rpx;
  136. .name {
  137. font-size: 28rpx;
  138. font-style: normal;
  139. font-weight: 400;
  140. color: $theme-color;
  141. padding-left: 20rpx;
  142. position: relative;
  143. &:before {
  144. position: absolute;
  145. content: '';
  146. left: 0rpx;
  147. top: 0rpx;
  148. bottom: 0rpx;
  149. width: 4rpx;
  150. height: 28rpx;
  151. background: $theme-color;
  152. margin: auto;
  153. }
  154. }
  155. }
  156. .material {
  157. margin-top: 10rpx;
  158. }
  159. .content_table2 {
  160. width: 100%;
  161. margin-top: 16rpx;
  162. .row {
  163. width: 100%;
  164. .item {
  165. color: #404446;
  166. font-size: 28rpx;
  167. padding-left: 12rpx;
  168. }
  169. .color157 {
  170. color: $theme-color;
  171. }
  172. .ww30 {
  173. width: 30%;
  174. }
  175. .ww50 {
  176. width: 50%;
  177. }
  178. .ww90 {
  179. width: 90%;
  180. }
  181. .ww15 {
  182. width: 15%;
  183. }
  184. .ww10 {
  185. width: 10%;
  186. }
  187. .ww30 {
  188. width: 30%;
  189. }
  190. }
  191. .head {
  192. height: 64rpx;
  193. background: #F7F9FA;
  194. border-top: 2rpx solid #E3E5E5;
  195. border-left: 2rpx solid #E3E5E5;
  196. .item {
  197. height: 64rpx;
  198. line-height: 64rpx;
  199. border-right: 2rpx solid #E3E5E5;
  200. box-sizing: border-box;
  201. }
  202. .selectAll {
  203. color: $theme-color;
  204. font-size: 24rpx;
  205. }
  206. }
  207. .tr {
  208. border-top: 2rpx solid #E3E5E5;
  209. border-left: 2rpx solid #E3E5E5;
  210. .item {
  211. font-size: 24rpx;
  212. min-height: 64rpx;
  213. display: flex;
  214. align-items: center;
  215. border-right: 2rpx solid #E3E5E5;
  216. box-sizing: border-box;
  217. white-space: normal;
  218. word-break: break-all;
  219. }
  220. &:last-child {
  221. border-bottom: 2rpx solid #E3E5E5;
  222. }
  223. }
  224. }
  225. .content_num {
  226. display: flex;
  227. align-items: center;
  228. padding: 0 4rpx;
  229. /deep/ .uni-input-input {
  230. border: 2rpx solid #F0F8F2;
  231. background: #F0F8F2;
  232. color: $theme-color;
  233. }
  234. }
  235. .penalize {
  236. width: 86rpx;
  237. line-height: 60rpx;
  238. background: $theme-color;
  239. font-size: 24rpx;
  240. text-align: center;
  241. color: #fff;
  242. }
  243. .check {
  244. width: 30rpx;
  245. height: 30rpx;
  246. }
  247. .z_list {
  248. max-height: 300rpx;
  249. }
  250. </style>