detail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <template>
  2. <div>
  3. <div style="background-image: url('../../../assets/images/bc.png');background-size: 100% 100%;">
  4. <div class="home_header">扫描</div>
  5. <div class="home_header_line"></div>
  6. <div class="home_con_body">
  7. <div class="home_con_s">
  8. <div v-if="is_show" class="pack_up">
  9. <img @click="handleShow" src="../../../assets/home/collect.png" alt="">
  10. </div>
  11. <div v-if="!is_show" :class="!is_show ? 'pack_up_d' : ''" class="pack_up" style="display: flex;gap: .3125rem;">
  12. <div style="font-size: 0.88rem;
  13. color: #ABDFFF;">展开</div>
  14. <img @click="handleShow" style="width: 0.41rem;height: 0.69rem;" src="../../../assets/home/zk.png" alt="">
  15. </div>
  16. <div v-if="is_show" class="pack_up_con">
  17. <p class="pack_up_name">王晓伟</p>
  18. <div class="pack_up_grid">
  19. <div>
  20. <p>人员工时</p>
  21. <div><span>1245</span><span>小时</span></div>
  22. </div>
  23. <div>
  24. <p>人员工数</p>
  25. <div><span>1245</span><span>件</span></div>
  26. </div>
  27. <div>
  28. <p>工作效率</p>
  29. <div><span>1245</span><span>件/小时</span></div>
  30. </div>
  31. <div>
  32. <p>包装件数</p>
  33. <div><span>1245</span><span>件</span></div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="send_work" v-if="tableData.length > 0" v-for="(item, index) in tableData" :key="index">
  39. <div class="check_box">
  40. <div @click="handleChoose(item, index)" :class="item.is_choose ? 'check_box_c_active' : 'check_box_c'">
  41. </div>
  42. </div>
  43. <div class="secd_flex">
  44. <div class="secd_title">
  45. <span>派工单号:</span><span> {{ item.dispatch_no }}</span>
  46. </div>
  47. <span class="secd_title_d">{{ item.product_title }}</span>
  48. <div class="secd_g"><span>规格型号:</span><span>{{ item.size }}</span></div>
  49. <div class="secd_flex_w">
  50. <div class="secd_flex_s">
  51. <span>已完工数:</span>
  52. <span>{{ item.finished_num }}件</span>
  53. </div>
  54. <div class="secd_flex_s">
  55. <span>未完工数:</span>
  56. <span>{{ item.not_finished_num }}件</span>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div v-if="tableData.length == 0"
  62. style="display: flex;width: 100%;height: 10rem;justify-content: center;align-items: center;">
  63. <Spin size="small" />
  64. <Spin />
  65. <Spin size="small" />
  66. </div>
  67. <div class="footer">
  68. <div class="return_btn" @click="handleReturn">返回</div>
  69. <div class="confirm_btn" @click="handelGoSure">确认</div>
  70. </div>
  71. </div>
  72. </div>
  73. <!-- -------------------------- -->
  74. <!-- <div class="bdy">
  75. <table>
  76. <tr style="height: 2rem">
  77. <th style="width: 3rem">派工单号</th>
  78. <th style="width: 4rem">产品名称</th>
  79. <th style="width: 3rem">规格型号</th>
  80. <th style="width: 3rem">已完工数量</th>
  81. <th style="width: 3rem">未完工数量</th>
  82. </tr>
  83. <tr v-for="(item, index) in tableData" :key="index" @click="handleChoose(item, index)"
  84. :class="item.is_choose ? 'choose_item' : ''">
  85. <td>
  86. {{ item.dispatch_no }}
  87. </td>
  88. <td>{{ item.product_title }}</td>
  89. <td>{{ item.size }}</td>
  90. <td>{{ item.finished_num }}</td>
  91. <td>{{ item.not_finished_num }}</td>
  92. </tr>
  93. </table>
  94. </div> -->
  95. </div>
  96. </template>
  97. <script>
  98. export default {
  99. data() {
  100. return {
  101. tableData: [],
  102. is_show: true,
  103. is_use: false,
  104. spinShow: false
  105. }
  106. },
  107. created () {
  108. },
  109. mounted () {
  110. this.handleShow()
  111. let text = []
  112. if (localStorage.getItem('fyy_target')) {
  113. let target = JSON.parse(localStorage.getItem('fyy_target'))
  114. localStorage.removeItem('fyy_target')
  115. target.forEach(v => {
  116. v = v.replace(/\"/g, '')
  117. text.push(this.func.hexToString(v))
  118. })
  119. }
  120. this.tableData = []
  121. // const fyyTarget = ('PG2023081000025,PG2023081000024').split(',')
  122. text = ['PG2023082800039']
  123. text.forEach(v => {
  124. const data = {
  125. url: 'http://121.36.142.167:7774/jbl/api/module-data/dispatch_orders/page',
  126. post: { "direction": "DESC", "property": "id", "fromClientType": "pc", "number": 0, "sorts": [], "rules": [{ "field": "dispatch_orders.dispatch_no", "option": "LIKE_ANYWHERE", "values": [v] }], "size": 15, "specialConditions": [], "workflowSearchBean": {}, "dynamicFormCode": "dispatch_orders", "dynamicFormTable": null, "ignoreField": true, "developmentSystemId": null, "debugFlag": true }
  127. }
  128. this.initData(data)
  129. })
  130. },
  131. methods: {
  132. initData(row) {
  133. this.axios.post('/api/testdwy', { ...row }).then(res => {
  134. res.data.content.forEach(v => {
  135. v.is_choose = false
  136. v.dispatch_no = v.dispatch_orders.dispatch_no
  137. v.not_finished_num = v.dispatch_num - v.finished_num
  138. })
  139. this.tableData.push(...res.data.content)
  140. })
  141. },
  142. handelGoSure() {
  143. if (this.tableData.filter(v => v.is_choose).length === 0) {
  144. return this.$Message.warning('请先选择数据!')
  145. }
  146. localStorage.removeItem('fyy_target')
  147. const dataId = Math.floor(Math.random() * 100)
  148. const text = JSON.stringify(this.tableData.filter(v => v.is_choose))
  149. localStorage.setItem(dataId + '', text)
  150. this.$router.push({ path: '/cms/finish/detailed', query: { id: dataId } })
  151. },
  152. handleReturn() {
  153. localStorage.removeItem('fyy_target')
  154. this.$router.push('/cms/home')
  155. },
  156. handleChoose(item, index) {
  157. item.is_choose = !item.is_choose
  158. // this.tableData.splice(index, 1, item)
  159. },
  160. handleShow() {
  161. this.is_show = !this.is_show
  162. }
  163. }
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .return_btn {
  168. background-image: url('../../../assets/home/return.png');
  169. background-size: 100% 100%;
  170. }
  171. .confirm_btn {
  172. background-image: url('../../../assets/home/confirm.png');
  173. background-size: 100% 100%;
  174. }
  175. .return_btn,
  176. .confirm_btn {
  177. width: 10.97rem;
  178. height: 3.93rem;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. color: #fff;
  183. font-size: 1.06rem;
  184. font-weight: 500;
  185. letter-spacing: 1px;
  186. }
  187. .secd_flex_s>span:nth-child(1) {
  188. font-size: 0.94rem;
  189. color: #ABDFFF;
  190. }
  191. .secd_flex_s>span:nth-child(2) {
  192. font-size: 0.94rem;
  193. color: #03FCD3;
  194. }
  195. .secd_g {
  196. font-size: 1rem;
  197. color: #ABDFFF
  198. }
  199. .secd_title_d {
  200. font-size: 1.13rem;
  201. color: #FFFFFF;
  202. text-shadow: 0px 0px 0px rgba(255, 255, 255, 0.5);
  203. white-space: nowrap;
  204. overflow: hidden;
  205. text-overflow: ellipsis;
  206. }
  207. .secd_flex_w {
  208. display: flex;
  209. justify-content: space-between;
  210. padding-right: 1.6rem;
  211. box-sizing: border-box;
  212. }
  213. .secd_flex {
  214. display: flex;
  215. flex-direction: column;
  216. gap: .375rem;
  217. .secd_title {
  218. font-size: 0.88rem;
  219. color: #ABDFFF;
  220. opacity: 0.5;
  221. }
  222. }
  223. .check_box_c {
  224. width: 1.19rem;
  225. height: 100%;
  226. background-image: url('../../../assets/home/check.png');
  227. background-size: 100% 100%;
  228. }
  229. .check_box_c_active {
  230. width: 1.3rem;
  231. height: 100%;
  232. background-image: url('../../../assets/home/checked.png');
  233. background-size: 100% 100%;
  234. }
  235. .send_work {
  236. height: 9.69rem;
  237. background-image: url('../../../assets/home/packUpback.png');
  238. background-size: 100% 100%;
  239. margin-top: 1.38rem;
  240. padding: 0.44rem 0.4rem 1.34rem 1.22rem;
  241. box-sizing: border-box;
  242. .check_box {
  243. height: 1.19rem;
  244. display: flex;
  245. justify-content: right;
  246. }
  247. }
  248. .com_top {
  249. margin-top: 1.72rem !important;
  250. }
  251. .completion_con {
  252. height: 5.19rem;
  253. background-image: url('../../../assets/home/completion.png');
  254. background-size: 100% 100%;
  255. margin-top: 0.72rem;
  256. padding: 1rem 1.28rem;
  257. box-sizing: border-box;
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-between;
  261. }
  262. .home_con_s {
  263. position: relative;
  264. .pack_up {
  265. position: absolute;
  266. top: 0;
  267. left: 50%;
  268. transform: translateX(-50%);
  269. width: 5.56rem;
  270. background-image: url('../../../assets/home/packUp.png');
  271. background-size: 100% 100%;
  272. height: 1.97rem;
  273. display: flex;
  274. align-items: center;
  275. justify-content: center;
  276. img {
  277. width: 2.59rem;
  278. height: 0.88rem;
  279. }
  280. }
  281. .pack_up_d {
  282. top: -1.1rem;
  283. }
  284. .pack_up_con {
  285. height: 14.09rem;
  286. background-image: url('../../../assets/home/packUpback.png');
  287. background-size: 100% 100%;
  288. padding: 1.78rem 2.03rem;
  289. box-sizing: border-box;
  290. .pack_up_name {
  291. height: 1.25rem;
  292. font-size: 1.25rem;
  293. color: #fff;
  294. font-weight: 600;
  295. }
  296. .pack_up_grid {
  297. display: grid;
  298. grid-template-columns: repeat(2, 1fr);
  299. row-gap: .625rem;
  300. &>div {
  301. display: flex;
  302. flex-direction: column;
  303. row-gap: .625rem;
  304. &>div {
  305. display: flex;
  306. gap: .125rem;
  307. span:nth-child(1) {
  308. font-size: 1.63rem;
  309. font-family: DIN-BoldItalic, DIN;
  310. font-weight: 600;
  311. color: #04FFD5;
  312. line-height: 1.31rem;
  313. transform: skewX(-10deg);
  314. text-shadow: 0px 0px 0px rgba(4, 255, 213, 0.23);
  315. }
  316. span:nth-child(2) {
  317. font-size: 1rem;
  318. font-family: PingFangSC-Regular, PingFang SC;
  319. font-weight: 400;
  320. color: #ABDFFF;
  321. }
  322. }
  323. &>p:nth-child(1) {
  324. font-size: 1rem;
  325. font-family: PingFangSC-Regular, PingFang SC;
  326. font-weight: 400;
  327. color: #ABDFFF;
  328. margin-bottom: 0px;
  329. }
  330. }
  331. }
  332. }
  333. }
  334. .home_con_body {
  335. width: 100%;
  336. padding: 1rem;
  337. box-sizing: border-box;
  338. }
  339. .home_header {
  340. height: 3.125rem;
  341. display: flex;
  342. align-items: center;
  343. justify-content: center;
  344. color: #fff;
  345. font-size: 1.125rem;
  346. font-weight: 600;
  347. }
  348. .home_header_line {
  349. width: 100%;
  350. height: .0625rem;
  351. background-color: #fff;
  352. opacity: 0.2;
  353. }
  354. .header {
  355. width: 94%;
  356. height: 7rem;
  357. // overflow: hidden;
  358. // transition: all 0.4s;
  359. position: relative;
  360. top: 0.5rem;
  361. left: 3%;
  362. box-shadow: 0.16rem 0.1rem 0.1rem 0.1rem #9d9b9b;
  363. border-radius: 1rem;
  364. padding: 0.4rem 0.7rem 0 1rem;
  365. background: #fff;
  366. }
  367. .header_btn {
  368. border-radius: 1rem;
  369. padding: 0.1rem;
  370. width: 5rem;
  371. display: flex;
  372. justify-content: space-around;
  373. align-items: center;
  374. }
  375. .header_top {
  376. display: flex;
  377. justify-content: space-between;
  378. align-items: center;
  379. }
  380. .ot {
  381. position: relative;
  382. top: -1.3rem;
  383. }
  384. .header_middle1 {
  385. display: flex;
  386. justify-content: space-between;
  387. align-items: center;
  388. .ft {
  389. font-size: 1.5rem;
  390. width: 5rem;
  391. text-align: center;
  392. }
  393. }
  394. .header_middle {
  395. position: relative;
  396. top: -0.3rem;
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. }
  401. /deep/ .btn-group>.btn,
  402. .btn-group-vertical>.btn {
  403. background: #ffffff;
  404. color: #2c3e50;
  405. outline: none;
  406. border: none;
  407. margin: 0;
  408. z-index: 3;
  409. }
  410. .header_footer {
  411. position: absolute;
  412. top: -1.7rem;
  413. display: flex;
  414. justify-content: space-between;
  415. align-items: center;
  416. div {
  417. font-size: 0.5rem;
  418. color: rgb(244, 136, 42);
  419. }
  420. }
  421. .bdy {
  422. width: 94%;
  423. height: calc(100% - 18.7rem);
  424. overflow: auto;
  425. position: relative;
  426. top: 1rem;
  427. left: 3%;
  428. }
  429. /deep/td {
  430. text-align: center;
  431. vertical-align: middle;
  432. }
  433. table {
  434. border-collapse: collapse;
  435. /* 合并边框 */
  436. width: 100%;
  437. /* 表格宽度 */
  438. background: #fff;
  439. table-layout: fixed;
  440. }
  441. th {
  442. font-size: 0.6rem;
  443. background: #66b1f4;
  444. color: #fff;
  445. }
  446. td {
  447. font-size: 0.6rem;
  448. word-break: break-all;
  449. }
  450. td,
  451. th {
  452. vertical-align: middle;
  453. text-align: center;
  454. border: 0.1rem solid #dddddd;
  455. /* 单元格边框样式 */
  456. padding: 0.02rem;
  457. /* 单元格内边距 */
  458. }
  459. .choose_item {
  460. background: #c8c8c8;
  461. }
  462. .footer {
  463. display: flex;
  464. justify-content: space-around;
  465. position: absolute;
  466. width: 100%;
  467. padding: 0 .55rem;
  468. box-sizing: border-box;
  469. left: 0;
  470. bottom: 4.8rem;
  471. }
  472. </style>