ChipPrintScreen.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501
  1. <template>
  2. <Modal v-model="fullscreenModal" fullscreen title="工位屏">
  3. <div slot="header">
  4. <span style="font-size: 0.5rem">工位屏</span>
  5. <div class="fullscreen-title-btn">
  6. <Button
  7. @click="handleFullScreenClick"
  8. size="large"
  9. id="full_screen_btn"
  10. type="primary"
  11. style="margin-right: 1rem"
  12. >
  13. {{ isFullScreen ? "退 出" : "全 屏" }}
  14. </Button>
  15. <Button
  16. @click="handlePrint"
  17. size="large"
  18. type="primary"
  19. style="margin-right: 1rem"
  20. >
  21. 打 印
  22. </Button>
  23. <Button
  24. @click="handleOk"
  25. size="large"
  26. type="primary"
  27. style="margin-right: 1rem"
  28. >
  29. 完 成
  30. </Button>
  31. <Button @click="goCheckPage" size="large" type="primary">
  32. 补 打
  33. </Button>
  34. </div>
  35. </div>
  36. <div class="fullscreen-content">
  37. <div class="fullscreen-content-select">
  38. <div class="fullscreen-content-select-block">
  39. <Button
  40. @click="handleSelection(ordernoObj, 1)"
  41. size="large"
  42. type="primary"
  43. style="margin-right: 10px"
  44. >
  45. 项目选择
  46. </Button>
  47. <div class="icon-wrapper" v-show="selectedInfo.order_no">
  48. <Icon
  49. class="icon-close"
  50. @click="handleCancelSelected('order_no')"
  51. size="24"
  52. type="md-close"
  53. />
  54. <div>
  55. <span>订单编号:</span>
  56. <span>{{ selectedInfo.order_no }}</span>
  57. </div>
  58. <div>
  59. <span>项目名称:</span>
  60. <span>{{ selectedInfo.residential_name }}</span>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="fullscreen-content-select-block">
  65. <Button
  66. @click="handleSelection(urlObj, 2)"
  67. size="large"
  68. type="primary"
  69. style="margin-right: 10px"
  70. >
  71. 图号选择
  72. </Button>
  73. <div style="display: flex; align-items: center">
  74. <div class="icon-wrapper">
  75. <div v-show="selectedInfo.url_number">
  76. <Icon
  77. class="icon-close"
  78. @click="handleCancelSelected('product_id')"
  79. size="24"
  80. type="md-close"
  81. />
  82. <span>图号:</span>
  83. <span>{{ selectedInfo.url_number }}</span>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="fullscreen-content-select-block">
  89. <Button
  90. @click="handleSelectionRowno(rownoObj)"
  91. size="large"
  92. type="primary"
  93. style="margin-right: 10px"
  94. >
  95. 行号选择
  96. </Button>
  97. <div
  98. class="icon-wrapper"
  99. v-show="selectedInfo.rows.length != 0"
  100. style="display: flex; align-items: center"
  101. >
  102. <span>行号:</span>
  103. <div style="display: flex; justify-content: flex-start">
  104. <div v-for="(item, index) in selectedInfo.rows" :key="item.key">
  105. <div class="icon-wrapper" style="margin-right: 0.35rem">
  106. <Icon
  107. class="icon-close"
  108. @click="handleCancelSelected(index, 1)"
  109. size="24"
  110. type="md-close"
  111. />
  112. <span style="display: inline-block"
  113. >{{ item.start }}-{{ item.end }}</span
  114. >
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="fullscreen-content-choose">
  122. <div
  123. :class="[
  124. choose.isChoosed
  125. ? 'fullscreen-content-choose-block fullscreen-content-choose-block-choosen'
  126. : 'fullscreen-content-choose-block fullscreen-content-choose-block-unchoosen',
  127. ]"
  128. v-for="choose in contentData"
  129. :key="choose.row"
  130. @click="handleChooseBlockClick(choose)"
  131. >
  132. <div class="chip-tag" v-show="choose.type == 1">
  133. 芯片
  134. <Icon
  135. size="20px"
  136. style="font-size: 1rem; transform: translate(-12%, -40%)"
  137. :color="choose.isChoosed ? '#2d8cf0' : 'white'"
  138. type="md-arrow-dropup"
  139. />
  140. </div>
  141. <div>
  142. <span>行号</span>
  143. <span>{{ choose.row_no }}</span>
  144. </div>
  145. <div>
  146. <span>部件</span>
  147. <span>{{ choose.part_title }}</span>
  148. </div>
  149. <div>
  150. <span>材料</span>
  151. <span>{{ choose.sub_part_title }}</span>
  152. </div>
  153. <div>
  154. <span>毛料尺寸</span>
  155. <span>{{ choose.wool_size }}</span>
  156. </div>
  157. <div>
  158. <span>精裁尺寸</span>
  159. <span>{{ choose.cut_size }}</span>
  160. </div>
  161. <div>
  162. <span>未完成数量</span>
  163. <span>
  164. {{ choose.un_complete }}(总数:{{
  165. choose.on_complete + choose.un_complete
  166. }})
  167. </span>
  168. </div>
  169. <div>
  170. <span>未打印数量</span>
  171. <span
  172. >{{ choose.un_print }}(总数:{{
  173. choose.on_print + choose.un_print
  174. }})</span
  175. >
  176. </div>
  177. </div>
  178. </div>
  179. <div class="fullscreen-content-page">
  180. <Page @on-change="changePage" :current="page_index" :total="total" />
  181. </div>
  182. </div>
  183. <div slot="footer"></div>
  184. <Modal
  185. class="selection-modal"
  186. v-model="selectionModal"
  187. :title="currencySelectedObj.title"
  188. width="80%"
  189. >
  190. <van-number-keyboard
  191. :show="show"
  192. @blur="show = false"
  193. @input="onInput"
  194. @delete="onDelete"
  195. z-index="99999"
  196. />
  197. <div class="selection-modal-top">
  198. <Input
  199. :placeholder="currencySelectedObj.title"
  200. v-model="currentSearchValue"
  201. @on-focus="show = true"
  202. @on-change="
  203. handleCurrentSearch(currencySelectedObj, currentSearchValue)
  204. "
  205. style="width: 80%"
  206. >
  207. <Icon
  208. @click="
  209. handleCurrentSearch(currencySelectedObj, currentSearchValue)
  210. "
  211. type="ios-search"
  212. slot="suffix"
  213. />
  214. </Input>
  215. </div>
  216. <div class="selection-modal-body">
  217. <div
  218. :class="[
  219. block.isCurrent
  220. ? 'selection-modal-body-block selection-modal-body-block-choosen'
  221. : 'selection-modal-body-block selection-modal-body-block-unchoosen',
  222. ]"
  223. v-for="(block, index) in currencySelectedObj.list"
  224. :key="index"
  225. @click="handleSelectionClick(currencySelectedObj, block)"
  226. >
  227. <div v-show="currencySelectedObj.type == 1">
  228. <span>订单编号:</span>
  229. <span>{{ block.order_no }}</span>
  230. </div>
  231. <div v-show="currencySelectedObj.type == 2">
  232. <span>{{ block.title }}</span>
  233. </div>
  234. <div v-show="currencySelectedObj.type == 1">
  235. <span>项目名称:</span>
  236. <span>{{ block.residential_name }}</span>
  237. </div>
  238. </div>
  239. <div
  240. style="font-size: 1rem"
  241. v-show="currencySelectedObj.list.length == 0"
  242. >
  243. 暂无数据
  244. </div>
  245. </div>
  246. <div class="fullscreen-content-page">
  247. <Page
  248. @on-change="changeModalPage"
  249. :current="
  250. currencySelectedObj.type == 1
  251. ? modal_1_page_index
  252. : modal_2_page_index
  253. "
  254. :page-size="
  255. currencySelectedObj.type == 1
  256. ? modal_1_page_size
  257. : modal_2_page_size
  258. "
  259. :total="currencySelectedObj.type == 1 ? modal_1_total : modal_2_total"
  260. />
  261. </div>
  262. <div slot="footer">
  263. <Button
  264. @click="selectionModal = false"
  265. type="primary"
  266. style="margin-right: 10px"
  267. >
  268. 返回
  269. </Button>
  270. <!-- <Button
  271. v-show="currencySelectedObj.type == 1"
  272. @click="handleSelectionComfirm(currencySelectedObj)"
  273. type="primary"
  274. >
  275. 确认
  276. </Button> -->
  277. </div>
  278. </Modal>
  279. <Modal
  280. class="selection-modal"
  281. v-model="selectionDetailModal"
  282. :title="currencySelectedObj.title"
  283. width="80%"
  284. >
  285. <div class="selection-modal-body" v-if="currencySelectedObj.hasChild">
  286. <div
  287. :class="[
  288. block.isCurrent
  289. ? 'selection-modal-body-block-detail selection-modal-body-block-detail-choosen'
  290. : 'selection-modal-body-block-detail selection-modal-body-block-detail-unchoosen',
  291. ]"
  292. v-for="(block, index) in chooseDetailUrlNo.children"
  293. :key="index"
  294. @click="handleSelectionDetailClick(chooseDetailUrlNo, block)"
  295. >
  296. <div>
  297. <span>{{ block.url_number }}</span>
  298. </div>
  299. </div>
  300. </div>
  301. <div slot="footer">
  302. <Button
  303. @click="
  304. selectionDetailModal = false;
  305. selectionModal = true;
  306. "
  307. type="primary"
  308. style="margin-right: 10px"
  309. >
  310. 返回
  311. </Button>
  312. <!-- <Button
  313. @click="handleSelectionComfirm(currencySelectedObj)"
  314. type="primary"
  315. >
  316. 确认
  317. </Button> -->
  318. </div>
  319. </Modal>
  320. <Modal
  321. class="selection-rowno-modal"
  322. v-model="selectionRownolModal"
  323. title="行号选择"
  324. width="80%"
  325. >
  326. <div class="selection-rowno-modal-body">
  327. <van-number-keyboard
  328. :show="show2"
  329. @blur="show2 = false"
  330. @input="keyboardTap"
  331. @delete="keyboardDele"
  332. z-index="99999"
  333. />
  334. <div
  335. class="selection-rowno-modal-body-block"
  336. v-for="(block, index) in chooseLineNo"
  337. :key="index"
  338. >
  339. <span>行号区间:</span>
  340. <Input
  341. v-model="block.start"
  342. @on-focus="handleRowNoInput(block, 1)"
  343. clearable
  344. style="width: 20%; margin: 0 10px"
  345. size="large"
  346. />
  347. -
  348. <Input
  349. v-model="block.end"
  350. @on-focus="handleRowNoInput(block, 2)"
  351. clearable
  352. style="width: 20%; margin: 0 10px"
  353. size="large"
  354. />
  355. <Button
  356. @click="handleAddRow(block, index)"
  357. type="primary"
  358. size="large"
  359. v-show="index == 0"
  360. style="margin-right: 10px"
  361. >
  362. 添加
  363. </Button>
  364. <Button
  365. @click="handleDeleRow(block, index)"
  366. type="primary"
  367. size="large"
  368. v-show="index != 0"
  369. style="margin-right: 10px"
  370. >
  371. 删除
  372. </Button>
  373. </div>
  374. </div>
  375. <div slot="footer">
  376. <Button
  377. @click="selectionRownolModal = false"
  378. type="primary"
  379. style="margin-right: 10px"
  380. >
  381. 返回
  382. </Button>
  383. <Button @click="handleRowNoComfirm(chooseLineNo)" type="primary">
  384. 确认
  385. </Button>
  386. </div>
  387. </Modal>
  388. <Modal
  389. class="selection-print-modal"
  390. v-model="printModal"
  391. title="打印"
  392. width="60%"
  393. >
  394. <div class="selection-print-modal-body">
  395. <div class="selection-print-modal-body-top">
  396. <div>
  397. <span>行号:</span>
  398. <span>{{ selectedObj.row_no }}</span>
  399. </div>
  400. <div>
  401. <span>部件名称:</span>
  402. <span>{{ selectedObj.part_title }}</span>
  403. </div>
  404. <div>
  405. <span>数量:</span>
  406. <InputNumber
  407. :max="selectedObj.on_print + selectedObj.un_print"
  408. :min="0"
  409. size="large"
  410. @on-focus="handlePrintInput"
  411. v-model="selectedObj.print_num"
  412. ></InputNumber>
  413. <van-number-keyboard
  414. :show="show4"
  415. @blur="show4 = false"
  416. @input="keyboardPrintTap"
  417. @delete="keyboardPrintDele"
  418. z-index="99999"
  419. />
  420. </div>
  421. </div>
  422. <div class="selection-print-modal-body-info">
  423. {{
  424. selectedObj.isFinished
  425. ? "该部件芯片数量已全部打印,是否再次打印?请选择要打印的房间号:"
  426. : "请确认打印数量是否正确!"
  427. }}
  428. <div>
  429. <Button
  430. v-show="selectedObj.isFinished"
  431. @click="handleSelectionRoom"
  432. type="primary"
  433. >
  434. 选择房间号
  435. </Button>
  436. </div>
  437. </div>
  438. </div>
  439. <div slot="footer">
  440. <Button
  441. @click="printModal = false"
  442. type="primary"
  443. style="margin-right: 10px"
  444. >
  445. 返回
  446. </Button>
  447. <Button @click="handlePrintComfirm(selectedObj)" type="primary">
  448. 确认
  449. </Button>
  450. </div>
  451. </Modal>
  452. <Modal
  453. class="selection-print-modal"
  454. v-model="okModal"
  455. title="完成"
  456. width="60%"
  457. >
  458. <div class="selection-print-modal-body">
  459. <div class="selection-print-modal-body-top">
  460. <div>
  461. <span>行号:</span>
  462. <span>{{ selectedObj.row_no }}</span>
  463. </div>
  464. <div>
  465. <span>部件名称:</span>
  466. <span>{{ selectedObj.part_title }}</span>
  467. </div>
  468. <div>
  469. <span>数量:</span>
  470. <InputNumber
  471. :max="
  472. selectedObj.type == 1
  473. ? selectedObj.on_print - selectedObj.on_complete
  474. : selectedObj.un_complete
  475. "
  476. :min="0"
  477. size="large"
  478. @on-focus="handleOkInput"
  479. v-model="selectedObj.ok_num"
  480. ></InputNumber>
  481. <van-number-keyboard
  482. :show="show3"
  483. @blur="show3 = false"
  484. @input="keyboardOkTap"
  485. @delete="keyboardOkDele"
  486. z-index="99999"
  487. />
  488. </div>
  489. </div>
  490. <div class="selection-print-modal-body-info">
  491. 请确认完成数量是否正确?
  492. </div>
  493. </div>
  494. <div slot="footer">
  495. <Button
  496. @click="okModal = false"
  497. type="primary"
  498. style="margin-right: 10px"
  499. >
  500. 返回
  501. </Button>
  502. <Button @click="handleOkComfirm(selectedObj)" type="primary">
  503. 确认
  504. </Button>
  505. </div>
  506. </Modal>
  507. <Modal
  508. class="selection-modal"
  509. v-model="roomModal"
  510. title="选择房间号"
  511. width="80%"
  512. >
  513. <div class="selection-modal-body">
  514. <div
  515. :class="[
  516. block.isCurrent
  517. ? 'selection-modal-body-block selection-modal-body-block-choosen'
  518. : 'selection-modal-body-block selection-modal-body-block-unchoosen',
  519. ]"
  520. v-for="(block, index) in modalRoomList"
  521. :key="index"
  522. @click="handleSelectedRoomClick(modalRoomList, block)"
  523. >
  524. <div>
  525. <span>{{ block.house }}</span>
  526. </div>
  527. </div>
  528. </div>
  529. <div class="fullscreen-content-page">
  530. <Page
  531. @on-change="changeRoomPage"
  532. :current="modal_room_page_index"
  533. :page-size="modal_room_page_size"
  534. :total="modal_room_total"
  535. />
  536. </div>
  537. <div slot="footer">
  538. <Button
  539. @click="handleRoomCancel"
  540. type="primary"
  541. style="margin-right: 10px"
  542. >
  543. 返回
  544. </Button>
  545. <Button @click="handlePrintComfirm(selectedObj, 1)" type="primary">
  546. 确认
  547. </Button>
  548. </div>
  549. </Modal>
  550. </Modal>
  551. </template>
  552. <script>
  553. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  554. // 例如:import 《组件名称》 from '《组件路径》';
  555. import $ from "jquery";
  556. import "@vant/touch-emulator";
  557. export default {
  558. name: "",
  559. components: {},
  560. props: {},
  561. // import引入的组件需要注入到对象中才能使用
  562. data() {
  563. // 这里存放数据
  564. return {
  565. show: false,
  566. show2: false,
  567. show3: false,
  568. show4: false,
  569. isFullScreen: false,
  570. fullscreenModal: true,
  571. selectionModal: false,
  572. selectionRownolModal: false,
  573. selectionDetailModal: false,
  574. printModal: false,
  575. okModal: false,
  576. roomModal: false,
  577. contentData: [],
  578. selectedObj: {},
  579. ordernoObj: {
  580. title: "订单编号/项目名称选择",
  581. list: [],
  582. hasChild: false,
  583. },
  584. urlObj: {
  585. title: "图号选择",
  586. list: [],
  587. hasChild: true,
  588. },
  589. rownoObj: {},
  590. currencySelectedObj: {
  591. title: "订单编号/项目名称选择",
  592. type: 1,
  593. list: [],
  594. },
  595. selectedInfo: {
  596. order_no: "",
  597. residential_name: "",
  598. url_number: "",
  599. product_id: "",
  600. rows: [],
  601. },
  602. page_index: 1,
  603. page_size: 12,
  604. total: 0,
  605. currentSearchValue: "",
  606. modal_1_page_index: 1,
  607. modal_1_page_size: 6,
  608. modal_1_total: 0,
  609. modal_room_page_index: 1,
  610. modal_room_page_size: 9,
  611. modal_room_total: 0,
  612. modal_2_page_index: 1,
  613. modal_2_page_size: 60,
  614. modal_2_total: 0,
  615. chooseOrderNo: {},
  616. chooseUrlNo: {},
  617. chooseDetailUrlNo: {},
  618. chooseLineNo: [{ start: "", end: "" }],
  619. keyboardObj: {},
  620. keyboardVal: "",
  621. modalRoomList: [],
  622. modalRoomListSelected: [],
  623. };
  624. },
  625. // 生命周期 - 创建完成(可以访问当前this实例)
  626. created() {},
  627. beforeRouteEnter(to, from, next) {
  628. next((vm) => {
  629. if (from.path == "/cms/ChipPrintScreen/ChipPrintScreenCheck") {
  630. vm.selectedInfo = JSON.parse(localStorage.getItem("printInfo"));
  631. vm.getChipDetail();
  632. }
  633. });
  634. },
  635. // 生命周期 - 挂载完成(可以访问DOM元素)
  636. mounted() {},
  637. methods: {
  638. back() {
  639. this.$router.go(-1);
  640. },
  641. handleSelection(obj, type) {
  642. if (type == 2 && this.selectedInfo.order_no == "") {
  643. return this.$Message.warning("请先选择项目");
  644. }
  645. this.currentSearchValue = "";
  646. this.currencySelectedObj = obj;
  647. this.selectionModal = true;
  648. this.currencySelectedObj.type = type;
  649. if (this.currencySelectedObj.list.length == 0 || type == 2) {
  650. this.handleCurrentSearch(
  651. this.currencySelectedObj,
  652. this.currentSearchValue
  653. );
  654. }
  655. },
  656. handleSelectionRowno(row) {
  657. console.log(`row`, row);
  658. if (this.selectedInfo.rows.legth > 0) {
  659. this.chooseLineNo = JSON.parse(JSON.stringify(this.selectedInfo.rows));
  660. } else {
  661. this.chooseLineNo = [{ start: null, end: null }];
  662. }
  663. this.selectionRownolModal = true;
  664. },
  665. handleCancelSelected(v, type) {
  666. if (type) {
  667. this.selectedInfo.rows.splice(v, 1);
  668. } else if (v == "product_id") {
  669. this.selectedInfo.url_number = "";
  670. this.selectedInfo.product_id = "";
  671. } else {
  672. this.selectedInfo[v] = "";
  673. }
  674. if (v != "order_no") {
  675. this.getChipDetail();
  676. } else {
  677. this.selectedInfo.residential_name = "";
  678. this.selectedInfo.url_number = "";
  679. this.selectedInfo.product_id = "";
  680. this.selectedInfo.rows = [];
  681. this.contentData = [];
  682. this.total = 0;
  683. }
  684. },
  685. handleChooseBlockClick(row) {
  686. console.log(`row`, row);
  687. if (row.isChoosed) {
  688. row.isChoosed = false;
  689. } else {
  690. this.contentData.map((v) => {
  691. v.isChoosed = false;
  692. });
  693. row.isChoosed = true;
  694. }
  695. if (row.un_print == 0) {
  696. row.isFinished = true;
  697. }
  698. this.selectedObj = row;
  699. },
  700. goCheckPage() {
  701. localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
  702. this.$router.push({
  703. path: "/cms/ChipPrintScreen/ChipPrintScreenCheck",
  704. });
  705. },
  706. handleSelectionClick(row, obj) {
  707. row.list.map((v) => (v.isCurrent = false));
  708. obj.isCurrent = true;
  709. if (row.hasChild) {
  710. // 行号
  711. this.selectionModal = false;
  712. this.selectionDetailModal = true;
  713. this.chooseDetailUrlNo = obj;
  714. this.contentData = [];
  715. this.total = 0;
  716. } else {
  717. // 订单号
  718. this.chooseOrderNo = obj;
  719. }
  720. if (row.type == 1) {
  721. this.handleSelectionComfirm(this.currencySelectedObj);
  722. }
  723. this.$forceUpdate();
  724. },
  725. handleSelectedRoomClick(list, block) {
  726. if (block.isCurrent) {
  727. this.modalRoomListSelected = this.modalRoomListSelected.filter(
  728. (v) => v.id != block.id
  729. );
  730. block.isCurrent = !block.isCurrent;
  731. } else {
  732. if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
  733. block.isCurrent = !block.isCurrent;
  734. this.modalRoomListSelected = this.modalRoomListSelected.concat(
  735. this.modalRoomList.filter((v) => v.isCurrent)
  736. );
  737. } else {
  738. this.$Message.warning("与打印数量不符,请重新选择");
  739. }
  740. }
  741. this.modalRoomListSelected = Array.from(
  742. new Set([...this.modalRoomListSelected])
  743. );
  744. },
  745. handleAddRow(row, index) {
  746. this.chooseLineNo.push({
  747. start: "",
  748. end: "",
  749. });
  750. },
  751. handleDeleRow(row, index) {
  752. this.chooseLineNo.splice(index, 1);
  753. },
  754. handleSelectionDetailClick(row, obj) {
  755. row.children.map((v) => (v.isCurrent = false));
  756. obj.isCurrent = true;
  757. this.chooseUrlNo = obj;
  758. this.handleSelectionComfirm(this.currencySelectedObj);
  759. this.$forceUpdate();
  760. },
  761. handleFullScreenClick() {
  762. this.isFullScreen = !this.isFullScreen;
  763. if (this.isFullScreen) {
  764. this.enterFullScreen();
  765. } else {
  766. this.exitFullScreen();
  767. }
  768. },
  769. handleSelectionRoom() {
  770. this.getModalRoomList();
  771. this.roomModal = true;
  772. },
  773. enterFullScreen() {
  774. let el = document.documentElement;
  775. let rfs =
  776. el.requestFullScreen ||
  777. el.webkitRequestFullScreen ||
  778. el.mozRequestFullScreen ||
  779. el.msRequestFullscreen;
  780. if (rfs) {
  781. rfs.call(el);
  782. } else if (typeof window.ActiveXObject !== "undefined") {
  783. // for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
  784. let wscript = new ActiveXObject("WScript.Shell");
  785. if (wscript != null) {
  786. wscript.SendKeys("{F11}");
  787. }
  788. }
  789. },
  790. exitFullScreen() {
  791. let el = document;
  792. let cfs =
  793. el.cancelFullScreen ||
  794. el.mozCancelFullScreen ||
  795. el.msExitFullscreen ||
  796. el.webkitExitFullscreen ||
  797. el.exitFullscreen;
  798. if (cfs) {
  799. // typeof cfs != "undefined" && cfs
  800. cfs.call(el);
  801. } else if (typeof window.ActiveXObject !== "undefined") {
  802. // for IE,这里和fullScreen相同,模拟按下F11键退出全屏
  803. let wscript = new ActiveXObject("WScript.Shell");
  804. if (wscript != null) {
  805. wscript.SendKeys("{F11}");
  806. }
  807. }
  808. },
  809. handleCurrentSearch(row, val) {
  810. //type 1项目选择 2图号选择
  811. let url =
  812. row.type == 1
  813. ? "/api/station_get_order"
  814. : "/api/station_get_url_number";
  815. this.axios({
  816. method: "post",
  817. url,
  818. data: {
  819. page_index:
  820. row.type == 1 ? this.modal_1_page_index : this.modal_2_page_index,
  821. page_size:
  822. row.type == 1 ? this.modal_1_page_size : this.modal_2_page_size,
  823. order_no: row.type == 1 ? val : this.selectedInfo.order_no,
  824. url_number: row.type == 1 ? "" : val,
  825. },
  826. }).then((res) => {
  827. if (res.code == 200) {
  828. if (row.type == 1) {
  829. row.list = res.data.data;
  830. this.modal_1_total = res.data.total;
  831. } else {
  832. row.list = [];
  833. this.modal_2_total = res.data.total;
  834. let length = Math.ceil(res.data.data.length / 10);
  835. for (let index = 0; index < length; index++) {
  836. row.list.push({
  837. //最后一位不一定刚好10个
  838. title:
  839. length - index == 1
  840. ? `${res.data.data[10 * index].url_number}~${
  841. res.data.data[res.data.data.length - 1].url_number
  842. }`
  843. : `${res.data.data[10 * index].url_number}~${
  844. res.data.data[10 * index + 10].url_number
  845. }`,
  846. children: res.data.data.slice(10 * index, 10 * index + 10),
  847. });
  848. }
  849. }
  850. }
  851. });
  852. },
  853. //项目、图号确认
  854. handleSelectionComfirm(row) {
  855. console.log(`row`, row);
  856. // 这里需要把弹框关闭之后赋值到selectedInfo上
  857. // this.selectedInfo.order_no;
  858. // 1 项目选择 2图号选择
  859. if (row.type == 1) {
  860. this.selectedInfo.order_no = this.chooseOrderNo.order_no;
  861. this.selectedInfo.residential_name = this.chooseOrderNo.residential_name;
  862. this.selectionModal = false;
  863. } else if (row.type == 2) {
  864. this.selectedInfo.url_number = this.chooseUrlNo.url_number;
  865. this.selectedInfo.product_id = this.chooseUrlNo.product_id;
  866. this.selectionDetailModal = false;
  867. this.getChipDetail();
  868. }
  869. // order_no: "20211010",
  870. // residential_name: "2",
  871. // url_number: "3",
  872. // row_no: [],
  873. },
  874. // 获取具体详情
  875. getChipDetail() {
  876. this.axios({
  877. method: "post",
  878. url: "/api/station_get_order_product_pr",
  879. data: {
  880. order_no: this.selectedInfo.order_no,
  881. product_id: this.selectedInfo.product_id,
  882. rows: this.selectedInfo.rows,
  883. page_index: this.page_index,
  884. page_size: this.page_size,
  885. },
  886. }).then((res) => {
  887. if (res.code == 200) {
  888. console.log(`res`, res);
  889. res.data.data.map((v) => (v.isChoosed = false));
  890. this.contentData = res.data.data;
  891. this.total = res.data.total;
  892. }
  893. });
  894. },
  895. handlePrint() {
  896. if (!this.selectedObj.isChoosed) {
  897. return this.$Message.warning("请选择数据");
  898. }
  899. if (this.selectedObj.type != 1) {
  900. return this.$Message.warning("该部件不含芯片,无需打印");
  901. }
  902. if (this.selectedObj.un_print == 0) {
  903. this.selectedObj.print_num = this.selectedObj.on_print;
  904. } else {
  905. this.selectedObj.print_num = this.selectedObj.un_print;
  906. }
  907. this.printModal = true;
  908. },
  909. handlePrintComfirm(row, type) {
  910. if (
  911. type &&
  912. this.modalRoomListSelected.length != this.selectedObj.print_num
  913. ) {
  914. return this.$Message.warning("与打印数量不符");
  915. }
  916. let ids = this.modalRoomListSelected.map((v) => {
  917. return v.id;
  918. });
  919. let data = type
  920. ? {
  921. order_no: this.selectedInfo.order_no,
  922. product_id: this.selectedInfo.product_id,
  923. rows: this.selectedInfo.rows,
  924. num: this.selectedObj.print_num,
  925. id: row.id,
  926. ids,
  927. type,
  928. }
  929. : {
  930. order_no: this.selectedInfo.order_no,
  931. product_id: this.selectedInfo.product_id,
  932. rows: this.selectedInfo.rows,
  933. num: this.selectedObj.print_num,
  934. id: row.id,
  935. };
  936. this.axios({
  937. method: "post",
  938. url: "/api/station_print",
  939. data,
  940. }).then((resp) => {
  941. if (resp.code == 200) {
  942. this.handlePrintChips(resp.data);
  943. this.printModal = false;
  944. this.roomModal = false;
  945. }
  946. });
  947. },
  948. handleOk() {
  949. if (!this.selectedObj.isChoosed) {
  950. return this.$Message.warning("请选择数据");
  951. }
  952. if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
  953. this.selectedObj.ok_num =
  954. this.selectedObj.on_print - this.selectedObj.on_complete;
  955. this.okModal = true;
  956. } else if (this.selectedObj.type != 1) {
  957. this.selectedObj.ok_num = this.selectedObj.un_complete;
  958. this.okModal = true;
  959. } else {
  960. return this.$Message.warning("部件存在未打印芯片,请先打印");
  961. }
  962. },
  963. handleRoomCancel() {
  964. this.modalRoomList.map((v) => {
  965. v.isCurrent = false;
  966. });
  967. this.modalRoomListSelected = [];
  968. this.roomModal = false;
  969. },
  970. handleOkComfirm(row) {
  971. this.axios({
  972. method: "post",
  973. url: "/api/station_complete",
  974. data: {
  975. order_no: this.selectedInfo.order_no,
  976. product_id: this.selectedInfo.product_id,
  977. rows: this.selectedInfo.rows,
  978. num: this.selectedObj.ok_num,
  979. id: row.id,
  980. },
  981. }).then((res) => {
  982. if (res.code == 200) {
  983. this.okModal = false;
  984. this.getChipDetail();
  985. }
  986. });
  987. },
  988. //行号确认
  989. handleRowNoComfirm() {
  990. this.selectedInfo.rows = JSON.parse(JSON.stringify(this.chooseLineNo));
  991. this.selectionRownolModal = false;
  992. this.getChipDetail();
  993. },
  994. onInput(value) {
  995. this.currentSearchValue = this.currentSearchValue + "" + value;
  996. this.handleCurrentSearch(
  997. this.currencySelectedObj,
  998. this.currentSearchValue
  999. );
  1000. },
  1001. onDelete() {
  1002. this.currentSearchValue = this.currentSearchValue.substring(
  1003. 0,
  1004. this.currentSearchValue.length - 1
  1005. );
  1006. this.handleCurrentSearch(
  1007. this.currencySelectedObj,
  1008. this.currentSearchValue
  1009. );
  1010. },
  1011. keyboardOkTap(value) {
  1012. let max;
  1013. if (this.selectedObj.type == 1) {
  1014. max = this.selectedObj.on_print - this.selectedObj.on_complete;
  1015. } else {
  1016. max = this.selectedObj.un_complete;
  1017. }
  1018. this.selectedObj.ok_num =
  1019. (this.selectedObj.ok_num ? this.selectedObj.ok_num : "") + "" + value;
  1020. if (this.selectedObj.ok_num * 1 > max) {
  1021. this.selectedObj.ok_num = max;
  1022. }
  1023. this.$forceUpdate();
  1024. },
  1025. keyboardOkDele() {
  1026. this.selectedObj.ok_num = (this.selectedObj.ok_num + "").substring(
  1027. 0,
  1028. this.selectedObj.ok_num.length - 1
  1029. );
  1030. this.$forceUpdate();
  1031. },
  1032. keyboardPrintTap(value) {
  1033. let max = this.selectedObj.on_print + this.selectedObj.un_print;
  1034. this.selectedObj.print_num =
  1035. (this.selectedObj.print_num ? this.selectedObj.print_num : "") +
  1036. "" +
  1037. value;
  1038. if (this.selectedObj.print_num * 1 > max) {
  1039. this.selectedObj.print_num = max;
  1040. }
  1041. this.$forceUpdate();
  1042. },
  1043. keyboardPrintDele() {
  1044. this.selectedObj.print_num = (this.selectedObj.print_num + "").substring(
  1045. 0,
  1046. this.selectedObj.print_num.length - 1
  1047. );
  1048. this.$forceUpdate();
  1049. },
  1050. keyboardTap(value) {
  1051. this.keyboardObj[this.keyboardVal] =
  1052. (this.keyboardObj[this.keyboardVal]
  1053. ? this.keyboardObj[this.keyboardVal]
  1054. : "") +
  1055. "" +
  1056. value;
  1057. },
  1058. keyboardDele() {
  1059. this.keyboardObj[this.keyboardVal] = this.keyboardObj[
  1060. this.keyboardVal
  1061. ].substring(0, this.keyboardObj[this.keyboardVal].length - 1);
  1062. },
  1063. handleRowNoInput(row, type) {
  1064. if (type == 1) {
  1065. this.keyboardVal = "start";
  1066. } else {
  1067. this.keyboardVal = "end";
  1068. }
  1069. this.keyboardObj = row;
  1070. this.show2 = true;
  1071. },
  1072. handleOkInput() {
  1073. this.show3 = true;
  1074. },
  1075. handlePrintInput() {
  1076. this.show4 = true;
  1077. },
  1078. changePage(e) {
  1079. this.page_index = e;
  1080. this.getChipDetail();
  1081. },
  1082. changeModalPage(e) {
  1083. this.currencySelectedObj.type == 1
  1084. ? (this.modal_1_page_index = e)
  1085. : (this.modal_2_page_index = e);
  1086. this.handleCurrentSearch(
  1087. this.currencySelectedObj,
  1088. this.currentSearchValue
  1089. );
  1090. },
  1091. changeRoomPage(e) {
  1092. this.modal_room_page_index = e;
  1093. this.getModalRoomList();
  1094. },
  1095. getModalRoomList() {
  1096. this.axios({
  1097. method: "post",
  1098. url: "/api/station_get_print_house",
  1099. data: {
  1100. order_no: this.selectedInfo.order_no,
  1101. product_id: this.selectedInfo.product_id,
  1102. rows: this.selectedInfo.rows,
  1103. page_index: this.modal_room_page_index,
  1104. page_size: this.modal_room_page_size,
  1105. id: this.selectedObj.id,
  1106. },
  1107. }).then((res) => {
  1108. if (res.code == 200) {
  1109. res.data.data.map((v) => {
  1110. v.isCurrent = false;
  1111. this.modalRoomListSelected &&
  1112. this.modalRoomListSelected.map((w) => {
  1113. if (w.id == v.id) {
  1114. v.isCurrent = true;
  1115. }
  1116. });
  1117. });
  1118. this.modalRoomList = res.data.data;
  1119. this.modal_room_total = res.data.total;
  1120. }
  1121. });
  1122. },
  1123. handlePrintChips(contents) {
  1124. this.axios.get("/api/get_print_url").then((res) => {
  1125. let data = {};
  1126. // let url = "http://192.168.0.145:888/postek/print"; //request_url
  1127. let url = `http://${res.data.request_url}:888/postek/print`; //request_url
  1128. data.reqParam = "1"; //这个一般不用改,如需改,查api
  1129. let printparamsJsonArray = [];
  1130. // let IP = "192.168.1.58";//print_url
  1131. // let IP = "192.168.0.199"; //print_url
  1132. let IP = res.data.print_url;
  1133. let port = 9100;
  1134. let IP_Port = IP + "," + port;
  1135. printparamsJsonArray.push({ PTK_Connect_Timer: IP_Port + ",1" });
  1136. printparamsJsonArray.push({ PTK_ClearBuffer: "" });
  1137. printparamsJsonArray.push({ PTK_SetDirection: "B" });
  1138. printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
  1139. printparamsJsonArray.push({ PTK_SetDarkness: "10" });
  1140. printparamsJsonArray.push({
  1141. PTK_SetLabelHeight: 624 + "," + 24 + ",0,false",
  1142. });
  1143. printparamsJsonArray.push({ PTK_SetLabelWidth: 1080 });
  1144. console.log(`contents`, contents);
  1145. contents.map((content) => {
  1146. //贝斯特打印格式
  1147. //上
  1148. const printContent_l1 = `项目:${content.client_name}`;
  1149. printparamsJsonArray.push({
  1150. PTK_DrawText_TrueType:
  1151. "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1152. });
  1153. const printContent_l1_2 = `区域:${
  1154. content.house ? content.house + "-" : ""
  1155. }${content.layer ? content.layer : ""}${
  1156. content.position ? content.position : ""
  1157. }`;
  1158. printparamsJsonArray.push({
  1159. PTK_DrawText_TrueType:
  1160. "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1161. });
  1162. const printContent_l2 = `房号:${content.number_detail}`;
  1163. printparamsJsonArray.push({
  1164. PTK_DrawText_TrueType:
  1165. "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1166. });
  1167. const printContent_l2_2 = `产品:${content.product_title}`;
  1168. printparamsJsonArray.push({
  1169. PTK_DrawText_TrueType:
  1170. "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1171. });
  1172. const printContent_l3 = `图号:${content.url_number}`;
  1173. printparamsJsonArray.push({
  1174. PTK_DrawText_TrueType:
  1175. "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1176. });
  1177. const printContent_l3_2 = `部件:${content.part_title}`;
  1178. printparamsJsonArray.push({
  1179. PTK_DrawText_TrueType:
  1180. "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1181. });
  1182. const printContent_l4 = `木皮:${content.color_title}`;
  1183. printparamsJsonArray.push({
  1184. PTK_DrawText_TrueType:
  1185. "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1186. });
  1187. const printContent_l4_2 = `尺寸:${content.measure}`;
  1188. printparamsJsonArray.push({
  1189. PTK_DrawText_TrueType:
  1190. "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1191. });
  1192. //下
  1193. printparamsJsonArray.push({
  1194. PTK_DrawText_TrueType:
  1195. "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1196. });
  1197. printparamsJsonArray.push({
  1198. PTK_DrawText_TrueType:
  1199. "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1200. });
  1201. printparamsJsonArray.push({
  1202. PTK_DrawText_TrueType:
  1203. "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1204. });
  1205. printparamsJsonArray.push({
  1206. PTK_DrawText_TrueType:
  1207. "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1208. });
  1209. printparamsJsonArray.push({
  1210. PTK_DrawText_TrueType:
  1211. "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1212. });
  1213. printparamsJsonArray.push({
  1214. PTK_DrawText_TrueType:
  1215. "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1216. });
  1217. printparamsJsonArray.push({
  1218. PTK_DrawText_TrueType:
  1219. "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1220. });
  1221. printparamsJsonArray.push({
  1222. PTK_DrawText_TrueType:
  1223. "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1224. });
  1225. // 17,35 420
  1226. printparamsJsonArray.push({
  1227. PTK_RWRFIDLabel:
  1228. "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1229. });
  1230. printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1231. });
  1232. // contents.map((content) => {
  1233. // //江山打印格式
  1234. // //上
  1235. // const printContent_l1 = `单号:${content.order_no}`;
  1236. // printparamsJsonArray.push({
  1237. // PTK_DrawText_TrueType:
  1238. // "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1239. // });
  1240. // const printContent_l1_2 = `型号:${content.product_title}`;
  1241. // printparamsJsonArray.push({
  1242. // PTK_DrawText_TrueType:
  1243. // "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1244. // });
  1245. // const printContent_l2 = `尺寸:${content.measure}`;
  1246. // printparamsJsonArray.push({
  1247. // PTK_DrawText_TrueType:
  1248. // "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1249. // });
  1250. // const printContent_l2_2 = `工艺:${content.process_title}`;
  1251. // printparamsJsonArray.push({
  1252. // PTK_DrawText_TrueType:
  1253. // "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1254. // });
  1255. // const printContent_l3 = `颜色:${content.color_title}`;
  1256. // printparamsJsonArray.push({
  1257. // PTK_DrawText_TrueType:
  1258. // "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1259. // });
  1260. // const printContent_l3_2 = `部件:${content.part_title}`;
  1261. // printparamsJsonArray.push({
  1262. // PTK_DrawText_TrueType:
  1263. // "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1264. // });
  1265. // //下
  1266. // printparamsJsonArray.push({
  1267. // PTK_DrawText_TrueType:
  1268. // "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1269. // });
  1270. // printparamsJsonArray.push({
  1271. // PTK_DrawText_TrueType:
  1272. // "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1273. // });
  1274. // printparamsJsonArray.push({
  1275. // PTK_DrawText_TrueType:
  1276. // "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1277. // });
  1278. // printparamsJsonArray.push({
  1279. // PTK_DrawText_TrueType:
  1280. // "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1281. // });
  1282. // printparamsJsonArray.push({
  1283. // PTK_DrawText_TrueType:
  1284. // "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1285. // });
  1286. // printparamsJsonArray.push({
  1287. // PTK_DrawText_TrueType:
  1288. // "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1289. // });
  1290. // printparamsJsonArray.push({
  1291. // PTK_RWRFIDLabel:
  1292. // "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1293. // });
  1294. // printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1295. // });
  1296. printparamsJsonArray.push({ PTK_CloseConnect: "" });
  1297. data.printparams = printparamsJsonArray;
  1298. let sub_data = JSON.parse(JSON.stringify(data));
  1299. sub_data.printparams = JSON.stringify(sub_data.printparams);
  1300. let _this = this;
  1301. $.ajax({
  1302. type: "post",
  1303. url,
  1304. data: sub_data,
  1305. dataType: "json",
  1306. timeout: 5000,
  1307. success: function(result) {
  1308. _this.getChipDetail();
  1309. if (result.retval == "0") {
  1310. _this.$Message.success("发送成功");
  1311. } else {
  1312. _this.$Message.error("发送失败,返回结果:" + result.msg);
  1313. }
  1314. },
  1315. });
  1316. });
  1317. },
  1318. },
  1319. // 监听属性 类似于data概念
  1320. computed: {},
  1321. // 监控data中的数据变化
  1322. watch: {},
  1323. beforeCreate() {}, // 生命周期 - 创建之前
  1324. beforeMount() {}, // 生命周期 - 挂载之前
  1325. beforeUpdate() {}, // 生命周期 - 更新之前
  1326. updated() {}, // 生命周期 - 更新之后
  1327. beforeDestroy() {}, // 生命周期 - 销毁之前
  1328. destroyed() {}, // 生命周期 - 销毁完成
  1329. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  1330. };
  1331. </script>
  1332. <style lang="scss" scoped>
  1333. .fullscreen-title-btn {
  1334. position: absolute;
  1335. right: 100px;
  1336. top: 0.175rem;
  1337. }
  1338. .fullscreen-content {
  1339. .fullscreen-content-select {
  1340. display: flex;
  1341. justify-content: space-around;
  1342. padding-bottom: 0.1rem;
  1343. border-bottom: 1px solid #e8eaec;
  1344. .fullscreen-content-select-block {
  1345. display: flex;
  1346. justify-content: center;
  1347. align-items: center;
  1348. }
  1349. .fullscreen-content-select-block:nth-child(1) {
  1350. width: 30%;
  1351. }
  1352. .fullscreen-content-select-block:nth-child(2) {
  1353. width: 20%;
  1354. }
  1355. .fullscreen-content-select-block:nth-child(3) {
  1356. }
  1357. }
  1358. .fullscreen-content-choose {
  1359. display: flex;
  1360. justify-content: flex-start;
  1361. flex-wrap: wrap;
  1362. padding-top: 0.1rem;
  1363. margin-bottom: 0.5rem;
  1364. .fullscreen-content-choose-block {
  1365. width: 25%;
  1366. border-radius: 5px;
  1367. border: 1px solid #2d8cf0;
  1368. // margin: 0.1rem 1%;
  1369. padding: 1%;
  1370. position: relative;
  1371. div {
  1372. display: flex;
  1373. justify-content: space-between;
  1374. }
  1375. .chip-tag {
  1376. display: inline-block;
  1377. position: absolute;
  1378. width: 0.75rem;
  1379. top: 0;
  1380. left: 50%;
  1381. background-color: #fadb14;
  1382. color: black;
  1383. height: 0.75rem;
  1384. border-radius: 15%;
  1385. text-align: center;
  1386. padding-top: 0.15rem;
  1387. transform: translate(-50%, -10%);
  1388. }
  1389. }
  1390. .fullscreen-content-choose-block-choosen {
  1391. color: white;
  1392. background-color: #2d8cf0;
  1393. }
  1394. .fullscreen-content-choose-block-unchoosen {
  1395. color: #2d8cf0;
  1396. background-color: white;
  1397. }
  1398. }
  1399. }
  1400. .fullscreen-content-page {
  1401. display: flex;
  1402. justify-content: center;
  1403. }
  1404. .selection-modal {
  1405. .selection-modal-top {
  1406. display: flex;
  1407. justify-content: center;
  1408. }
  1409. .selection-modal-body {
  1410. display: flex;
  1411. justify-content: center;
  1412. flex-wrap: wrap;
  1413. .selection-modal-body-block {
  1414. cursor: pointer;
  1415. width: 30%;
  1416. margin: 1%;
  1417. padding: 3% 1%;
  1418. background-color: #e9ecef;
  1419. div {
  1420. display: flex;
  1421. justify-content: center;
  1422. }
  1423. }
  1424. .selection-modal-body-block-detail {
  1425. cursor: pointer;
  1426. width: 17%;
  1427. margin: 1%;
  1428. padding: 3% 1%;
  1429. background-color: #e9ecef;
  1430. div {
  1431. display: flex;
  1432. justify-content: center;
  1433. }
  1434. }
  1435. .selection-modal-body-block-choosen,
  1436. .selection-modal-body-block-detail-choosen {
  1437. background-color: #fadb14;
  1438. }
  1439. .selection-modal-body-block-unchoosen,
  1440. .selection-modal-body-block-detail-unchoosen {
  1441. background-color: #e9ecef;
  1442. }
  1443. }
  1444. }
  1445. .selection-rowno-modal {
  1446. .selection-rowno-modal-body {
  1447. .selection-rowno-modal-body-block {
  1448. margin: 0.5rem 0;
  1449. text-align: center;
  1450. }
  1451. }
  1452. }
  1453. .selection-print-modal {
  1454. .selection-print-modal-body {
  1455. .selection-print-modal-body-top {
  1456. display: flex;
  1457. justify-content: space-around;
  1458. align-items: center;
  1459. margin: 0.5rem 0;
  1460. }
  1461. .selection-print-modal-body-info {
  1462. padding-top: 16px;
  1463. border-top: 1px solid #e8eaec;
  1464. text-align: center;
  1465. }
  1466. }
  1467. }
  1468. .icon-wrapper {
  1469. position: relative;
  1470. font-size: 0.25rem;
  1471. }
  1472. .icon-close {
  1473. position: absolute;
  1474. right: -0.35rem;
  1475. top: -0.2rem;
  1476. }
  1477. /deep/.ivu-page-item {
  1478. display: inline-block;
  1479. font-size: 0.5rem;
  1480. height: 1rem;
  1481. line-height: 1rem;
  1482. width: 1rem;
  1483. }
  1484. /deep/.ivu-page-prev,
  1485. /deep/.ivu-page-next {
  1486. display: inline-block;
  1487. font-size: 0.5rem;
  1488. height: 1rem;
  1489. line-height: 1rem;
  1490. width: 1rem;
  1491. a {
  1492. font-size: 0.5rem;
  1493. }
  1494. }
  1495. /deep/.fullscreen-content-page {
  1496. display: flex;
  1497. justify-content: space-around;
  1498. }
  1499. </style>