ChipPrintScreen.vue 82 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497
  1. <template>
  2. <div>
  3. <Modal v-model="fullscreenModal" fullscreen title="工位屏" @on-cancel='cancel'>
  4. <div slot="header">
  5. <span style="font-size: 0.5rem">工位屏</span>
  6. <div class="fullscreen-title-btn">
  7. <Button type="primary" size='large' style="margin-right:1rem" @click="handleCancelPrint">撤销打印</Button>
  8. <Button
  9. @click="handleWideScreenClick"
  10. size="large"
  11. id="full_screen_btn"
  12. type="primary"
  13. style="margin-right: 1rem"
  14. >
  15. {{ isWideScreen ? "完整模式" : "简单模式" }}
  16. </Button>
  17. <Button
  18. @click="handleFullScreenClick"
  19. size="large"
  20. id="full_screen_btn"
  21. type="primary"
  22. style="margin-right: 1rem"
  23. >
  24. {{ isFullScreen ? "收 缩" : "全 屏" }}
  25. </Button>
  26. <Button
  27. @click="handlePrint"
  28. size="large"
  29. type="primary"
  30. style="margin-right: 1rem"
  31. >
  32. 打 印
  33. </Button>
  34. <!-- <Button
  35. @click="handleOk"
  36. size="large"
  37. type="primary"
  38. style="margin-right: 1rem"
  39. >
  40. 完 工
  41. </Button> -->
  42. <Button
  43. style="margin-right: 1rem"
  44. @click="goCheckPage(1)"
  45. size="large"
  46. type="primary"
  47. >
  48. 补 打
  49. </Button>
  50. <Button
  51. style="margin-right: 1rem"
  52. @click="goCheckPage(2)"
  53. size="large"
  54. type="primary"
  55. >
  56. 设备打印
  57. </Button>
  58. </div>
  59. </div>
  60. <div class="fullscreen-content">
  61. <div class="fullscreen-content-select">
  62. <div class="fullscreen-content-select-block">
  63. <Button
  64. @click="handleSelection(ordernoObj, 1)"
  65. size="large"
  66. type="primary"
  67. style="margin-right: 10px"
  68. >
  69. 项目选择
  70. </Button>
  71. <div class="icon-wrapper" v-show="selectedInfo.order_no">
  72. <Icon
  73. class="icon-close"
  74. @click="handleCancelSelected('order_no')"
  75. size="24"
  76. type="md-close"
  77. />
  78. <div>
  79. <span>订单编号:</span>
  80. <span>{{ selectedInfo.order_no }}</span>
  81. </div>
  82. <div>
  83. <span>项目名称:</span>
  84. <span>{{ selectedInfo.residential_name }}</span>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="fullscreen-content-select-block">
  89. <Button
  90. @click="handleSelection(urlObj, 2)"
  91. size="large"
  92. type="primary"
  93. style="margin-right: 10px"
  94. >
  95. 图号选择
  96. </Button>
  97. <div style="display: flex; align-items: center">
  98. <div class="icon-wrapper">
  99. <div v-show="selectedInfo.url_number">
  100. <Icon
  101. class="icon-close"
  102. @click="handleCancelSelected('product_id')"
  103. size="24"
  104. type="md-close"
  105. />
  106. <span>图号:</span>
  107. <span>{{ selectedInfo.url_number }}</span>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="fullscreen-content-select-block">
  113. <Button
  114. @click="handleSelectionRowno(rownoObj)"
  115. size="large"
  116. type="primary"
  117. style="margin-right: 10px"
  118. >
  119. 行号选择
  120. </Button>
  121. <div
  122. class="icon-wrapper"
  123. v-show="selectedInfo.rows.length != 0"
  124. style="display: flex; align-items: center"
  125. >
  126. <span>行号:</span>
  127. <div style="display: flex; justify-content: flex-start">
  128. <div v-for="(item, index) in selectedInfo.rows" :key="item.key">
  129. <div class="icon-wrapper" style="margin-right: 0.35rem">
  130. <Icon
  131. class="icon-close"
  132. @click="handleCancelSelected(index, 1)"
  133. size="24"
  134. type="md-close"
  135. />
  136. <span style="display: inline-block"
  137. >{{ item.start }}-{{ item.end }}</span
  138. >
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="fullscreen-content-select-block">
  145. <Button
  146. @click="handleSelectionCancel"
  147. size="large"
  148. type="primary"
  149. :ghost='selectedAll?true:false'
  150. style="margin-right: 10px"
  151. v-if="selectedAll"
  152. >
  153. 取消全选
  154. </Button>
  155. <Button
  156. @click="handleSelectionAll"
  157. size="large"
  158. type="primary"
  159. :ghost='selectedAll?true:false'
  160. style="margin-right: 10px"
  161. v-else
  162. >
  163. 全选
  164. </Button>
  165. </div>
  166. </div>
  167. <div class="fullscreen-content-choose">
  168. <div
  169. :class="[
  170. choose.isChoosed
  171. ? 'fullscreen-content-choose-block fullscreen-content-choose-block-choosen'
  172. : 'fullscreen-content-choose-block fullscreen-content-choose-block-unchoosen',
  173. isWideScreen ? 'fullscreen-content-choose-block-wide' : '',
  174. ]"
  175. v-for="choose in contentData"
  176. :key="choose.row"
  177. @click="handleChooseBlockClick(choose)"
  178. >
  179. <div
  180. :class="[isWideScreen ? 'chip-tag-choosed' : 'chip-tag']"
  181. v-show="choose.type == 1"
  182. >
  183. 芯片
  184. <Icon
  185. size="20px"
  186. :style="
  187. isWideScreen
  188. ? 'font-size: 1rem; transform: translate(0, -50%)'
  189. : 'font-size: 1rem; transform: translate(0, -40%)'
  190. "
  191. style="font-size: 1rem; transform: translate(0, -40%)"
  192. :color="choose.isChoosed ? '#2d8cf0' : 'white'"
  193. type="md-arrow-dropup"
  194. />
  195. </div>
  196. <div v-show="!isWideScreen">
  197. <span>行号</span>
  198. <span>{{ choose.row_no }}</span>
  199. </div>
  200. <div v-show="!isWideScreen">
  201. <span>部件</span>
  202. <span>{{ choose.part_title }}</span>
  203. </div>
  204. <div v-show="!isWideScreen">
  205. <span>材料</span>
  206. <span>{{ choose.sub_part_title }}</span>
  207. </div>
  208. <div v-show="!isWideScreen">
  209. <span>毛料尺寸</span>
  210. <span>{{ choose.wool_size }}</span>
  211. </div>
  212. <div v-show="!isWideScreen">
  213. <span>精裁尺寸</span>
  214. <span>{{ choose.cut_size }}</span>
  215. </div>
  216. <div v-show="isWideScreen" class="wide-screen-rowno">
  217. <span
  218. :class="[
  219. choose.isChoosed
  220. ? 'wide-screen-rowno-span-choosed'
  221. : 'wide-screen-rowno-span',
  222. ]"
  223. >{{ choose.row_no }}</span
  224. >
  225. </div>
  226. <div>
  227. <span>生产数量</span>
  228. <span>
  229. {{
  230. choose.on_complete + choose.un_complete
  231. }}
  232. </span>
  233. </div>
  234. <div>
  235. <span>未打印数量</span>
  236. <span
  237. >{{ choose.un_print }}</span
  238. >
  239. </div>
  240. </div>
  241. </div>
  242. <div class="fullscreen-content-page">
  243. <Page
  244. @on-change="changePage"
  245. :page-size="page_size"
  246. :current="page_index"
  247. :total="total"
  248. />
  249. </div>
  250. </div>
  251. <div slot="footer"></div>
  252. <Modal
  253. class="selection-modal"
  254. v-model="selectionModal"
  255. width="80%"
  256. >
  257. <div slot="header">
  258. <h1>{{currencySelectedObj.title}}</h1>
  259. </div>
  260. <van-number-keyboard
  261. :show="show"
  262. @blur="show = false"
  263. @input="onInput"
  264. @delete="onDelete"
  265. z-index="99999"
  266. />
  267. <div class="selection-modal-top">
  268. <Input
  269. :placeholder="currencySelectedObj.title"
  270. v-model="currentSearchValue"
  271. @on-focus="show = true"
  272. @on-change="
  273. handleCurrentSearch(currencySelectedObj, currentSearchValue)
  274. "
  275. style="width: 80%"
  276. >
  277. <Icon
  278. @click="
  279. handleCurrentSearch(currencySelectedObj, currentSearchValue)
  280. "
  281. type="ios-search"
  282. slot="suffix"
  283. />
  284. </Input>
  285. </div>
  286. <div class="selection-modal-body">
  287. <div
  288. :class="[
  289. block.isCurrent
  290. ? 'selection-modal-body-block selection-modal-body-block-choosen'
  291. : 'selection-modal-body-block selection-modal-body-block-unchoosen',
  292. ]"
  293. v-for="(block, index) in currencySelectedObj.list"
  294. :key="index"
  295. @click="handleSelectionClick(currencySelectedObj, block)"
  296. style="font-size:1.4em"
  297. >
  298. <div v-show="currencySelectedObj.type == 1">
  299. <span>订单编号:</span>
  300. <span>{{ block.order_no }}</span>
  301. </div>
  302. <div v-show="currencySelectedObj.type == 2">
  303. <span>{{ block.title }}</span>
  304. </div>
  305. <div v-show="currencySelectedObj.type == 1">
  306. <span>项目名称:</span>
  307. <span>{{ block.residential_name }}</span>
  308. </div>
  309. </div>
  310. <div
  311. style="font-size: 1rem"
  312. v-show="currencySelectedObj.list.length == 0"
  313. >
  314. 暂无数据
  315. </div>
  316. </div>
  317. <div class="fullscreen-content-page">
  318. <Page
  319. @on-change="changeModalPage"
  320. :current="
  321. currencySelectedObj.type == 1
  322. ? modal_1_page_index
  323. : modal_2_page_index
  324. "
  325. :page-size="
  326. currencySelectedObj.type == 1
  327. ? modal_1_page_size
  328. : modal_2_page_size
  329. "
  330. :total="
  331. currencySelectedObj.type == 1 ? modal_1_total : modal_2_total
  332. "
  333. />
  334. </div>
  335. <div slot="footer" style="text-align:center">
  336. <Button
  337. @click="selectionModal = false"
  338. type="primary"
  339. style="margin-right: 10px;width:30%;height:1rem;font-size:2em"
  340. >
  341. 返回
  342. </Button>
  343. <!-- <Button
  344. v-show="currencySelectedObj.type == 1"
  345. @click="handleSelectionComfirm(currencySelectedObj)"
  346. type="primary"
  347. >
  348. 确认
  349. </Button> -->
  350. </div>
  351. </Modal>
  352. <Modal
  353. class="selection-modal"
  354. v-model="selectionDetailModal"
  355. width="80%"
  356. >
  357. <div slot="header"><h1>{{currencySelectedObj.title}}</h1></div>
  358. <div class="selection-modal-body" v-if="currencySelectedObj.hasChild">
  359. <div
  360. :class="[
  361. block.isCurrent
  362. ? 'selection-modal-body-block-detail selection-modal-body-block-detail-choosen'
  363. : 'selection-modal-body-block-detail selection-modal-body-block-detail-unchoosen',
  364. ]"
  365. v-for="(block, index) in chooseDetailUrlNo.children"
  366. :key="index"
  367. @click="handleSelectionDetailClick(chooseDetailUrlNo, block)"
  368. style="font-size: 1.4em;"
  369. >
  370. <div>
  371. <span>{{ block.url_number }}</span>
  372. </div>
  373. </div>
  374. </div>
  375. <div slot="footer" style='text-align:center'>
  376. <Button
  377. @click="
  378. selectionDetailModal = false;
  379. selectionModal = true;
  380. "
  381. type="primary"
  382. style="margin-right: 10px;width:30%;height:1rem;font-size:2em"
  383. >
  384. 返回
  385. </Button>
  386. <!-- <Button
  387. @click="handleSelectionComfirm(currencySelectedObj)"
  388. type="primary"
  389. >
  390. 确认
  391. </Button> -->
  392. </div>
  393. </Modal>
  394. <Modal
  395. class="selection-rowno-modal"
  396. v-model="selectionRownolModal"
  397. width="80%"
  398. >
  399. <div slot="header"><h1>行号选择</h1></div>
  400. <div class="selection-rowno-modal-body">
  401. <van-number-keyboard
  402. :show="show2"
  403. @blur="show2 = false"
  404. @input="keyboardTap"
  405. @delete="keyboardDele"
  406. z-index="99999"
  407. />
  408. <div
  409. class="selection-rowno-modal-body-block"
  410. v-for="(block, index) in chooseLineNo"
  411. :key="index"
  412. >
  413. <span style="font-size:2em;">行号区间:</span>
  414. <Input
  415. v-model="block.start"
  416. @on-focus="handleRowNoInput(block, 1)"
  417. clearable
  418. style="width: 20%; margin: 0 10px"
  419. size="large"
  420. />
  421. -
  422. <Input
  423. v-model="block.end"
  424. @on-focus="handleRowNoInput(block, 2)"
  425. clearable
  426. style="width: 20%; margin: 0 10px"
  427. size="large"
  428. />
  429. <Button
  430. @click="handleAddRow(block, index)"
  431. type="primary"
  432. size="large"
  433. v-show="index == 0"
  434. style="margin-right: 10px"
  435. >
  436. 添加
  437. </Button>
  438. <Button
  439. @click="handleDeleRow(block, index)"
  440. type="primary"
  441. size="large"
  442. v-show="index != 0"
  443. style="margin-right: 10px"
  444. >
  445. 删除
  446. </Button>
  447. </div>
  448. </div>
  449. <div slot="footer" style="text-align:center">
  450. <Button
  451. @click="selectionRownolModal = false"
  452. type="primary"
  453. style="margin-right: 10px;width:30%;height:1rem;font-size:2em"
  454. >
  455. 返回
  456. </Button>
  457. <Button @click="handleRowNoComfirm" type="primary"
  458. style="margin-right: 10px;width:30%;height:1rem;font-size:2em">
  459. 确认
  460. </Button>
  461. </div>
  462. </Modal>
  463. <Modal
  464. class="selection-print-modal"
  465. v-model="printModal"
  466. width="60%"
  467. >
  468. <div slot="header" style="text-align:center;font-weight:bold"><h1>打 印</h1></div>
  469. <div class="selection-print-modal-body">
  470. <div class="selection-print-modal-body-top">
  471. <div>
  472. <span>行号:</span>
  473. <span>{{ selectedObj.row_no }}</span>
  474. </div>
  475. <div>
  476. <span>部件名称:</span>
  477. <span>{{ selectedObj.part_title }}</span>
  478. </div>
  479. <div>
  480. <span>数量:</span>
  481. <InputNumber
  482. :max="selectedObj.un_print==0?selectedObj.on_print:selectedObj.un_print"
  483. :min="0"
  484. style="height:1em;font-size:1.5em;line-height:0.9em;width:2rem"
  485. @on-focus="handlePrintInput"
  486. v-model="selectedObj.print_num"
  487. ></InputNumber>
  488. <van-number-keyboard
  489. :show="show4"
  490. @blur="show4 = false"
  491. @input="keyboardPrintTap"
  492. @delete="keyboardPrintDele"
  493. z-index="99999"
  494. />
  495. </div>
  496. </div>
  497. <div class="selection-print-modal-body-info">
  498. {{
  499. selectedObj.isFinished
  500. ? "该部件芯片数量已全部打印,是否再次打印?请选择要打印的房间号:"
  501. : "请确认打印数量是否正确!"
  502. }}
  503. <div>
  504. <Button
  505. v-show="selectedObj.isFinished"
  506. @click="handleSelectionRoom"
  507. type="primary"
  508. >
  509. 选择房间号
  510. </Button>
  511. </div>
  512. </div>
  513. </div>
  514. <div slot="footer" class="selection-print-modal-body-footer">
  515. <Button
  516. @click="printModal = false"
  517. type="primary"
  518. style="margin-right: 40px"
  519. >
  520. 返回
  521. </Button>
  522. <Button @click="handlePrintComfirm(selectedObj,null,item.printerUsbPort,item.printer_brand,item.sub_type)" type="primary" v-for="item in printTip" :key="item.id" >
  523. {{item.title}}
  524. </Button>
  525. <Button @click="Print(selectedObj)" type="primary" v-if="false">
  526. 标签打印
  527. </Button>
  528. </div>
  529. </Modal>
  530. <!-- <Modal
  531. class="selection-print-modal"
  532. v-model="okModal"
  533. title="完成"
  534. width="60%"
  535. >
  536. <div class="selection-print-modal-body">
  537. <div class="selection-print-modal-body-top">
  538. <div>
  539. <span>行号:</span>
  540. <span>{{ selectedObj.row_no }}</span>
  541. </div>
  542. <div>
  543. <span>部件名称:</span>
  544. <span>{{ selectedObj.part_title }}</span>
  545. </div>
  546. <div>
  547. <span>数量:</span>
  548. <InputNumber
  549. :max="
  550. selectedObj.type == 1
  551. ? selectedObj.on_print - selectedObj.on_complete
  552. : selectedObj.un_complete
  553. "
  554. :min="0"
  555. size="large"
  556. @on-focus="handleOkInput"
  557. v-model="selectedObj.ok_num"
  558. ></InputNumber>
  559. <van-number-keyboard
  560. :show="show3"
  561. @blur="show3 = false"
  562. @input="keyboardOkTap"
  563. @delete="keyboardOkDele"
  564. z-index="99999"
  565. />
  566. </div>
  567. </div>
  568. <div class="selection-print-modal-body-info">
  569. 请确认完成数量是否正确?
  570. </div>
  571. </div>
  572. <div slot="footer">
  573. <Button
  574. @click="okModal = false"
  575. type="primary"
  576. style="margin-right: 10px"
  577. >
  578. 返回
  579. </Button>
  580. <Button @click="handleOkComfirm(selectedObj)" type="primary">
  581. 确认
  582. </Button>
  583. </div>
  584. </Modal> -->
  585. <Modal
  586. class="selection-modal"
  587. v-model="roomModal"
  588. @on-cancel ='handleRoomCancel'
  589. :draggable='true'
  590. style="height:100%"
  591. width="80%"
  592. >
  593. <div slot="header">
  594. <h1>选择房间号</h1>
  595. </div>
  596. <div class="selection-modal-body">
  597. <div
  598. :class="[
  599. block.isCurrent
  600. ? 'selection-modal-body-block selection-modal-body-block-choosen'
  601. : 'selection-modal-body-block selection-modal-body-block-unchoosen',
  602. ]"
  603. v-for="(block, index) in modalRoomList"
  604. :key="index"
  605. @click="handleSelectedRoomClick(modalRoomList, block)"
  606. >
  607. <div style="display:flex;flex-direction: column;text-align: center;">
  608. <span style="font-size:25px">{{ block.house }}</span>
  609. <span style="font-size:18px">{{`(${block.tag})`}}</span>
  610. </div>
  611. </div>
  612. </div>
  613. <div class="fullscreen-content-page">
  614. <Page
  615. @on-change="changeRoomPage"
  616. :current="modal_room_page_index"
  617. :page-size="modal_room_page_size"
  618. :total="modal_room_total"
  619. />
  620. </div>
  621. <div slot="footer" style="display:flex;flex-wrap: wrap;">
  622. <Button
  623. @click="handleRoomCancel"
  624. type="primary"
  625. style="margin: 10px;width:20%;height:60px;font-size:29px"
  626. >
  627. 返回
  628. </Button>
  629. <Button @click="handlePrintComfirm(selectedObj, 1,item.printerUsbPort,item.printer_brand,item.sub_type)" type="primary"
  630. style="width:20%;height:1rem;font-size:29px;margin: 10px" v-for="item in printTip" :key="item.id">
  631. {{item.title}}
  632. </Button>
  633. <Button @click="Print(selectedObj, 1)" type="primary" style="width:20%;height:2rem;font-size:29px" v-if="false">
  634. 标签打印
  635. </Button>
  636. </div>
  637. </Modal>
  638. <!-- <Modal
  639. class=""
  640. v-model="finishWork"
  641. @on-cancel ='handleCancel'
  642. width="80%"
  643. >
  644. <div slot="header" style="text-align:center;font-weight:bold"><h1>完 工</h1></div>
  645. <div style="display:flex;height: 7.5rem;">
  646. <div style="width:60%;overflow:auto;border-right:2px solid #ede7e7">
  647. <div style="display:flex">
  648. <span style="width:2rem;font-size: 0.4rem;margin: 0.6em;">工序</span>
  649. <div style="display:flex;flex-wrap: wrap;">
  650. <span v-for="item in produceList" :key="item.id" @click="changeChooseProduceList(item)" :style="item.isChoosed?{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#ffffff',backgroundColor:'#2D8CF0',cursor: 'pointer'}:{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#2D8CF0',cursor: 'pointer'}">
  651. {{item.title}}
  652. </span>
  653. </div>
  654. </div>
  655. <div style="display:flex">
  656. <span style="width:1.5rem;font-size: 0.4rem;margin: 0.6em;">班组</span>
  657. <div style="display:flex;flex-wrap:wrap">
  658. <span v-for="_item in employeeList" :key="_item.id" @click="changeChooseEmployeeList(_item)" :style="_item.isChoosed?{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#ffffff',backgroundColor:'#2D8CF0',cursor: 'pointer'}:{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#2D8CF0',cursor: 'pointer'}" >
  659. {{_item.nickname}}
  660. </span>
  661. </div>
  662. </div>
  663. </div>
  664. <div style="width:40%;overflow:auto;">
  665. <van-number-keyboard
  666. :show="show5"
  667. @blur="show5 = false"
  668. @input="numChange"
  669. @delete="delChange"
  670. z-index="99999"
  671. />
  672. <div v-for="(item,index) in rownoList" :key="item.id" style="display:flex;justify-content: space-between;align-items: center;width: 100%;font-size:0.4rem;margin-bottom:0.5rem">
  673. <span style="margin-left:1rem">行号:{{item.sort}}</span><span style="width: 40%;">数量:<Input style='width:50%' size="large" v-model="item.num" @on-focus="focusChange(index)" clearable /></span>
  674. </div>
  675. </div>
  676. </div>
  677. <div slot="footer" style="text-align:center;">
  678. <div style="margin-bottom:0.3rem"><h1>是否确认完工?</h1></div>
  679. <Button
  680. @click="handleCancel"
  681. type="primary"
  682. style="margin-right: 0.5rem;width:15%;height:1rem;font-size:0.4rem"
  683. >
  684. 返回
  685. </Button>
  686. <Button @click="handleThen" type="primary" style="margin-right: 0.5rem;width:15%;height:1rem;font-size:0.4rem">
  687. 确认
  688. </Button>
  689. </div>
  690. </Modal> -->
  691. <Modal v-model="selectTrue" :closable='false'>
  692. <div style="text-align:center;margin:2em"><h1>是否全选所有页面的所有部件</h1></div>
  693. <div slot="footer" style="text-align:center;">
  694. <Button
  695. @click="selectTrue=false"
  696. type="primary"
  697. style="margin-right: 0.5rem;width:30%;height:1rem;font-size:0.4rem"
  698. >
  699. 返回
  700. </Button>
  701. <Button @click="selectOk" type="primary" style="margin-right: 0.5rem;width:30%;height:1rem;font-size:0.4rem">
  702. 确认
  703. </Button>
  704. </div>
  705. </Modal>
  706. </Modal>
  707. <div ref='printRow' class="printRow">
  708. <div v-for="(item,index) in tagPrintList" :key="index" class="printRow_content" style="width:400px">
  709. <div style="display:flex"><span style="width:140px">项目:{{item.client_name}}</span><span>区域:{{item.house ? item.house + "-" : ""}}{{item.layer ? item.layer : ""}}{{item.position ? item.position : ""}}</span></div>
  710. <div style="display:flex"><span style="width:140px">房号:{{item.number_detail}}</span><span>产品:{{item.product_title}}</span></div>
  711. <div style="display:flex"><span style="width:140px">图号:{{item.url_number}}</span><span>部件:{{item.part_title}}</span></div>
  712. <div><span>尺寸:{{item.measure}}</span></div>
  713. <div><span>木皮:{{item.color_title}}</span></div>
  714. </div>
  715. </div>
  716. </div>
  717. </template>
  718. <script>
  719. // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  720. // 例如:import 《组件名称》 from '《组件路径》';
  721. import $ from "jquery";
  722. import "@vant/touch-emulator";
  723. export default {
  724. name: "",
  725. components: {},
  726. props: {},
  727. // import引入的组件需要注入到对象中才能使用
  728. data() {
  729. // 这里存放数据
  730. return {
  731. wxsoect:null,
  732. printTip:[],
  733. rule_data:[],
  734. selectTrue:false,
  735. cancelData:[],
  736. tagPrintList:[],
  737. produceID:null,
  738. employeeID:null,
  739. rownoList:[],
  740. employeeList:[],
  741. produceList:[],
  742. saveData:[],
  743. finishWork:false,
  744. show: false,
  745. show2: false,
  746. show3: false,
  747. show4: false,
  748. show5:false,
  749. isFullScreen: false,
  750. fullscreenModal: true,
  751. selectionModal: false,
  752. selectionRownolModal: false,
  753. selectionDetailModal: false,
  754. printModal: false,
  755. okModal: false,
  756. roomModal: false,
  757. contentData: [],
  758. selectedObj: {
  759. state:0,
  760. },
  761. ordernoObj: {
  762. title: "订单编号/项目名称选择",
  763. currentSearchValue: "",
  764. list: [],
  765. hasChild: false,
  766. },
  767. urlObj: {
  768. title: "图号选择",
  769. currentSearchValue: "",
  770. list: [],
  771. hasChild: true,
  772. },
  773. rownoObj: {},
  774. currencySelectedObj: {
  775. title: "订单编号/项目名称选择",
  776. type: 1,
  777. list: [],
  778. },
  779. selectedInfo: {
  780. order_no: "",
  781. residential_name: "",
  782. url_number: "",
  783. product_id: "",
  784. rows: [],
  785. },
  786. page_index: 1,
  787. // page_size: 6,
  788. total: 0,
  789. currentSearchValue: "",
  790. modal_1_page_index: 1,
  791. modal_1_page_size: 6,
  792. selectedAll:false,//true全选;false取消全选
  793. modal_1_total: 0,
  794. modal_room_page_index: 1,
  795. modal_room_page_size: 9,
  796. modal_room_total: 0,
  797. modal_2_page_index: 1,
  798. modal_2_page_size: 60,
  799. modal_2_total: 0,
  800. chooseOrderNo: {},
  801. chooseUrlNo: {},
  802. chooseDetailUrlNo: {},
  803. chooseLineNo: [{ start: "", end: "" }],
  804. keyboardObj: {},
  805. keyboardVal: "",
  806. modalRoomList: [],
  807. modalRoomListSelected: [],
  808. isWideScreen: localStorage.getItem("isWideScreen") || false,
  809. focusIndex:'',
  810. max:'',
  811. };
  812. },
  813. // 生命周期 - 创建完成(可以访问当前this实例)
  814. computed:{
  815. page_size(){
  816. if(this.isWideScreen){
  817. return 12
  818. }else{
  819. return 6
  820. }
  821. }
  822. },
  823. created() {
  824. },
  825. beforeRouteEnter(to, from, next) {
  826. next((vm) => {
  827. if (from.path == "/cms/ChipPrintScreen/ChipPrintScreenCheck") {
  828. vm.selectedInfo = JSON.parse(localStorage.getItem("printInfo"));
  829. vm.getChipDetail();
  830. vm.handleGetType(JSON.parse(localStorage.getItem("printInfo")).order_no);
  831. }})
  832. },
  833. // 生命周期 - 挂载完成(可以访问DOM元素)
  834. mounted() {
  835. // this.axios.post('/api/station_get_type').then(res=>{
  836. // if(res.code == 200){
  837. // this.employeeList = res.data.employee_list;
  838. // this.employeeList.map(item=>{
  839. // item.isChoosed = false;
  840. // })
  841. // this.produceList = res.data.produce_list;
  842. // this.produceList.map(item=>{
  843. // item.isChoosed = false;
  844. // })
  845. // }
  846. // })
  847. this.axios.get('/api/ext_print_format_station').then(res=>{
  848. this.printTip = res.data.data;
  849. })
  850. },
  851. methods: {
  852. handleCancelPrint(){
  853. if(this.saveData.length==0){
  854. return this.$Message.warning('请选择数据!')
  855. }
  856. if(!this.selectedObj.isChoosed){
  857. return this.$Message.warning('撤销打印只能单选!')
  858. }
  859. this.axios.post('/api/station_cancer_print',{
  860. order_no: this.selectedInfo.order_no,
  861. product_id: this.selectedInfo.product_id,
  862. rows: this.selectedInfo.rows,
  863. num: this.selectedObj.print_num,
  864. id: this.selectedObj.id,
  865. }).then(res=>{
  866. if(res.code==200){
  867. this.$Message.success(res.msg)
  868. }
  869. })
  870. },
  871. selectOk(){
  872. this.selectTrue = false;
  873. this.selectedAll = !this.selectedAll;
  874. this.contentData.map(v=>{
  875. v.isChoosed = true
  876. });
  877. this.saveData = [];
  878. },
  879. handleSelectionAll(){
  880. this.selectTrue = true;
  881. },
  882. handleSelectionCancel(){
  883. this.selectedAll = !this.selectedAll;
  884. if(this.selectedAll){
  885. this.contentData.map(v=>{
  886. v.isChoosed = true
  887. });
  888. this.saveData = [];
  889. }else{
  890. this.contentData.map(v=>{
  891. v.isChoosed = false;
  892. });
  893. this.saveData=[];
  894. this.cancelData = [];
  895. }
  896. },
  897. Print(row,type){
  898. if (
  899. type &&
  900. this.modalRoomListSelected.length != this.selectedObj.print_num
  901. ) {
  902. return this.$Message.warning("与打印数量不符");
  903. }
  904. let ids = this.modalRoomListSelected.map((v) => {
  905. return v.id;
  906. });
  907. let data = type
  908. ? {
  909. order_no: this.selectedInfo.order_no,
  910. product_id: this.selectedInfo.product_id,
  911. rows: this.selectedInfo.rows,
  912. num: this.selectedObj.print_num,
  913. id: row.id,
  914. ids,
  915. type,
  916. }
  917. : {
  918. order_no: this.selectedInfo.order_no,
  919. product_id: this.selectedInfo.product_id,
  920. rows: this.selectedInfo.rows,
  921. num: this.selectedObj.print_num,
  922. id: row.id,
  923. };
  924. // 获取打印数据
  925. this.axios({
  926. method: "post",
  927. url: "/api/station_print",
  928. data,
  929. }).then((resp) => {
  930. if (resp.code == 200) {
  931. console.log(resp)
  932. this.tagPrintList = resp.data;
  933. setTimeout(()=>{
  934. this.$print(this.$refs.printRow);
  935. })
  936. }
  937. });
  938. },
  939. cancel(){
  940. this.fullscreenModal = false;
  941. this.$router.push({path:'/cms/ChipPrintScreen/list'});
  942. // this.$forceUpdate();
  943. },
  944. focusChange(index){
  945. this.focusIndex = index;
  946. this.max = this.rownoList[index].num;
  947. this.show5=true;
  948. },
  949. delChange(){
  950. // item.num = item.num.toString().substring(0,item.num.length-1)
  951. this.rownoList[this.focusIndex].num = this.rownoList[this.focusIndex].num.toString().substring(0,this.rownoList[this.focusIndex].num.toString().length-1);
  952. // console.log(this.rownoList[this.focusIndex].num)
  953. },
  954. numChange(e){
  955. // console.log(index);
  956. // item.num = item.num+''+e;
  957. this.rownoList[this.focusIndex].num =this.rownoList[this.focusIndex].num==='0'?'':this.rownoList[this.focusIndex].num+''+e;
  958. console.log(this.rownoList)
  959. if(Number(this.rownoList[this.focusIndex].num)>this.rownoList[this.focusIndex].val){
  960. this.rownoList[this.focusIndex].num = this.rownoList[this.focusIndex].val.toString();
  961. }
  962. // if(this.this.rownoList[this.focusIndex].num>max){
  963. // this.rownoList[this.focusIndex].num=max
  964. // }
  965. // if(Number(this.rownoList[this.focusIndex].num)>Number(max==''?'0':max)){
  966. // this.rownoList[this.focusIndex].num =JSON.parse(JSON.stringify(max));
  967. // console.log(this.rownoList[this.focusIndex].num)
  968. // }
  969. },
  970. changeChooseEmployeeList(item){
  971. this.employeeList.map(m=>{
  972. if(m.id==item.id){
  973. m.isChoosed = !m.isChoosed
  974. }else{
  975. m.isChoosed=false;
  976. }
  977. })
  978. if(item.isChoosed){
  979. this.employeeID =item.id
  980. }else{
  981. this.employeeID =null;
  982. }
  983. this.$forceUpdate();
  984. },
  985. changeChooseProduceList(item){
  986. let passData={
  987. order_no: this.selectedInfo.order_no,
  988. product_id: this.selectedInfo.product_id,
  989. rows: this.selectedInfo.rows,
  990. };
  991. let produce = item.id;
  992. let id = [];
  993. let cancelId = [];
  994. if(this.selectedAll){
  995. this.cancelData.map(v=>{
  996. cancelId.push(v.id)
  997. })
  998. passData.delete_id = cancelId;
  999. passData.produce =produce;
  1000. passData.type =1; //type1全选状态;
  1001. }else{
  1002. this.saveData.map(v=>{
  1003. id.push(v.id);
  1004. });
  1005. passData.id = id;
  1006. passData.produce =produce;
  1007. }
  1008. this.produceList.map(m=>{
  1009. if(m.id==item.id){
  1010. m.isChoosed = !m.isChoosed
  1011. }else{
  1012. m.isChoosed=false;
  1013. }
  1014. })
  1015. console.log(item)
  1016. if(item.isChoosed){
  1017. this.axios.post('/api/station_get_order_produce',{...passData}).then(res=>{
  1018. if(res.code==200){
  1019. this.rownoList = res.data;
  1020. this.produceID = item.id;
  1021. this.rownoList.map(v=>{
  1022. v.val = v.num;
  1023. })
  1024. this.rule_data.forEach(element => {
  1025. if(element.id == item.id){
  1026. this.employeeList = element.employee_list;
  1027. this.employeeList.map(item=>{
  1028. item.isChoosed = false;
  1029. })
  1030. console.log(1)
  1031. }
  1032. });
  1033. console.log(this.employeeList)
  1034. }
  1035. })
  1036. }else{
  1037. this.employeeList=[];
  1038. this.rownoList= [];
  1039. this.produceID = null;
  1040. }
  1041. },
  1042. back() {
  1043. this.$router.go(-1);
  1044. },
  1045. handleSelection(obj, type) {
  1046. this.saveData = [];
  1047. if (type == 2 && this.selectedInfo.order_no == "") {
  1048. return this.$Message.warning("请先选择项目");
  1049. }
  1050. this.currentSearchValue = "";
  1051. this.currentSearchValue = obj.currentSearchValue;
  1052. this.currencySelectedObj = obj;
  1053. this.selectionModal = true;
  1054. this.total = 0;
  1055. this.currencySelectedObj.type = type;
  1056. if (this.currencySelectedObj.list.length == 0 || type == 2) {
  1057. this.handleCurrentSearch(
  1058. this.currencySelectedObj,
  1059. this.currentSearchValue
  1060. );
  1061. }
  1062. },
  1063. handleSelectionRowno(row) {
  1064. if (this.selectedInfo.rows.length > 0) {
  1065. this.chooseLineNo = JSON.parse(JSON.stringify(this.selectedInfo.rows));
  1066. } else {
  1067. this.chooseLineNo = [{ start: null, end: null }];
  1068. }
  1069. this.selectionRownolModal = true;
  1070. },
  1071. handleCancelSelected(v, type) {
  1072. this.saveData = [];
  1073. if (type) {
  1074. this.selectedInfo.rows.splice(v, 1);
  1075. } else if (v == "product_id") {
  1076. this.selectedInfo.url_number = "";
  1077. this.selectedInfo.product_id = "";
  1078. } else {
  1079. this.selectedInfo[v] = "";
  1080. }
  1081. if (v != "order_no") {
  1082. this.getChipDetail();
  1083. } else {
  1084. this.selectedInfo.residential_name = "";
  1085. this.selectedInfo.url_number = "";
  1086. this.selectedInfo.product_id = "";
  1087. this.selectedInfo.rows = [];
  1088. this.contentData = [];
  1089. this.total = 0;
  1090. }
  1091. },
  1092. handleChooseBlockClick(row) {
  1093. if (row.isChoosed) {
  1094. row.isChoosed = false;
  1095. this.saveData.map((v,index)=>{
  1096. if(v.id == row.id){
  1097. this.saveData.splice(index,1)
  1098. }
  1099. })
  1100. } else {
  1101. row.isChoosed = true;
  1102. this.saveData.push(row)
  1103. }
  1104. // console.log(this.saveData)
  1105. if (row.un_print == 0) {
  1106. row.isFinished = true;
  1107. }
  1108. if(this.saveData.length == 1){
  1109. this.selectedObj = this.saveData[0];
  1110. }else{
  1111. if(this.saveData.length>1){
  1112. this.selectedObj = {};
  1113. }else{
  1114. this.selectedObj = {state:0};
  1115. }
  1116. }
  1117. if(this.selectedAll){
  1118. if(!row.isChoosed){
  1119. this.cancelData.push(row)
  1120. }else{
  1121. this.cancelData.map((v,index)=>{
  1122. if(v.id == row.id){
  1123. this.cancelData.splice(index,1)
  1124. }
  1125. })
  1126. }
  1127. }
  1128. console.log(this.saveData)
  1129. console.log(this.cancelData)
  1130. // this.selectedObj = row;
  1131. },
  1132. goCheckPage(val) {
  1133. switch(val){
  1134. case 1:
  1135. localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
  1136. this.$router.push({
  1137. path: "/cms/ChipPrintScreen/ChipPrintScreenCheck"
  1138. });
  1139. break;
  1140. case 2:
  1141. localStorage.setItem("printInfo", JSON.stringify(this.selectedInfo));
  1142. this.$router.push({
  1143. path: "/cms/ChipPrintScreen/ChipPrintScreenEquipment"
  1144. });
  1145. break;
  1146. }
  1147. },
  1148. handleSelectionClick(row, obj) {
  1149. row.list.map((v) => (v.isCurrent = false));
  1150. obj.isCurrent = true;
  1151. if (row.hasChild) {
  1152. // 行号
  1153. this.selectionModal = false;
  1154. this.selectionDetailModal = true;
  1155. this.chooseDetailUrlNo = obj;
  1156. this.currentSearchValue = this.rownoObj.currentSearchValue;
  1157. this.contentData = [];
  1158. this.total = 0;
  1159. } else {
  1160. // 订单号
  1161. this.chooseOrderNo = obj;
  1162. this.currentSearchValue = this.ordernoObj.currentSearchValue;
  1163. }
  1164. if (row.type == 1) {
  1165. this.handleSelectionComfirm(this.currencySelectedObj);
  1166. }
  1167. this.$forceUpdate();
  1168. },
  1169. handleSelectedRoomClick(list, block) {
  1170. if (block.isCurrent) {
  1171. this.modalRoomListSelected = this.modalRoomListSelected.filter(
  1172. (v) => v.id != block.id
  1173. );
  1174. block.isCurrent = !block.isCurrent;
  1175. } else {
  1176. if (this.modalRoomListSelected.length < this.selectedObj.print_num) {
  1177. block.isCurrent = !block.isCurrent;
  1178. this.modalRoomListSelected = this.modalRoomListSelected.concat(
  1179. this.modalRoomList.filter((v) => v.isCurrent)
  1180. );
  1181. } else {
  1182. this.$Message.warning("与打印数量不符,请重新选择");
  1183. }
  1184. }
  1185. this.modalRoomListSelected = Array.from(
  1186. new Set([...this.modalRoomListSelected])
  1187. );
  1188. },
  1189. handleAddRow(row, index) {
  1190. this.chooseLineNo.push({
  1191. start: "",
  1192. end: "",
  1193. });
  1194. },
  1195. handleDeleRow(row, index) {
  1196. this.chooseLineNo.splice(index, 1);
  1197. },
  1198. handleSelectionDetailClick(row, obj) {
  1199. row.children.map((v) => (v.isCurrent = false));
  1200. obj.isCurrent = true;
  1201. this.chooseUrlNo = obj;
  1202. this.handleSelectionComfirm(this.currencySelectedObj);
  1203. this.$forceUpdate();
  1204. },
  1205. handleFullScreenClick() {
  1206. this.isFullScreen = !this.isFullScreen;
  1207. if (this.isFullScreen) {
  1208. this.enterFullScreen();
  1209. } else {
  1210. this.exitFullScreen();
  1211. }
  1212. },
  1213. handleWideScreenClick() {
  1214. this.isWideScreen = !this.isWideScreen;
  1215. localStorage.setItem("isWideScreen", this.isWideScreen);
  1216. if (this.isWideScreen) {
  1217. this.page_index =1;
  1218. // this.page_size = 12;
  1219. this.enterWideScreen();
  1220. } else {
  1221. this.page_index =1;
  1222. // this.page_size = 6;
  1223. this.exitWideScreen();
  1224. }
  1225. this.getChipDetail();
  1226. },
  1227. enterWideScreen() {},
  1228. exitWideScreen() {},
  1229. handleSelectionRoom() {
  1230. this.getModalRoomList();
  1231. this.roomModal = true;
  1232. },
  1233. enterFullScreen() {
  1234. let el = document.documentElement;
  1235. let rfs =
  1236. el.requestFullScreen ||
  1237. el.webkitRequestFullScreen ||
  1238. el.mozRequestFullScreen ||
  1239. el.msRequestFullscreen;
  1240. if (rfs) {
  1241. rfs.call(el);
  1242. } else if (typeof window.ActiveXObject !== "undefined") {
  1243. // for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
  1244. let wscript = new ActiveXObject("WScript.Shell");
  1245. if (wscript != null) {
  1246. wscript.SendKeys("{F11}");
  1247. }
  1248. }
  1249. },
  1250. exitFullScreen() {
  1251. let el = document;
  1252. let cfs =
  1253. el.cancelFullScreen ||
  1254. el.mozCancelFullScreen ||
  1255. el.msExitFullscreen ||
  1256. el.webkitExitFullscreen ||
  1257. el.exitFullscreen;
  1258. if (cfs) {
  1259. // typeof cfs != "undefined" && cfs
  1260. cfs.call(el);
  1261. } else if (typeof window.ActiveXObject !== "undefined") {
  1262. // for IE,这里和fullScreen相同,模拟按下F11键退出全屏
  1263. let wscript = new ActiveXObject("WScript.Shell");
  1264. if (wscript != null) {
  1265. wscript.SendKeys("{F11}");
  1266. }
  1267. }
  1268. },
  1269. handleCurrentSearch(row, val) {
  1270. //type 1项目选择 2图号选择
  1271. let url =
  1272. row.type == 1
  1273. ? "/api/station_get_order"
  1274. : "/api/station_get_url_number";
  1275. this.axios({
  1276. method: "post",
  1277. url,
  1278. data: {
  1279. page_index:
  1280. row.type == 1 ? this.modal_1_page_index : this.modal_2_page_index,
  1281. page_size:
  1282. row.type == 1 ? this.modal_1_page_size : this.modal_2_page_size,
  1283. order_no: row.type == 1 ? val : this.selectedInfo.order_no,
  1284. url_number: row.type == 1 ? "" : val,
  1285. },
  1286. }).then((res) => {
  1287. if (res.code == 200) {
  1288. if (row.type == 1) {
  1289. row.list = res.data.data;
  1290. this.modal_1_total = res.data.total;
  1291. } else {
  1292. row.list = [];
  1293. this.modal_2_total = res.data.total;
  1294. let length = Math.ceil(res.data.data.length / 10);
  1295. for (let index = 0; index < length; index++) {
  1296. row.list.push({
  1297. //最后一位不一定刚好10个
  1298. title:
  1299. length - index == 1
  1300. ? `${res.data.data[10 * index].url_number}~${
  1301. res.data.data[res.data.data.length - 1].url_number
  1302. }`
  1303. : `${res.data.data[10 * index].url_number}~${
  1304. res.data.data[10 * index + 9].url_number
  1305. }`,
  1306. children: res.data.data.slice(10 * index, 10 * index + 10),
  1307. });
  1308. }
  1309. }
  1310. }
  1311. });
  1312. },
  1313. handleGetType(row){
  1314. this.axios.post('/api/station_get_type',{order_no:row}).then(res=>{
  1315. if(res.code == 200){
  1316. // this.employeeList = res.data.employee_list;
  1317. // this.employeeList.map(item=>{
  1318. // item.isChoosed = false;
  1319. // })
  1320. this.rule_data = res.data.rule_data;
  1321. this.produceList = res.data.produce_list;
  1322. this.produceList.map(item=>{
  1323. item.isChoosed = false;
  1324. })
  1325. }
  1326. })
  1327. },
  1328. //项目、图号确认
  1329. handleSelectionComfirm(row) {
  1330. console.log(`row`, row);
  1331. this.page_index=1;
  1332. // 这里需要把弹框关闭之后赋值到selectedInfo上
  1333. // this.selectedInfo.order_no;
  1334. // 1 项目选择 2图号选择
  1335. if (row.type == 1) {
  1336. let order_no ='';
  1337. this.saveData = [];
  1338. this.selectedInfo.order_no = this.chooseOrderNo.order_no;
  1339. this.selectedInfo.residential_name = this.chooseOrderNo.residential_name;
  1340. this.selectionModal = false;
  1341. this.selectedAll = false;
  1342. this.contentData = [];
  1343. this.selectedInfo.url_number = '';
  1344. row.list.map(v=>{
  1345. if(v.isCurrent){
  1346. order_no = v.order_no;
  1347. }
  1348. })
  1349. this.handleGetType(order_no);
  1350. } else if (row.type == 2) {
  1351. this.selectedAll = false;
  1352. this.selectedInfo.url_number = this.chooseUrlNo.url_number;
  1353. this.selectedInfo.product_id = this.chooseUrlNo.product_id;
  1354. this.selectionDetailModal = false;
  1355. this.getChipDetail();
  1356. }
  1357. // order_no: "20211010",
  1358. // residential_name: "2",
  1359. // url_number: "3",
  1360. // row_no: [],
  1361. },
  1362. // 获取具体详情
  1363. getChipDetail() {
  1364. this.axios({
  1365. method: "post",
  1366. url: "/api/station_get_order_product_pr",
  1367. data: {
  1368. order_no: this.selectedInfo.order_no,
  1369. product_id: this.selectedInfo.product_id,
  1370. rows: this.selectedInfo.rows,
  1371. page_index: this.page_index,
  1372. page_size: this.page_size,
  1373. },
  1374. }).then((res) => {
  1375. if (res.code == 200) {
  1376. res.data.data.map((v) => (v.isChoosed = false));
  1377. this.contentData = res.data.data;
  1378. if(this.selectedAll){
  1379. this.contentData.map(v=>{
  1380. v.isChoosed = true;
  1381. })
  1382. this.contentData.map(v=>{
  1383. this.cancelData.map(m=>{
  1384. if(v.id == m.id){
  1385. v.isChoosed=false;
  1386. }
  1387. })
  1388. })
  1389. }
  1390. this.contentData.map(v=>{
  1391. this.saveData.map(m=>{
  1392. if(v.id==m.id){
  1393. v.isChoosed =true;
  1394. }
  1395. })
  1396. })
  1397. this.total = res.data.total;
  1398. }
  1399. });
  1400. },
  1401. handlePrint() {
  1402. if(this.selectedObj.state == 0){
  1403. return this.$Message.warning("请选择数据");
  1404. }
  1405. if (!this.selectedObj.isChoosed) {
  1406. return this.$Message.warning("打印只能单选");
  1407. }
  1408. if (this.selectedObj.type != 1) {
  1409. return this.$Message.warning("该部件不含芯片,无需打印");
  1410. }
  1411. if (this.selectedObj.un_print == 0) {
  1412. this.selectedObj.print_num = this.selectedObj.on_print;
  1413. } else {
  1414. this.selectedObj.print_num = this.selectedObj.un_print;
  1415. }
  1416. this.printModal = true;
  1417. },
  1418. printDemo(data) {
  1419. setTimeout(()=>{
  1420. if (!data) return 0;
  1421. const st = this.wxsoect;
  1422. const {
  1423. client_name,
  1424. product_title,
  1425. part_title,
  1426. measure,
  1427. process,
  1428. url_number,
  1429. color_title,
  1430. chip,
  1431. chip_bin,
  1432. house,
  1433. unit,
  1434. layer,
  1435. number_detail,
  1436. position,
  1437. } = data;
  1438. st.send("OpenPort|255");
  1439. st.send("ZM_ClearBuffer");
  1440. st.send("ZM_SetPrintSpeed|4");
  1441. st.send("ZM_SetDarkness|12");
  1442. if (location.origin.indexOf("121.37.173.82") > -1) {
  1443. st.send("ZM_SetLabelHeight|136|32");
  1444. } else {
  1445. st.send("ZM_SetLabelHeight|160|16");
  1446. }
  1447. st.send("ZM_SetLabelWidth|664");
  1448. st.send(
  1449. `ZM_DrawTextTrueTypeW|70|20|24|0|Arial|1|600|0|0|0|A1| 项目:${client_name ||
  1450. ""}`
  1451. );
  1452. st.send(
  1453. `ZM_DrawTextTrueTypeW|280|20|24|0|Arial|1|600|0|0|0|A1| 区域: ${layer||''}`
  1454. );
  1455. st.send(
  1456. `ZM_DrawTextTrueTypeW|70|55|24|0|Arial|1|600|0|0|0|A2| 房号:${number_detail||''}`
  1457. );
  1458. st.send(
  1459. `ZM_DrawTextTrueTypeW|280|55|24|0|Arial|1|600|0|0|0|A2| 产品:${product_title ||
  1460. ""} `
  1461. );
  1462. st.send(
  1463. `ZM_DrawTextTrueTypeW|70|90|24|0|Arial|1|600|0|0|0|A3| 部件:${part_title || ""} `
  1464. );
  1465. st.send(
  1466. `ZM_DrawTextTrueTypeW|280|90|24|0|Arial|1|600|0|0|0|A3| 图号: ${url_number ||
  1467. ""} `
  1468. );
  1469. st.send(
  1470. `ZM_DrawTextTrueTypeW|70|125|24|0|Arial|1|600|0|0|0|A4| 尺寸: ${measure ||
  1471. ""} `
  1472. );
  1473. st.send(
  1474. `ZM_DrawTextTrueTypeW|280|125|24|0|Arial|1|600|0|0|0|A4| 木皮:${color_title || ""}`
  1475. );
  1476. st.send(
  1477. `ZM_DrawTextTrueTypeW|520|90|12|0|Arial|1|600|0|0|0|A4| ${chip_bin || ""}`
  1478. );
  1479. st.send(`ZM_RW_RfidFormat|1|0|0|${chip.length}|1|${chip}`);
  1480. st.send("ZM_PrintLabel_R|1|1");
  1481. st.send("ClosePort");
  1482. },1000)
  1483. },
  1484. handlePrintComfirm(row, type,printerUsbPort,printer_brand,sub_type) {
  1485. if (
  1486. type &&
  1487. this.modalRoomListSelected.length != this.selectedObj.print_num
  1488. ) {
  1489. return this.$Message.warning("与打印数量不符");
  1490. }
  1491. let ids = this.modalRoomListSelected.map((v) => {
  1492. return v.id;
  1493. });
  1494. let data = type
  1495. ? {
  1496. order_no: this.selectedInfo.order_no,
  1497. product_id: this.selectedInfo.product_id,
  1498. rows: this.selectedInfo.rows,
  1499. num: this.selectedObj.print_num,
  1500. id: row.id,
  1501. ids,
  1502. type,
  1503. }
  1504. : {
  1505. order_no: this.selectedInfo.order_no,
  1506. product_id: this.selectedInfo.product_id,
  1507. rows: this.selectedInfo.rows,
  1508. num: this.selectedObj.print_num,
  1509. id: row.id,
  1510. };
  1511. if(printer_brand === '灵天智能'){
  1512. const wxsoect = new WebSocket(`ws://localhost:${printerUsbPort?printerUsbPort:'1808'}`);
  1513. this.wxsoect = wxsoect;
  1514. console.log("this.wxsoect :>> ", this.wxsoect);
  1515. wxsoect.onopen = function(evt) {
  1516. console.log(`已成功打开`);
  1517. };
  1518. }
  1519. // 获取打印数据
  1520. this.axios({
  1521. method: "post",
  1522. url: "/api/station_print",
  1523. data,
  1524. }).then((resp) => {
  1525. if (resp.code == 200) {
  1526. if(printer_brand === '灵天智能'){
  1527. resp.data.map(ele=>{
  1528. this.printDemo(ele)
  1529. })
  1530. this.getChipDetail();
  1531. }else if(printer_brand === 'POSTEK'){
  1532. // usb打印/ip打印
  1533. this.axios.get("/api/get_print_local_url").then((res) => {
  1534. console.log(res);
  1535. if (res.code == 200) {
  1536. if (res.data.state) {
  1537. this.handlePrintChipsUsb(resp.data, res.data.type,printerUsbPort,sub_type);
  1538. } else {
  1539. this.handlePrintChipsIp(resp.data, res.data.type);
  1540. }
  1541. }
  1542. });}else{
  1543. return this.$Message.error('该格式未设置打印机')
  1544. }
  1545. // this.selectedObj.un_print = this.selectedObj.un_print - this.selectedObj.print_num;
  1546. // if(this.selectedObj.un_print == 0){
  1547. // this.selectedObj.isFinished == true;
  1548. // this.selectedObj.print_num == this.selectedObj.on_print;
  1549. // }
  1550. this.modalRoomList.map((v) => {
  1551. v.isCurrent = false;
  1552. });
  1553. this.modalRoomListSelected = [];
  1554. this.saveData = [];
  1555. this.printModal = false;
  1556. this.roomModal = false;
  1557. }
  1558. });
  1559. },
  1560. handleThen(){
  1561. if(!this.produceID||!this.employeeID){
  1562. return this.$Message.warning('请确认信息')
  1563. }
  1564. this.axios.post('/api/station_order_produce_complete',{produce_id:this.produceID,employee_id:this.employeeID,sort_list:this.rownoList}).then(res=>{
  1565. if(res.code==200){
  1566. this.$Message.success(res.msg);
  1567. this.produceList.map((v) => {
  1568. v.isChoosed = false;
  1569. });
  1570. this.produceID = null;
  1571. this.rownoList=[];
  1572. this.finishWork = false;
  1573. }
  1574. })
  1575. // this.finishWork = false;
  1576. },
  1577. // handleOk() {
  1578. // if (this.saveData.length==0&&!this.selectedAll) {
  1579. // return this.$Message.warning("请选择数据");
  1580. // }
  1581. // if (this.selectedObj.type == 1 && this.selectedObj.un_print == 0) {
  1582. // this.selectedObj.ok_num =
  1583. // this.selectedObj.on_print - this.selectedObj.on_complete;
  1584. // this.okModal = true;
  1585. // } else if (this.selectedObj.type != 1) {
  1586. // this.selectedObj.ok_num = this.selectedObj.un_complete;
  1587. // this.okModal = true;
  1588. // } else {
  1589. // return this.$Message.warning("部件存在未打印芯片,请先打印");
  1590. // }
  1591. // this.finishWork = true;
  1592. // },
  1593. handleRoomCancel() {
  1594. this.modalRoomList.map((v) => {
  1595. v.isCurrent = false;
  1596. });
  1597. this.modalRoomListSelected = [];
  1598. this.roomModal = false;
  1599. },
  1600. handleCancel() {
  1601. this.produceList.map((v) => {
  1602. v.isChoosed = false;
  1603. });
  1604. this.produceID = null;
  1605. this.rownoList = [];
  1606. this.finishWork = false;
  1607. },
  1608. // handleOkComfirm(row) {
  1609. // this.axios({
  1610. // method: "post",
  1611. // url: "/api/station_complete",
  1612. // data: {
  1613. // order_no: this.selectedInfo.order_no,
  1614. // product_id: this.selectedInfo.product_id,
  1615. // rows: this.selectedInfo.rows,
  1616. // num: this.selectedObj.ok_num,
  1617. // id: row.id,
  1618. // },
  1619. // }).then((res) => {
  1620. // if (res.code == 200) {
  1621. // this.okModal = false;
  1622. // this.getChipDetail();
  1623. // }
  1624. // });
  1625. // },
  1626. //行号确认
  1627. handleRowNoComfirm() {
  1628. let data =[];
  1629. this.chooseLineNo.map((v)=>{
  1630. if(v.start&&v.end){
  1631. data.push(v)
  1632. }
  1633. })
  1634. this.selectedInfo.rows = JSON.parse(JSON.stringify(data));
  1635. this.selectionRownolModal = false;
  1636. this.page_index = 1;
  1637. this.getChipDetail();
  1638. },
  1639. onInput(value) {
  1640. this.currentSearchValue = this.currentSearchValue + "" + value;
  1641. this.handleCurrentSearch(
  1642. this.currencySelectedObj,
  1643. this.currentSearchValue
  1644. );
  1645. },
  1646. onDelete() {
  1647. this.currentSearchValue = this.currentSearchValue.substring(
  1648. 0,
  1649. this.currentSearchValue.length - 1
  1650. );
  1651. this.handleCurrentSearch(
  1652. this.currencySelectedObj,
  1653. this.currentSearchValue
  1654. );
  1655. },
  1656. keyboardOkTap(value) {
  1657. let max;
  1658. if (this.selectedObj.type == 1) {
  1659. max = this.selectedObj.on_print - this.selectedObj.on_complete;
  1660. } else {
  1661. max = this.selectedObj.un_complete;
  1662. }
  1663. this.selectedObj.ok_num =
  1664. (this.selectedObj.ok_num ? this.selectedObj.ok_num : "") + "" + value;
  1665. if (this.selectedObj.ok_num * 1 > max) {
  1666. this.selectedObj.ok_num = max;
  1667. }
  1668. this.$forceUpdate();
  1669. },
  1670. keyboardOkDele() {
  1671. this.selectedObj.ok_num = (this.selectedObj.ok_num + "").substring(
  1672. 0,
  1673. this.selectedObj.ok_num.length - 1
  1674. );
  1675. this.$forceUpdate();
  1676. },
  1677. keyboardPrintTap(value) {
  1678. let max = this.selectedObj.on_print + this.selectedObj.un_print;
  1679. this.selectedObj.print_num =
  1680. Number((this.selectedObj.print_num ? this.selectedObj.print_num : "") +
  1681. "" +
  1682. value);
  1683. if (this.selectedObj.print_num * 1 > max) {
  1684. this.selectedObj.print_num = max;
  1685. }
  1686. this.$forceUpdate();
  1687. },
  1688. keyboardPrintDele() {
  1689. this.selectedObj.print_num = Number((this.selectedObj.print_num + "").substring(
  1690. 0,
  1691. this.selectedObj.print_num.length - 1
  1692. ));
  1693. this.$forceUpdate();
  1694. },
  1695. keyboardTap(value) {
  1696. this.keyboardObj[this.keyboardVal] =
  1697. (this.keyboardObj[this.keyboardVal]
  1698. ? this.keyboardObj[this.keyboardVal]
  1699. : "") +
  1700. "" +
  1701. value;
  1702. },
  1703. keyboardDele() {
  1704. this.keyboardObj[this.keyboardVal] = this.keyboardObj[
  1705. this.keyboardVal
  1706. ].substring(0, this.keyboardObj[this.keyboardVal].length - 1);
  1707. },
  1708. handleRowNoInput(row, type) {
  1709. if (type == 1) {
  1710. this.keyboardVal = "start";
  1711. } else {
  1712. this.keyboardVal = "end";
  1713. }
  1714. this.keyboardObj = row;
  1715. this.show2 = true;
  1716. },
  1717. handleOkInput() {
  1718. this.show3 = true;
  1719. },
  1720. handlePrintInput() {
  1721. this.show4 = true;
  1722. },
  1723. changePage(e) {
  1724. this.page_index = e;
  1725. this.getChipDetail();
  1726. },
  1727. changeModalPage(e) {
  1728. this.currencySelectedObj.type == 1
  1729. ? (this.modal_1_page_index = e)
  1730. : (this.modal_2_page_index = e);
  1731. this.handleCurrentSearch(
  1732. this.currencySelectedObj,
  1733. this.currentSearchValue
  1734. );
  1735. },
  1736. changeRoomPage(e) {
  1737. this.modal_room_page_index = e;
  1738. this.getModalRoomList();
  1739. },
  1740. getModalRoomList() {
  1741. this.axios({
  1742. method: "post",
  1743. url: "/api/station_get_print_house",
  1744. data: {
  1745. order_no: this.selectedInfo.order_no,
  1746. product_id: this.selectedInfo.product_id,
  1747. rows: this.selectedInfo.rows,
  1748. page_index: this.modal_room_page_index,
  1749. page_size: this.modal_room_page_size,
  1750. id: this.selectedObj.id,
  1751. },
  1752. }).then((res) => {
  1753. if (res.code == 200) {
  1754. res.data.data.map((v) => {
  1755. v.isCurrent = false;
  1756. this.modalRoomListSelected &&
  1757. this.modalRoomListSelected.map((w) => {
  1758. if (w.id == v.id) {
  1759. v.isCurrent = true;
  1760. }
  1761. });
  1762. });
  1763. this.modalRoomList = res.data.data;
  1764. this.modal_room_total = res.data.total;
  1765. console.log(this.modalRoomList)
  1766. }
  1767. });
  1768. },
  1769. handlePrintChipsUsb(contents, type,printerUsbPort,sub_type) {
  1770. this.axios.get("/api/get_print_url").then((res) => {
  1771. // let data = {};
  1772. // // let url = "http://192.168.0.145:888/postek/print"; //request_url
  1773. let url = `http://${res.data.request_url}:888/postek/print`; //request_url
  1774. // data.reqParam = "1"; //这个一般不用改,如需改,查api
  1775. // let printparamsJsonArray = [];
  1776. // // let IP = "192.168.1.58";//print_url
  1777. // // let IP = "192.168.0.199"; //print_url
  1778. // // printparamsJsonArray.push({printPort:"1",printName:"POSTEK TX3r"});
  1779. // printparamsJsonArray.push({ PTK_OpenUSBPort:printerUsbPort});
  1780. // printparamsJsonArray.push({ PTK_ClearBuffer: "" });
  1781. // printparamsJsonArray.push({ PTK_SetDirection: "B" });
  1782. // printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
  1783. // printparamsJsonArray.push({ PTK_SetDarkness: "10" });
  1784. // printparamsJsonArray.push({
  1785. // PTK_SetLabelHeight: 624 + "," + 24 + ",0,false",
  1786. // });
  1787. // printparamsJsonArray.push({ PTK_SetLabelWidth: 1080 });
  1788. // // 打印类型 1江山 2贝斯特
  1789. // if (type == 1) {
  1790. // contents.map((content) => {
  1791. // //江山打印格式
  1792. // //上
  1793. // const printContent_l1 = `单号:${content.order_no}`;
  1794. // printparamsJsonArray.push({
  1795. // PTK_DrawText_TrueType:
  1796. // "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1797. // });
  1798. // const printContent_l1_2 = `型号:${content.product_title}`;
  1799. // printparamsJsonArray.push({
  1800. // PTK_DrawText_TrueType:
  1801. // "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1802. // });
  1803. // const printContent_l2 = `尺寸:${content.measure}`;
  1804. // printparamsJsonArray.push({
  1805. // PTK_DrawText_TrueType:
  1806. // "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1807. // });
  1808. // const printContent_l2_2 = `工艺:${content.process_title}`;
  1809. // printparamsJsonArray.push({
  1810. // PTK_DrawText_TrueType:
  1811. // "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1812. // });
  1813. // const printContent_l3 = `颜色:${content.color_title}`;
  1814. // printparamsJsonArray.push({
  1815. // PTK_DrawText_TrueType:
  1816. // "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1817. // });
  1818. // const printContent_l3_2 = `部件:${content.part_title}`;
  1819. // printparamsJsonArray.push({
  1820. // PTK_DrawText_TrueType:
  1821. // "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1822. // });
  1823. // //下
  1824. // printparamsJsonArray.push({
  1825. // PTK_DrawText_TrueType:
  1826. // "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1827. // });
  1828. // printparamsJsonArray.push({
  1829. // PTK_DrawText_TrueType:
  1830. // "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1831. // });
  1832. // printparamsJsonArray.push({
  1833. // PTK_DrawText_TrueType:
  1834. // "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1835. // });
  1836. // printparamsJsonArray.push({
  1837. // PTK_DrawText_TrueType:
  1838. // "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1839. // });
  1840. // printparamsJsonArray.push({
  1841. // PTK_DrawText_TrueType:
  1842. // "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1843. // });
  1844. // printparamsJsonArray.push({
  1845. // PTK_DrawText_TrueType:
  1846. // "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1847. // });
  1848. // printparamsJsonArray.push({
  1849. // PTK_RWRFIDLabel:
  1850. // "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1851. // });
  1852. // printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1853. // });
  1854. // } else {
  1855. // contents.map((content) => {
  1856. // //贝斯特打印格式
  1857. // //上
  1858. // const printContent_l1 = `项目:${content.client_name}`;
  1859. // printparamsJsonArray.push({
  1860. // PTK_DrawText_TrueType:
  1861. // "150,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1862. // });
  1863. // const printContent_l1_2 = `区域:${
  1864. // content.house ? content.house + "-" : ""
  1865. // }${content.layer ? content.layer : ""}${
  1866. // content.position ? content.position : ""
  1867. // }`;
  1868. // printparamsJsonArray.push({
  1869. // PTK_DrawText_TrueType:
  1870. // "650,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1871. // });
  1872. // const printContent_l2 = `房号:${content.number_detail}`;
  1873. // printparamsJsonArray.push({
  1874. // PTK_DrawText_TrueType:
  1875. // "150,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1876. // });
  1877. // const printContent_l2_2 = `产品:${content.product_title}`;
  1878. // printparamsJsonArray.push({
  1879. // PTK_DrawText_TrueType:
  1880. // "650,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1881. // });
  1882. // const printContent_l3 = `图号:${content.url_number}`;
  1883. // printparamsJsonArray.push({
  1884. // PTK_DrawText_TrueType:
  1885. // "150,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1886. // });
  1887. // const printContent_l3_2 = `部件:${content.part_title}`;
  1888. // printparamsJsonArray.push({
  1889. // PTK_DrawText_TrueType:
  1890. // "650,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1891. // });
  1892. // const printContent_l4 = `木皮:${content.color_title}`;
  1893. // printparamsJsonArray.push({
  1894. // PTK_DrawText_TrueType:
  1895. // "150,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1896. // });
  1897. // const printContent_l4_2 = `尺寸:${content.measure}`;
  1898. // printparamsJsonArray.push({
  1899. // PTK_DrawText_TrueType:
  1900. // "150,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1901. // });
  1902. // let space_str = '\u0000'
  1903. // let printContent_l5_data=this.hexCharCodeToStr(content.chip);
  1904. // printContent_l5_data = printContent_l5_data.replace(space_str,'')
  1905. // const printContent_l5 = `芯片编码:${printContent_l5_data}`;
  1906. // // console.log(printContent_l5_data)
  1907. // printparamsJsonArray.push({
  1908. // PTK_DrawText_TrueTypeEx:
  1909. // "970,330,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
  1910. // });
  1911. // //下
  1912. // printparamsJsonArray.push({
  1913. // PTK_DrawText_TrueType:
  1914. // "150,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  1915. // });
  1916. // printparamsJsonArray.push({
  1917. // PTK_DrawText_TrueType:
  1918. // "650,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  1919. // });
  1920. // printparamsJsonArray.push({
  1921. // PTK_DrawText_TrueType:
  1922. // "150,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  1923. // });
  1924. // printparamsJsonArray.push({
  1925. // PTK_DrawText_TrueType:
  1926. // "650,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  1927. // });
  1928. // printparamsJsonArray.push({
  1929. // PTK_DrawText_TrueType:
  1930. // "150,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  1931. // });
  1932. // printparamsJsonArray.push({
  1933. // PTK_DrawText_TrueType:
  1934. // "650,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  1935. // });
  1936. // printparamsJsonArray.push({
  1937. // PTK_DrawText_TrueType:
  1938. // "150,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  1939. // });
  1940. // printparamsJsonArray.push({
  1941. // PTK_DrawText_TrueType:
  1942. // "650,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  1943. // });
  1944. // printparamsJsonArray.push({
  1945. // PTK_DrawText_TrueTypeEx:
  1946. // "970,530,25,0,微软雅黑,1,700,0,0,0,10,0,0,0," + printContent_l5,
  1947. // });
  1948. // // 17,35 420
  1949. // printparamsJsonArray.push({
  1950. // PTK_RWRFIDLabel:
  1951. // "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  1952. // });
  1953. // printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  1954. // });
  1955. // }
  1956. // printparamsJsonArray.push({ PTK_CloseUSBPort: "" });
  1957. // data.printparams = printparamsJsonArray;
  1958. // let sub_data = JSON.parse(JSON.stringify(data));
  1959. // sub_data.printparams = JSON.stringify(sub_data.printparams);
  1960. let _this = this;
  1961. $.ajax({
  1962. type: "post",
  1963. url,
  1964. data: _this.func.PrintChipsUsb(contents,type,printerUsbPort,sub_type),
  1965. dataType: "json",
  1966. timeout: 5000,
  1967. success: function(result) {
  1968. _this.getChipDetail();
  1969. if (result.retval == "0") {
  1970. _this.$Message.success("发送成功");
  1971. } else {
  1972. _this.$Message.error("发送失败,返回结果:" + result.msg);
  1973. }
  1974. },
  1975. error: function() {
  1976. _this.getChipDetail();
  1977. },
  1978. });
  1979. });
  1980. },
  1981. // hexCharCodeToStr(hexCharCodeStr) {
  1982. // let trimedStr = hexCharCodeStr.trim();
  1983. // let rawStr = trimedStr.substr(0,2).toLowerCase() === "0x"?trimedStr.substr(2):trimedStr;
  1984. // let len = rawStr.length;
  1985. // if(len % 2 !== 0) {
  1986. // alert("Illegal Format ASCII Code!");
  1987. // return "";}
  1988. // let curCharCode;
  1989. // let resultStr = [];
  1990. // for(var i = 0; i < len;i = i + 2) {
  1991. // curCharCode = parseInt(rawStr.substr(i, 2), 16); // ASCII Code Value
  1992. // resultStr.push(String.fromCharCode(curCharCode));
  1993. // }
  1994. // return resultStr.join("");
  1995. // },
  1996. handlePrintChipsIp(contents, type) {
  1997. this.axios.get("/api/get_print_url").then((res) => {
  1998. let data = {};
  1999. // let url = "http://192.168.0.145:888/postek/print"; //request_url
  2000. let url = `http://${res.data.request_url}:888/postek/print`; //request_url
  2001. data.reqParam = "1"; //这个一般不用改,如需改,查api
  2002. let printparamsJsonArray = [];
  2003. // let IP = "192.168.1.58";//print_url
  2004. // let IP = "192.168.0.199"; //print_url
  2005. let IP = res.data.print_url;
  2006. let port = 9100;
  2007. let IP_Port = IP + "," + port;
  2008. printparamsJsonArray.push({ PTK_Connect_Timer: IP_Port + ",1" });
  2009. printparamsJsonArray.push({ PTK_ClearBuffer: "" });
  2010. printparamsJsonArray.push({ PTK_SetDirection: "B" });
  2011. printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
  2012. printparamsJsonArray.push({ PTK_SetDarkness: "10" });
  2013. printparamsJsonArray.push({
  2014. PTK_SetLabelHeight: 624 + "," + 24 + ",0,false",
  2015. });
  2016. printparamsJsonArray.push({ PTK_SetLabelWidth: 1080 });
  2017. console.log(`contents`, contents);
  2018. if (type == 1) {
  2019. contents.map((content) => {
  2020. //江山打印格式
  2021. //上
  2022. const printContent_l1 = `单号:${content.order_no}`;
  2023. printparamsJsonArray.push({
  2024. PTK_DrawText_TrueType:
  2025. "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  2026. });
  2027. const printContent_l1_2 = `型号:${content.product_title}`;
  2028. printparamsJsonArray.push({
  2029. PTK_DrawText_TrueType:
  2030. "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  2031. });
  2032. const printContent_l2 = `尺寸:${content.measure}`;
  2033. printparamsJsonArray.push({
  2034. PTK_DrawText_TrueType:
  2035. "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  2036. });
  2037. const printContent_l2_2 = `工艺:${content.process_title}`;
  2038. printparamsJsonArray.push({
  2039. PTK_DrawText_TrueType:
  2040. "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  2041. });
  2042. const printContent_l3 = `颜色:${content.color_title}`;
  2043. printparamsJsonArray.push({
  2044. PTK_DrawText_TrueType:
  2045. "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  2046. });
  2047. const printContent_l3_2 = `部件:${content.part_title}`;
  2048. printparamsJsonArray.push({
  2049. PTK_DrawText_TrueType:
  2050. "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  2051. });
  2052. //下
  2053. printparamsJsonArray.push({
  2054. PTK_DrawText_TrueType:
  2055. "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  2056. });
  2057. printparamsJsonArray.push({
  2058. PTK_DrawText_TrueType:
  2059. "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  2060. });
  2061. printparamsJsonArray.push({
  2062. PTK_DrawText_TrueType:
  2063. "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  2064. });
  2065. printparamsJsonArray.push({
  2066. PTK_DrawText_TrueType:
  2067. "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  2068. });
  2069. printparamsJsonArray.push({
  2070. PTK_DrawText_TrueType:
  2071. "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  2072. });
  2073. printparamsJsonArray.push({
  2074. PTK_DrawText_TrueType:
  2075. "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  2076. });
  2077. printparamsJsonArray.push({
  2078. PTK_RWRFIDLabel:
  2079. "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  2080. });
  2081. printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  2082. });
  2083. } else {
  2084. contents.map((content) => {
  2085. //贝斯特打印格式
  2086. //上
  2087. const printContent_l1 = `项目:${content.client_name}`;
  2088. printparamsJsonArray.push({
  2089. PTK_DrawText_TrueType:
  2090. "100,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  2091. });
  2092. const printContent_l1_2 = `区域:${
  2093. content.house ? content.house + "-" : ""
  2094. }${content.layer ? content.layer : ""}${
  2095. content.position ? content.position : ""
  2096. }`;
  2097. printparamsJsonArray.push({
  2098. PTK_DrawText_TrueType:
  2099. "600,40,60,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  2100. });
  2101. const printContent_l2 = `房号:${content.number_detail}`;
  2102. printparamsJsonArray.push({
  2103. PTK_DrawText_TrueType:
  2104. "100,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  2105. });
  2106. const printContent_l2_2 = `产品:${content.product_title}`;
  2107. printparamsJsonArray.push({
  2108. PTK_DrawText_TrueType:
  2109. "600,110,60,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  2110. });
  2111. const printContent_l3 = `图号:${content.url_number}`;
  2112. printparamsJsonArray.push({
  2113. PTK_DrawText_TrueType:
  2114. "100,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  2115. });
  2116. const printContent_l3_2 = `部件:${content.part_title}`;
  2117. printparamsJsonArray.push({
  2118. PTK_DrawText_TrueType:
  2119. "600,180,60,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  2120. });
  2121. const printContent_l4 = `木皮:${content.color_title}`;
  2122. printparamsJsonArray.push({
  2123. PTK_DrawText_TrueType:
  2124. "100,320,60,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  2125. });
  2126. const printContent_l4_2 = `尺寸:${content.measure}`;
  2127. printparamsJsonArray.push({
  2128. PTK_DrawText_TrueType:
  2129. "100,250,60,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  2130. });
  2131. //下
  2132. printparamsJsonArray.push({
  2133. PTK_DrawText_TrueType:
  2134. "100,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1,
  2135. });
  2136. printparamsJsonArray.push({
  2137. PTK_DrawText_TrueType:
  2138. "600,435,45,0,微软雅黑,1,700,0,0,0," + printContent_l1_2,
  2139. });
  2140. printparamsJsonArray.push({
  2141. PTK_DrawText_TrueType:
  2142. "100,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2,
  2143. });
  2144. printparamsJsonArray.push({
  2145. PTK_DrawText_TrueType:
  2146. "600,480,45,0,微软雅黑,1,700,0,0,0," + printContent_l2_2,
  2147. });
  2148. printparamsJsonArray.push({
  2149. PTK_DrawText_TrueType:
  2150. "100,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3,
  2151. });
  2152. printparamsJsonArray.push({
  2153. PTK_DrawText_TrueType:
  2154. "600,525,45,0,微软雅黑,1,700,0,0,0," + printContent_l3_2,
  2155. });
  2156. printparamsJsonArray.push({
  2157. PTK_DrawText_TrueType:
  2158. "100,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4,
  2159. });
  2160. printparamsJsonArray.push({
  2161. PTK_DrawText_TrueType:
  2162. "600,570,45,0,微软雅黑,1,700,0,0,0," + printContent_l4_2,
  2163. });
  2164. // 17,35 420
  2165. printparamsJsonArray.push({
  2166. PTK_RWRFIDLabel:
  2167. "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
  2168. });
  2169. printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
  2170. });
  2171. }
  2172. printparamsJsonArray.push({ PTK_CloseConnect: "" });
  2173. data.printparams = printparamsJsonArray;
  2174. let sub_data = JSON.parse(JSON.stringify(data));
  2175. sub_data.printparams = JSON.stringify(sub_data.printparams);
  2176. let _this = this;
  2177. $.ajax({
  2178. type: "post",
  2179. url,
  2180. data: sub_data,
  2181. dataType: "json",
  2182. timeout: 5000,
  2183. success: function(result) {
  2184. _this.getChipDetail();
  2185. if (result.retval == "0") {
  2186. _this.$Message.success("发送成功");
  2187. } else {
  2188. _this.$Message.error("发送失败,返回结果:" + result.msg);
  2189. }
  2190. },
  2191. error: function() {
  2192. _this.getChipDetail();
  2193. },
  2194. });
  2195. });
  2196. },
  2197. },
  2198. // 监控data中的数据变化
  2199. watch: {},
  2200. beforeCreate() {}, // 生命周期 - 创建之前
  2201. beforeMount() {}, // 生命周期 - 挂载之前
  2202. beforeUpdate() {}, // 生命周期 - 更新之前
  2203. updated() {}, // 生命周期 - 更新之后
  2204. beforeDestroy() {}, // 生命周期 - 销毁之前
  2205. destroyed() {}, // 生命周期 - 销毁完成
  2206. activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
  2207. };
  2208. </script>
  2209. <style lang="scss" scoped>
  2210. .fullscreen-title-btn {
  2211. position: absolute;
  2212. right: 100px;
  2213. top: 0.175rem;
  2214. }
  2215. .fullscreen-content {
  2216. font-size: 26px;
  2217. font-family: "Microsoft YaHei", 微软雅黑;
  2218. font-weight: bold;
  2219. .fullscreen-content-select {
  2220. display: flex;
  2221. justify-content: flex-start;
  2222. padding-bottom: 0.1rem;
  2223. border-bottom: 1px solid #e8eaec;
  2224. .fullscreen-content-select-block {
  2225. display: flex;
  2226. justify-content: flex-start;
  2227. align-items: center;
  2228. }
  2229. .fullscreen-content-select-block:nth-child(1) {
  2230. width: 30%;
  2231. }
  2232. .fullscreen-content-select-block:nth-child(2) {
  2233. width: 30%;
  2234. }
  2235. .fullscreen-content-select-block:nth-child(3) {
  2236. width: 30%;
  2237. }
  2238. }
  2239. .fullscreen-content-choose {
  2240. display: flex;
  2241. justify-content: flex-start;
  2242. flex-wrap: wrap;
  2243. padding-top: 0.1rem;
  2244. margin-bottom: 0.5rem;
  2245. .fullscreen-content-choose-block {
  2246. width: 33.33%;
  2247. border-radius: 5px;
  2248. border: 1px solid #2d8cf0;
  2249. // margin: 0.1rem 1%;
  2250. padding: 1%;
  2251. position: relative;
  2252. div {
  2253. display: flex;
  2254. justify-content: space-between;
  2255. // margin-top: 5px;
  2256. }
  2257. .chip-tag {
  2258. display: inline-block;
  2259. position: absolute;
  2260. width: 1rem;
  2261. top: 0;
  2262. left: 50%;
  2263. font-size: 18px;
  2264. background-color: #fadb14;
  2265. color: black;
  2266. height: 0.75rem;
  2267. border-radius: 15%;
  2268. text-align: center;
  2269. padding-top: 0.15rem;
  2270. transform: translate(-50%, -10%);
  2271. }
  2272. .chip-tag-choosed {
  2273. display: inline-block;
  2274. position: absolute;
  2275. width: 1rem;
  2276. top: 0;
  2277. left: 15%;
  2278. font-size: 18px;
  2279. background-color: #fadb14;
  2280. color: black;
  2281. height: 0.75rem;
  2282. border-radius: 15%;
  2283. text-align: center;
  2284. padding-top: 0.15rem;
  2285. transform: translate(-10%, -10%) !important;
  2286. }
  2287. }
  2288. .fullscreen-content-choose-block-wide {
  2289. width: 24.5%;
  2290. }
  2291. .fullscreen-content-choose-block-choosen {
  2292. color: white;
  2293. background-color: #2d8cf0;
  2294. }
  2295. .fullscreen-content-choose-block-unchoosen {
  2296. color: #2d8cf0;
  2297. background-color: white;
  2298. }
  2299. }
  2300. }
  2301. .fullscreen-content-page {
  2302. display: flex;
  2303. justify-content: center;
  2304. }
  2305. .selection-modal {
  2306. .selection-modal-top {
  2307. display: flex;
  2308. justify-content: center;
  2309. }
  2310. .selection-modal-body {
  2311. display: flex;
  2312. justify-content: center;
  2313. flex-wrap: wrap;
  2314. .selection-modal-body-block {
  2315. cursor: pointer;
  2316. width: 30%;
  2317. margin: 1%;
  2318. padding: 3% 1%;
  2319. background-color: #e9ecef;
  2320. div {
  2321. display: flex;
  2322. justify-content: center;
  2323. }
  2324. }
  2325. .selection-modal-body-block-detail {
  2326. cursor: pointer;
  2327. width: 17%;
  2328. margin: 1%;
  2329. padding: 3% 1%;
  2330. background-color: #e9ecef;
  2331. div {
  2332. display: flex;
  2333. justify-content: center;
  2334. }
  2335. }
  2336. .selection-modal-body-block-choosen,
  2337. .selection-modal-body-block-detail-choosen {
  2338. background-color: #fadb14;
  2339. }
  2340. .selection-modal-body-block-unchoosen,
  2341. .selection-modal-body-block-detail-unchoosen {
  2342. background-color: #e9ecef;
  2343. }
  2344. }
  2345. }
  2346. .selection-rowno-modal {
  2347. .selection-rowno-modal-body {
  2348. max-height: 7rem;
  2349. overflow: auto;
  2350. .selection-rowno-modal-body-block {
  2351. margin: 0.5rem 0;
  2352. text-align: center;
  2353. }
  2354. }
  2355. }
  2356. .selection-print-modal {
  2357. .selection-print-modal-body {
  2358. font-size: 0.5rem;
  2359. height: 4.5rem;
  2360. .selection-print-modal-body-top {
  2361. display: flex;
  2362. justify-content: space-around;
  2363. align-items: center;
  2364. margin: 0.5rem 0;
  2365. /deep/.ivu-input-number-handler{
  2366. height: 20.5px;
  2367. }
  2368. // /deep/.ivu-input-number-input-warp{
  2369. // margin: auto 0;
  2370. // /deep/.ivu-input-number-input{
  2371. // margin: auto 0;
  2372. // }
  2373. // }
  2374. }
  2375. .selection-print-modal-body-info {
  2376. padding-top: 16px;
  2377. border-top: 1px solid #e8eaec;
  2378. text-align: center;
  2379. button{
  2380. height: 2em;
  2381. font-size: 1em;
  2382. }
  2383. }
  2384. }
  2385. .selection-print-modal-body-footer{
  2386. height: auto;
  2387. display: flex;
  2388. // justify-content: space-around;
  2389. flex-wrap: wrap;
  2390. button{
  2391. margin: 0.2em;
  2392. height: 1.5em;
  2393. font-size: 3em;
  2394. }
  2395. }
  2396. }
  2397. .icon-wrapper {
  2398. position: relative;
  2399. font-size: 0.25rem;
  2400. }
  2401. .icon-close {
  2402. position: absolute;
  2403. right: -0.35rem;
  2404. top: -0.2rem;
  2405. }
  2406. /deep/.ivu-page-item {
  2407. display: inline-block;
  2408. font-size: 0.5rem;
  2409. height: 1rem;
  2410. line-height: 1rem;
  2411. width: 1rem;
  2412. }
  2413. /deep/.ivu-page-prev,
  2414. /deep/.ivu-page-next {
  2415. display: inline-block;
  2416. font-size: 0.5rem;
  2417. height: 1rem;
  2418. line-height: 1rem;
  2419. width: 1rem;
  2420. a {
  2421. font-size: 0.5rem;
  2422. }
  2423. }
  2424. /deep/.ivu-modal-close {
  2425. border: 1px solid black;
  2426. }
  2427. /deep/.fullscreen-content-page {
  2428. display: flex;
  2429. justify-content: space-around;
  2430. }
  2431. .wide-screen-rowno {
  2432. display: flex;
  2433. justify-content: center !important;
  2434. span {
  2435. display: inline-block;
  2436. text-align: center;
  2437. width: 3rem;
  2438. height: 3rem;
  2439. line-height: 3rem;
  2440. border-radius: 50%;
  2441. font-size: 1.5rem;
  2442. }
  2443. .wide-screen-rowno-span-choosed {
  2444. color: #2d8cf0;
  2445. background-color: white;
  2446. }
  2447. .wide-screen-rowno-span {
  2448. color: white;
  2449. background-color: #2d8cf0;
  2450. }
  2451. }
  2452. .printRow{
  2453. display: none;
  2454. }
  2455. @media print {
  2456. .printRow{
  2457. display: block;
  2458. width: 100%;
  2459. margin-top: 10mm;
  2460. .printRow_content{
  2461. page-break-after: always;
  2462. }
  2463. }
  2464. @page{
  2465. margin:10mm 1mm
  2466. }
  2467. }
  2468. </style>