matterPop.vue 11 KB

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