workOrder.vue 134 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932
  1. <template>
  2. <div class="content-box" v-loading="loading">
  3. <div class="left">
  4. <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
  5. <span class="cameratxt">工单管理</span>
  6. </div>
  7. <div class="middle">
  8. <div class="filter">
  9. <div class="condition">
  10. <span>关键字 : </span>
  11. <el-input
  12. clearable
  13. @clear="searchBtn"
  14. v-model="searchInput.keyWord"
  15. class="w-50 m-2"
  16. placeholder="输入区域、姓名、电话、工单号"
  17. style="width: 230px"
  18. />
  19. </div>
  20. <div class="condition2" v-if="schoolId == 0">
  21. <span>校区 : </span>
  22. <el-select
  23. v-model="searchInput.schoolId"
  24. class="m-2"
  25. placeholder="请选择校区"
  26. @change="selSchool"
  27. style="width: 150px"
  28. >
  29. <el-option label="全部校区" :value="0" />
  30. <el-option label="黄家湖校区" :value="1" />
  31. <el-option label="墨轩湖校区" :value="2" />
  32. </el-select>
  33. </div>
  34. <div class="condition2" v-if="schoolId == 1">
  35. <span>校区 : </span>
  36. <el-select
  37. v-model="searchInput.schoolId"
  38. class="m-2"
  39. placeholder="请选择校区"
  40. @change="selSchool"
  41. >
  42. <el-option label="黄家湖校区" :value="1" />
  43. </el-select>
  44. </div>
  45. <div class="condition2" v-if="schoolId == 2">
  46. <span>校区 : </span>
  47. <el-select
  48. v-model="searchInput.schoolId"
  49. class="m-2"
  50. placeholder="请选择校区"
  51. @change="selSchool"
  52. >
  53. <el-option label="墨轩湖校区" :value="2" />
  54. </el-select>
  55. </div>
  56. <div class="condition2">
  57. <span>维修师傅 : </span>
  58. <el-input
  59. clearable
  60. @clear="searchBtn"
  61. v-model="searchInput.maintenanceName"
  62. class="w-50 m-2"
  63. placeholder="输入维修师傅名字"
  64. style="width: 160px"
  65. />
  66. </div>
  67. <div class="condition2">
  68. <span>创建时间 : </span>
  69. <el-date-picker
  70. style="width: 240px"
  71. v-model="searchInput.createTime"
  72. type="daterange"
  73. range-separator="-"
  74. start-placeholder="起始时间"
  75. end-placeholder="结束时间"
  76. format="YYYY-MM-DD"
  77. value-format="YYYY-MM-DD"
  78. :prefix-icon="Calendar"
  79. placeholder="请选择日期"
  80. />
  81. </div>
  82. <el-button
  83. style="margin-left: 30px"
  84. color="rgba(111, 182, 184, 1)"
  85. type="primary"
  86. class="search"
  87. @click="searchBtn"
  88. ><el-icon>
  89. <Search />
  90. </el-icon>
  91. <span>查询</span></el-button
  92. >
  93. </div>
  94. <!-- 按钮列表 -->
  95. <div class="gongneng">
  96. <!-- <el-button
  97. type="primary"
  98. color="rgba(111, 182, 184, 1)"
  99. @click="addlist"
  100. ><img
  101. src="@/assets/add.png"
  102. style="width: 14px; height: 14px; margin-right: 4px"
  103. alt=""
  104. /><span>新建工单</span></el-button
  105. > -->
  106. <el-button
  107. color="rgba(111, 182, 184, 1)"
  108. class="import"
  109. type="primary"
  110. @click="batchOperate"
  111. ><img
  112. src="@/assets/batchGD.png"
  113. style="width: 14px; height: 14px; margin-right: 4px"
  114. alt=""
  115. />
  116. <span>批量关单</span></el-button
  117. >
  118. <el-button
  119. color="rgba(111, 182, 184, 1)"
  120. class="import"
  121. type="primary"
  122. @click="importExcel"
  123. ><img
  124. src="@/assets/importWhite.png"
  125. style="width: 14px; height: 14px; margin-right: 4px"
  126. alt=""
  127. />
  128. <span>导出表单</span></el-button
  129. >
  130. </div>
  131. </div>
  132. <div class="btn">
  133. <ul>
  134. <li
  135. v-for="i in day"
  136. :key="i.name"
  137. @click="dayBtn(i.state)"
  138. :class="dayIndex == i.state ? 'li_active' : ''"
  139. >
  140. {{ i.name + " (" + i.key + ")" }}
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="footer">
  145. <el-table
  146. :row-class-name="tableRowClassName"
  147. :data="tableData.list"
  148. @selection-change="handleSelectionChange"
  149. style="width: 100%"
  150. :header-cell-style="{
  151. background: 'rgba(240, 243, 247, 1)',
  152. height: '50px',
  153. border: 0,
  154. }"
  155. >
  156. <el-table-column align="center" type="selection" width="80" />
  157. <el-table-column align="center" type="index" label="序号" width="80" />
  158. <el-table-column
  159. align="center"
  160. prop="recordNo"
  161. width="180"
  162. label="工单编号"
  163. >
  164. <template #default="scope">
  165. <div class="orderNum">
  166. <span>{{ scope.row.recordNo }}</span>
  167. </div>
  168. </template>
  169. </el-table-column>
  170. <el-table-column
  171. align="center"
  172. prop="areaName"
  173. show-overflow-tooltip
  174. width="220"
  175. label="报修区域"
  176. />
  177. <el-table-column align="center" prop="userName" label="姓名" />
  178. <el-table-column
  179. align="center"
  180. prop="userPhone"
  181. width="120"
  182. label="电话"
  183. />
  184. <el-table-column
  185. align="center"
  186. prop="articleName"
  187. width="180"
  188. show-overflow-tooltip
  189. label="报修物品"
  190. />
  191. <el-table-column
  192. align="center"
  193. prop="description"
  194. show-overflow-tooltip
  195. label="故障描述"
  196. />
  197. <el-table-column align="center" prop="state" label="状态">
  198. <!-- <template #default="scope">
  199. <div
  200. class="operation"
  201. style="color: rgb(0, 0, 0)"
  202. v-if="scope.row.state == '已完成'"
  203. >
  204. 已完成
  205. </div>
  206. <div
  207. class="operation"
  208. style="color: rgba(255, 87, 51, 1)"
  209. v-if="scope.row.state == '待接单'"
  210. >
  211. 待接单
  212. </div>
  213. <div
  214. class="operation"
  215. style="color: rgba(30, 125, 251, 1)"
  216. v-if="scope.row.state == '待审核'"
  217. >
  218. 待审核
  219. </div>
  220. <div
  221. class="operation"
  222. style="color: rgba(111, 182, 184, 1)"
  223. v-if="scope.row.state == '待处理'"
  224. >
  225. 待处理
  226. </div>
  227. <div
  228. class="operation"
  229. style="color: rgb(12, 26, 221)"
  230. v-if="scope.row.state == '维修中'"
  231. >
  232. 维修中
  233. </div>
  234. <div
  235. class="operation"
  236. style="color: rgb(209, 78, 235)"
  237. v-if="scope.row.state == '已关单'"
  238. >
  239. 已关单
  240. </div>
  241. <div
  242. class="operation"
  243. style="color: rgb(255, 0, 43)"
  244. v-if="scope.row.state == '维修超时'"
  245. >
  246. 维修超时
  247. </div>
  248. <div
  249. class="operation"
  250. style="color: rgb(255, 0, 43)"
  251. v-if="scope.row.state == '接单超时'"
  252. >
  253. 接单超时
  254. </div>
  255. <div
  256. class="operation"
  257. style="color: rgb(204, 204, 204)"
  258. v-if="scope.row.state == '已取消'"
  259. >
  260. 已取消
  261. </div>
  262. </template> -->
  263. </el-table-column>
  264. <el-table-column
  265. align="center"
  266. prop="reportTime"
  267. width="180"
  268. label="报修时间"
  269. />
  270. <el-table-column
  271. align="center"
  272. prop="maintenancerName"
  273. label="技术员"
  274. />
  275. <el-table-column align="center" width="240" label="操作">
  276. <template #default="scope">
  277. <div class="operation">
  278. <div
  279. class="btns"
  280. v-if="scope.row.dispatch == 1"
  281. @click="sendOrders(scope.row)"
  282. >
  283. 派单
  284. </div>
  285. <div
  286. class="btns"
  287. v-if="scope.row.collaborate == 1"
  288. @click="cooperation(scope.row)"
  289. >
  290. 协作审核
  291. </div>
  292. <div
  293. class="btns"
  294. v-if="scope.row.transfer == 1"
  295. @click="transOrder(scope.row)"
  296. >
  297. 转单审核
  298. </div>
  299. <div
  300. class="btns"
  301. v-if="scope.row.close == 1"
  302. @click="customsOrder(scope.row)"
  303. >
  304. 关单
  305. </div>
  306. <div
  307. class="btns"
  308. v-if="scope.row.offline == 1"
  309. @click="offline(scope.row)"
  310. >
  311. 转线下审核
  312. </div>
  313. <div
  314. class="btns"
  315. v-if="scope.row.changePrice == 1"
  316. @click="changePrice(scope.row)"
  317. >
  318. 改价
  319. </div>
  320. <div
  321. class="btns"
  322. v-if="scope.row.reply == 1"
  323. @click="reply(scope.row)"
  324. >
  325. 回复
  326. </div>
  327. <!-- <div
  328. class="btns"
  329. v-if="scope.row.delayed == 1"
  330. @click="delayed(scope.row)"
  331. >
  332. 延时
  333. </div> -->
  334. <div
  335. class="btns"
  336. v-if="scope.row.details == 1"
  337. @click="orderInfo(scope.row)"
  338. >
  339. 详情
  340. </div>
  341. <div class="btns" @click="printOrder(scope.row)">打印</div>
  342. </div>
  343. </template>
  344. </el-table-column>
  345. </el-table>
  346. <!-- 新建工单弹窗 -->
  347. <!-- <el-dialog
  348. class="addStaff"
  349. v-model="addDialogVisible"
  350. :close-on-click-modal="false"
  351. :close-on-press-escape="false"
  352. :title="dialongTitle"
  353. align-center
  354. width="960"
  355. :before-close="cancelAdd"
  356. >
  357. <el-form
  358. ref="ruleFormAddStaff"
  359. :model="AddStaffList"
  360. :rules="addStaffRules"
  361. label-width="100px"
  362. class="demo-ruleForm"
  363. size="default"
  364. label-position="left"
  365. status-icon
  366. >
  367. <el-form-item label="报修人姓名 :" prop="name">
  368. <el-input
  369. v-model="AddStaffList.name"
  370. placeholder="请输入姓名"
  371. clearable
  372. />
  373. </el-form-item>
  374. <el-form-item label="手机号码 :">
  375. <el-input
  376. v-model="AddStaffList.phone"
  377. placeholder="请输入手机号码"
  378. clearable
  379. />
  380. </el-form-item>
  381. <el-form-item label="报修区域 :" prop="post">
  382. <el-select
  383. v-model="AddStaffList.post"
  384. class="m-2"
  385. placeholder="请选择报修区域"
  386. >
  387. <el-option label="车队长" value="车队长" />
  388. <el-option label="司机" value="司机" />
  389. </el-select>
  390. </el-form-item>
  391. <el-form-item label="详细地址 :" prop="name">
  392. <el-input
  393. v-model="AddStaffList.name"
  394. placeholder="请输入详细地址"
  395. clearable
  396. />
  397. </el-form-item>
  398. <el-form-item label="报修类型 :" prop="post">
  399. <el-select
  400. v-model="AddStaffList.post"
  401. class="m-2"
  402. placeholder="请选择报修类型"
  403. >
  404. <el-option label="车队长" value="车队长" />
  405. <el-option label="司机" value="司机" />
  406. </el-select>
  407. </el-form-item>
  408. <el-form-item label="故障描述 :" prop="cardnumber">
  409. <el-input
  410. v-model="AddStaffList.phone"
  411. :rows="3"
  412. type="textarea"
  413. placeholder="请文字描述详细故障"
  414. />
  415. </el-form-item>
  416. <el-form-item
  417. label="故障照片 :"
  418. prop="cardnumber"
  419. style="
  420. padding-bottom: 40px;
  421. border-bottom: 1px solid rgba(230, 230, 230, 1);
  422. "
  423. >
  424. <el-upload
  425. class="avatar-uploader"
  426. action=""
  427. :on-preview="handlePreview"
  428. :on-remove="handleRemove"
  429. list-type="picture-card"
  430. :on-change="handleChange"
  431. :http-request="handleUpload"
  432. >
  433. <img
  434. class="avatar-uploader-icon"
  435. src="@/assets/addImg.png"
  436. alt=""
  437. />
  438. </el-upload>
  439. <el-dialog
  440. title="查看照片"
  441. class="imgVisible"
  442. width="960"
  443. v-model="imgVisible"
  444. >
  445. <img :src="imgUrl" alt="" />
  446. </el-dialog>
  447. </el-form-item>
  448. <el-form-item class="options">
  449. <el-button
  450. color="rgba(111, 182, 184, 1)"
  451. class="queding"
  452. type="primary"
  453. @click="submitAdd(ruleFormRef)"
  454. >
  455. 确定
  456. </el-button>
  457. <el-button @click="cancelAdd(ruleFormRef)">取消</el-button>
  458. </el-form-item>
  459. </el-form>
  460. </el-dialog> -->
  461. <!-- 派单弹窗 -->
  462. <el-dialog
  463. class="sendOrder"
  464. v-model="sendOrderVisible"
  465. :close-on-click-modal="false"
  466. :close-on-press-escape="false"
  467. title="派单"
  468. align-center
  469. width="960"
  470. :before-close="cancelSendOrders"
  471. >
  472. <div class="send_order">
  473. <div class="condition">
  474. <span>关键字 : </span>
  475. <el-input
  476. clearable
  477. v-model="sendOrderSearch"
  478. @clear="sendOrderBtn"
  479. class="w-50 m-2"
  480. placeholder="输入用户名或者电话"
  481. style="width: 200px"
  482. />
  483. <el-button
  484. style="margin-left: 30px; color: #fff"
  485. color="rgba(111, 182, 184, 1)"
  486. type="primary"
  487. class="search"
  488. @click="sendOrderBtn"
  489. ><el-icon>
  490. <Search />
  491. </el-icon>
  492. <span>查询</span></el-button
  493. >
  494. <div class="table">
  495. <el-table
  496. :row-class-name="tableRowClassName"
  497. :data="sendOrderData.list"
  498. style="width: 100%"
  499. :header-cell-style="{
  500. background: 'rgba(240, 243, 247, 1)',
  501. height: '50px',
  502. border: 0,
  503. }"
  504. >
  505. <el-table-column
  506. align="center"
  507. prop="userName"
  508. label="用户名"
  509. />
  510. <el-table-column align="center" prop="userPhone" label="电话" />
  511. <el-table-column align="center" prop="state" label="状态" />
  512. <el-table-column
  513. align="center"
  514. prop="create_time"
  515. label="维修班"
  516. />
  517. <el-table-column align="center" label="操作">
  518. <template #default="scope">
  519. <div class="operation">
  520. <el-button
  521. color="rgba(111, 182, 184, 1)"
  522. class="queding"
  523. type="primary"
  524. @click="sendOrderTrue(scope.row)"
  525. style="color: #fff"
  526. >
  527. 派单
  528. </el-button>
  529. </div>
  530. </template>
  531. </el-table-column>
  532. </el-table>
  533. </div>
  534. </div>
  535. <div class="options" style="margin: 20px 0 0 0">
  536. <el-pagination
  537. background
  538. :current-page="sendOrderCurrentPage"
  539. :page-size="sendOrderPageSize"
  540. layout="total, prev, pager, next, jumper, slot"
  541. :total="sendOrderTotal"
  542. @size-change="sendOrderSizeChange"
  543. @update:current-page="sendOrderCurrentChange"
  544. />
  545. </div>
  546. </div>
  547. </el-dialog>
  548. <!-- 详情弹窗 -->
  549. <el-dialog
  550. class="orderInfo"
  551. v-model="orderInfoVisible"
  552. :close-on-click-modal="false"
  553. :close-on-press-escape="false"
  554. title="工单详情"
  555. align-center
  556. width="760"
  557. :before-close="cancelOrderInfo"
  558. >
  559. <div class="order_info">
  560. <!-- 工单详情 工单信息 -->
  561. <div class="title">
  562. <img src="@/assets/orderInfo.png" alt="" />
  563. <span>工单信息</span>
  564. </div>
  565. <div class="workNum">
  566. <div class="titles">工单编号:</div>
  567. <span>{{ orderInfoData.recordNo }}</span>
  568. </div>
  569. <div class="workNum">
  570. <div class="titles">报修姓名:</div>
  571. <span>{{ orderInfoData.userName }}</span>
  572. </div>
  573. <div class="workNum">
  574. <div class="titles">报修年级:</div>
  575. <span>{{ orderInfoData.userClass }}</span>
  576. </div>
  577. <div class="workNum">
  578. <div class="titles">报修电话:</div>
  579. <span>{{ orderInfoData.userPhone }}</span>
  580. </div>
  581. <div class="workNum">
  582. <div class="titles">故障类型:</div>
  583. <span>{{ orderInfoData.articleName }}</span>
  584. </div>
  585. <div class="workNum">
  586. <div class="titles">故障描述:</div>
  587. <span>{{ orderInfoData.description }}</span>
  588. </div>
  589. <div class="workNum">
  590. <div class="titles">报修区域:</div>
  591. <span>{{ orderInfoData.areaName }}{{ orderInfoData.address }}</span>
  592. </div>
  593. <div class="workNum">
  594. <div class="titles">报修录音:</div>
  595. <div class="audio" @click="bofang">
  596. <img src="@/assets/audio.png" alt="" />
  597. <div class="audioNum">{{ orderInfoData.voiceLength }}"</div>
  598. <!-- <button class="butt" @click="bofang">确认</button> -->
  599. <audio ref="audio" class="aud" :src="orderInfoData.voice"></audio>
  600. </div>
  601. </div>
  602. <div class="workNum">
  603. <div class="titles">报修时间:</div>
  604. <span>{{ orderInfoData.reportTime }}</span>
  605. </div>
  606. <div class="title">
  607. <img src="@/assets/repairsPrice.png" alt="" />
  608. <span>维修费用</span>
  609. </div>
  610. <div class="consumables">
  611. <div
  612. style="border-bottom: 1px solid #ccc;margin-top: 8px"
  613. class=""
  614. v-for="i in consumables"
  615. >
  616. <div class="workNum">
  617. <div class="titles">耗材:</div>
  618. <span>{{ i.consumeName }}</span>
  619. </div>
  620. <div class="workNum">
  621. <div class="titles">耗材单价:</div>
  622. <span>{{ i.price }} 元</span>
  623. </div>
  624. <div class="workNum">
  625. <div class="titles">耗材数量:</div>
  626. <span>{{ i.number }}</span>
  627. </div>
  628. <div class="workNum">
  629. <div class="titles">耗材费用:</div>
  630. <span>{{ i.totalPrice }} 元</span>
  631. </div>
  632. <div class="workNum">
  633. <div class="titles">支付时间:</div>
  634. <span>{{ orderInfoData.payTime }}</span>
  635. </div>
  636. </div>
  637. </div>
  638. <!-- 工单详情 报修进度 -->
  639. <div class="title">
  640. <img src="@/assets/repairsInfo.png" alt="" />
  641. <span>报修进度</span>
  642. </div>
  643. <!-- <div class="workNum">
  644. <span class="titles">维修总时长:</span
  645. ><span>{{ orderInfoData.totalTime }}</span>
  646. </div>
  647. <div class="workNum">
  648. <span class="titles">维修耗时:</span
  649. ><span>{{ orderInfoData.time }}</span>
  650. </div> -->
  651. <div class="steps">
  652. <el-steps direction="vertical" :active="100">
  653. <el-step v-for="(i, index) in orderInfoData.tracks">
  654. <template v-slot:icon>
  655. <img
  656. style="width: 20px; height: 20px"
  657. src="@/assets/step_common.png"
  658. alt=""
  659. />
  660. </template>
  661. <template v-slot:title>
  662. <span>{{ i.state }}</span>
  663. </template>
  664. <template v-slot:description>
  665. <div class="content">
  666. <span
  667. >[{{ i.userZzstr }}]{{ i.userName }}{{ i.userPhone }}
  668. {{ i.createTime }}</span
  669. >
  670. </div>
  671. <div class="middleContent">
  672. <div class="overContent">{{ i.content }}</div>
  673. <!-- 评价图片 -->
  674. <div v-if="i.images" class="evaluateImg">
  675. <div v-for="(item, index) in i.images">
  676. <img
  677. @click="lookImg(item)"
  678. :key="index"
  679. :src="item"
  680. alt=""
  681. />
  682. </div>
  683. </div>
  684. <!-- 评价录音 -->
  685. <div v-if="i.voice" class="audio" @click="audioPlay(i)">
  686. <img src="@/assets/audio.png" alt="" />
  687. <div class="audioNum">{{ i.voiceLength }}"</div>
  688. <!-- <button class="butt" @click="bofang">确认</button> -->
  689. <audio
  690. :id="`audio${i.id}`"
  691. class="aud"
  692. :src="i.voice"
  693. ></audio>
  694. </div>
  695. </div>
  696. </template>
  697. </el-step>
  698. </el-steps>
  699. </div>
  700. </div>
  701. </el-dialog>
  702. <!-- 延时弹窗 -->
  703. <el-dialog
  704. class="delayed"
  705. v-model="delayedVisible"
  706. :close-on-click-modal="false"
  707. :close-on-press-escape="false"
  708. title="延时"
  709. align-center
  710. width="660"
  711. :before-close="cancelDelayed"
  712. >
  713. <div class="delayed">
  714. <div class="kaohe">
  715. <span>接单考核时间</span>
  716. <el-input
  717. v-model="delayedData.time1"
  718. :clearable="false"
  719. placeholder="考核时间"
  720. style="width: 150px; margin: 0 10px"
  721. >
  722. <template #suffix>
  723. <img
  724. src="@/assets/timer.png"
  725. alt=""
  726. style="width: 15px; height: 15px"
  727. />
  728. </template>
  729. </el-input>
  730. <span>分钟</span>
  731. </div>
  732. <div class="kaohe">
  733. <span>维修考核时间</span>
  734. <el-input
  735. v-model="delayedData.time2"
  736. :clearable="false"
  737. placeholder="考核时间"
  738. style="width: 150px; margin: 0 10px"
  739. >
  740. <template #suffix>
  741. <img
  742. src="@/assets/timer.png"
  743. alt=""
  744. style="width: 15px; height: 15px"
  745. />
  746. </template>
  747. </el-input>
  748. <span>分钟</span>
  749. </div>
  750. <div class="options">
  751. <el-button
  752. color="rgba(111, 182, 184, 1)"
  753. class="queding"
  754. type="primary"
  755. @click="delayedYes()"
  756. >
  757. 确定
  758. </el-button>
  759. <el-button @click="cancelDelayed">取消</el-button>
  760. </div>
  761. </div>
  762. </el-dialog>
  763. <!-- 回复弹窗 -->
  764. <el-dialog
  765. class="reply"
  766. v-model="replyVisible"
  767. :close-on-click-modal="false"
  768. :close-on-press-escape="false"
  769. title="回复"
  770. align-center
  771. width="660"
  772. :before-close="cancelReply"
  773. >
  774. <div class="reply">
  775. <div class="content">
  776. <el-input
  777. v-model="replycontent.reply"
  778. :rows="6"
  779. type="textarea"
  780. show-word-limit
  781. placeholder="请输入你要回复的文字"
  782. />
  783. </div>
  784. <div class="options">
  785. <el-button
  786. color="rgba(111, 182, 184, 1)"
  787. class="queding"
  788. type="primary"
  789. @click="replycontentYes()"
  790. >
  791. 确定
  792. </el-button>
  793. <el-button @click="cancelReply">取消</el-button>
  794. </div>
  795. </div>
  796. </el-dialog>
  797. <!-- 协作审核 弹窗 -->
  798. <el-dialog
  799. class="cooperation"
  800. v-model="cooperationVisible"
  801. :close-on-click-modal="false"
  802. :close-on-press-escape="false"
  803. title="协作审核"
  804. align-center
  805. width="560"
  806. :before-close="cancelCooperation"
  807. >
  808. <el-form
  809. ref="ruleFormCooperation"
  810. :model="cooperationData"
  811. status-icon
  812. :rules="cooperationRules"
  813. label-width="90px"
  814. class="demo-ruleForm"
  815. >
  816. <el-form-item label="申请人 :" prop="userName">
  817. <span>{{ cooperationData.userName }}</span>
  818. </el-form-item>
  819. <el-form-item label="协作对象 :" prop="cooperationValue">
  820. <el-select-v2
  821. v-if="options"
  822. v-model="cooperationData.cooperationValue"
  823. :options="options"
  824. placeholder="请选择协作对象"
  825. style="width: 320px"
  826. multiple
  827. @change="cooperationSel"
  828. />
  829. </el-form-item>
  830. <el-form-item label="转单语音 :" prop="voice">
  831. <!-- <span>{{ cooperationData.voice }}</span> -->
  832. <div class="audio" @click="cooperationAudioPlay">
  833. <img src="@/assets/audio.png" alt="" />
  834. <div class="audioNum">{{ cooperationData.voiceLength }}"</div>
  835. <!-- <button class="butt" @click="bofang">确认</button> -->
  836. <audio
  837. ref="cooperationAudio"
  838. class="aud"
  839. :src="cooperationData.voice"
  840. ></audio>
  841. </div>
  842. </el-form-item>
  843. <el-form-item label="备注 :" prop="age">
  844. <div class="content">
  845. <el-input
  846. v-model="cooperationData.remark"
  847. :rows="3"
  848. type="textarea"
  849. show-word-limit
  850. placeholder="此处为备注内容"
  851. />
  852. </div>
  853. </el-form-item>
  854. <el-form-item>
  855. <div class="options">
  856. <el-button
  857. color="rgba(111, 182, 184, 1)"
  858. class="queding"
  859. type="primary"
  860. @click="cooperationYes(ruleFormCooperation, 1)"
  861. >
  862. 同意
  863. </el-button>
  864. <el-button @click="cooperationYes(ruleFormCooperation, 0)"
  865. >拒绝</el-button
  866. >
  867. </div>
  868. </el-form-item>
  869. </el-form>
  870. <!-- <div class="">
  871. <div class="block">
  872. <span class="name">申请人 :</span><span>张师傅</span>
  873. </div>
  874. <div class="block">
  875. <span class="name">协作对象 :</span>
  876. <div>
  877. <el-select-v2
  878. v-model="nameValue"
  879. :options="options"
  880. placeholder="请选择协作对象"
  881. style="width: 320px"
  882. multiple
  883. />
  884. </div>
  885. </div>
  886. <div class="block">
  887. <span class="name">转单语音 :</span><span>语音</span>
  888. </div>
  889. <div class="content">
  890. <span>备注</span>
  891. <el-input
  892. v-model="cooperationContent"
  893. :rows="3"
  894. type="textarea"
  895. show-word-limit
  896. placeholder="此处为备注内容"
  897. />
  898. </div>
  899. <div class="options">
  900. <el-button
  901. color="rgba(111, 182, 184, 1)"
  902. class="queding"
  903. type="primary"
  904. @click="sendOrderTrue()"
  905. >
  906. 同意
  907. </el-button>
  908. <el-button @click="cancelCooperation">拒绝</el-button>
  909. </div>
  910. </div> -->
  911. </el-dialog>
  912. <!-- 转单审核 弹窗 -->
  913. <el-dialog
  914. class="transOrder"
  915. v-model="transOrderVisible"
  916. :close-on-click-modal="false"
  917. :close-on-press-escape="false"
  918. title="转单审核"
  919. align-center
  920. width="560"
  921. :before-close="cancelTransOrder"
  922. >
  923. <el-form
  924. ref="ruleFormTransOrder"
  925. :model="transOrderData"
  926. status-icon
  927. :rules="transOrderRules"
  928. label-width="90px"
  929. class="demo-ruleForm"
  930. >
  931. <el-form-item label="申请人 :" prop="userName">
  932. <span>{{ transOrderData.userName }}</span>
  933. </el-form-item>
  934. <el-form-item label="转单语音 :" prop="voice">
  935. <div class="audio" @click="transOrderAudioPlay">
  936. <img src="@/assets/audio.png" alt="" />
  937. <div class="audioNum">{{ transOrderData.voiceLength }}"</div>
  938. <!-- <button class="butt" @click="bofang">确认</button> -->
  939. <audio
  940. ref="transOrderAudio"
  941. class="aud"
  942. :src="transOrderData.voice"
  943. ></audio>
  944. </div>
  945. <!-- <div>{{ transOrderData.voice }}</div> -->
  946. </el-form-item>
  947. <el-form-item label="备注 :" prop="remark">
  948. <div class="content">
  949. <el-input
  950. v-model="transOrderData.remark"
  951. :rows="3"
  952. type="textarea"
  953. show-word-limit
  954. placeholder="此处为备注内容"
  955. />
  956. </div>
  957. </el-form-item>
  958. <!-- <el-form-item label="身份 :" prop="userId">
  959. <el-select v-model="transOrderData.userId" placeholder="请选择派单人员">
  960. <el-option v-for="item in transOrderObj.list" :key="item.id" :label="item.userName" :value="item.id" />
  961. </el-select>
  962. </el-form-item> -->
  963. <el-form-item label="选择师傅 :" prop="userId">
  964. <el-select
  965. v-model="transOrderData.userId"
  966. placeholder="请选择派单人员"
  967. >
  968. <el-option
  969. v-for="item in transOrderObj.list"
  970. :key="item.id"
  971. :label="item.userName"
  972. :value="item.id"
  973. />
  974. </el-select>
  975. </el-form-item>
  976. <el-form-item>
  977. <div class="options">
  978. <el-button
  979. color="rgba(111, 182, 184, 1)"
  980. class="queding"
  981. type="primary"
  982. @click="transOrderYes(ruleFormTransOrder, 1)"
  983. >
  984. 同意
  985. </el-button>
  986. <el-button @click="transOrderYes(ruleFormTransOrder, 0)"
  987. >拒绝
  988. </el-button>
  989. </div>
  990. </el-form-item>
  991. </el-form>
  992. </el-dialog>
  993. <!-- 拒绝转单 -->
  994. <el-dialog
  995. class="transOrder"
  996. v-model="refusetransOrderVisible"
  997. :close-on-click-modal="false"
  998. :close-on-press-escape="false"
  999. title="拒绝转单"
  1000. align-center
  1001. width="400"
  1002. :before-close="cancelRefusetransOrder"
  1003. >
  1004. <el-form
  1005. ref="refusetransOrder"
  1006. :model="refusetransOrderData"
  1007. status-icon
  1008. :rules="refusetransOrderRules"
  1009. label-width="90px"
  1010. class="demo-ruleForm"
  1011. >
  1012. <el-form-item label="审批意见 :" prop="remark">
  1013. <el-input
  1014. v-model="refusetransOrderData.remark"
  1015. :rows="5"
  1016. type="textarea"
  1017. show-word-limit
  1018. placeholder="请输入备审批意见"
  1019. />
  1020. </el-form-item>
  1021. <el-form-item>
  1022. <div class="options">
  1023. <el-button
  1024. color="rgba(111, 182, 184, 1)"
  1025. class="queding"
  1026. type="primary"
  1027. @click="refusetransOrderYes(refusetransOrder)"
  1028. >
  1029. 确定
  1030. </el-button>
  1031. <el-button @click="cancelRefusetransOrder(refusetransOrder)"
  1032. >取消
  1033. </el-button>
  1034. </div>
  1035. </el-form-item>
  1036. </el-form>
  1037. </el-dialog>
  1038. <!-- 转线下审核 弹窗 -->
  1039. <el-dialog
  1040. class="transOrder"
  1041. v-model="offlineVisible"
  1042. :close-on-click-modal="false"
  1043. :close-on-press-escape="false"
  1044. title="转线下审核"
  1045. align-center
  1046. width="560"
  1047. :before-close="cancelOffline"
  1048. >
  1049. <el-form
  1050. ref="ruleFormOffline"
  1051. :model="offlineData"
  1052. status-icon
  1053. :rules="offlineRules"
  1054. label-width="90px"
  1055. class="demo-ruleForm"
  1056. >
  1057. <el-form-item label="申请人 :" prop="userName">
  1058. <span>{{ offlineData.userName }}</span>
  1059. </el-form-item>
  1060. <el-form-item label="转单语音 :" prop="voice">
  1061. <div class="audio" @click="offlineAudioPlay">
  1062. <img src="@/assets/audio.png" alt="" />
  1063. <div class="audioNum">{{ offlineData.voiceLength }}"</div>
  1064. <!-- <button class="butt" @click="bofang">确认</button> -->
  1065. <audio
  1066. ref="offlineAudio"
  1067. class="aud"
  1068. :src="offlineData.voice"
  1069. ></audio>
  1070. </div>
  1071. <!-- <div>{{ transOrderData.voice }}</div> -->
  1072. </el-form-item>
  1073. <el-form-item label="备注 :" prop="remark">
  1074. <div class="content">
  1075. <el-input
  1076. v-model="offlineData.remark"
  1077. :rows="3"
  1078. type="textarea"
  1079. show-word-limit
  1080. placeholder="此处为备注内容"
  1081. />
  1082. </div>
  1083. </el-form-item>
  1084. <!-- <el-form-item label="身份 :" prop="userId">
  1085. <el-select v-model="transOrderData.userId" placeholder="请选择派单人员">
  1086. <el-option v-for="item in transOrderObj.list" :key="item.id" :label="item.userName" :value="item.id" />
  1087. </el-select>
  1088. </el-form-item> -->
  1089. <el-form-item label="选择师傅 :" prop="userId">
  1090. <el-select
  1091. v-model="offlineData.userId"
  1092. placeholder="请选择派单人员"
  1093. >
  1094. <el-option
  1095. v-for="item in offlineObj.list"
  1096. :key="item.id"
  1097. :label="item.userName"
  1098. :value="item.id"
  1099. />
  1100. </el-select>
  1101. </el-form-item>
  1102. <el-form-item>
  1103. <div class="options">
  1104. <el-button
  1105. color="rgba(111, 182, 184, 1)"
  1106. class="queding"
  1107. type="primary"
  1108. @click="offlineYes(ruleFormOffline, 1)"
  1109. >
  1110. 同意
  1111. </el-button>
  1112. <el-button @click="offlineYes(ruleFormOffline, 0)"
  1113. >拒绝
  1114. </el-button>
  1115. </div>
  1116. </el-form-item>
  1117. </el-form>
  1118. </el-dialog>
  1119. <!-- 拒绝转线下审核 -->
  1120. <el-dialog
  1121. class="transOrder"
  1122. v-model="refuseOfflineVisible"
  1123. :close-on-click-modal="false"
  1124. :close-on-press-escape="false"
  1125. title="拒绝转线下审核"
  1126. align-center
  1127. width="400"
  1128. :before-close="cancelRefuseOffline"
  1129. >
  1130. <el-form
  1131. ref="refuseOffline"
  1132. :model="refuseOfflineData"
  1133. status-icon
  1134. :rules="refuseOfflineRules"
  1135. label-width="90px"
  1136. class="demo-ruleForm"
  1137. >
  1138. <el-form-item label="留言 :" prop="remark">
  1139. <el-input
  1140. v-model="refuseOfflineData.remark"
  1141. :rows="5"
  1142. type="textarea"
  1143. show-word-limit
  1144. placeholder="请输入备审批意见"
  1145. />
  1146. </el-form-item>
  1147. <el-form-item>
  1148. <div class="options">
  1149. <el-button
  1150. color="rgba(111, 182, 184, 1)"
  1151. class="queding"
  1152. type="primary"
  1153. @click="refuseOfflineYes(refuseOffline)"
  1154. >
  1155. 确定
  1156. </el-button>
  1157. <el-button @click="cancelRefuseOffline(refuseOffline)"
  1158. >取消
  1159. </el-button>
  1160. </div>
  1161. </el-form-item>
  1162. </el-form>
  1163. </el-dialog>
  1164. <!-- 关单 弹窗 -->
  1165. <el-dialog
  1166. class="customsOrder"
  1167. v-model="customsOrderVisible"
  1168. :close-on-click-modal="false"
  1169. :close-on-press-escape="false"
  1170. :title="customsOrderTitle"
  1171. align-center
  1172. width="560"
  1173. :before-close="cancelCustomsOrder"
  1174. >
  1175. <div class="">
  1176. <div class="content">
  1177. <span class="name">关单原因 :</span>
  1178. <!-- <el-select v-model="customsOrderData.reason" placeholder="选择关单原因">
  1179. <el-option v-for="item in customsOrderList" :key="item.id" :label="item.name" :value="item.name" />
  1180. </el-select> -->
  1181. <el-select
  1182. v-model="customsOrderData.reason"
  1183. filterable
  1184. allow-create
  1185. default-first-option
  1186. :reserve-keyword="false"
  1187. placeholder="请输入或选择关单原因"
  1188. >
  1189. <el-option
  1190. v-for="item in customsOrderList"
  1191. :key="item.id"
  1192. :label="item.name"
  1193. :value="item.name"
  1194. />
  1195. </el-select>
  1196. </div>
  1197. <div class="content">
  1198. <span class="name">备注 :</span>
  1199. <el-input
  1200. v-model="customsOrderData.remark"
  1201. :rows="4"
  1202. type="textarea"
  1203. show-word-limit
  1204. placeholder="此处为备注内容"
  1205. />
  1206. </div>
  1207. <div class="options">
  1208. <el-button
  1209. color="rgba(111, 182, 184, 1)"
  1210. class="queding"
  1211. type="primary"
  1212. @click="customsOrderYes"
  1213. >
  1214. 同意
  1215. </el-button>
  1216. <el-button @click="cancelCustomsOrder">取消</el-button>
  1217. </div>
  1218. </div>
  1219. </el-dialog>
  1220. <!-- 改价 弹窗 -->
  1221. <!-- <el-dialog class="changePrice" v-model="changePriceVisible" :close-on-click-modal="false"
  1222. :close-on-press-escape="false" title="改价" align-center width="600" :before-close="cancelChangePrice">
  1223. <div>
  1224. <div class="goodsCard" v-for="(i, index) in changePriceNum.list" :key="i.id">
  1225. <div class="goodsTitle">
  1226. <h2>{{ i.consumeName }}</h2>
  1227. <el-button type="danger" @click="delChangePrice(i)">
  1228. 删除
  1229. </el-button>
  1230. </div>
  1231. <div class="label" label="物品种类 :" prop="articleId">
  1232. <div class="type">物品种类 :</div>
  1233. <el-select v-model="i.articleId" placeholder="请选择物品种类" @change="changePriceSel($event, i)">
  1234. <el-option v-for="item in changePriceList.list" :key="item.id" :label="item.name" :value="item.id" />
  1235. </el-select>
  1236. </div>
  1237. <div class="label" label="耗材名称 :" prop="consumeId">
  1238. <div class="type">耗材名称 :</div>
  1239. <el-select v-model="i.consumeId" @change="consumeChange($event, i)" placeholder="请选择耗材名称">
  1240. <el-option v-for="item in i.changePriceList2" :key="item.id" :label="item.name" :value="item.id" />
  1241. </el-select>
  1242. </div>
  1243. <div class="label" label="耗材数量 :" prop="number">
  1244. <div class="type">耗材数量 :</div>
  1245. <el-input v-model="i.number" />
  1246. </div>
  1247. <div class="label" label="单价 :" prop="price">
  1248. <div class="type">单价 :</div>
  1249. <el-input disabled :value="i.price" />
  1250. </div>
  1251. <div class="label" label="金额 :" prop="totalPrice">
  1252. <div class="type">金额 :</div>
  1253. <el-input disabled :value="i.totalPrice" />
  1254. </div>
  1255. </div>
  1256. <div class="addGoods">
  1257. <el-button class="queding" type="primary" @click="addChangePrice">
  1258. 添加物品
  1259. </el-button>
  1260. </div>
  1261. <div class="priceSum">
  1262. <div class="totalPrice">总金额 : {{ changePriceSum }} 元</div>
  1263. <div class="options">
  1264. <el-button color="rgba(111, 182, 184, 1)" class="queding" type="primary"
  1265. @click="changePriceYes(ruleFormChangePrice)">
  1266. 确定
  1267. </el-button>
  1268. <el-button @click="cancelChangePrice(ruleFormChangePrice)">取消</el-button>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </el-dialog> -->
  1273. <!-- 改价 弹窗 -->
  1274. <el-dialog
  1275. class="changePrice"
  1276. v-model="changePriceVisible"
  1277. :close-on-click-modal="false"
  1278. :close-on-press-escape="false"
  1279. title="改价"
  1280. align-center
  1281. width="1000"
  1282. :before-close="cancelChangePrice"
  1283. :collapse-tags="true"
  1284. >
  1285. <div class="goodsCard">
  1286. <!-- <div class="types">
  1287. <div class="type">关联种类</div>
  1288. <div class="type">耗材名称</div>
  1289. <div class="type">价格(元)</div>
  1290. <div class="type">数量</div>
  1291. </div> -->
  1292. <div style="width: 433px; margin-right: 33px">
  1293. <el-input
  1294. v-model="goodTypeKeyWord"
  1295. clearable
  1296. @input="filterType"
  1297. @clear="keyWordClean"
  1298. style="width: 433px"
  1299. class="w-50 m-2"
  1300. placeholder="搜索耗材"
  1301. />
  1302. <div v-if="!goodTypeKeyWord">
  1303. <el-cascader-panel
  1304. v-model="changePriceSelId"
  1305. :options="changePriceNum.list"
  1306. :props="{ value: 'id', label: 'name', multiple: true }"
  1307. multiple
  1308. @change="selPrice"
  1309. >
  1310. <template #default="{ node, data }">
  1311. <span>{{ data.name }}</span>
  1312. <span v-if="!node.isLeaf">
  1313. ({{ data.children.length }})
  1314. </span>
  1315. </template>
  1316. </el-cascader-panel>
  1317. </div>
  1318. <div v-else class="checkbox-group">
  1319. <el-checkbox-group
  1320. @change="keyWordSelPriceChange"
  1321. v-model="keyWordSelPriceData"
  1322. >
  1323. <el-checkbox
  1324. :label="item.parentName + '-' + item.name"
  1325. v-for="item in keyWordSelPrice"
  1326. />
  1327. </el-checkbox-group>
  1328. <!-- <el-cascader-panel v-model="changePriceSelId" :options="keyWordSelPrice"
  1329. :props="{ value: 'id', label: 'name', multiple: true }" multiple @change="keyWordSelPriceChange">
  1330. <template #default="{ node, data }">
  1331. <span>{{ data.name }}</span>
  1332. </template>
  1333. </el-cascader-panel> -->
  1334. </div>
  1335. </div>
  1336. <el-table
  1337. :data="selPriceList"
  1338. style="width: 500px"
  1339. :header-cell-style="{
  1340. background: 'rgba(240, 243, 247, 1)',
  1341. height: '34px',
  1342. border: 0,
  1343. }"
  1344. >
  1345. <!-- <el-table-column align="center" type="selection" width="80" /> -->
  1346. <el-table-column
  1347. align="center"
  1348. label="耗材名称"
  1349. prop="name"
  1350. width="180"
  1351. show-overflow-tooltip
  1352. />
  1353. <el-table-column align="center" label="价格(元)">
  1354. <template #default="{ row }">
  1355. <el-input
  1356. v-model="row.price"
  1357. oninput="value=value.replace(/\D*(\d*)(\.?)(\d{0,2})\d*/,'$1$2$3').replace(/^0+(\d)/, '$1') .replace(/^\./, '0.').match(/^\d*(\.?\d{0,2})/g)[0] || ''"
  1358. placeholder=""
  1359. style="width: 80px"
  1360. />
  1361. </template>
  1362. </el-table-column>
  1363. <el-table-column align="center" label="数量">
  1364. <template #default="{ row }">
  1365. <el-input
  1366. v-model="row.number"
  1367. placeholder=""
  1368. oninput="value=value.replace(/[^\d]/g,'').replace(/^0{1,}/g,'')"
  1369. style="width: 80px"
  1370. />
  1371. </template>
  1372. </el-table-column>
  1373. <el-table-column align="center" label="操作" prop="id">
  1374. <template #default="{ row }">
  1375. <!-- <el-button type="danger" :icon="Delete" circle /> -->
  1376. <span class="del" @click="delSelChangePrice(row)">删除</span>
  1377. </template>
  1378. </el-table-column>
  1379. </el-table>
  1380. </div>
  1381. <div class="priceSum">
  1382. <div class="totalPrice" style="width: 400px">
  1383. 总金额 : {{ allPrice }} 元
  1384. </div>
  1385. <div class="options">
  1386. <el-button
  1387. color="rgba(111, 182, 184, 1)"
  1388. class="queding"
  1389. type="primary"
  1390. @click="changePriceYes(ruleFormChangePrice)"
  1391. >
  1392. 确定
  1393. </el-button>
  1394. <el-button @click="cancelChangePrice(ruleFormChangePrice)"
  1395. >取消</el-button
  1396. >
  1397. </div>
  1398. </div>
  1399. </el-dialog>
  1400. <!-- 打印报表 -->
  1401. <el-dialog
  1402. class="printDialog"
  1403. v-model="printVisible"
  1404. :close-on-click-modal="false"
  1405. :close-on-press-escape="false"
  1406. title="打印工单"
  1407. align-center
  1408. width="760"
  1409. :before-close="cancelPrint"
  1410. >
  1411. <div class="content" id="printWrapper">
  1412. <div class="title">
  1413. <span>校园报修系统</span>
  1414. <span
  1415. >打印时间:{{ nowTime }} &nbsp;&nbsp;操作人:{{
  1416. printData.list.operator
  1417. }}</span
  1418. >
  1419. </div>
  1420. <!-- <h3>故障报修</h3> -->
  1421. <div class="title">
  1422. <span>{{ printData.list.schoolName }}</span>
  1423. <span>工单号: {{ printData.list.recordNo }}</span>
  1424. </div>
  1425. <div class="printTable">
  1426. <table border="1" Cellspacing="0">
  1427. <tr>
  1428. <td class="tableTitle" Colspan="4">故障报修</td>
  1429. </tr>
  1430. <tr>
  1431. <td class="item">报修人</td>
  1432. <td class="value">{{ printData.list.userName }}</td>
  1433. <td class="item">年级</td>
  1434. <td class="value">{{ printData.list.userClass }}</td>
  1435. </tr>
  1436. <tr>
  1437. <td class="item">手机</td>
  1438. <td class="value">{{ printData.list.userPhone }}</td>
  1439. <td class="item">区域</td>
  1440. <td class="value">{{ printData.list.areaId }}</td>
  1441. </tr>
  1442. <tr>
  1443. <td class="item">报修物品</td>
  1444. <td class="value">{{ printData.list.articleName }}</td>
  1445. <td class="item">报修时间</td>
  1446. <td class="value">{{ printData.list.reportTime }}</td>
  1447. </tr>
  1448. <tr>
  1449. <td class="item">故障描述</td>
  1450. <td Colspan="3" class="textarea">
  1451. <div class="textarea">{{ printData.list.description }}</div>
  1452. </td>
  1453. </tr>
  1454. <tr>
  1455. <td class="item">维修师傅</td>
  1456. <td Colspan="3">{{ printData.list.maintenancerName }}</td>
  1457. </tr>
  1458. <tr>
  1459. <td class="item">手机号码</td>
  1460. <td class="value">{{ printData.list.maintenancerPhone }}</td>
  1461. <td class="item">状态</td>
  1462. <td class="value">{{ printData.list.state }}</td>
  1463. </tr>
  1464. <tr>
  1465. <td class="item">支付金额/元</td>
  1466. <td class="value">{{ printData.list.price }}</td>
  1467. <td class="item">退款金额/元</td>
  1468. <td class="value">{{ printData.list.refund }}</td>
  1469. </tr>
  1470. <!-- <tr>
  1471. <td class="item">备注</td>
  1472. <td class="textarea" Colspan="3">
  1473. 学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4学生/人工智能/智能2021-4
  1474. </td>
  1475. </tr> -->
  1476. </table>
  1477. <div class="name">
  1478. <span>后期签字: </span>
  1479. <span></span>
  1480. <span>师傅签字: </span>
  1481. <span></span>
  1482. </div>
  1483. <!-- <div class="name date">
  1484. <span>日期: </span>
  1485. <span></span>
  1486. <span>日期: </span>
  1487. <span></span>
  1488. </div> -->
  1489. </div>
  1490. </div>
  1491. <div class="options">
  1492. <el-button
  1493. color="rgba(111, 182, 184, 1)"
  1494. class="queding"
  1495. type="primary"
  1496. @click="printBox"
  1497. >
  1498. 打印
  1499. </el-button>
  1500. <el-button @click="cancelPrint">取消</el-button>
  1501. </div>
  1502. </el-dialog>
  1503. </div>
  1504. <!-- 分页组件 -->
  1505. <el-pagination
  1506. background
  1507. :current-page="currentPage"
  1508. :page-size="pageSize"
  1509. :page-sizes="[10, 20, 50, 100]"
  1510. layout="total,sizes, prev, pager, next, jumper, slot"
  1511. :total="total"
  1512. @size-change="handleSizeChange"
  1513. @update:current-page="handleCurrentChange"
  1514. />
  1515. <div class="bgImg" v-if="bgImg">
  1516. <img @click="bgImg = false" :src="bgImgurl" alt="" />
  1517. </div>
  1518. </div>
  1519. </template>
  1520. <script setup>
  1521. import {
  1522. ref,
  1523. reactive,
  1524. nextTick,
  1525. watch,
  1526. onBeforeMount,
  1527. onUnmounted,
  1528. } from "vue";
  1529. import { useRouter } from "vue-router";
  1530. import { ElMessage, ElMessageBox } from "element-plus";
  1531. import { Timer } from "@element-plus/icons-vue";
  1532. import { Calendar, Delete } from "@element-plus/icons-vue";
  1533. import vidiconsApi from "@/api/vidicons.js";
  1534. import { dayjs } from "element-plus";
  1535. // import gaobai from "@/static/gaobai.mp3";
  1536. // import type { UploadProps } from "element-plus";
  1537. import lodash, { get } from "lodash";
  1538. import axios from "axios";
  1539. import { useStore } from "vuex";
  1540. import print from "print-js";
  1541. const store = useStore();
  1542. const router = useRouter();
  1543. const loading = ref(false);
  1544. const schoolId = ref(""); // 判断是否为超级管理员账号
  1545. const day = ref([
  1546. "全部",
  1547. "待处理",
  1548. "待接单",
  1549. "待审核",
  1550. "维修中",
  1551. "已完成",
  1552. "已取消",
  1553. "已关单",
  1554. "已超时",
  1555. ]); // 天数切换按钮
  1556. let dayIndex = ref(0); // 天数切换按钮索引
  1557. // 表格数据
  1558. const tableData = reactive({
  1559. list: [],
  1560. });
  1561. // 新建工单时的数据 (-----------------------------------------------)
  1562. const ruleFormAddStaff = ref();
  1563. const addDialogVisible = ref(false); // 控制添加员工弹窗
  1564. const dialongTitle = ref("新增工单"); // 新建工单弹窗标题
  1565. const fileList = ref([]); // 添加多张图片的文件
  1566. const imgVisible = ref(false); // 点击查看图片是否查看
  1567. const imgUrl = ref(""); // 点击查看的那张照片地址
  1568. const AddStaffList = reactive({
  1569. name: "",
  1570. phone: "",
  1571. post: "0",
  1572. cardnumber: "",
  1573. id: "",
  1574. }); // 新建工单表单数据
  1575. const addStaffRules = reactive({
  1576. name: [
  1577. { required: true, message: "姓名不能为空", trigger: "blur" },
  1578. {
  1579. pattern: /[\u4e00-\u9fa5]$/,
  1580. message: "请输入正确姓名",
  1581. trigger: "blur",
  1582. },
  1583. ],
  1584. // /^[\u4E00-\u9FA5]$/
  1585. cardnumber: [
  1586. { required: true, message: "卡号不能为空", trigger: "blur" },
  1587. // {
  1588. // // pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
  1589. // // pattern: /^[0-9]*$/,
  1590. // message: "请输入正确卡号(数字类型)",
  1591. // trigger: "blur",
  1592. // },
  1593. ],
  1594. phone: [
  1595. { required: true, message: "请输入手机号", trigger: "blur" },
  1596. {
  1597. // pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
  1598. pattern: /^((\(\+86\))|(\(86\)))?[1][3456789][0-9]{9}$/,
  1599. message: "请输入合法手机号/电话号",
  1600. trigger: "blur",
  1601. },
  1602. ],
  1603. post: [
  1604. {
  1605. required: true,
  1606. message: "职位不能为空",
  1607. trigger: "blur",
  1608. },
  1609. ],
  1610. // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
  1611. }); // 新建工单表单验证
  1612. // 派单 (-----------------------------------------------)
  1613. const sendOrderCurrentPage = ref(1);
  1614. const sendOrderPageSize = ref(10);
  1615. const sendOrderTotal = ref();
  1616. const sendOrderSearch = ref();
  1617. const sendOrderVisible = ref(false); // 控制工单派单弹窗
  1618. const sendOrderData = reactive({
  1619. list: [],
  1620. id: "",
  1621. // sendOrder: {
  1622. // acceptanceTime: "",
  1623. // shiftId: "",
  1624. // sarticleId: "",
  1625. // id: "",
  1626. // },
  1627. }); // 派单表单数据
  1628. const sendOrderRules = reactive({
  1629. name: [
  1630. { required: true, message: "姓名不能为空", trigger: "blur" },
  1631. {
  1632. pattern: /[\u4e00-\u9fa5]$/,
  1633. message: "请输入正确姓名",
  1634. trigger: "blur",
  1635. },
  1636. ],
  1637. // /^[\u4E00-\u9FA5]$/
  1638. cardnumber: [
  1639. { required: true, message: "卡号不能为空", trigger: "blur" },
  1640. // {
  1641. // // pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
  1642. // // pattern: /^[0-9]*$/,
  1643. // message: "请输入正确卡号(数字类型)",
  1644. // trigger: "blur",
  1645. // },
  1646. ],
  1647. phone: [
  1648. { required: true, message: "请输入手机号", trigger: "blur" },
  1649. {
  1650. // pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
  1651. pattern: /^((\(\+86\))|(\(86\)))?[1][3456789][0-9]{9}$/,
  1652. message: "请输入合法手机号/电话号",
  1653. trigger: "blur",
  1654. },
  1655. ],
  1656. post: [
  1657. {
  1658. required: true,
  1659. message: "职位不能为空",
  1660. trigger: "blur",
  1661. },
  1662. ],
  1663. // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
  1664. }); // 派单表单验证
  1665. // 详情 (-----------------------------------------------)
  1666. const orderInfoVisible = ref(false); // 控制工单详情
  1667. const audio = ref(); // 工单详情音频
  1668. const orderInfoData = ref({
  1669. recordNo: "", // 工单编号
  1670. userName: "", // 报修姓名
  1671. userClass: "", // 报修年级
  1672. userPhone: "", // 报修电话
  1673. articleName: "", // 故障类型
  1674. description: "", // 故障描述
  1675. articleId: "", // 报修类型
  1676. address: "", // 报修区域
  1677. areaName: "", // 报修校区地址
  1678. voice: "", // 报修录音
  1679. voiceLength: "", // 报修录音时长
  1680. reportTime: "", // 报修时间
  1681. totalTime: "", // 维修总时长
  1682. time: "", // 维修耗时
  1683. tracks: [],
  1684. price: "", // 费用
  1685. payTime: "", // 支付时间
  1686. });
  1687. const consumables = ref(); // 耗材详情
  1688. const mapUrl = ref(); // 音频地址
  1689. const bgImg = ref(false); // 点击查看图片
  1690. const bgImgurl = ref(); // 点击查看图片地址
  1691. // 延时 (-----------------------------------------------)
  1692. const delayedVisible = ref(false); // 延时弹窗控制
  1693. const delayedData = ref({
  1694. id: "",
  1695. time1: "", // 接单考核时间
  1696. time2: "", // 维修考核时间
  1697. });
  1698. // 回复 (-----------------------------------------------)
  1699. const replyVisible = ref(false); // 回复弹窗控制
  1700. const replycontent = ref({
  1701. reply: "",
  1702. id: "",
  1703. }); // 回复绑定数据
  1704. // 协作审核 (-----------------------------------------------)
  1705. // 协作审核中审核对象数组
  1706. const cooperationVisible = ref(false); // 协作审核弹窗控制
  1707. const cooperationData = ref({
  1708. collaboratorDatas: [],
  1709. cooperationValue: "",
  1710. id: "",
  1711. remark: "",
  1712. userName: "",
  1713. voice: "",
  1714. }); // 协作审核数据
  1715. const cooperationValue = ref([]); // 挑选中的对象数组
  1716. const options = ref(); // 多选数据判断
  1717. const ruleFormCooperation = ref(); // 协作审核ref对象
  1718. const cooperationAudio = ref(); // 语音对象
  1719. // 转单审核验证
  1720. const cooperationRules = reactive({
  1721. // userName: [{ required: true, message: "申请人不能为空", trigger: "blur" }],
  1722. cooperationValue: [
  1723. { required: true, message: "协作对象不能为空", trigger: "blur" },
  1724. ],
  1725. voice: [{ required: true, message: "转单语音不能为空", trigger: "blur" }],
  1726. });
  1727. // 转单审核 (-----------------------------------------------)
  1728. const transOrderVisible = ref(false); // 控制转单审核弹窗
  1729. const transOrderData = ref({
  1730. id: "",
  1731. userName: "",
  1732. voice: "",
  1733. remark: "",
  1734. userId: "", // 被派单师傅id(下拉框)
  1735. voiceLength: "", // 录音长度
  1736. }); // 挑选中的对象
  1737. const ruleFormTransOrder = ref();
  1738. const transOrderObj = reactive({
  1739. list: [],
  1740. });
  1741. // 转单审核中审核对象数组
  1742. const transOrderAudio = ref(); // 语音对象
  1743. // 转单审核验证
  1744. const transOrderRules = reactive({
  1745. userName: [{ required: true, message: "申请人不能为空", trigger: "blur" }],
  1746. voice: [{ required: true, message: "转单语音不能为空", trigger: "blur" }],
  1747. userId: [{ required: true, message: "请选择派单人员", trigger: "blur" }],
  1748. });
  1749. // 拒绝转单
  1750. const refusetransOrder = ref();
  1751. const refusetransOrderVisible = ref(false);
  1752. const refusetransOrderData = reactive({
  1753. remark: "",
  1754. });
  1755. // 拒绝转单验证
  1756. const refusetransOrderRules = reactive({
  1757. remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }],
  1758. });
  1759. // 转线下审核 (--------------------------------------------)
  1760. const offlineVisible = ref(false); // 转线下审核控制
  1761. const offlineData = reactive({
  1762. id: "",
  1763. userName: "",
  1764. remark: "",
  1765. voice: "",
  1766. userId: "", // 被派单师傅id(下拉框)
  1767. voiceLength: "", // 录音长度
  1768. });
  1769. // 挑选中的对象
  1770. const ruleFormOffline = ref();
  1771. const offlineObj = reactive({
  1772. list: [],
  1773. });
  1774. // 转线下审核中审核对象数组
  1775. const offlineAudio = ref(); // 语音对象
  1776. // 转线下审核验证
  1777. const offlineRules = reactive({
  1778. userName: [{ required: true, message: "申请人不能为空", trigger: "blur" }],
  1779. voice: [{ required: true, message: "转单语音不能为空", trigger: "blur" }],
  1780. userId: [{ required: true, message: "请选择派单人员", trigger: "blur" }],
  1781. });
  1782. // 拒绝转线下审核
  1783. const refuseOffline = ref();
  1784. const refuseOfflineVisible = ref(false);
  1785. const refuseOfflineData = reactive({
  1786. remark: "",
  1787. });
  1788. // 拒绝转线下审核验证
  1789. const refuseOfflineRules = reactive({
  1790. remark: [
  1791. { required: true, message: "拒绝转线下审核留言不能为空", trigger: "blur" },
  1792. ],
  1793. });
  1794. // 关单 (关单--------------------------------------------)
  1795. const customsOrderVisible = ref(false); // 关单弹窗
  1796. const customsOrderTitle = ref('关单'); // 关单弹窗
  1797. const customsOrderList = ref(); // 关单原因列表
  1798. const customsOrderData = ref({
  1799. reason: "",
  1800. recordId: "",
  1801. remark: "",
  1802. }); // 选择的关单原因
  1803. // 改价 (改价--------------------------------------------)
  1804. const changePriceVisible = ref(false); // 改价弹窗
  1805. const ruleFormChangePrice = ref(); // 改价ref
  1806. const changePriceIndex = ref(0);
  1807. const changePriceSum = ref(0); // 总金额
  1808. const changePriceNum = reactive({ list: [] }); // 改价中的物品数量
  1809. const changePriceList = reactive({ list: [] }); // 物品种类
  1810. const changePriceList2 = reactive({ list: [] }); // 耗材种类
  1811. const changePriceData = ref({
  1812. id: "",
  1813. schoolId: "",
  1814. recordId: "",
  1815. });
  1816. const selPriceList = ref([]); // 改价选中数据
  1817. const changePriceSelId = ref([]); // 改价中 多选时选中的数据id
  1818. const goodTypeKeyWord = ref(); // 耗材名称搜索关键字
  1819. const keyWordSelPriceData = ref(); // 通过关键字搜索的数据勾选的数据
  1820. const keyWordSelPrice = ref(); // 通过关键字搜索的数据
  1821. const allPrice = ref(0); // 计算的数量总价格
  1822. // 打印
  1823. const printVisible = ref(false);
  1824. const nowTime = ref();
  1825. const printData = reactive({
  1826. list: {},
  1827. }); // 打印数据
  1828. watch(
  1829. selPriceList,
  1830. (newVal, oldVal) => {
  1831. console.log(oldVal, "表格中的数据");
  1832. console.log(newVal, "表格中的数据");
  1833. let allSum = 0;
  1834. newVal.forEach((item) => {
  1835. let sum = Number(
  1836. (item.number * item.price * 100).toString().split(".")[0]
  1837. );
  1838. console.log(sum);
  1839. allSum += sum;
  1840. });
  1841. allPrice.value = allSum / 100;
  1842. // allPrice.value = newVal.reduce((pre, cur) => {
  1843. // let sum = pre + cur.number * cur.price
  1844. // let sums = (cur.number * cur.price * 100).toString().split(".")
  1845. // console.log(sums);
  1846. // return sum
  1847. // }, 0)
  1848. },
  1849. { deep: true }
  1850. );
  1851. const validatePrice = (rule, value, callback) => {
  1852. if (/^(?!0+(?:\.0+)?$)(?:[1-9]\d*|0)(?:\.\d{1,2})?$/.test(value)) {
  1853. callback();
  1854. } else {
  1855. callback(new Error("最多包含两位小数的正数"));
  1856. }
  1857. };
  1858. const changePriceRules = reactive({
  1859. articleId: [{ required: true, message: "物品种类不能为空", trigger: "blur" }],
  1860. number: [
  1861. { required: true, message: "耗材数量不能为空", trigger: "blur" },
  1862. { pattern: /^\+?[1-9]\d*$/, message: "请输入大于0的正整数" },
  1863. ],
  1864. consumeId: [{ required: true, message: "耗材名称不能为空", trigger: "blur" }],
  1865. price: [
  1866. { required: true, message: "单价不能为空", trigger: "blur" },
  1867. { validator: validatePrice, trigger: "blur" },
  1868. ],
  1869. totalPrice: [{ required: true, message: "金额不能为空", trigger: "blur" }],
  1870. }); // 改价表单验证
  1871. const api = ref(""); // 拼接接口地址
  1872. // 筛选框条件
  1873. const searchInput = reactive({
  1874. keyWord: "",
  1875. createTime: "",
  1876. maintenanceName: "",
  1877. schoolId: "",
  1878. }); // 搜索按钮数据
  1879. const currentPage = ref(1); // 当前页
  1880. const pageSize = ref(10);
  1881. const total = ref(15); // 当前总数
  1882. const selectData = reactive({ list: [] }); // 多选框选择的数据
  1883. watch(
  1884. () => searchInput.createTime,
  1885. (newVal, oldVal) => {
  1886. console.log("监听时间:", newVal);
  1887. if (newVal == null) {
  1888. searchBtn();
  1889. }
  1890. }
  1891. );
  1892. // 天数切换按钮选项
  1893. const dayBtn = (index) => {
  1894. dayIndex.value = index;
  1895. getList();
  1896. };
  1897. // 打印功能
  1898. const printBox = () => {
  1899. setTimeout(function () {
  1900. print({
  1901. printable: "printWrapper",
  1902. // 打印类型 html
  1903. type: "html",
  1904. font_size: "", // 不设置则使用默认字体大小
  1905. scanStyles: false,
  1906. // 继承样式
  1907. targetStyle: "*",
  1908. targetStyles: "*",
  1909. scanStyles: true,
  1910. style: "@page {margin:0mm 10mm};",
  1911. });
  1912. }, 500);
  1913. };
  1914. // 工单数据
  1915. const getList = async () => {
  1916. loading.value = true;
  1917. let data = {
  1918. currentPage: currentPage.value,
  1919. pageCount: pageSize.value,
  1920. keyWord: searchInput.keyWord,
  1921. state: dayIndex.value,
  1922. schoolId: searchInput.schoolId,
  1923. maintenanceName: searchInput.maintenanceName,
  1924. };
  1925. if (searchInput.createTime) {
  1926. data.startTime = searchInput.createTime[0];
  1927. data.endTime = searchInput.createTime[1];
  1928. }
  1929. let res = await axios({
  1930. method: "get",
  1931. url: api.value + "/repairRecord/queryManagePage",
  1932. headers: {
  1933. token: sessionStorage.getItem("token"),
  1934. user_head: sessionStorage.getItem("userhead"),
  1935. },
  1936. params: data,
  1937. });
  1938. console.log(res, "工单数据");
  1939. if (res.status == 200) {
  1940. tableData.list = res.data.data.list;
  1941. total.value = res.data.data.totalCount;
  1942. loading.value = false;
  1943. } else {
  1944. ElMessage({
  1945. type: "error",
  1946. showClose: true,
  1947. message: res.data.message,
  1948. center: true,
  1949. });
  1950. if (res.data.code == 570) {
  1951. sessionStorage.removeItem("token");
  1952. router.push({
  1953. path: `/login`,
  1954. });
  1955. }
  1956. }
  1957. // console.log(res);
  1958. };
  1959. // 切换校区
  1960. const selSchool = async (val) => {
  1961. let data = {
  1962. schoolId: val,
  1963. keyWord: searchInput.keyWord,
  1964. maintenanceName: searchInput.maintenanceName,
  1965. };
  1966. if (searchInput.createTime) {
  1967. data.startTime = searchInput.createTime[0];
  1968. data.endTime = searchInput.createTime[1];
  1969. }
  1970. let ress = await axios({
  1971. method: "get",
  1972. url: api.value + "/repairRecord/queryManageCount",
  1973. headers: {
  1974. token: sessionStorage.getItem("token"),
  1975. user_head: sessionStorage.getItem("userhead"),
  1976. },
  1977. params: data,
  1978. });
  1979. day.value = new Array(10);
  1980. console.log(day.value);
  1981. console.log(ress, "工单管理头部状态数量");
  1982. if (ress.status == 200) {
  1983. let obj = ress.data.data;
  1984. Object.keys(obj).forEach(function (key) {
  1985. // console.log(key, obj[key]);
  1986. if (key == "allCount") {
  1987. day.value[0] = {
  1988. key: obj[key],
  1989. name: "全部",
  1990. state: 0,
  1991. };
  1992. }
  1993. if (key == "dispatchCount") {
  1994. day.value[1] = {
  1995. key: obj[key],
  1996. name: "待接单",
  1997. state: 1,
  1998. };
  1999. }
  2000. if (key == "maintenanceCount") {
  2001. day.value[2] = {
  2002. key: obj[key],
  2003. name: "维修中",
  2004. state: 2,
  2005. };
  2006. }
  2007. if (key == "logisticsCount") {
  2008. day.value[3] = {
  2009. key: obj[key],
  2010. name: "待处理",
  2011. state: 3,
  2012. };
  2013. }
  2014. if (key == "examineCount") {
  2015. day.value[4] = {
  2016. key: obj[key],
  2017. name: "待审核",
  2018. state: 4,
  2019. };
  2020. }
  2021. if (key == "paidCount") {
  2022. day.value[5] = {
  2023. key: obj[key],
  2024. name: "待支付",
  2025. state: 10,
  2026. };
  2027. }
  2028. if (key == "canceledCount") {
  2029. day.value[6] = {
  2030. key: obj[key],
  2031. name: "已取消",
  2032. state: 6,
  2033. };
  2034. }
  2035. if (key == "closedCount") {
  2036. day.value[7] = {
  2037. key: obj[key],
  2038. name: "已关单",
  2039. state: 7,
  2040. };
  2041. }
  2042. // if (key == "timeoutCount") {
  2043. // day.value.push({
  2044. // key: obj[key],
  2045. // name: "已超时",
  2046. // state: 8,
  2047. // });
  2048. // }
  2049. if (key == "finishedCount") {
  2050. day.value[8] = {
  2051. key: obj[key],
  2052. name: "已完成",
  2053. state: 5,
  2054. };
  2055. }
  2056. if (key == "offlineCount") {
  2057. day.value[9] = {
  2058. key: obj[key],
  2059. name: "转线下",
  2060. state: 9,
  2061. };
  2062. }
  2063. });
  2064. } else {
  2065. ElMessage({
  2066. type: "error",
  2067. showClose: true,
  2068. message: res.data.message,
  2069. center: true,
  2070. });
  2071. }
  2072. getList();
  2073. };
  2074. // 添加工单中上传照片组件功能 (新建工单------------------------)
  2075. const handleRemove = (uploadFile, uploadFiles) => {
  2076. console.log(uploadFile.uid, uploadFiles);
  2077. fileList.value = fileList.value.filter((item) => {
  2078. return item.uid != uploadFile.uid;
  2079. });
  2080. };
  2081. // 点击图片的查看按钮
  2082. const handlePreview = (file) => {
  2083. imgUrl.value = file.url;
  2084. imgVisible.value = true;
  2085. console.log(file);
  2086. };
  2087. // 添加照片时往fileList列表中添加图片信息
  2088. const handleChange = (file, fileLists) => {
  2089. fileList.value.push(file);
  2090. console.log(file, "filefilefilefilefile");
  2091. };
  2092. // 可以获取图片参数
  2093. const handleUpload = (file) => {
  2094. console.log(file, "filefilefilefilefile");
  2095. };
  2096. // 新建工单按钮
  2097. const addlist = () => {
  2098. dialongTitle.value = "新建工单";
  2099. addDialogVisible.value = true;
  2100. };
  2101. //编辑工单按钮
  2102. const edit = (row) => {
  2103. dialongTitle.value = "编辑工单";
  2104. addDialogVisible.value = true;
  2105. console.log(row);
  2106. };
  2107. // 取消添加工单
  2108. const cancelAdd = () => {
  2109. addDialogVisible.value = false;
  2110. ruleFormAddStaff.value.resetFields();
  2111. };
  2112. // 确认添加工单
  2113. const submitAdd = async (formEl) => {
  2114. if (!formEl) return;
  2115. await formEl.validate(async (valid, fields) => {
  2116. if (valid) {
  2117. if (dialongTitle.value == "新增驾驶员") {
  2118. let data = {
  2119. user_name: ruleForm.name,
  2120. user_phone: ruleForm.phone,
  2121. user_zz: ruleForm.post,
  2122. card_number: ruleForm.cardnumber,
  2123. };
  2124. // let res = await admin.adminAdd(data);
  2125. let res = await axios({
  2126. method: "post",
  2127. url: api.value + "/carBook/userinsert.action",
  2128. headers: {
  2129. "Content-Type": "application/json;charset=utf-8",
  2130. token: sessionStorage.getItem("token"),
  2131. },
  2132. data: data,
  2133. });
  2134. // console.log(res, "添加账号");
  2135. if (res.data.code == 200) {
  2136. getList();
  2137. ElMessage({
  2138. type: "success",
  2139. showClose: true,
  2140. message: res.data.message,
  2141. center: true,
  2142. });
  2143. addDialogVisible.value = false;
  2144. ruleFormRef.value.resetFields();
  2145. } else {
  2146. ElMessage({
  2147. type: "error",
  2148. showClose: true,
  2149. message: res.data.message,
  2150. center: true,
  2151. });
  2152. }
  2153. } else {
  2154. let data = {
  2155. user_name: ruleForm.name,
  2156. user_phone: ruleForm.phone,
  2157. user_zz: ruleForm.post,
  2158. id: ruleForm.id,
  2159. };
  2160. // let res = await admin.adminAdd(data);
  2161. let res = await axios({
  2162. method: "post",
  2163. url: api.value + "/carBook/userupdate.action",
  2164. headers: {
  2165. "Content-Type": "application/json;charset=utf-8",
  2166. token: sessionStorage.getItem("token"),
  2167. },
  2168. data: data,
  2169. });
  2170. // console.log(res, "修改账号");
  2171. if (res.data.code == 200) {
  2172. getList();
  2173. ElMessage({
  2174. type: "success",
  2175. showClose: true,
  2176. message: res.data.message,
  2177. center: true,
  2178. });
  2179. addDialogVisible.value = false;
  2180. ruleFormRef.value.resetFields();
  2181. } else {
  2182. ElMessage({
  2183. type: "error",
  2184. showClose: true,
  2185. message: res.data.message,
  2186. center: true,
  2187. });
  2188. }
  2189. }
  2190. } else {
  2191. console.log("error submit!", fields);
  2192. }
  2193. });
  2194. };
  2195. // 派单按钮 (派单------------------------------------------)
  2196. // 获取派单表格数据
  2197. const sendOrderTable = async () => {
  2198. let data = {
  2199. recordId: sendOrderData.id,
  2200. currentPage: sendOrderCurrentPage.value,
  2201. pageCount: sendOrderPageSize.value,
  2202. keyWord: sendOrderSearch.value,
  2203. };
  2204. let res = await axios({
  2205. method: "get",
  2206. url: api.value + "/repairUser/queryPageRepairUsers",
  2207. headers: {
  2208. token: sessionStorage.getItem("token"),
  2209. user_head: sessionStorage.getItem("userhead"),
  2210. },
  2211. params: data,
  2212. });
  2213. console.log(res, "派单数据");
  2214. if (res.data.code == 200) {
  2215. sendOrderData.list = res.data.data.list;
  2216. sendOrderTotal.value = res.data.data.totalCount;
  2217. } else {
  2218. ElMessage({
  2219. type: "error",
  2220. showClose: true,
  2221. message: res.data.message,
  2222. center: true,
  2223. });
  2224. }
  2225. };
  2226. // 搜索按钮
  2227. const sendOrderBtn = () => {
  2228. sendOrderTable();
  2229. };
  2230. // 点击派单按钮
  2231. const sendOrders = async (row) => {
  2232. sendOrderVisible.value = true;
  2233. sendOrderData.id = row.id;
  2234. sendOrderTable();
  2235. };
  2236. // 确定派单
  2237. const sendOrderTrue = (row) => {
  2238. ElMessageBox.confirm(`确定是否派单?`, "提示", {
  2239. confirmButtonText: "确认",
  2240. cancelButtonText: "取消",
  2241. type: "warning",
  2242. })
  2243. .then(async () => {
  2244. let data = {
  2245. id: row.id,
  2246. acceptanceTime: row.acceptanceTime,
  2247. shiftId: row.shiftId,
  2248. articleId: row.articleId,
  2249. recordId: sendOrderData.id,
  2250. };
  2251. let res = await axios({
  2252. method: "post",
  2253. url: api.value + "/repairRecord/receiveSendOrders",
  2254. headers: {
  2255. token: sessionStorage.getItem("token"),
  2256. user_head: sessionStorage.getItem("userhead"),
  2257. },
  2258. data: data,
  2259. });
  2260. if (res.data.code == 200) {
  2261. sendOrderVisible.value = false;
  2262. getList();
  2263. ElMessage({
  2264. type: "success",
  2265. showClose: true,
  2266. message: res.data.message,
  2267. center: true,
  2268. });
  2269. } else {
  2270. ElMessage({
  2271. type: "error",
  2272. showClose: true,
  2273. message: res.data.message,
  2274. center: true,
  2275. });
  2276. }
  2277. console.log(res);
  2278. })
  2279. .catch(() => {
  2280. ElMessage({
  2281. type: "info",
  2282. message: "已取消删除",
  2283. });
  2284. });
  2285. };
  2286. // 取消派单按钮
  2287. const cancelSendOrders = () => {
  2288. sendOrderVisible.value = false;
  2289. };
  2290. const sendOrderSizeChange = (val) => {
  2291. console.log(val);
  2292. sendOrderPageSize.value = val;
  2293. sendOrderTable();
  2294. };
  2295. // 派单按钮分页
  2296. const sendOrderCurrentChange = (val) => {
  2297. console.log(val);
  2298. sendOrderCurrentPage.value = val;
  2299. sendOrderTable();
  2300. };
  2301. // 工单详情按钮 (工单详情-----------------------------------)
  2302. const orderInfo = async (row) => {
  2303. orderInfoVisible.value = true;
  2304. let data = { recordId: row.id };
  2305. let res = await axios({
  2306. method: "get",
  2307. url: api.value + "/repairRecord/details",
  2308. headers: {
  2309. token: sessionStorage.getItem("token"),
  2310. user_head: sessionStorage.getItem("userhead"),
  2311. },
  2312. params: data,
  2313. });
  2314. console.log(res, "详情数据");
  2315. if (res.data.code == 200) {
  2316. orderInfoData.value.recordNo = res.data.data.recordNo;
  2317. orderInfoData.value.userName = res.data.data.userName;
  2318. orderInfoData.value.userClass = res.data.data.userClass;
  2319. orderInfoData.value.userPhone = res.data.data.userPhone;
  2320. orderInfoData.value.description = res.data.data.description;
  2321. orderInfoData.value.address = res.data.data.address;
  2322. orderInfoData.value.areaName = res.data.data.areaName;
  2323. orderInfoData.value.articleName = res.data.data.articleName;
  2324. orderInfoData.value.voice = res.data.data.voice;
  2325. orderInfoData.value.voiceLength = res.data.data.voiceLength;
  2326. orderInfoData.value.reportTime = res.data.data.reportTime;
  2327. orderInfoData.value.totalTime = res.data.data.totalTime;
  2328. orderInfoData.value.time = res.data.data.time;
  2329. orderInfoData.value.tracks = res.data.data.tracks;
  2330. orderInfoData.value.price = res.data.data.price;
  2331. orderInfoData.value.payTime = res.data.data.payTime;
  2332. consumables.value = res.data.data.consumables;
  2333. } else {
  2334. ElMessage({
  2335. type: "error",
  2336. showClose: true,
  2337. message: res.data.message,
  2338. center: true,
  2339. });
  2340. }
  2341. };
  2342. // 取消工单详情按钮
  2343. const cancelOrderInfo = () => {
  2344. audio.value.load();
  2345. if (orderInfoData.value.tracks) {
  2346. orderInfoData.value.tracks.forEach((item) => {
  2347. console.log(item.id);
  2348. let audioId = document.getElementById(`audio${item.id}`);
  2349. if (item.voice) {
  2350. console.log(item.id);
  2351. audioId.load();
  2352. }
  2353. });
  2354. }
  2355. orderInfoVisible.value = false;
  2356. };
  2357. // 工单详情 点击音频
  2358. const bofang = () => {
  2359. orderInfoData.value.tracks.forEach((item) => {
  2360. // console.log(item.id);
  2361. let audioId = document.getElementById(`audio${item.id}`);
  2362. if (item.voice) {
  2363. console.log("详情录音重置");
  2364. audioId.load();
  2365. }
  2366. });
  2367. // console.log(audio.value.duration, "音频总时长");
  2368. if (audio.value.paused == true) {
  2369. audio.value.play();
  2370. console.log("详情录音播放");
  2371. } else {
  2372. audio.value.pause();
  2373. }
  2374. };
  2375. // 步骤条中的播放
  2376. const audioPlay = (i) => {
  2377. audio.value.load();
  2378. console.log("详情录音重置");
  2379. orderInfoData.value.tracks.forEach((item) => {
  2380. let audioId = document.getElementById(`audio${item.id}`);
  2381. if (item.voice) {
  2382. console.log("步骤条录音重置");
  2383. audioId.load();
  2384. }
  2385. });
  2386. let audioId = document.getElementById(`audio${i.id}`);
  2387. if (audioId.paused == true) {
  2388. audioId.play();
  2389. console.log("步骤条录音播放");
  2390. } else {
  2391. audioId.pause();
  2392. }
  2393. };
  2394. // 点击工单步骤中的图片查看
  2395. const lookImg = (item) => {
  2396. bgImg.value = true;
  2397. bgImgurl.value = item;
  2398. };
  2399. // 延时弹窗 (延时-----------------------------------)
  2400. const delayed = (row) => {
  2401. delayedVisible.value = true;
  2402. console.log(row);
  2403. delayedData.value.id = row.id;
  2404. };
  2405. // 延时关闭功能
  2406. const cancelDelayed = () => {
  2407. delayedVisible.value = false;
  2408. delayedData.value.time1 = "";
  2409. delayedData.value.time2 = "";
  2410. };
  2411. // 确定延时
  2412. const delayedYes = async () => {
  2413. let data = {
  2414. recordId: delayedData.value.id,
  2415. receiving: delayedData.value.time1,
  2416. maintain: delayedData.value.time2,
  2417. };
  2418. let res = await axios({
  2419. method: "post",
  2420. url: api.value + "/repairRecord/delayed",
  2421. headers: {
  2422. token: sessionStorage.getItem("token"),
  2423. user_head: sessionStorage.getItem("userhead"),
  2424. },
  2425. data: data,
  2426. });
  2427. console.log(res, "延时");
  2428. if (res.data.code == 200) {
  2429. delayedVisible.value = false;
  2430. delayedData.value.time1 = "";
  2431. delayedData.value.time2 = "";
  2432. getList();
  2433. ElMessage({
  2434. type: "success",
  2435. showClose: true,
  2436. message: res.data.message,
  2437. center: true,
  2438. });
  2439. addDialogVisible.value = false;
  2440. ruleFormRef.value.resetFields();
  2441. } else {
  2442. ElMessage({
  2443. type: "error",
  2444. showClose: true,
  2445. message: res.data.message,
  2446. center: true,
  2447. });
  2448. }
  2449. };
  2450. // 回复弹窗 (回复-------------------------------)
  2451. const reply = (row) => {
  2452. replyVisible.value = true;
  2453. replycontent.value.id = row.id;
  2454. };
  2455. // 关闭回复弹窗
  2456. const cancelReply = () => {
  2457. replyVisible.value = false;
  2458. replycontent.value.reply = "";
  2459. };
  2460. // 确定回复
  2461. const replycontentYes = async () => {
  2462. let data = {
  2463. recordId: replycontent.value.id,
  2464. content: replycontent.value.reply,
  2465. };
  2466. let res = await axios({
  2467. method: "post",
  2468. url: api.value + "/repairRecord/revert",
  2469. headers: {
  2470. token: sessionStorage.getItem("token"),
  2471. user_head: sessionStorage.getItem("userhead"),
  2472. },
  2473. data: data,
  2474. });
  2475. console.log(res, "延时");
  2476. if (res.data.code == 200) {
  2477. replyVisible.value = false;
  2478. replycontent.value.reply = "";
  2479. getList();
  2480. ElMessage({
  2481. type: "success",
  2482. showClose: true,
  2483. message: res.data.message,
  2484. center: true,
  2485. });
  2486. } else {
  2487. ElMessage({
  2488. type: "error",
  2489. showClose: true,
  2490. message: res.data.message,
  2491. center: true,
  2492. });
  2493. }
  2494. };
  2495. // 协作审核 (协作审核--------------------------------------)
  2496. // 协作审核中协作对象多选
  2497. const cooperation = async (row) => {
  2498. console.log(row, "协作审核数据row");
  2499. cooperationVisible.value = true;
  2500. cooperationData.value.cooperationValue = [];
  2501. let data = { recordId: row.id };
  2502. let res = await axios({
  2503. method: "get",
  2504. url: api.value + "/repairRecord/cooperationDetail",
  2505. headers: {
  2506. token: sessionStorage.getItem("token"),
  2507. user_head: sessionStorage.getItem("userhead"),
  2508. },
  2509. params: data,
  2510. });
  2511. console.log(res, "协作审核数据");
  2512. let datas = {
  2513. // currentPage: 1,
  2514. // pageCount: 10,
  2515. schoolId: row.schoolId,
  2516. userId: row.id,
  2517. recordId: row.id,
  2518. };
  2519. let ress = await axios({
  2520. method: "get",
  2521. url: api.value + "/repairUser/queryPageCollaborator",
  2522. headers: {
  2523. token: sessionStorage.getItem("token"),
  2524. user_head: sessionStorage.getItem("userhead"),
  2525. },
  2526. params: datas,
  2527. });
  2528. console.log(ress, "协作对象下拉框数据");
  2529. if (res.data.code == 200) {
  2530. cooperationData.value.collaboratorDatas = res.data.data.collaboratorDatas;
  2531. cooperationData.value.id = res.data.data.id;
  2532. // cooperationData.value.cooperationValue = res.data.data.cooperationValue;
  2533. cooperationData.value.cooperationValue = [];
  2534. res.data.data.collaboratorDatas.forEach((item) => {
  2535. cooperationData.value.cooperationValue.push(item.id.toString());
  2536. });
  2537. cooperationData.value.remark = res.data.data.remark;
  2538. cooperationData.value.userName = res.data.data.userName;
  2539. cooperationData.value.voice = res.data.data.voice;
  2540. cooperationData.value.voiceLength = res.data.data.voiceLength;
  2541. let cooperationName = ress.data.data.list;
  2542. options.value = Array.from({ length: cooperationName.length }).map(
  2543. (_, idx) => {
  2544. return {
  2545. value: `${cooperationName[idx].id}`,
  2546. label: `${cooperationName[idx].name}`,
  2547. };
  2548. }
  2549. );
  2550. } else {
  2551. ElMessage({
  2552. type: "error",
  2553. showClose: true,
  2554. message: res.data.message,
  2555. center: true,
  2556. });
  2557. }
  2558. };
  2559. // 选择协作对象发生变化
  2560. const cooperationSel = (val) => {
  2561. console.log(val);
  2562. cooperationData.value.cooperationValue = val;
  2563. };
  2564. // 关闭协作审核弹窗
  2565. const cancelCooperation = () => {
  2566. cooperationAudio.value.load();
  2567. cooperationVisible.value = false;
  2568. };
  2569. // 播放音频
  2570. const cooperationAudioPlay = () => {
  2571. if (cooperationAudio.value.paused == true) {
  2572. cooperationAudio.value.play();
  2573. } else {
  2574. cooperationAudio.value.pause();
  2575. // clearInterval(timer);
  2576. // timer = null;
  2577. }
  2578. };
  2579. // 确定协作审核
  2580. const cooperationYes = async (formEl, flag) => {
  2581. if (!formEl) return;
  2582. await formEl.validate(async (valid, fields) => {
  2583. if (valid) {
  2584. console.log(flag);
  2585. let data = {
  2586. id: cooperationData.value.id,
  2587. collaborator: cooperationData.value.cooperationValue,
  2588. approverStatu: flag,
  2589. remark: cooperationData.value.remark,
  2590. };
  2591. let res = await axios({
  2592. method: "post",
  2593. url: api.value + "/repairRecord/cooperationOrders",
  2594. headers: {
  2595. token: sessionStorage.getItem("token"),
  2596. user_head: sessionStorage.getItem("userhead"),
  2597. },
  2598. data: data,
  2599. });
  2600. console.log(res, "确定协作审核");
  2601. if (res.data.code == 200) {
  2602. cooperationAudio.value.load();
  2603. cooperationVisible.value = false;
  2604. searchBtn();
  2605. ElMessage({
  2606. type: "success",
  2607. showClose: true,
  2608. message: res.data.message,
  2609. center: true,
  2610. });
  2611. } else {
  2612. cooperationAudio.value.load();
  2613. ElMessage({
  2614. type: "error",
  2615. showClose: true,
  2616. message: res.data.message,
  2617. center: true,
  2618. });
  2619. }
  2620. } else {
  2621. console.log("error submit!", fields);
  2622. }
  2623. });
  2624. };
  2625. // 转单审核弹窗 (转单审核-----------------------------------)
  2626. const transOrder = async (row) => {
  2627. console.log(row);
  2628. transOrderVisible.value = true;
  2629. let data = { recordId: row.id };
  2630. let res = await axios({
  2631. method: "get",
  2632. url: api.value + "/repairRecord/transferDetail",
  2633. headers: {
  2634. token: sessionStorage.getItem("token"),
  2635. user_head: sessionStorage.getItem("userhead"),
  2636. },
  2637. params: data,
  2638. });
  2639. console.log(res, "转单审核数据");
  2640. if (res.data.code == 200) {
  2641. transOrderData.value.id = res.data.data.id;
  2642. transOrderData.value.userName = res.data.data.userName;
  2643. transOrderData.value.voice = res.data.data.voice;
  2644. transOrderData.value.remark = res.data.data.remark;
  2645. transOrderData.value.voiceLength = res.data.data.voiceLength;
  2646. } else {
  2647. ElMessage({
  2648. type: "error",
  2649. showClose: true,
  2650. message: res.data.message,
  2651. center: true,
  2652. });
  2653. }
  2654. // 下拉框人员数据
  2655. let datas = { recordId: row.id };
  2656. let ress = await axios({
  2657. method: "get",
  2658. url: api.value + "/repairUser/queryPageOfflineUsers",
  2659. headers: {
  2660. token: sessionStorage.getItem("token"),
  2661. user_head: sessionStorage.getItem("userhead"),
  2662. },
  2663. params: datas,
  2664. });
  2665. console.log(ress, "下拉框数据");
  2666. if (ress.data.code == 200) {
  2667. transOrderObj.list = ress.data.data.list;
  2668. } else {
  2669. ElMessage({
  2670. type: "error",
  2671. showClose: true,
  2672. message: ress.data.message,
  2673. center: true,
  2674. });
  2675. }
  2676. };
  2677. // 关闭转单审核
  2678. const cancelTransOrder = () => {
  2679. transOrderVisible.value = false;
  2680. ruleFormTransOrder.value.resetFields();
  2681. transOrderAudio.value.load();
  2682. };
  2683. // 播放音频
  2684. const transOrderAudioPlay = () => {
  2685. if (transOrderAudio.value.paused == true) {
  2686. transOrderAudio.value.play();
  2687. } else {
  2688. transOrderAudio.value.pause();
  2689. // clearInterval(timer);
  2690. // timer = null;
  2691. }
  2692. };
  2693. // 确定转单审核
  2694. const transOrderYes = async (formEl, flag) => {
  2695. if (flag == 1) {
  2696. if (!formEl) return;
  2697. await formEl.validate(async (valid, fields) => {
  2698. if (valid) {
  2699. let data = {
  2700. id: transOrderData.value.id,
  2701. userId: transOrderData.value.userId,
  2702. approverStatu: flag,
  2703. remark: transOrderData.value.remark,
  2704. };
  2705. let res = await axios({
  2706. method: "post",
  2707. url: api.value + "/repairRecord/transfer",
  2708. headers: {
  2709. token: sessionStorage.getItem("token"),
  2710. user_head: sessionStorage.getItem("userhead"),
  2711. },
  2712. data: data,
  2713. });
  2714. if (res.data.code == 200) {
  2715. transOrderAudio.value.load();
  2716. transOrderVisible.value = false;
  2717. searchBtn();
  2718. ElMessage({
  2719. type: "success",
  2720. showClose: true,
  2721. message: res.data.message,
  2722. center: true,
  2723. });
  2724. } else {
  2725. transOrderAudio.value.load();
  2726. ElMessage({
  2727. type: "error",
  2728. showClose: true,
  2729. message: res.data.message,
  2730. center: true,
  2731. });
  2732. }
  2733. } else {
  2734. console.log("error submit!", fields);
  2735. }
  2736. });
  2737. } else {
  2738. refusetransOrderVisible.value = true;
  2739. }
  2740. };
  2741. // 确定拒绝
  2742. const refusetransOrderYes = async (formEl) => {
  2743. if (!formEl) return;
  2744. await formEl.validate(async (valid, fields) => {
  2745. if (valid) {
  2746. console.log("确定拒绝");
  2747. let data = {
  2748. id: transOrderData.value.id,
  2749. // userId: transOrderData.value.userId,
  2750. approverStatu: 0,
  2751. // remark: transOrderData.value.remark,
  2752. refuseRemark: refusetransOrderData.remark,
  2753. };
  2754. let res = await axios({
  2755. method: "post",
  2756. url: api.value + "/repairRecord/transfer",
  2757. headers: {
  2758. token: sessionStorage.getItem("token"),
  2759. user_head: sessionStorage.getItem("userhead"),
  2760. },
  2761. data: data,
  2762. });
  2763. console.log(res, "确定转单审核");
  2764. if (res.data.code == 200) {
  2765. transOrderAudio.value.load();
  2766. transOrderVisible.value = false;
  2767. refusetransOrderVisible.value = false;
  2768. searchBtn();
  2769. ElMessage({
  2770. type: "success",
  2771. showClose: true,
  2772. message: res.data.message,
  2773. center: true,
  2774. });
  2775. } else {
  2776. transOrderAudio.value.load();
  2777. ElMessage({
  2778. type: "error",
  2779. showClose: true,
  2780. message: res.data.message,
  2781. center: true,
  2782. });
  2783. }
  2784. }
  2785. });
  2786. };
  2787. // 取消拒绝
  2788. const cancelRefusetransOrder = () => {
  2789. console.log("取消拒绝");
  2790. refusetransOrderVisible.value = false;
  2791. refusetransOrderData.remark = "";
  2792. refusetransOrder.value.resetFields();
  2793. };
  2794. // 转线下审核(------------------------------------------------)
  2795. const offline = async (row) => {
  2796. // console.log(row);
  2797. offlineVisible.value = true;
  2798. let data = {
  2799. recordId: row.id,
  2800. };
  2801. let res = await axios({
  2802. method: "get",
  2803. url: api.value + "/repairRecord/offlineDetail",
  2804. headers: {
  2805. token: sessionStorage.getItem("token"),
  2806. user_head: sessionStorage.getItem("userhead"),
  2807. },
  2808. params: data,
  2809. });
  2810. console.log(res, "转线下审核详情数据");
  2811. if (res.data.code == 200) {
  2812. offlineData.id = res.data.data.id;
  2813. offlineData.userName = res.data.data.userName;
  2814. offlineData.remark = res.data.data.remark;
  2815. offlineData.voice = res.data.data.voice;
  2816. offlineData.voiceLength = res.data.data.voiceLength;
  2817. } else {
  2818. ElMessage({
  2819. type: "error",
  2820. showClose: true,
  2821. message: res.data.message,
  2822. center: true,
  2823. });
  2824. }
  2825. // 下拉框人员数据
  2826. let datas = { recordId: row.id };
  2827. let ress = await axios({
  2828. method: "get",
  2829. url: api.value + "/repairUser/queryPageOfflineUsers",
  2830. headers: {
  2831. token: sessionStorage.getItem("token"),
  2832. user_head: sessionStorage.getItem("userhead"),
  2833. },
  2834. params: datas,
  2835. });
  2836. console.log(ress, "线下师傅下拉框数据");
  2837. if (ress.data.code == 200) {
  2838. offlineObj.list = ress.data.data.list;
  2839. } else {
  2840. ElMessage({
  2841. type: "error",
  2842. showClose: true,
  2843. message: ress.data.message,
  2844. center: true,
  2845. });
  2846. }
  2847. };
  2848. // 播放音频
  2849. const offlineAudioPlay = () => {
  2850. if (offlineAudio.value.paused == true) {
  2851. offlineAudio.value.play();
  2852. } else {
  2853. offlineAudio.value.pause();
  2854. // clearInterval(timer);
  2855. // timer = null;
  2856. }
  2857. };
  2858. // 转线下操作(1同意,0拒绝)
  2859. const offlineYes = async (formEl, flag) => {
  2860. // 同意
  2861. if (flag == 1) {
  2862. if (!formEl) return;
  2863. await formEl.validate(async (valid, fields) => {
  2864. if (valid) {
  2865. let data = {
  2866. id: offlineData.id,
  2867. userId: offlineData.userId,
  2868. approverStatu: 1,
  2869. remark: offlineData.remark,
  2870. };
  2871. console.log(data);
  2872. let res = await axios({
  2873. method: "post",
  2874. url: api.value + "/repairRecord/offline",
  2875. headers: {
  2876. token: sessionStorage.getItem("token"),
  2877. user_head: sessionStorage.getItem("userhead"),
  2878. },
  2879. data: data,
  2880. });
  2881. console.log(res, "确定转单审核");
  2882. if (res.data.code == 200) {
  2883. offlineAudio.value.load();
  2884. offlineVisible.value = false;
  2885. searchBtn();
  2886. ElMessage({
  2887. type: "success",
  2888. showClose: true,
  2889. message: res.data.message,
  2890. center: true,
  2891. });
  2892. } else {
  2893. offlineAudio.value.load();
  2894. ElMessage({
  2895. type: "error",
  2896. showClose: true,
  2897. message: res.data.message,
  2898. center: true,
  2899. });
  2900. }
  2901. }
  2902. });
  2903. }
  2904. // 拒绝
  2905. else {
  2906. refuseOfflineVisible.value = true;
  2907. // console.log("确定拒绝", flag);
  2908. }
  2909. };
  2910. // 关闭转线下审核
  2911. const cancelOffline = () => {
  2912. offlineVisible.value = false;
  2913. ruleFormOffline.value.resetFields();
  2914. offlineAudio.value.load();
  2915. };
  2916. // 转线下审核拒绝 确认留言
  2917. const refuseOfflineYes = async (formEl) => {
  2918. if (!formEl) return;
  2919. await formEl.validate(async (valid, fields) => {
  2920. if (valid) {
  2921. let data = {
  2922. id: offlineData.id,
  2923. approverStatu: 0,
  2924. refuseRemark: refuseOfflineData.remark,
  2925. };
  2926. console.log(data, "确定拒绝转线下");
  2927. let res = await axios({
  2928. method: "post",
  2929. url: api.value + "/repairRecord/offline",
  2930. headers: {
  2931. token: sessionStorage.getItem("token"),
  2932. user_head: sessionStorage.getItem("userhead"),
  2933. },
  2934. data: data,
  2935. });
  2936. console.log(res, "转线下审核");
  2937. if (res.data.code == 200) {
  2938. offlineAudio.value.load();
  2939. refuseOfflineVisible.value = false;
  2940. offlineVisible.value = false;
  2941. searchBtn();
  2942. ElMessage({
  2943. type: "success",
  2944. showClose: true,
  2945. message: res.data.message,
  2946. center: true,
  2947. });
  2948. } else {
  2949. offlineAudio.value.load();
  2950. ElMessage({
  2951. type: "error",
  2952. showClose: true,
  2953. message: res.data.message,
  2954. center: true,
  2955. });
  2956. }
  2957. }
  2958. });
  2959. };
  2960. // 转线下审核拒绝 留言取消
  2961. const cancelRefuseOffline = () => {
  2962. refuseOfflineVisible.value = false;
  2963. refuseOfflineData.remark = "";
  2964. refuseOffline.value.resetFields();
  2965. console.log("取消拒绝转线下审核");
  2966. };
  2967. // 关单弹窗 (关单-----------------------------------------)
  2968. const customsOrder = (row) => {
  2969. customsOrderVisible.value = true;
  2970. customsOrderTitle.value='关单';
  2971. console.log(row, "关单row");
  2972. customsOrderData.value.recordId = row.id;
  2973. customsOrderData.value.reason = "";
  2974. customsOrderData.value.remark = "";
  2975. };
  2976. const cancelCustomsOrder = () => {
  2977. customsOrderVisible.value = false;
  2978. };
  2979. // 确定关单
  2980. const customsOrderYes = async () => {
  2981. if(customsOrderTitle.value=='关单'){
  2982. let data = {
  2983. recordId: customsOrderData.value.recordId,
  2984. reason: customsOrderData.value.reason,
  2985. remark: customsOrderData.value.remark,
  2986. };
  2987. if (customsOrderData.value.reason && customsOrderData.value.remark) {
  2988. let res = await axios({
  2989. method: "get",
  2990. url: api.value + "/repairRecord/closePCOrder",
  2991. headers: {
  2992. token: sessionStorage.getItem("token"),
  2993. user_head: sessionStorage.getItem("userhead"),
  2994. },
  2995. params: data,
  2996. });
  2997. if (res.data.code == 200) {
  2998. searchBtn();
  2999. customsOrderVisible.value = false;
  3000. ElMessage({
  3001. type: "success",
  3002. showClose: true,
  3003. message: res.data.message,
  3004. center: true,
  3005. });
  3006. } else {
  3007. ElMessage({
  3008. type: "error",
  3009. showClose: true,
  3010. message: res.data.message,
  3011. center: true,
  3012. });
  3013. }
  3014. } else {
  3015. ElMessage({
  3016. type: "warning",
  3017. showClose: true,
  3018. message: "关单原因或关单备注不能为空",
  3019. center: true,
  3020. });
  3021. }
  3022. }else if(customsOrderTitle.value=='批量关单'){
  3023. let data = {
  3024. recordIds: customsOrderData.value.recordId.join(','),
  3025. reason: customsOrderData.value.reason,
  3026. remark: customsOrderData.value.remark,
  3027. };
  3028. if (customsOrderData.value.reason && customsOrderData.value.remark) {
  3029. let res = await axios({
  3030. method: "get",
  3031. url: api.value + "/repairRecord/closePCOrderBeath",
  3032. headers: {
  3033. token: sessionStorage.getItem("token"),
  3034. user_head: sessionStorage.getItem("userhead"),
  3035. },
  3036. params: data,
  3037. });
  3038. if (res.data.code == 200) {
  3039. searchBtn();
  3040. customsOrderVisible.value = false;
  3041. ElMessage({
  3042. type: "success",
  3043. showClose: true,
  3044. message: res.data.message,
  3045. center: true,
  3046. });
  3047. } else {
  3048. ElMessage({
  3049. type: "error",
  3050. showClose: true,
  3051. message: res.data.message,
  3052. center: true,
  3053. });
  3054. }
  3055. } else {
  3056. ElMessage({
  3057. type: "warning",
  3058. showClose: true,
  3059. message: "关单原因或关单备注不能为空",
  3060. center: true,
  3061. });
  3062. }
  3063. }
  3064. };
  3065. // 改价弹窗 (改价-----------------------------------------)
  3066. const changePrice = async (row) => {
  3067. changePriceVisible.value = true;
  3068. changePriceData.value.schoolId = row.schoolId; // 复制校区id
  3069. changePriceData.value.recordId = row.id; // 复制校区id
  3070. let data = { recordId: row.id };
  3071. let res = await axios({
  3072. method: "get",
  3073. url: api.value + "/repairRecord/alterPriceShow",
  3074. headers: {
  3075. token: sessionStorage.getItem("token"),
  3076. user_head: sessionStorage.getItem("userhead"),
  3077. },
  3078. params: data,
  3079. });
  3080. console.log(res, "改价显示 数据");
  3081. // 树形数据
  3082. let datas = { schoolId: row.schoolId };
  3083. let ress = await axios({
  3084. method: "get",
  3085. url: api.value + "/repairConsume/queryRepairConsumeTypeTree",
  3086. headers: {
  3087. token: sessionStorage.getItem("token"),
  3088. user_head: sessionStorage.getItem("userhead"),
  3089. },
  3090. params: datas,
  3091. });
  3092. console.log(ress, "数量种类列表 数据");
  3093. // changePriceNum.list = ress.data.data;
  3094. if (ress.data.code == 200) {
  3095. ress.data.data.forEach((item) => {
  3096. item.children.forEach((ii) => {
  3097. ii.flag = false;
  3098. });
  3099. });
  3100. res.data.data.forEach((items) => {
  3101. // data.push([items.repairConsumables.articleId, items.repairConsumables.consumeId])// 显示的物品默认勾选[122,153]
  3102. // selPriceList.value.push(item.repairConsumables) // 将选中的物品放到显示表格中
  3103. ress.data.data.forEach((item) => {
  3104. if (items.repairConsumables.articleId == item.id) {
  3105. item.children.forEach((row) => {
  3106. if (row.id == items.repairConsumables.consumeId) {
  3107. console.log(row);
  3108. row.flag = true;
  3109. row.number = items.repairConsumables.number;
  3110. row.price = items.repairConsumables.price;
  3111. }
  3112. });
  3113. // let flag = item.children.findIndex(row => {
  3114. // return row.id == items.repairConsumables.consumeId
  3115. // })
  3116. // console.log(flag, "找到的数据");
  3117. // console.log(items.repairConsumables, "找到的数据");
  3118. // item.children[flag].flag = true
  3119. // item.children[flag].number = items.repairConsumables.number;
  3120. // item.children[flag].price = items.repairConsumables.price;
  3121. // selPriceList.value.push(item.children[0])
  3122. }
  3123. });
  3124. changePriceNum.list = ress.data.data;
  3125. });
  3126. let data = [];
  3127. selPriceList.value = [];
  3128. changePriceNum.list.forEach((ii) => {
  3129. ii.children.forEach((i) => {
  3130. if (i.flag) {
  3131. selPriceList.value.push(i);
  3132. data.push([i.parentId, i.id]); // 显示的物品默认勾选[122,153]
  3133. }
  3134. });
  3135. });
  3136. console.log(data, "选中的数据id");
  3137. changePriceSelId.value = data;
  3138. } else {
  3139. ElMessage({
  3140. type: "error",
  3141. showClose: true,
  3142. message: res.data.message,
  3143. center: true,
  3144. });
  3145. }
  3146. };
  3147. // 勾选改价中的数据
  3148. const selPrice = (val) => {
  3149. console.log(val);
  3150. // 将勾选置空
  3151. changePriceNum.list.forEach((ii) => {
  3152. ii.children.forEach((i) => {
  3153. i.flag = false;
  3154. });
  3155. });
  3156. // 给勾选的重新赋值 flag=true
  3157. changePriceNum.list.forEach((item) => {
  3158. val.forEach((i) => {
  3159. if (item.id == i[0]) {
  3160. if (item.children) {
  3161. item.children.forEach((row) => {
  3162. if (row.id == i[1]) {
  3163. row.flag = true;
  3164. }
  3165. });
  3166. }
  3167. }
  3168. });
  3169. });
  3170. // 将重新赋值的数据放到 选中的表格中
  3171. selPriceList.value = [];
  3172. changePriceNum.list.forEach((ii) => {
  3173. ii.children.forEach((i) => {
  3174. if (i.flag) {
  3175. selPriceList.value.push(i);
  3176. }
  3177. });
  3178. });
  3179. };
  3180. // 删除选中的改价数据
  3181. const delSelChangePrice = (row) => {
  3182. console.log(row);
  3183. row.flag = false;
  3184. // 将树形勾选重新赋值
  3185. let data = [];
  3186. selPriceList.value = [];
  3187. changePriceNum.list.forEach((ii) => {
  3188. ii.children.forEach((i) => {
  3189. if (i.flag) {
  3190. selPriceList.value.push(i);
  3191. data.push([i.parentId, i.id]); // 显示的物品默认勾选[122,153]
  3192. }
  3193. });
  3194. });
  3195. changePriceSelId.value = data;
  3196. // 将搜索出来的数据勾选重新赋值
  3197. if (keyWordSelPrice.value) {
  3198. keyWordSelPriceData.value = [];
  3199. selPriceList.value.forEach((item) => {
  3200. let name = `${item.parentName}-${item.name}`;
  3201. keyWordSelPriceData.value.push(name);
  3202. });
  3203. }
  3204. };
  3205. // 搜索关键字
  3206. const filterType = async () => {
  3207. console.log(goodTypeKeyWord.value);
  3208. keyWordSelPriceData.value = [];
  3209. let data = {
  3210. schoolId: changePriceData.value.schoolId,
  3211. keyWord: goodTypeKeyWord.value,
  3212. };
  3213. let res = await axios({
  3214. method: "get",
  3215. url: api.value + "/repairConsume/queryRepairConsumesBykey",
  3216. headers: {
  3217. token: sessionStorage.getItem("token"),
  3218. user_head: sessionStorage.getItem("userhead"),
  3219. },
  3220. params: data,
  3221. });
  3222. console.log(res, "关键字搜索数据");
  3223. keyWordSelPrice.value = res.data.data;
  3224. keyWordSelPrice.value.forEach((i) => {
  3225. selPriceList.value.forEach((item) => {
  3226. // console.log(item, "关键字");
  3227. if (i.name == item.name) {
  3228. let name = `${item.parentName}-${item.name}`;
  3229. keyWordSelPriceData.value.push(name);
  3230. }
  3231. });
  3232. });
  3233. // keyWordSelPriceData.value
  3234. };
  3235. // 当搜索关键字时勾选时
  3236. const keyWordSelPriceChange = (val) => {
  3237. console.log(val, "勾选");
  3238. // 将搜索出来的全部数据flag=false
  3239. changePriceNum.list.forEach((items) => {
  3240. keyWordSelPrice.value.forEach((item) => {
  3241. if (items.id == item.parentId) {
  3242. items.children.forEach((i) => {
  3243. if (i.id == item.id) {
  3244. i.flag = false;
  3245. }
  3246. });
  3247. }
  3248. });
  3249. });
  3250. // 将勾选的数据重新赋值flag=true
  3251. val.forEach((items) => {
  3252. let data = items.split("-");
  3253. console.log(data);
  3254. changePriceNum.list.forEach((item) => {
  3255. if (item.name == data[0]) {
  3256. item.children.forEach((i) => {
  3257. if (i.name == data[1]) {
  3258. i.flag = true;
  3259. }
  3260. });
  3261. }
  3262. });
  3263. });
  3264. // 将勾选的表格数据和树形勾选的重新赋值
  3265. let data = [];
  3266. selPriceList.value = [];
  3267. changePriceNum.list.forEach((ii) => {
  3268. ii.children.forEach((i) => {
  3269. if (i.flag) {
  3270. selPriceList.value.push(i);
  3271. data.push([i.parentId, i.id]); // 显示的物品默认勾选[122,153]
  3272. }
  3273. });
  3274. });
  3275. changePriceSelId.value = data;
  3276. };
  3277. // 将改价搜索框关键词清空时,将数据置空
  3278. const keyWordClean = () => {
  3279. keyWordSelPrice.value = [];
  3280. };
  3281. // 获取数量种类列表
  3282. // const changePrices = async (row) => {
  3283. // let data = { schoolId: row.schoolId };
  3284. // let res = await axios({
  3285. // method: "get",
  3286. // url: api.value + "/repairConsume/queryRepairConsumeTypeTree",
  3287. // headers: {
  3288. // token: sessionStorage.getItem("token"),
  3289. // user_head: sessionStorage.getItem("userhead"),
  3290. // },
  3291. // params: data,
  3292. // });
  3293. // console.log(res, "数量种类列表 数据");
  3294. // changePriceNum.list = res.data.data;
  3295. // };
  3296. // 确定改价
  3297. const changePriceYes = lodash.debounce(async () => {
  3298. let goodsArr = [];
  3299. let ids = [];
  3300. selPriceList.value.forEach((i) => {
  3301. ids.push(i.id);
  3302. let arr = {
  3303. recordId: "",
  3304. articleId: "",
  3305. consumeId: "",
  3306. consumeName: "",
  3307. price: "",
  3308. number: "",
  3309. totalPrice: "",
  3310. };
  3311. arr.recordId = changePriceData.value.recordId;
  3312. arr.articleId = i.parentId;
  3313. arr.consumeId = i.id;
  3314. arr.consumeName = i.name;
  3315. arr.price = i.price;
  3316. arr.number = i.number;
  3317. arr.totalPrice = allPrice.value;
  3318. goodsArr.push(arr);
  3319. });
  3320. let data = {
  3321. recordId: changePriceData.value.recordId, //工单ID
  3322. ids: ids, //携带耗材记录信息的所有id
  3323. totalPrice: allPrice.value, //所有耗材记录总金额
  3324. repairConsumablesList: goodsArr,
  3325. };
  3326. console.log(data, "改价参数");
  3327. let res = await axios({
  3328. method: "post",
  3329. url: api.value + "/repairRecord/alterPrice",
  3330. headers: {
  3331. token: sessionStorage.getItem("token"),
  3332. user_head: sessionStorage.getItem("userhead"),
  3333. },
  3334. data: data,
  3335. });
  3336. console.log(res, "修改 改价数据");
  3337. if (res.data.code == 200) {
  3338. getList();
  3339. cancelChangePrice();
  3340. ElMessage({
  3341. type: "success",
  3342. showClose: true,
  3343. message: res.data.message,
  3344. center: true,
  3345. });
  3346. } else {
  3347. ElMessage({
  3348. type: "error",
  3349. showClose: true,
  3350. message: res.data.message,
  3351. center: true,
  3352. });
  3353. }
  3354. }, 1500);
  3355. // 取消改价
  3356. const cancelChangePrice = () => {
  3357. changePriceVisible.value = false;
  3358. selPriceList.value = [];
  3359. changePriceSelId.value = [];
  3360. };
  3361. // 打印(----------------------------------------------------------------------------)
  3362. const printOrder = async (row) => {
  3363. printVisible.value = true;
  3364. console.log(row);
  3365. nowTime.value = dayjs().format("YYYY-MM-DD HH:ss:mm");
  3366. let data = {
  3367. recordId: row.id,
  3368. };
  3369. let res = await axios({
  3370. method: "get",
  3371. url: api.value + "/repairRecord/queryPrintData",
  3372. headers: {
  3373. token: sessionStorage.getItem("token"),
  3374. user_head: sessionStorage.getItem("userhead"),
  3375. },
  3376. params: data,
  3377. });
  3378. console.log(res, "打印数据");
  3379. if (res.data.code == 200) {
  3380. printData.list = res.data.data;
  3381. } else {
  3382. ElMessage({
  3383. type: "error",
  3384. showClose: true,
  3385. message: res.data.message,
  3386. center: true,
  3387. });
  3388. }
  3389. };
  3390. const cancelPrint = () => {
  3391. printVisible.value = false;
  3392. };
  3393. // tab标签页操作
  3394. const addTab = (targetName) => {
  3395. console.log(targetName);
  3396. const newTabName = `${++tabIndex}`;
  3397. editableTabs.value.push({
  3398. articleName: "",
  3399. consumeName: "",
  3400. number: "",
  3401. price: "",
  3402. totalPrice: "",
  3403. articleId: "",
  3404. schoolId: "",
  3405. id: "",
  3406. });
  3407. editableTabsValue.value = newTabName;
  3408. };
  3409. const removeTab = (targetName) => {
  3410. console.log(targetName);
  3411. // const tabs = editableTabs.value;
  3412. // let activeName = editableTabsValue.value;
  3413. // if (activeName === targetName) {
  3414. // tabs.forEach((tab, index) => {
  3415. // if (tab.name === targetName) {
  3416. // const nextTab = tabs[index + 1] || tabs[index - 1];
  3417. // if (nextTab) {
  3418. // activeName = nextTab.name;
  3419. // }
  3420. // }
  3421. // });
  3422. // }
  3423. // editableTabsValue.value = activeName;
  3424. // editableTabs.value = tabs.filter((tab) => tab.name !== targetName);
  3425. };
  3426. // 搜索功能
  3427. const searchBtn = lodash.debounce(async () => {
  3428. // getList();
  3429. selSchool(searchInput.schoolId);
  3430. }, 300);
  3431. // 重置搜索
  3432. const searchRefresh = lodash.debounce(async () => {
  3433. searchInput.name = "";
  3434. searchInput.phone = "";
  3435. searchInput.createTime = "";
  3436. currentPage.value = 1;
  3437. getList();
  3438. }, 300);
  3439. //删除按钮
  3440. const del = (row) => {
  3441. ElMessageBox.confirm(`是否删除 ${row.user_name} 驾驶员?`, "提示", {
  3442. confirmButtonText: "确认",
  3443. cancelButtonText: "取消",
  3444. type: "warning",
  3445. })
  3446. .then(async () => {
  3447. let data = new FormData();
  3448. data.set("id", row.id);
  3449. // let res = await adminApi.adminLogin(data);
  3450. let res = await axios({
  3451. method: "post",
  3452. url: api.value + "/carBook/userdel.action",
  3453. headers: {
  3454. token: sessionStorage.getItem("token"),
  3455. },
  3456. data: data,
  3457. });
  3458. if (res.data.code == 200) {
  3459. if (tableData.list.length == 1 && currentPage.value != 1) {
  3460. currentPage.value = currentPage.value - 1;
  3461. }
  3462. getList();
  3463. ElMessage({
  3464. type: "success",
  3465. showClose: true,
  3466. message: res.data.message,
  3467. center: true,
  3468. });
  3469. } else {
  3470. ElMessage({
  3471. type: "error",
  3472. showClose: true,
  3473. message: res.data.message,
  3474. center: true,
  3475. });
  3476. }
  3477. console.log(res);
  3478. })
  3479. .catch(() => {
  3480. ElMessage({
  3481. type: "info",
  3482. message: "已取消删除",
  3483. });
  3484. });
  3485. };
  3486. //导出功能
  3487. const importExcel = lodash.debounce(async () => {
  3488. let data = {
  3489. keyWord: searchInput.keyWord,
  3490. state: dayIndex.value,
  3491. schoolId: searchInput.schoolId,
  3492. };
  3493. if (searchInput.createTime) {
  3494. data.startTime = searchInput.createTime[0];
  3495. data.endTime = searchInput.createTime[1];
  3496. }
  3497. let res = await axios({
  3498. method: "get",
  3499. url: api.value + "/repairRecord/reportExport",
  3500. headers: {
  3501. token: sessionStorage.getItem("token"),
  3502. user_head: sessionStorage.getItem("userhead"),
  3503. },
  3504. responseType: "blob",
  3505. params: data,
  3506. });
  3507. console.log(res, "导出工单数据");
  3508. if (res.status == 200) {
  3509. let name = `工单数据`;
  3510. var content = res.data;
  3511. var datas = new Blob([content]);
  3512. var downloadUrl = window.URL.createObjectURL(datas);
  3513. var anchor = document.createElement("a");
  3514. anchor.href = downloadUrl;
  3515. anchor.download = name + ".xlsx";
  3516. anchor.click();
  3517. window.URL.revokeObjectURL(datas);
  3518. ElMessage({
  3519. type: "success",
  3520. showClose: true,
  3521. message: "导出成功",
  3522. center: true,
  3523. });
  3524. } else {
  3525. ElMessage({
  3526. type: "error",
  3527. showClose: true,
  3528. message: "导出失败",
  3529. center: true,
  3530. });
  3531. }
  3532. }, 1000);
  3533. // 多选框功能
  3534. const handleSelectionChange = (val) => {
  3535. console.log(val);
  3536. selectData.list = val;
  3537. };
  3538. // 批量关单
  3539. const batchOperate = async () => {
  3540. if (selectData.list.length) {
  3541. customsOrderVisible.value = true;
  3542. customsOrderTitle.value='批量关单';
  3543. customsOrderData.value.reason = "";
  3544. customsOrderData.value.remark = "";
  3545. let recordIds=[]
  3546. selectData.list.forEach(i=>{
  3547. recordIds.push(i.id)
  3548. })
  3549. customsOrderData.value.recordId=recordIds
  3550. }else{
  3551. ElMessage({
  3552. type: "warning",
  3553. showClose: true,
  3554. message:'至少勾选一条数据',
  3555. center: true,
  3556. });
  3557. }
  3558. };
  3559. // 表格斑马纹颜色修改
  3560. const tableRowClassName = ({ row, rowIndex }) => {
  3561. if (rowIndex % 2 === 0) {
  3562. return "even";
  3563. } else if (rowIndex % 2 !== 0) {
  3564. return "odd";
  3565. }
  3566. return "";
  3567. };
  3568. const handleSizeChange = (val) => {
  3569. console.log(val);
  3570. pageSize.value = val;
  3571. getList();
  3572. };
  3573. // 分页
  3574. const handleCurrentChange = (value) => {
  3575. // console.log(value);
  3576. currentPage.value = value;
  3577. getList();
  3578. };
  3579. onBeforeMount(async () => {
  3580. api.value = store.state.user.api;
  3581. if (sessionStorage.getItem("schoolId") == "null") {
  3582. searchInput.schoolId = 0;
  3583. schoolId.value = 0;
  3584. } else {
  3585. searchInput.schoolId = Number(sessionStorage.getItem("schoolId"));
  3586. schoolId.value = Number(sessionStorage.getItem("schoolId"));
  3587. }
  3588. selSchool(searchInput.schoolId);
  3589. // 关单原因列表
  3590. let res = await axios({
  3591. method: "get",
  3592. url: api.value + "/repairClose/queryRepairCloses",
  3593. headers: {
  3594. token: sessionStorage.getItem("token"),
  3595. user_head: sessionStorage.getItem("userhead"),
  3596. },
  3597. });
  3598. console.log(res, "关单原因列表");
  3599. if (res.data.code == 200) {
  3600. customsOrderList.value = res.data.data;
  3601. } else {
  3602. ElMessage({
  3603. type: "error",
  3604. showClose: true,
  3605. message: res.data.message,
  3606. center: true,
  3607. });
  3608. if (res.data.code == 570) {
  3609. sessionStorage.removeItem("token");
  3610. router.push({
  3611. path: `/login`,
  3612. });
  3613. }
  3614. }
  3615. });
  3616. </script>
  3617. <style scoped lang="scss">
  3618. .content-box {
  3619. width: 97.5%;
  3620. height: 89%;
  3621. margin: 20px auto;
  3622. background-color: #fff;
  3623. color: #fff;
  3624. display: flex;
  3625. flex-direction: column;
  3626. box-shadow: 0px 3px 10px rgba(213, 228, 252, 1);
  3627. .left {
  3628. // width: calc(100wh - 40px);
  3629. display: flex;
  3630. align-items: center;
  3631. height: 60px;
  3632. margin: 0 30px;
  3633. border-bottom: 1px solid #ccc;
  3634. color: #000;
  3635. font-size: 18px;
  3636. font-weight: 600;
  3637. .cameratxt {
  3638. margin-right: 15px;
  3639. // color: #4392f7;
  3640. height: 60px;
  3641. line-height: 60px;
  3642. }
  3643. }
  3644. .middle {
  3645. width: 96%;
  3646. margin: 10px auto;
  3647. padding-top: 10px;
  3648. display: flex;
  3649. flex-wrap: wrap;
  3650. color: #000;
  3651. align-items: center;
  3652. justify-content: space-between;
  3653. // border-bottom: 1px solid rgb(231, 231, 231);
  3654. .filter {
  3655. display: flex;
  3656. align-items: center;
  3657. .search {
  3658. color: #fff;
  3659. }
  3660. .condition2 {
  3661. margin-left: 30px;
  3662. }
  3663. }
  3664. .gongneng {
  3665. span {
  3666. color: #fff;
  3667. }
  3668. }
  3669. }
  3670. .btn {
  3671. margin: 10px 0;
  3672. ul {
  3673. list-style: none;
  3674. display: flex;
  3675. padding: 0 20px;
  3676. margin: 0 0 0 15px;
  3677. li {
  3678. color: #000;
  3679. // width: 80px;
  3680. padding: 0 8px;
  3681. height: 30px;
  3682. border-radius: 8px;
  3683. border: 1px solid #ccc;
  3684. line-height: 30px;
  3685. text-align: center;
  3686. cursor: pointer;
  3687. font-size: 14px;
  3688. margin-right: 20px;
  3689. }
  3690. .li_active {
  3691. // background-color: rgba(111, 182, 184, 1);
  3692. border: 1px solid rgba(111, 182, 184, 1);
  3693. color: rgba(111, 182, 184, 1);
  3694. }
  3695. }
  3696. }
  3697. .footer {
  3698. width: 96%;
  3699. height: 550px;
  3700. margin: 10px auto 30px;
  3701. .el-table--fit {
  3702. height: 100%;
  3703. :deep(.el-table__header-wrapper) {
  3704. background-color: #000;
  3705. font-size: 16px;
  3706. .el-table__header {
  3707. tr {
  3708. color: #000;
  3709. }
  3710. }
  3711. }
  3712. :deep(.el-table__row) {
  3713. height: 50px;
  3714. font-size: 16px;
  3715. color: rgba(77, 77, 77, 1);
  3716. .operation {
  3717. display: flex;
  3718. font-size: 16px;
  3719. justify-content: space-around;
  3720. .btns {
  3721. cursor: pointer;
  3722. font-size: 14px;
  3723. color: rgba(111, 182, 184, 1);
  3724. }
  3725. .btns:hover {
  3726. color: red;
  3727. font-size: 16px;
  3728. }
  3729. }
  3730. }
  3731. :deep(.el-table__row td) {
  3732. padding: 0;
  3733. border: 0;
  3734. // 表格工单编号样式
  3735. .orderNum {
  3736. display: flex;
  3737. align-items: center;
  3738. justify-content: center;
  3739. .xi {
  3740. width: 18px;
  3741. height: 18px;
  3742. font-size: 12px;
  3743. color: #fff;
  3744. line-height: 18px;
  3745. text-align: center;
  3746. background-color: rgba(111, 182, 184, 1);
  3747. margin-left: 8px;
  3748. }
  3749. .xie {
  3750. width: 18px;
  3751. height: 18px;
  3752. font-size: 12px;
  3753. color: #fff;
  3754. line-height: 18px;
  3755. text-align: center;
  3756. background-color: red;
  3757. margin-left: 8px;
  3758. }
  3759. }
  3760. }
  3761. .el-button--primary {
  3762. margin-left: 5px;
  3763. }
  3764. :deep(.el-table__body .even) {
  3765. background-color: #fff;
  3766. }
  3767. :deep(.el-table__body .odd) {
  3768. background-color: rgba(240, 243, 247, 1);
  3769. }
  3770. // 表格操作样式
  3771. }
  3772. // 新建工单弹窗样式
  3773. :deep(.addStaff) {
  3774. // height: 420px;
  3775. border-radius: 11px;
  3776. .el-dialog__header {
  3777. border-radius: 11px 11px 0 0;
  3778. background: rgba(237, 241, 245, 1);
  3779. font-weight: 600;
  3780. margin: 0;
  3781. .el-dialog__headerbtn {
  3782. outline: none;
  3783. }
  3784. }
  3785. .el-dialog__body {
  3786. padding: 30px 20px 10px 20px;
  3787. // 添加工单中上传照片样式
  3788. .el-form-item__content {
  3789. .avatar-uploader .avatar {
  3790. width: 128px;
  3791. height: 128px;
  3792. display: block;
  3793. }
  3794. .avatar-uploader .el-upload {
  3795. width: 128px;
  3796. height: 128px;
  3797. background-color: #ccc;
  3798. border: 1px dashed var(--el-border-color);
  3799. border-radius: 6px;
  3800. cursor: pointer;
  3801. position: relative;
  3802. overflow: hidden;
  3803. transition: var(--el-transition-duration-fast);
  3804. }
  3805. .avatar-uploader .el-upload:hover {
  3806. border-color: var(--el-color-primary);
  3807. }
  3808. .avatar-uploader-icon {
  3809. width: 88px;
  3810. height: 88px;
  3811. text-align: center;
  3812. }
  3813. // 添加多张图片样式
  3814. .el-upload-list {
  3815. .el-upload-list__item {
  3816. width: 128px;
  3817. height: 128px;
  3818. }
  3819. }
  3820. }
  3821. .el-input {
  3822. width: 230px;
  3823. }
  3824. .el-textarea__inner {
  3825. width: 230px;
  3826. }
  3827. .options {
  3828. .el-form-item__content {
  3829. .queding {
  3830. margin-left: 20px;
  3831. color: #fff;
  3832. }
  3833. display: flex;
  3834. flex-direction: row-reverse;
  3835. }
  3836. }
  3837. }
  3838. }
  3839. // 查看图片弹窗
  3840. :deep(.imgVisible) {
  3841. .el-dialog__body {
  3842. padding: 0;
  3843. height: 640px;
  3844. display: flex;
  3845. justify-content: center;
  3846. align-items: center;
  3847. }
  3848. img {
  3849. height: 100%;
  3850. padding: 0;
  3851. margin: 0;
  3852. }
  3853. }
  3854. // 派单样式
  3855. :deep(.sendOrder) {
  3856. // height: 420px;
  3857. border-radius: 11px;
  3858. .el-dialog__header {
  3859. border-radius: 11px 11px 0 0;
  3860. background: rgba(237, 241, 245, 1);
  3861. font-weight: 600;
  3862. margin: 0;
  3863. .el-dialog__headerbtn {
  3864. outline: none;
  3865. }
  3866. }
  3867. .el-dialog__body {
  3868. padding: 30px 20px 10px 20px;
  3869. .send_order {
  3870. .table {
  3871. margin: 20px 0;
  3872. }
  3873. }
  3874. .options {
  3875. display: flex;
  3876. flex-direction: row-reverse;
  3877. margin: 10px 0 25px 0;
  3878. .queding {
  3879. margin-left: 20px;
  3880. color: #fff;
  3881. }
  3882. }
  3883. }
  3884. }
  3885. // 详情样式
  3886. :deep(.orderInfo) {
  3887. height: 800px;
  3888. overflow: hidden;
  3889. border-radius: 11px;
  3890. .el-dialog__header {
  3891. border-radius: 11px 11px 0 0;
  3892. background: rgba(237, 241, 245, 1);
  3893. font-weight: 600;
  3894. margin: 0;
  3895. .el-dialog__headerbtn {
  3896. outline: none;
  3897. }
  3898. }
  3899. .el-dialog__body {
  3900. height: 720px;
  3901. overflow: auto;
  3902. padding: 0px 20px 10px 20px;
  3903. .order_info {
  3904. .title {
  3905. display: flex;
  3906. align-items: center;
  3907. margin: 25px 0 10px 0;
  3908. img {
  3909. width: 20px;
  3910. height: 20px;
  3911. margin-right: 10px;
  3912. }
  3913. span {
  3914. color: #000;
  3915. font-size: 18px;
  3916. font-weight: 600;
  3917. }
  3918. }
  3919. // 工单详情 排列模式样式
  3920. .workNum {
  3921. display: flex;
  3922. align-items: center;
  3923. margin-bottom: 12px;
  3924. font-size: 16px;
  3925. .audio {
  3926. width: 98px;
  3927. height: 30px;
  3928. border-radius: 42.41px;
  3929. background: rgba(255, 255, 255, 1);
  3930. box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
  3931. display: flex;
  3932. align-items: center;
  3933. cursor: pointer;
  3934. img {
  3935. width: 18px;
  3936. height: 18px;
  3937. margin-left: 5px;
  3938. }
  3939. .audioNum {
  3940. font-size: 16px;
  3941. }
  3942. }
  3943. .titles {
  3944. color: rgba(128, 128, 128, 1);
  3945. margin-right: 8px;
  3946. width: 80px;
  3947. font-weight: 400;
  3948. }
  3949. span {
  3950. color: #000;
  3951. font-weight: 600;
  3952. width: 640px;
  3953. }
  3954. }
  3955. // 工单详情 步骤条样式
  3956. .steps {
  3957. .el-step {
  3958. // margin: 15px 0;
  3959. .el-step__main {
  3960. display: flex;
  3961. margin-bottom: 15px;
  3962. span {
  3963. font-size: 16px;
  3964. }
  3965. .el-step__title {
  3966. display: inline;
  3967. padding: 0 15px 0 0;
  3968. span {
  3969. background-color: rgba(111, 182, 184, 1);
  3970. color: #fff;
  3971. padding: 1px 3px;
  3972. border-radius: 3px;
  3973. }
  3974. }
  3975. }
  3976. .el-step__description {
  3977. padding-right: 0;
  3978. .content {
  3979. margin-top: 7px;
  3980. }
  3981. .middleContent {
  3982. width: 500px;
  3983. .overContent {
  3984. word-wrap: break-word;
  3985. }
  3986. }
  3987. .evaluateImg {
  3988. width: 500px;
  3989. margin: 10px 0;
  3990. display: flex;
  3991. flex-wrap: wrap;
  3992. img {
  3993. width: 80px;
  3994. // height: 40px;
  3995. margin: 5px 10px 0 0;
  3996. }
  3997. }
  3998. .audio {
  3999. width: 98px;
  4000. height: 30px;
  4001. border-radius: 42.41px;
  4002. background: rgba(255, 255, 255, 1);
  4003. box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
  4004. display: flex;
  4005. align-items: center;
  4006. cursor: pointer;
  4007. img {
  4008. width: 18px;
  4009. height: 18px;
  4010. margin-left: 5px;
  4011. }
  4012. .audioNum {
  4013. font-size: 16px;
  4014. color: #000;
  4015. }
  4016. }
  4017. }
  4018. }
  4019. }
  4020. }
  4021. }
  4022. }
  4023. // 延时弹窗样式
  4024. :deep(.delayed) {
  4025. // height: 420px;
  4026. border-radius: 11px;
  4027. .el-dialog__header {
  4028. border-radius: 11px 11px 0 0;
  4029. background: rgba(237, 241, 245, 1);
  4030. font-weight: 600;
  4031. margin: 0;
  4032. .el-dialog__headerbtn {
  4033. outline: none;
  4034. }
  4035. }
  4036. .el-dialog__body {
  4037. padding: 0px 30px 10px 20px;
  4038. .kaohe {
  4039. margin: 25px 0;
  4040. }
  4041. .options {
  4042. display: flex;
  4043. flex-direction: row-reverse;
  4044. margin: 100px 0 25px 0;
  4045. .queding {
  4046. margin-left: 20px;
  4047. color: #fff;
  4048. }
  4049. }
  4050. }
  4051. }
  4052. // 回复弹窗样式
  4053. :deep(.reply) {
  4054. // height: 420px;
  4055. border-radius: 11px;
  4056. .el-dialog__header {
  4057. border-radius: 11px 11px 0 0;
  4058. background: rgba(237, 241, 245, 1);
  4059. font-weight: 600;
  4060. margin: 0;
  4061. .el-dialog__headerbtn {
  4062. outline: none;
  4063. }
  4064. }
  4065. .el-dialog__body {
  4066. padding: 0px 30px 10px 20px;
  4067. .content {
  4068. margin: 25px 0;
  4069. }
  4070. .options {
  4071. display: flex;
  4072. flex-direction: row-reverse;
  4073. margin: 20px 0 25px 0;
  4074. .queding {
  4075. margin-left: 20px;
  4076. color: #fff;
  4077. }
  4078. }
  4079. }
  4080. }
  4081. // 协作审核弹窗样式
  4082. :deep(.cooperation) {
  4083. // height: 420px;
  4084. border-radius: 11px;
  4085. .el-dialog__header {
  4086. border-radius: 11px 11px 0 0;
  4087. background: rgba(237, 241, 245, 1);
  4088. font-weight: 600;
  4089. margin: 0;
  4090. .el-dialog__headerbtn {
  4091. outline: none;
  4092. }
  4093. }
  4094. .el-dialog__body {
  4095. padding: 10px 30px 10px 30px;
  4096. .block {
  4097. display: flex;
  4098. align-items: center;
  4099. margin: 15px 0;
  4100. color: #000;
  4101. .name {
  4102. margin-right: 8px;
  4103. }
  4104. }
  4105. .audio {
  4106. width: 98px;
  4107. height: 30px;
  4108. cursor: pointer;
  4109. border-radius: 42.41px;
  4110. background: rgba(255, 255, 255, 1);
  4111. box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
  4112. display: flex;
  4113. align-items: center;
  4114. img {
  4115. width: 18px;
  4116. height: 18px;
  4117. margin-left: 5px;
  4118. }
  4119. .audioNum {
  4120. font-size: 16px;
  4121. }
  4122. }
  4123. .content {
  4124. display: flex;
  4125. flex-direction: column;
  4126. color: #000;
  4127. span {
  4128. display: inline-block;
  4129. margin: 0 0 10px 0;
  4130. }
  4131. .el-textarea {
  4132. width: 400px;
  4133. }
  4134. }
  4135. .options {
  4136. display: flex;
  4137. flex-direction: row-reverse;
  4138. margin: 20px 20px 0 0;
  4139. width: 100%;
  4140. .queding {
  4141. margin-left: 20px;
  4142. color: #fff;
  4143. }
  4144. }
  4145. }
  4146. }
  4147. // 转单审核弹窗样式
  4148. :deep(.transOrder) {
  4149. // height: 420px;
  4150. border-radius: 11px;
  4151. .el-dialog__header {
  4152. border-radius: 11px 11px 0 0;
  4153. background: rgba(237, 241, 245, 1);
  4154. font-weight: 600;
  4155. margin: 0;
  4156. .el-dialog__headerbtn {
  4157. outline: none;
  4158. }
  4159. }
  4160. .el-dialog__body {
  4161. padding: 25px 20px 10px 20px;
  4162. .el-form-item__label {
  4163. color: #000;
  4164. }
  4165. .el-textarea {
  4166. width: 400px;
  4167. }
  4168. .el-input {
  4169. width: 400px;
  4170. }
  4171. .audio {
  4172. width: 98px;
  4173. height: 30px;
  4174. cursor: pointer;
  4175. border-radius: 42.41px;
  4176. background: rgba(255, 255, 255, 1);
  4177. box-shadow: 0px 0px 1.68px rgba(0, 0, 0, 0.25);
  4178. display: flex;
  4179. align-items: center;
  4180. img {
  4181. width: 18px;
  4182. height: 18px;
  4183. margin-left: 5px;
  4184. }
  4185. .audioNum {
  4186. font-size: 16px;
  4187. }
  4188. }
  4189. .options {
  4190. display: flex;
  4191. flex-direction: row-reverse;
  4192. margin: 20px 20px 0 0;
  4193. width: 100%;
  4194. .queding {
  4195. margin-left: 20px;
  4196. color: #fff;
  4197. }
  4198. }
  4199. }
  4200. }
  4201. // 关单弹窗样式
  4202. :deep(.customsOrder) {
  4203. // height: 420px;
  4204. border-radius: 11px;
  4205. .el-dialog__header {
  4206. border-radius: 11px 11px 0 0;
  4207. background: rgba(237, 241, 245, 1);
  4208. font-weight: 600;
  4209. margin: 0;
  4210. .el-dialog__headerbtn {
  4211. outline: none;
  4212. }
  4213. }
  4214. .el-dialog__body {
  4215. padding: 0px 30px 10px 30px;
  4216. .content {
  4217. color: #000;
  4218. margin: 20px 0 0 0;
  4219. .name {
  4220. display: inline-block;
  4221. margin-bottom: 20px;
  4222. }
  4223. .el-input {
  4224. width: 400px;
  4225. margin-left: 10px;
  4226. }
  4227. .el-textarea {
  4228. width: 430px;
  4229. margin-left: 10px;
  4230. }
  4231. }
  4232. .options {
  4233. display: flex;
  4234. flex-direction: row-reverse;
  4235. margin: 30px 0 10px 0;
  4236. .queding {
  4237. margin-left: 20px;
  4238. color: #fff;
  4239. }
  4240. }
  4241. }
  4242. }
  4243. // // 改价弹窗样式
  4244. // :deep(.changePrice) {
  4245. // // height: 420px;
  4246. // border-radius: 11px;
  4247. // .el-dialog__header {
  4248. // border-radius: 11px 11px 0 0;
  4249. // background: rgba(237, 241, 245, 1);
  4250. // font-weight: 600;
  4251. // margin: 0;
  4252. // .el-dialog__headerbtn {
  4253. // outline: none;
  4254. // }
  4255. // }
  4256. // .el-dialog__body {
  4257. // padding: 0;
  4258. // max-height: 700px;
  4259. // overflow: auto;
  4260. // ul {
  4261. // list-style: none;
  4262. // display: flex;
  4263. // flex-wrap: wrap;
  4264. // margin: 0 0 14px 0;
  4265. // padding: 0;
  4266. // li {
  4267. // margin: 0 4px;
  4268. // padding: 2px 4px;
  4269. // border-radius: 3px;
  4270. // // border: 1px solid #ccc;
  4271. // background-color: #ccc;
  4272. // color: #fff;
  4273. // cursor: pointer;
  4274. // box-sizing: border-box;
  4275. // display: flex;
  4276. // align-items: center;
  4277. // img {
  4278. // width: 18px;
  4279. // height: 18px;
  4280. // margin-left: 5px;
  4281. // }
  4282. // }
  4283. // .li_active {
  4284. // background-color: rgba(111, 182, 184, 1);
  4285. // // border: 1px solid rgba(111, 182, 184, 1);
  4286. // }
  4287. // }
  4288. // .goodsCard {
  4289. // border: 1px solid #ccc;
  4290. // margin: 20px 20px;
  4291. // padding: 0 10px;
  4292. // .goodsTitle {
  4293. // display: flex;
  4294. // align-items: center;
  4295. // justify-content: space-between;
  4296. // h2 {
  4297. // margin: 10px;
  4298. // }
  4299. // span {
  4300. // color: #fff;
  4301. // }
  4302. // }
  4303. // .label {
  4304. // display: flex;
  4305. // margin: 10px;
  4306. // .type {
  4307. // width: 75px;
  4308. // }
  4309. // }
  4310. // .label:last-child {
  4311. // display: flex;
  4312. // margin-bottom: 20px;
  4313. // .type {
  4314. // width: 75px;
  4315. // }
  4316. // }
  4317. // }
  4318. // .addGoods {
  4319. // width: 94%;
  4320. // margin: 0 auto;
  4321. // }
  4322. // .el-form-item__label {
  4323. // color: #000;
  4324. // }
  4325. // .el-textarea {
  4326. // width: 400px;
  4327. // }
  4328. // .el-input {
  4329. // width: 400px;
  4330. // }
  4331. // .priceSum {
  4332. // width: 94%;
  4333. // display: flex;
  4334. // justify-content: center;
  4335. // margin: 20px auto;
  4336. // .totalPrice {
  4337. // width: 200px;
  4338. // font-size: 18px;
  4339. // color: #000;
  4340. // }
  4341. // }
  4342. // .options {
  4343. // display: flex;
  4344. // flex-direction: row-reverse;
  4345. // width: 100%;
  4346. // .queding {
  4347. // margin-left: 20px;
  4348. // color: #fff;
  4349. // }
  4350. // }
  4351. // }
  4352. // }
  4353. // 改价弹窗样式
  4354. :deep(.changePrice) {
  4355. // height: 420px;
  4356. border-radius: 11px;
  4357. .el-dialog__header {
  4358. border-radius: 11px 11px 0 0;
  4359. background: rgba(237, 241, 245, 1);
  4360. font-weight: 600;
  4361. margin: 0;
  4362. .el-dialog__headerbtn {
  4363. outline: none;
  4364. }
  4365. }
  4366. .el-dialog__body {
  4367. padding: 0;
  4368. max-height: 700px;
  4369. overflow: auto;
  4370. .goodsCard {
  4371. display: flex;
  4372. margin: 20px;
  4373. // 树形选择
  4374. .el-cascader-panel {
  4375. height: 396px;
  4376. .el-scrollbar {
  4377. // border: 1px solid red;
  4378. .el-scrollbar__wrap {
  4379. height: 400px;
  4380. }
  4381. }
  4382. }
  4383. // 单数据多选
  4384. .checkbox-group {
  4385. height: 376px;
  4386. border: 1px solid #dcdfe6;
  4387. padding: 10px 20px;
  4388. overflow: auto;
  4389. .el-checkbox-group {
  4390. display: flex;
  4391. flex-direction: column;
  4392. }
  4393. }
  4394. .types {
  4395. display: flex;
  4396. }
  4397. .el-table--fit {
  4398. height: 430px;
  4399. .el-table__header-wrapper {
  4400. background-color: #000;
  4401. font-size: 14px;
  4402. height: 34px;
  4403. border: 1px solid #dcdfe6;
  4404. border-bottom: none;
  4405. box-sizing: border-box;
  4406. .el-table__header {
  4407. tr {
  4408. color: #000;
  4409. }
  4410. }
  4411. }
  4412. .el-table__body-wrapper {
  4413. border: 1px solid #dcdfe6;
  4414. box-sizing: border-box;
  4415. }
  4416. .el-table__row {
  4417. height: 34px;
  4418. font-size: 14px;
  4419. color: rgba(77, 77, 77, 1);
  4420. // 表格中修改价格和数量
  4421. .el-input__wrapper {
  4422. background-color: transparent;
  4423. box-shadow: none;
  4424. .el-input__inner {
  4425. text-align: center;
  4426. }
  4427. }
  4428. .el-input__wrapper.is-focus {
  4429. box-shadow: 0 0 0 1px #409eff inset;
  4430. }
  4431. }
  4432. .el-table__row td {
  4433. padding: 0;
  4434. border: 0;
  4435. .del {
  4436. color: rgba(64, 158, 255, 1);
  4437. cursor: pointer;
  4438. }
  4439. .del:hover {
  4440. color: red;
  4441. }
  4442. }
  4443. .el-table__empty-block {
  4444. display: none;
  4445. }
  4446. }
  4447. }
  4448. .priceSum {
  4449. width: 94%;
  4450. display: flex;
  4451. justify-content: center;
  4452. margin: 20px auto;
  4453. .totalPrice {
  4454. width: 200px;
  4455. font-size: 18px;
  4456. color: #000;
  4457. }
  4458. }
  4459. .options {
  4460. display: flex;
  4461. flex-direction: row-reverse;
  4462. width: 100%;
  4463. .queding {
  4464. margin-left: 20px;
  4465. color: #fff;
  4466. }
  4467. }
  4468. }
  4469. }
  4470. // 打印
  4471. :deep(.printDialog) {
  4472. border-radius: 11px;
  4473. .el-dialog__header {
  4474. border-radius: 11px 11px 0 0;
  4475. background: rgba(237, 241, 245, 1);
  4476. font-weight: 600;
  4477. margin: 0;
  4478. .el-dialog__headerbtn {
  4479. outline: none;
  4480. }
  4481. }
  4482. .el-dialog__body {
  4483. padding: 0px 30px 10px 30px;
  4484. height: 700px;
  4485. overflow: auto;
  4486. .content {
  4487. color: #000;
  4488. margin: 5px 0 30px 0;
  4489. font-size: 18px;
  4490. .title {
  4491. margin: 15px 0;
  4492. display: flex;
  4493. justify-content: space-between;
  4494. }
  4495. .name {
  4496. margin: 20px 0 0 0;
  4497. span {
  4498. display: inline-block;
  4499. }
  4500. span:nth-child(1) {
  4501. width: 300px;
  4502. text-align: right;
  4503. }
  4504. span:nth-child(2) {
  4505. width: 150px;
  4506. padding-left: 5px;
  4507. }
  4508. span:nth-child(3) {
  4509. width: 100px;
  4510. text-align: right;
  4511. }
  4512. span:nth-child(4) {
  4513. padding-left: 5px;
  4514. }
  4515. }
  4516. .date {
  4517. margin: 10px 0 60px 0;
  4518. }
  4519. h3 {
  4520. margin: 20px 0 30px 0;
  4521. font-size: 26px;
  4522. text-align: center;
  4523. }
  4524. .printTable {
  4525. table {
  4526. width: 700px;
  4527. border-collapse: collapse; //消除单元格间距
  4528. tr {
  4529. td {
  4530. padding: 8px 15px;
  4531. }
  4532. .tableTitle {
  4533. font-size: 18px;
  4534. font-weight: 800;
  4535. text-align: center;
  4536. background-color: rgba(241, 241, 241, 1);
  4537. }
  4538. .item {
  4539. width: 100px;
  4540. background-color: rgba(241, 241, 241, 1);
  4541. }
  4542. .textarea {
  4543. // text-indent: 2em;
  4544. // padding: 20px;
  4545. // line-height: 2;
  4546. overflow: hidden;
  4547. text-overflow: ellipsis;
  4548. white-space: nowrap;
  4549. width: 530px;
  4550. }
  4551. }
  4552. }
  4553. }
  4554. }
  4555. .options {
  4556. display: flex;
  4557. flex-direction: row-reverse;
  4558. margin: 30px 0 10px 0;
  4559. .queding {
  4560. margin-left: 20px;
  4561. color: #fff;
  4562. }
  4563. }
  4564. }
  4565. }
  4566. }
  4567. .el-pagination {
  4568. // width: 1600px;
  4569. width: 96%;
  4570. margin: 0 auto 18px;
  4571. justify-content: flex-end;
  4572. :deep(.el-pagination__total) {
  4573. color: #000;
  4574. }
  4575. :deep(.el-pagination__goto) {
  4576. color: #000;
  4577. }
  4578. :deep(.el-pagination__classifier) {
  4579. color: #000;
  4580. }
  4581. :deep(.el-input__wrapper) {
  4582. border: 1px solid rgba(0, 0, 0, 1);
  4583. border-radius: 5px;
  4584. box-shadow: none;
  4585. }
  4586. :deep(.el-pager li) {
  4587. margin: 0 5px;
  4588. border: 1px solid rgba(0, 0, 0, 1);
  4589. border-radius: 5px;
  4590. background-color: transparent;
  4591. }
  4592. :deep(.el-pager li.is-active) {
  4593. background-color: rgba(111, 182, 184, 1);
  4594. }
  4595. :deep(.btn-prev) {
  4596. margin-right: 5px;
  4597. border: 1px solid rgba(0, 0, 0, 1);
  4598. border-radius: 5px;
  4599. background-color: transparent;
  4600. }
  4601. :deep(.btn-next) {
  4602. margin-left: 5px;
  4603. border: 1px solid rgba(0, 0, 0, 1);
  4604. border-radius: 5px;
  4605. background-color: transparent;
  4606. }
  4607. }
  4608. .bgImg {
  4609. position: absolute;
  4610. left: 0;
  4611. top: 0;
  4612. z-index: 99999999;
  4613. width: 100%;
  4614. height: 100%;
  4615. background-color: rgba(255, 255, 255, 0.8);
  4616. display: flex;
  4617. justify-content: center;
  4618. img {
  4619. height: 100%;
  4620. }
  4621. }
  4622. }
  4623. .el-input {
  4624. width: 192px;
  4625. }
  4626. </style>