ChipPrintScreen.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  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. } else {
  715. // 订单号
  716. this.chooseOrderNo = obj;
  717. }
  718. if (row.type == 1) {
  719. this.handleSelectionComfirm(this.currencySelectedObj);
  720. }
  721. this.$forceUpdate();
  722. },
  723. handleSelectedRoomClick(list, block) {
  724. if (block.isCurrent) {
  725. this.modalRoomListSelected = this.modalRoomListSelected.filter(
  726. (v) => v.id != block.id
  727. );
  728. block.isCurrent = !block.isCurrent;
  729. } else {
  730. if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
  731. block.isCurrent = !block.isCurrent;
  732. this.modalRoomListSelected = this.modalRoomListSelected.concat(
  733. this.modalRoomList.filter((v) => v.isCurrent)
  734. );
  735. } else {
  736. this.$Message.warning("与打印数量不符,请重新选择");
  737. }
  738. }
  739. this.modalRoomListSelected = Array.from(
  740. new Set([...this.modalRoomListSelected])
  741. );
  742. },
  743. handleAddRow(row, index) {
  744. this.chooseLineNo.push({
  745. start: "",
  746. end: "",
  747. });
  748. },
  749. handleDeleRow(row, index) {
  750. this.chooseLineNo.splice(index, 1);
  751. },
  752. handleSelectionDetailClick(row, obj) {
  753. row.children.map((v) => (v.isCurrent = false));
  754. obj.isCurrent = true;
  755. this.chooseUrlNo = obj;
  756. this.handleSelectionComfirm(this.currencySelectedObj);
  757. this.$forceUpdate();
  758. },
  759. handleFullScreenClick() {
  760. this.isFullScreen = !this.isFullScreen;
  761. if (this.isFullScreen) {
  762. this.enterFullScreen();
  763. } else {
  764. this.exitFullScreen();
  765. }
  766. },
  767. handleSelectionRoom() {
  768. this.getModalRoomList();
  769. this.roomModal = true;
  770. },
  771. enterFullScreen() {
  772. let el = document.documentElement;
  773. let rfs =
  774. el.requestFullScreen ||
  775. el.webkitRequestFullScreen ||
  776. el.mozRequestFullScreen ||
  777. el.msRequestFullscreen;
  778. if (rfs) {
  779. rfs.call(el);
  780. } else if (typeof window.ActiveXObject !== "undefined") {
  781. // for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
  782. let wscript = new ActiveXObject("WScript.Shell");
  783. if (wscript != null) {
  784. wscript.SendKeys("{F11}");
  785. }
  786. }
  787. },
  788. exitFullScreen() {
  789. let el = document;
  790. let cfs =
  791. el.cancelFullScreen ||
  792. el.mozCancelFullScreen ||
  793. el.msExitFullscreen ||
  794. el.webkitExitFullscreen ||
  795. el.exitFullscreen;
  796. if (cfs) {
  797. // typeof cfs != "undefined" && cfs
  798. cfs.call(el);
  799. } else if (typeof window.ActiveXObject !== "undefined") {
  800. // for IE,这里和fullScreen相同,模拟按下F11键退出全屏
  801. let wscript = new ActiveXObject("WScript.Shell");
  802. if (wscript != null) {
  803. wscript.SendKeys("{F11}");
  804. }
  805. }
  806. },
  807. handleCurrentSearch(row, val) {
  808. //type 1项目选择 2图号选择
  809. let url =
  810. row.type == 1
  811. ? "/api/station_get_order"
  812. : "/api/station_get_url_number";
  813. this.axios({
  814. method: "post",
  815. url,
  816. data: {
  817. page_index:
  818. row.type == 1 ? this.modal_1_page_index : this.modal_2_page_index,
  819. page_size:
  820. row.type == 1 ? this.modal_1_page_size : this.modal_2_page_size,
  821. order_no: row.type == 1 ? val : this.selectedInfo.order_no,
  822. url_number: row.type == 1 ? "" : val,
  823. },
  824. }).then((res) => {
  825. if (res.code == 200) {
  826. if (row.type == 1) {
  827. row.list = res.data.data;
  828. this.modal_1_total = res.data.total;
  829. } else {
  830. row.list = [];
  831. this.modal_2_total = res.data.total;
  832. let length = Math.ceil(res.data.data.length / 10);
  833. for (let index = 0; index < length; index++) {
  834. row.list.push({
  835. //最后一位不一定刚好10个
  836. title:
  837. length - index == 1
  838. ? `${res.data.data[10 * index].url_number}~${
  839. res.data.data[res.data.data.length - 1].url_number
  840. }`
  841. : `${res.data.data[10 * index].url_number}~${
  842. res.data.data[10 * index + 10].url_number
  843. }`,
  844. children: res.data.data.slice(10 * index, 10 * index + 10),
  845. });
  846. }
  847. }
  848. }
  849. });
  850. },
  851. //项目、图号确认
  852. handleSelectionComfirm(row) {
  853. console.log(`row`, row);
  854. // 这里需要把弹框关闭之后赋值到selectedInfo上
  855. // this.selectedInfo.order_no;
  856. // 1 项目选择 2图号选择
  857. if (row.type == 1) {
  858. this.selectedInfo.order_no = this.chooseOrderNo.order_no;
  859. this.selectedInfo.residential_name = this.chooseOrderNo.residential_name;
  860. this.selectionModal = false;
  861. } else if (row.type == 2) {
  862. this.selectedInfo.url_number = this.chooseUrlNo.url_number;
  863. this.selectedInfo.product_id = this.chooseUrlNo.product_id;
  864. this.selectionDetailModal = false;
  865. this.getChipDetail();
  866. }
  867. // order_no: "20211010",
  868. // residential_name: "2",
  869. // url_number: "3",
  870. // row_no: [],
  871. },
  872. // 获取具体详情
  873. getChipDetail() {
  874. this.axios({
  875. method: "post",
  876. url: "/api/station_get_order_product_pr",
  877. data: {
  878. order_no: this.selectedInfo.order_no,
  879. product_id: this.selectedInfo.product_id,
  880. rows: this.selectedInfo.rows,
  881. page_index: this.page_index,
  882. page_size: this.page_size,
  883. },
  884. }).then((res) => {
  885. if (res.code == 200) {
  886. console.log(`res`, res);
  887. res.data.data.map((v) => (v.isChoosed = false));
  888. this.contentData = res.data.data;
  889. this.total = res.data.total;
  890. }
  891. });
  892. },
  893. handlePrint() {
  894. if (!this.selectedObj.isChoosed) {
  895. return this.$Message.warning("请选择数据");
  896. }
  897. if (this.selectedObj.type != 1) {
  898. return this.$Message.warning("该部件不含芯片,无需打印");
  899. }
  900. if (this.selectedObj.un_print == 0) {
  901. this.selectedObj.print_num = this.selectedObj.on_print;
  902. } else {
  903. this.selectedObj.print_num = this.selectedObj.un_print;
  904. }
  905. this.printModal = true;
  906. },
  907. handlePrintComfirm(row, type) {
  908. if (this.modalRoomListSelected.length != this.selectedObj.print_num) {
  909. return this.$Message.warning("与打印数量不符");
  910. }
  911. let ids = this.modalRoomListSelected.map((v) => {
  912. return v.id;
  913. });
  914. let data = type
  915. ? {
  916. order_no: this.selectedInfo.order_no,
  917. product_id: this.selectedInfo.product_id,
  918. rows: this.selectedInfo.rows,
  919. num: this.selectedObj.print_num,
  920. id: row.id,
  921. ids,
  922. type,
  923. }
  924. : {
  925. order_no: this.selectedInfo.order_no,
  926. product_id: this.selectedInfo.product_id,
  927. rows: this.selectedInfo.rows,
  928. num: this.selectedObj.print_num,
  929. id: row.id,
  930. };
  931. this.axios({
  932. method: "post",
  933. url: "/api/station_print",
  934. data,
  935. }).then((resp) => {
  936. if (resp.code == 200) {
  937. this.handlePrintChips(resp.data);
  938. this.printModal = false;
  939. this.roomModal = false;
  940. }
  941. });
  942. },
  943. handleOk() {
  944. if (!this.selectedObj.isChoosed) {
  945. return this.$Message.warning("请选择数据");
  946. }
  947. if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
  948. this.selectedObj.ok_num =
  949. this.selectedObj.on_print - this.selectedObj.on_complete;
  950. this.okModal = true;
  951. } else if (this.selectedObj.type != 1) {
  952. this.selectedObj.ok_num = this.selectedObj.un_complete;
  953. this.okModal = true;
  954. } else {
  955. return this.$Message.warning("部件存在未打印芯片,请先打印");
  956. }
  957. },
  958. handleRoomCancel() {
  959. this.modalRoomList.map((v) => {
  960. v.isCurrent = false;
  961. });
  962. this.modalRoomListSelected = [];
  963. this.roomModal = false;
  964. },
  965. handleOkComfirm(row) {
  966. this.axios({
  967. method: "post",
  968. url: "/api/station_complete",
  969. data: {
  970. order_no: this.selectedInfo.order_no,
  971. product_id: this.selectedInfo.product_id,
  972. rows: this.selectedInfo.rows,
  973. num: this.selectedObj.ok_num,
  974. id: row.id,
  975. },
  976. }).then((res) => {
  977. if (res.code == 200) {
  978. this.okModal = false;
  979. this.getChipDetail();
  980. }
  981. });
  982. },
  983. //行号确认
  984. handleRowNoComfirm() {
  985. this.selectedInfo.rows = JSON.parse(JSON.stringify(this.chooseLineNo));
  986. this.selectionRownolModal = false;
  987. this.getChipDetail();
  988. },
  989. onInput(value) {
  990. this.currentSearchValue = this.currentSearchValue + "" + value;
  991. this.handleCurrentSearch(
  992. this.currencySelectedObj,
  993. this.currentSearchValue
  994. );
  995. },
  996. onDelete() {
  997. this.currentSearchValue = this.currentSearchValue.substring(
  998. 0,
  999. this.currentSearchValue.length - 1
  1000. );
  1001. this.handleCurrentSearch(
  1002. this.currencySelectedObj,
  1003. this.currentSearchValue
  1004. );
  1005. },
  1006. keyboardOkTap(value) {
  1007. let max;
  1008. if (this.selectedObj.type == 1) {
  1009. max = this.selectedObj.on_print - this.selectedObj.on_complete;
  1010. } else {
  1011. max = this.selectedObj.un_complete;
  1012. }
  1013. this.selectedObj.ok_num =
  1014. (this.selectedObj.ok_num ? this.selectedObj.ok_num : "") + "" + value;
  1015. if (this.selectedObj.ok_num * 1 > max) {
  1016. this.selectedObj.ok_num = max;
  1017. }
  1018. this.$forceUpdate();
  1019. },
  1020. keyboardOkDele() {
  1021. this.selectedObj.ok_num = (this.selectedObj.ok_num + "").substring(
  1022. 0,
  1023. this.selectedObj.ok_num.length - 1
  1024. );
  1025. this.$forceUpdate();
  1026. },
  1027. keyboardPrintTap(value) {
  1028. let max = this.selectedObj.on_print + this.selectedObj.un_print;
  1029. this.selectedObj.print_num =
  1030. (this.selectedObj.print_num ? this.selectedObj.print_num : "") +
  1031. "" +
  1032. value;
  1033. if (this.selectedObj.print_num * 1 > max) {
  1034. this.selectedObj.print_num = max;
  1035. }
  1036. this.$forceUpdate();
  1037. },
  1038. keyboardPrintDele() {
  1039. this.selectedObj.print_num = (this.selectedObj.print_num + "").substring(
  1040. 0,
  1041. this.selectedObj.print_num.length - 1
  1042. );
  1043. this.$forceUpdate();
  1044. },
  1045. keyboardTap(value) {
  1046. this.keyboardObj[this.keyboardVal] =
  1047. (this.keyboardObj[this.keyboardVal]
  1048. ? this.keyboardObj[this.keyboardVal]
  1049. : "") +
  1050. "" +
  1051. value;
  1052. },
  1053. keyboardDele() {
  1054. this.keyboardObj[this.keyboardVal] = this.keyboardObj[
  1055. this.keyboardVal
  1056. ].substring(0, this.keyboardObj[this.keyboardVal].length - 1);
  1057. },
  1058. handleRowNoInput(row, type) {
  1059. if (type == 1) {
  1060. this.keyboardVal = "start";
  1061. } else {
  1062. this.keyboardVal = "end";
  1063. }
  1064. this.keyboardObj = row;
  1065. this.show2 = true;
  1066. },
  1067. handleOkInput() {
  1068. this.show3 = true;
  1069. },
  1070. handlePrintInput() {
  1071. this.show4 = true;
  1072. },
  1073. changePage(e) {
  1074. this.page_index = e;
  1075. this.getChipDetail();
  1076. },
  1077. changeModalPage(e) {
  1078. this.currencySelectedObj.type == 1
  1079. ? (this.modal_1_page_index = e)
  1080. : (this.modal_2_page_index = e);
  1081. this.handleCurrentSearch(
  1082. this.currencySelectedObj,
  1083. this.currentSearchValue
  1084. );
  1085. },
  1086. changeRoomPage(e) {
  1087. this.modal_room_page_index = e;
  1088. this.getModalRoomList();
  1089. },
  1090. getModalRoomList() {
  1091. this.axios({
  1092. method: "post",
  1093. url: "/api/station_get_print_house",
  1094. data: {
  1095. order_no: this.selectedInfo.order_no,
  1096. product_id: this.selectedInfo.product_id,
  1097. rows: this.selectedInfo.rows,
  1098. page_index: this.modal_room_page_index,
  1099. page_size: this.modal_room_page_size,
  1100. id: this.selectedObj.id,
  1101. },
  1102. }).then((res) => {
  1103. if (res.code == 200) {
  1104. res.data.data.map((v) => {
  1105. v.isCurrent = false;
  1106. this.modalRoomListSelected &&
  1107. this.modalRoomListSelected.map((w) => {
  1108. if (w.id == v.id) {
  1109. v.isCurrent = true;
  1110. }
  1111. });
  1112. });
  1113. this.modalRoomList = res.data.data;
  1114. this.modal_room_total = res.data.total;
  1115. }
  1116. });
  1117. },
  1118. handlePrintChips(contents) {
  1119. this.axios.get("/api/get_print_url").then((res) => {
  1120. let data = {};
  1121. // let url = "http://192.168.0.145:888/postek/print"; //request_url
  1122. let url = `http://${res.data.request_url}:888/postek/print`; //request_url
  1123. data.reqParam = "1"; //这个一般不用改,如需改,查api
  1124. let printparamsJsonArray = [];
  1125. // let IP = "192.168.1.58";//print_url
  1126. // let IP = "192.168.0.199"; //print_url
  1127. let IP = res.data.print_url;
  1128. let port = 9100;
  1129. let IP_Port = IP + "," + port;
  1130. printparamsJsonArray.push({ PTK_Connect_Timer: IP_Port + ",1" });
  1131. printparamsJsonArray.push({ PTK_ClearBuffer: "" });
  1132. printparamsJsonArray.push({ PTK_SetDirection: "B" });
  1133. printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
  1134. printparamsJsonArray.push({ PTK_SetDarkness: "10" });
  1135. printparamsJsonArray.push({
  1136. PTK_SetLabelHeight: 624 + "," + 24 + ",0,false",
  1137. });
  1138. printparamsJsonArray.push({ PTK_SetLabelWidth: 1080 });
  1139. console.log(`contents`, contents);
  1140. contents.map((content) => {
  1141. //贝斯特打印格式
  1142. //上
  1143. const printContent_l1 = `项目:${content.client_name}`;
  1144. printparamsJsonArray.push({
  1145. PTK_DrawText_TrueType:
  1146. "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1147. });
  1148. const printContent_l1_2 = `区域:${
  1149. content.house ? content.house + "-" : ""
  1150. }${content.layer ? content.layer : ""}${
  1151. content.position ? content.position : ""
  1152. }`;
  1153. printparamsJsonArray.push({
  1154. PTK_DrawText_TrueType:
  1155. "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1156. });
  1157. const printContent_l2 = `房号:${content.number_detail}`;
  1158. printparamsJsonArray.push({
  1159. PTK_DrawText_TrueType:
  1160. "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1161. });
  1162. const printContent_l2_2 = `产品:${content.product_title}`;
  1163. printparamsJsonArray.push({
  1164. PTK_DrawText_TrueType:
  1165. "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1166. });
  1167. const printContent_l3 = `图号:${content.url_number}`;
  1168. printparamsJsonArray.push({
  1169. PTK_DrawText_TrueType:
  1170. "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1171. });
  1172. const printContent_l3_2 = `部件:${content.part_title}`;
  1173. printparamsJsonArray.push({
  1174. PTK_DrawText_TrueType:
  1175. "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1176. });
  1177. const printContent_l4 = `木皮:${content.color_title}`;
  1178. printparamsJsonArray.push({
  1179. PTK_DrawText_TrueType:
  1180. "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1181. });
  1182. const printContent_l4_2 = `尺寸:${content.measure}`;
  1183. printparamsJsonArray.push({
  1184. PTK_DrawText_TrueType:
  1185. "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1186. });
  1187. //下
  1188. printparamsJsonArray.push({
  1189. PTK_DrawText_TrueType:
  1190. "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1191. });
  1192. printparamsJsonArray.push({
  1193. PTK_DrawText_TrueType:
  1194. "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1195. });
  1196. printparamsJsonArray.push({
  1197. PTK_DrawText_TrueType:
  1198. "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1199. });
  1200. printparamsJsonArray.push({
  1201. PTK_DrawText_TrueType:
  1202. "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1203. });
  1204. printparamsJsonArray.push({
  1205. PTK_DrawText_TrueType:
  1206. "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1207. });
  1208. printparamsJsonArray.push({
  1209. PTK_DrawText_TrueType:
  1210. "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1211. });
  1212. printparamsJsonArray.push({
  1213. PTK_DrawText_TrueType:
  1214. "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1215. });
  1216. printparamsJsonArray.push({
  1217. PTK_DrawText_TrueType:
  1218. "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1219. });
  1220. // 17,35 420
  1221. printparamsJsonArray.push({
  1222. PTK_RWRFIDLabel:
  1223. "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1224. });
  1225. printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1226. });
  1227. // contents.map((content) => {
  1228. // //江山打印格式
  1229. // //上
  1230. // const printContent_l1 = `单号:${content.order_no}`;
  1231. // printparamsJsonArray.push({
  1232. // PTK_DrawText_TrueType:
  1233. // "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1234. // });
  1235. // const printContent_l1_2 = `型号:${content.product_title}`;
  1236. // printparamsJsonArray.push({
  1237. // PTK_DrawText_TrueType:
  1238. // "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1239. // });
  1240. // const printContent_l2 = `尺寸:${content.measure}`;
  1241. // printparamsJsonArray.push({
  1242. // PTK_DrawText_TrueType:
  1243. // "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1244. // });
  1245. // const printContent_l2_2 = `工艺:${content.process_title}`;
  1246. // printparamsJsonArray.push({
  1247. // PTK_DrawText_TrueType:
  1248. // "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1249. // });
  1250. // const printContent_l3 = `颜色:${content.color_title}`;
  1251. // printparamsJsonArray.push({
  1252. // PTK_DrawText_TrueType:
  1253. // "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1254. // });
  1255. // const printContent_l3_2 = `部件:${content.part_title}`;
  1256. // printparamsJsonArray.push({
  1257. // PTK_DrawText_TrueType:
  1258. // "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1259. // });
  1260. // //下
  1261. // printparamsJsonArray.push({
  1262. // PTK_DrawText_TrueType:
  1263. // "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1264. // });
  1265. // printparamsJsonArray.push({
  1266. // PTK_DrawText_TrueType:
  1267. // "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1268. // });
  1269. // printparamsJsonArray.push({
  1270. // PTK_DrawText_TrueType:
  1271. // "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1272. // });
  1273. // printparamsJsonArray.push({
  1274. // PTK_DrawText_TrueType:
  1275. // "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1276. // });
  1277. // printparamsJsonArray.push({
  1278. // PTK_DrawText_TrueType:
  1279. // "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1280. // });
  1281. // printparamsJsonArray.push({
  1282. // PTK_DrawText_TrueType:
  1283. // "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1284. // });
  1285. // printparamsJsonArray.push({
  1286. // PTK_RWRFIDLabel:
  1287. // "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1288. // });
  1289. // printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1290. // });
  1291. printparamsJsonArray.push({ PTK_CloseConnect: "" });
  1292. data.printparams = printparamsJsonArray;
  1293. let sub_data = JSON.parse(JSON.stringify(data));
  1294. sub_data.printparams = JSON.stringify(sub_data.printparams);
  1295. let _this = this;
  1296. $.ajax({
  1297. type: "post",
  1298. url,
  1299. data: sub_data,
  1300. dataType: "json",
  1301. timeout: 5000,
  1302. success: function(result) {
  1303. if (result.retval == "0") {
  1304. _this.$Message.success("发送成功");
  1305. _this.getChipDetail();
  1306. } else {
  1307. _this.$Message.error("发送失败,返回结果:" + result.msg);
  1308. }
  1309. },
  1310. });
  1311. });
  1312. },
  1313. },
  1314. // 监听属性 类似于data概念
  1315. computed: {},
  1316. // 监控data中的数据变化
  1317. watch: {},
  1318. beforeCreate() {}, // 生命周期 - 创建之前
  1319. beforeMount() {}, // 生命周期 - 挂载之前
  1320. beforeUpdate() {}, // 生命周期 - 更新之前
  1321. updated() {}, // 生命周期 - 更新之后
  1322. beforeDestroy() {}, // 生命周期 - 销毁之前
  1323. destroyed() {}, // 生命周期 - 销毁完成
  1324. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  1325. };
  1326. </script>
  1327. <style lang="scss" scoped>
  1328. .fullscreen-title-btn {
  1329. position: absolute;
  1330. right: 100px;
  1331. top: 0.175rem;
  1332. }
  1333. .fullscreen-content {
  1334. .fullscreen-content-select {
  1335. display: flex;
  1336. justify-content: space-around;
  1337. padding-bottom: 0.1rem;
  1338. border-bottom: 1px solid #e8eaec;
  1339. .fullscreen-content-select-block {
  1340. display: flex;
  1341. justify-content: center;
  1342. align-items: center;
  1343. }
  1344. .fullscreen-content-select-block:nth-child(1) {
  1345. width: 30%;
  1346. }
  1347. .fullscreen-content-select-block:nth-child(2) {
  1348. width: 20%;
  1349. }
  1350. .fullscreen-content-select-block:nth-child(3) {
  1351. }
  1352. }
  1353. .fullscreen-content-choose {
  1354. display: flex;
  1355. justify-content: flex-start;
  1356. flex-wrap: wrap;
  1357. padding-top: 0.1rem;
  1358. margin-bottom: 0.5rem;
  1359. .fullscreen-content-choose-block {
  1360. width: 25%;
  1361. border-radius: 5px;
  1362. border: 1px solid #2d8cf0;
  1363. // margin: 0.1rem 1%;
  1364. padding: 1%;
  1365. position: relative;
  1366. div {
  1367. display: flex;
  1368. justify-content: space-between;
  1369. }
  1370. .chip-tag {
  1371. display: inline-block;
  1372. position: absolute;
  1373. width: 0.75rem;
  1374. top: 0;
  1375. left: 50%;
  1376. background-color: #fadb14;
  1377. color: black;
  1378. height: 0.75rem;
  1379. border-radius: 15%;
  1380. text-align: center;
  1381. padding-top: 0.15rem;
  1382. transform: translate(-50%, -10%);
  1383. }
  1384. }
  1385. .fullscreen-content-choose-block-choosen {
  1386. color: white;
  1387. background-color: #2d8cf0;
  1388. }
  1389. .fullscreen-content-choose-block-unchoosen {
  1390. color: #2d8cf0;
  1391. background-color: white;
  1392. }
  1393. }
  1394. }
  1395. .fullscreen-content-page {
  1396. display: flex;
  1397. justify-content: center;
  1398. }
  1399. .selection-modal {
  1400. .selection-modal-top {
  1401. display: flex;
  1402. justify-content: center;
  1403. }
  1404. .selection-modal-body {
  1405. display: flex;
  1406. justify-content: center;
  1407. flex-wrap: wrap;
  1408. .selection-modal-body-block {
  1409. cursor: pointer;
  1410. width: 30%;
  1411. margin: 1%;
  1412. padding: 3% 1%;
  1413. background-color: #e9ecef;
  1414. div {
  1415. display: flex;
  1416. justify-content: center;
  1417. }
  1418. }
  1419. .selection-modal-body-block-detail {
  1420. cursor: pointer;
  1421. width: 17%;
  1422. margin: 1%;
  1423. padding: 3% 1%;
  1424. background-color: #e9ecef;
  1425. div {
  1426. display: flex;
  1427. justify-content: center;
  1428. }
  1429. }
  1430. .selection-modal-body-block-choosen,
  1431. .selection-modal-body-block-detail-choosen {
  1432. background-color: #fadb14;
  1433. }
  1434. .selection-modal-body-block-unchoosen,
  1435. .selection-modal-body-block-detail-unchoosen {
  1436. background-color: #e9ecef;
  1437. }
  1438. }
  1439. }
  1440. .selection-rowno-modal {
  1441. .selection-rowno-modal-body {
  1442. .selection-rowno-modal-body-block {
  1443. margin: 0.5rem 0;
  1444. text-align: center;
  1445. }
  1446. }
  1447. }
  1448. .selection-print-modal {
  1449. .selection-print-modal-body {
  1450. .selection-print-modal-body-top {
  1451. display: flex;
  1452. justify-content: space-around;
  1453. align-items: center;
  1454. margin: 0.5rem 0;
  1455. }
  1456. .selection-print-modal-body-info {
  1457. padding-top: 16px;
  1458. border-top: 1px solid #e8eaec;
  1459. text-align: center;
  1460. }
  1461. }
  1462. }
  1463. .icon-wrapper {
  1464. position: relative;
  1465. font-size: 0.25rem;
  1466. }
  1467. .icon-close {
  1468. position: absolute;
  1469. right: -0.35rem;
  1470. top: -0.2rem;
  1471. }
  1472. /deep/.ivu-page-item {
  1473. display: inline-block;
  1474. font-size: 0.5rem;
  1475. height: 1rem;
  1476. line-height: 1rem;
  1477. width: 1rem;
  1478. }
  1479. /deep/.ivu-page-prev,
  1480. /deep/.ivu-page-next {
  1481. display: inline-block;
  1482. font-size: 0.5rem;
  1483. height: 1rem;
  1484. line-height: 1rem;
  1485. width: 1rem;
  1486. a {
  1487. font-size: 0.5rem;
  1488. }
  1489. }
  1490. /deep/.fullscreen-content-page {
  1491. display: flex;
  1492. justify-content: space-around;
  1493. }
  1494. </style>