matterPop.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <view>
  3. <u-popup :show="show" duration='300' :mode='mode' :closeOnClickOverlay='false'>
  4. <view class="content-box">
  5. <view class="list_box">
  6. <u-list @scrolltolower="scrolltolower">
  7. <checkbox-group v-for="(item, index) in list" :key="index"
  8. @change="e => selectVal(e, item, index)">
  9. <label class="listBox rx-bs">
  10. <view class="listBox-sel">
  11. <checkbox :value="item.code" color="#fff" :disabled="item.disabled"
  12. :checked="item.checked" />
  13. </view>
  14. <view class="listBox-con">
  15. <view class="listBox-top rx-bc">
  16. <view> {{ item.name }}</view>
  17. <view class="code">{{ item.code}}</view>
  18. </view>
  19. <view class="listBox-bottom rx">
  20. <view v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
  21. class="items">
  22. {{ itm.label }}:{{ item[itm.prop] }}
  23. </view>
  24. <view class="items">
  25. 可用库存:{{ item.availableCountBase }} {{item.unit}}
  26. </view>
  27. </view>
  28. </view>
  29. </label>
  30. </checkbox-group>
  31. </u-list>
  32. </view>
  33. <view class="operate_box rx-sc">
  34. <u-button size="small" class="u-reset-button" @click="handleClose">取消</u-button>
  35. <u-button size="small" class="u-reset-button" type="success" @click="save">确认 </u-button>
  36. </view>
  37. </view>
  38. </u-popup>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. tableHeader
  44. } from '../../common.js'
  45. export default {
  46. data() {
  47. return {
  48. show: true,
  49. mode: 'right',
  50. memoList: [],
  51. list: [{
  52. "id": "1753322665677725698",
  53. "createTime": "2024-02-02 15:41:13",
  54. "categoryId": "1740639160215891970",
  55. "name": "返工料",
  56. "rootCategoryLevelId": "1",
  57. "code": "W31000056388",
  58. "fixCode": "",
  59. "brand": "",
  60. "color": "",
  61. "weight": "",
  62. "purpose": "",
  63. "ownershipGroupId": "",
  64. "ownershipGroupName": "",
  65. "ownershipUserId": "",
  66. "repairGroupId": "",
  67. "repairUserId": "",
  68. "supplierId": "",
  69. "positionId": "",
  70. "roteId": "",
  71. "detailLocation": "",
  72. "imageUrl": "",
  73. "attUrl": "",
  74. "isIotEnable": 0,
  75. "iotId": "",
  76. "runStatus": "",
  77. "networkStatus": "",
  78. "extInfo": "",
  79. "extInfoSelf": "",
  80. "position": [{
  81. "id": "1753322666474643458",
  82. "substanceId": "1753322665677725698",
  83. "sourceBizNo": "W30000025534080013",
  84. "sourceType": 1,
  85. "sourceBatchNo": "080",
  86. "pathIds": "1745372293592903681,1745374089405132802,1745374089413521409,1745374089677762562",
  87. "pathName": "型材分公司-原料仓,1号库区,A,A-11",
  88. "minPositionId": "1745374089677762562",
  89. "detailPosition": "",
  90. "type": 2,
  91. "num": 1,
  92. "unit": "PCS",
  93. "minUnit": "桶",
  94. "deleted": 0,
  95. "createTime": "2024-02-02 15:41:13",
  96. "updateTime": "2024-02-02 15:41:13",
  97. "createUserId": "1683714098556100610",
  98. "updateUserId": "1683714098556100610"
  99. }],
  100. "category": {
  101. "id": "1740639160215891970",
  102. "createTime": "2024-01-01 23:41:29",
  103. "categoryLevelGroupId": "",
  104. "factoryCode": "",
  105. "price": "",
  106. "priceUnit": "",
  107. "categoryLevelGroupCode": "",
  108. "mrpControllerUser": "",
  109. "differenceCode": "",
  110. "mrpType": "",
  111. "categoryLevelGroupName": "",
  112. "categoryLevelId": "1738396672025526273",
  113. "categoryLevelName": "返工料",
  114. "name": "返工料",
  115. "code": "W30000025534",
  116. "categoryLevelPathIdParent": "",
  117. "categoryLevelPathId": "1,1738375428798509057,1738396672025526273",
  118. "categoryLevelPath": "物料-PR料-返工料",
  119. "measuringUnit": "PCS",
  120. "packingUnit": "箱",
  121. "brandNum": "YL10.2",
  122. "modelType": "YL10.2|BΦ16.0*100(MG)",
  123. "specification": "",
  124. "volume": "",
  125. "volumeUnit": "",
  126. "volumeUnitId": "",
  127. "roughWeight": 0,
  128. "netWeight": 50,
  129. "weightUnit": "KG",
  130. "weightUnitId": "",
  131. "isProduct": 0,
  132. "productCategoryLevelName": "",
  133. "deptId": "",
  134. "deptLeaderId": "",
  135. "iotProductKey": "",
  136. "remarkAttach": [],
  137. "remark": "",
  138. "description": "",
  139. "warrantyPeriod": "",
  140. "warrantyPeriodUnit": ""
  141. },
  142. "categoryDetail": "",
  143. "codeNumber": ""
  144. },
  145. {
  146. "id": "1747105301001793538",
  147. "createTime": "2024-01-16 11:55:38",
  148. "categoryId": "1739922471153106946",
  149. "name": "混合料",
  150. "rootCategoryLevelId": "1",
  151. "code": "S310000552732",
  152. "fixCode": "",
  153. "brand": "",
  154. "color": "",
  155. "weight": "",
  156. "purpose": "",
  157. "ownershipGroupId": "",
  158. "ownershipGroupName": "",
  159. "ownershipUserId": "",
  160. "repairGroupId": "",
  161. "repairUserId": "",
  162. "supplierId": "",
  163. "positionId": "",
  164. "roteId": "",
  165. "detailLocation": "",
  166. "imageUrl": "",
  167. "attUrl": "",
  168. "isIotEnable": 0,
  169. "iotId": "",
  170. "runStatus": "",
  171. "networkStatus": "",
  172. "extInfo": "",
  173. "extInfoSelf": "",
  174. "position": [{
  175. "id": "1747105301005987842",
  176. "substanceId": "1747105301001793538",
  177. "sourceBizNo": "IN202401160074",
  178. "sourceType": 2,
  179. "sourceBatchNo": "001",
  180. "pathIds": "test",
  181. "pathName": "test",
  182. "minPositionId": "-1",
  183. "detailPosition": "test",
  184. "type": 1,
  185. "num": 2,
  186. "unit": "KG",
  187. "minUnit": "KG",
  188. "deleted": 0,
  189. "createTime": "2024-01-16 11:55:38",
  190. "updateTime": "2024-01-16 11:55:38",
  191. "createUserId": "1683714098556100610",
  192. "updateUserId": "1683714098556100610"
  193. }],
  194. "category": {
  195. "id": "1739922471153106946",
  196. "createTime": "2023-12-29 00:13:37",
  197. "categoryLevelGroupId": "",
  198. "factoryCode": "10J0",
  199. "price": "",
  200. "priceUnit": "1",
  201. "categoryLevelGroupCode": "",
  202. "mrpControllerUser": "",
  203. "differenceCode": "",
  204. "mrpType": "",
  205. "categoryLevelGroupName": "",
  206. "categoryLevelId": "1738393436870770689",
  207. "categoryLevelName": "混合料",
  208. "name": "混合料",
  209. "code": "W31000055273",
  210. "categoryLevelPathIdParent": "",
  211. "categoryLevelPathId": "[1,1677145633090453506,1738393436870770689]",
  212. "categoryLevelPath": "物料,原料,混合料",
  213. "measuringUnit": "PCS",
  214. "packingUnit": "箱",
  215. "brandNum": "XU102",
  216. "modelType": "",
  217. "specification": "",
  218. "volume": "",
  219. "volumeUnit": "",
  220. "volumeUnitId": "",
  221. "roughWeight": 10,
  222. "netWeight": 10,
  223. "weightUnit": "KG",
  224. "weightUnitId": "",
  225. "isProduct": 0,
  226. "productCategoryLevelName": "",
  227. "deptId": "",
  228. "deptLeaderId": "",
  229. "iotProductKey": "",
  230. "remarkAttach": [],
  231. "remark": "XU102",
  232. "description": "",
  233. "warrantyPeriod": "",
  234. "warrantyPeriodUnit": ""
  235. },
  236. "categoryDetail": "",
  237. "codeNumber": ""
  238. },
  239. {
  240. "id": "1747105300896935938",
  241. "createTime": "2024-01-16 11:55:38",
  242. "categoryId": "1739922471153106946",
  243. "name": "混合料",
  244. "rootCategoryLevelId": "1",
  245. "code": "S310000552731",
  246. "fixCode": "",
  247. "brand": "",
  248. "color": "",
  249. "weight": "",
  250. "purpose": "",
  251. "ownershipGroupId": "",
  252. "ownershipGroupName": "",
  253. "ownershipUserId": "",
  254. "repairGroupId": "",
  255. "repairUserId": "",
  256. "supplierId": "",
  257. "positionId": "",
  258. "roteId": "",
  259. "detailLocation": "",
  260. "imageUrl": "",
  261. "attUrl": "",
  262. "isIotEnable": 0,
  263. "iotId": "",
  264. "runStatus": "",
  265. "networkStatus": "",
  266. "extInfo": "",
  267. "extInfoSelf": "",
  268. "position": [{
  269. "id": "1747105300993404930",
  270. "substanceId": "1747105300896935938",
  271. "sourceBizNo": "IN202401160074",
  272. "sourceType": 2,
  273. "sourceBatchNo": "001",
  274. "pathIds": "test",
  275. "pathName": "test",
  276. "minPositionId": "-1",
  277. "detailPosition": "test",
  278. "type": 1,
  279. "num": 2,
  280. "unit": "KG",
  281. "minUnit": "KG",
  282. "deleted": 0,
  283. "createTime": "2024-01-16 11:55:38",
  284. "updateTime": "2024-01-16 11:55:38",
  285. "createUserId": "1683714098556100610",
  286. "updateUserId": "1683714098556100610"
  287. }],
  288. "category": {
  289. "id": "1739922471153106946",
  290. "createTime": "2023-12-29 00:13:37",
  291. "categoryLevelGroupId": "",
  292. "factoryCode": "10J0",
  293. "price": "",
  294. "priceUnit": "1",
  295. "categoryLevelGroupCode": "",
  296. "mrpControllerUser": "",
  297. "differenceCode": "",
  298. "mrpType": "",
  299. "categoryLevelGroupName": "",
  300. "categoryLevelId": "1738393436870770689",
  301. "categoryLevelName": "混合料",
  302. "name": "混合料",
  303. "code": "W31000055273",
  304. "categoryLevelPathIdParent": "",
  305. "categoryLevelPathId": "[1,1677145633090453506,1738393436870770689]",
  306. "categoryLevelPath": "物料,原料,混合料",
  307. "measuringUnit": "PCS",
  308. "packingUnit": "箱",
  309. "brandNum": "XU102",
  310. "modelType": "",
  311. "specification": "",
  312. "volume": "",
  313. "volumeUnit": "",
  314. "volumeUnitId": "",
  315. "roughWeight": 10,
  316. "netWeight": 10,
  317. "weightUnit": "KG",
  318. "weightUnitId": "",
  319. "isProduct": 0,
  320. "productCategoryLevelName": "",
  321. "deptId": "",
  322. "deptLeaderId": "",
  323. "iotProductKey": "",
  324. "remarkAttach": [],
  325. "remark": "XU102",
  326. "description": "",
  327. "warrantyPeriod": "",
  328. "warrantyPeriodUnit": ""
  329. },
  330. "categoryDetail": "",
  331. "codeNumber": ""
  332. }
  333. ]
  334. }
  335. },
  336. methods: {
  337. scrolltolower() {},
  338. save() {
  339. },
  340. //勾选
  341. selectVal(e, val, index) {
  342. this.list[index].checked = !this.list[index].checked
  343. const idx = this.memoList.findIndex(
  344. item => item.id === this.list[index].id
  345. )
  346. if (this.list[index].checked) {
  347. if (idx === -1) {
  348. this.memoList.push(this.list[index])
  349. }
  350. } else {
  351. if (idx > -1) {
  352. this.memoList.splice(idx, 1)
  353. }
  354. }
  355. },
  356. tableH(type) {
  357. return tableHeader(type)
  358. },
  359. handleClose() {
  360. this.$emit('close')
  361. },
  362. }
  363. }
  364. </script>
  365. <style lang="scss" scoped>
  366. .content-box {
  367. width: 80vw;
  368. height: 100vh;
  369. overflow: hidden;
  370. display: flex;
  371. flex-direction: column;
  372. background-color: $page-bg;
  373. }
  374. .list_box {
  375. flex: 1;
  376. overflow: hidden;
  377. padding: 4rpx 0;
  378. .u-list {
  379. height: 100% !important;
  380. }
  381. }
  382. .listBox {
  383. margin-top: 8rpx;
  384. padding: 8rpx 24rpx;
  385. background: #fff;
  386. /deep/ .uni-checkbox-input-checked {
  387. background-color: $theme-color !important;
  388. border-color: $theme-color !important;
  389. }
  390. .listBox-con {
  391. width: 650rpx;
  392. font-weight: 400;
  393. }
  394. .listBox-top {
  395. margin-top: 6rpx;
  396. color: #090A0A;
  397. font-size: 28rpx;
  398. font-style: normal;
  399. }
  400. .listBox-bottom {
  401. color: #090A0A;
  402. font-size: 24rpx;
  403. font-style: normal;
  404. flex-wrap: wrap;
  405. .items {
  406. width: 50%;
  407. margin-top: 8rpx;
  408. }
  409. }
  410. }
  411. .operate_box {
  412. background-color: #fff;
  413. padding: 10rpx 100rpx;
  414. /deep/ .u-button {
  415. width: 160rpx;
  416. }
  417. }
  418. </style>