oYeTransResult.vue 169 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542
  1. //钢材统计报表
  2. <template>
  3. <div class="saleSteelReports">
  4. <div class="tableTop">
  5. <el-form :inline="true">
  6. <el-form-item>
  7. <el-select
  8. v-model="screen"
  9. placeholder="请选择需筛选的内容"
  10. clearable
  11. @change="changeScreen"
  12. style="width:90px"
  13. >
  14. <el-option
  15. v-for="item in options"
  16. :key="item.value"
  17. :label="item.label"
  18. :value="item.value"
  19. >
  20. </el-option>
  21. </el-select>
  22. <el-input
  23. style="width:150px"
  24. v-model="input"
  25. placeholder="请输入查询条件"
  26. clearable
  27. ></el-input>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-select
  31. v-model="screen1"
  32. placeholder="请选择需筛选的内容"
  33. clearable
  34. @change="changeScreen"
  35. style="width:90px"
  36. >
  37. <el-option
  38. v-for="item in options1"
  39. :key="item.value"
  40. :label="item.label"
  41. :value="item.value"
  42. >
  43. </el-option>
  44. </el-select>
  45. <el-input
  46. style="width:150px"
  47. v-model="input1"
  48. placeholder="请输入查询条件"
  49. clearable
  50. ></el-input>
  51. </el-form-item>
  52. <el-form-item>
  53. <el-select v-model="dateType" placeholder="请选择" style="width:90px">
  54. <el-option label="计划日期" value="1" key="1"></el-option>
  55. <el-option label="出库日期" value="2" key="2"></el-option>
  56. </el-select>
  57. <el-date-picker
  58. v-model="startTime"
  59. type="datetime"
  60. placeholder="选择日期"
  61. style="width:200px"
  62. :picker-options="pickerOptions"
  63. >
  64. </el-date-picker>
  65. <span>至</span>
  66. <el-date-picker
  67. v-model="endTime"
  68. type="datetime"
  69. placeholder="选择日期"
  70. style="width:200px"
  71. :picker-options="pickerOptions1"
  72. >
  73. </el-date-picker>
  74. <el-button type="primary" class="btn" @click="onclick(filterMap)">
  75. <i class="el-icon-search"></i>
  76. </el-button>
  77. </el-form-item>
  78. <el-form-item>
  79. <el-button type="primary" @click="exportAllReportToExcel"
  80. >下载Excel</el-button
  81. >
  82. </el-form-item>
  83. <el-form-item>
  84. <el-button type="primary" @click="clearFilter"
  85. >清除所有筛选</el-button
  86. >
  87. </el-form-item>
  88. <el-form-item>
  89. <el-button type="primary" @click="refresh">
  90. <i class="el-icon-refresh"></i>
  91. </el-button>
  92. </el-form-item>
  93. <el-form-item>
  94. <el-button
  95. type="primary"
  96. @click="checkTrans()"
  97. v-privilege="activeMenu + 'checkTrans'"
  98. ><i class="el-icon-truck"></i>轨迹</el-button
  99. >
  100. </el-form-item>
  101. <el-form-item>
  102. <el-button
  103. type="primary"
  104. @click="operation()"
  105. v-privilege="activeMenu + 'operation'"
  106. >
  107. <i class="el-icon-edit"></i>更改
  108. <span>
  109. <!-- || orgCode!='chengyunshang' -->
  110. <el-badge
  111. :value="taskAllNum"
  112. :max="99"
  113. :hidden="taskAllNum < 1"
  114. ></el-badge>
  115. </span>
  116. </el-button>
  117. <!-- <el-button type="primary" @click="batchoperation()"
  118. ><i class="el-icon-edit"></i>批量更改</el-button
  119. > -->
  120. <el-button
  121. type="primary"
  122. @click="checkPoint()"
  123. v-privilege="activeMenu + 'checkPoint'"
  124. ><i class="el-icon-map-location"></i>实时路径</el-button
  125. >
  126. </el-form-item>
  127. <el-form-item>
  128. <el-button
  129. type="primary"
  130. @click="openReceive()"
  131. v-privilege="activeMenu + 'openReceive'"
  132. >
  133. <i class="el-icon-document"></i>签收抵达</el-button
  134. >
  135. </el-form-item>
  136. <el-form-item>
  137. <el-button
  138. type="primary"
  139. @click="batchCarrier()"
  140. v-privilege="activeMenu + 'batchCarrier'"
  141. >
  142. <i class="el-icon-share"></i>批量</el-button
  143. >
  144. </el-form-item>
  145. <el-form-item>
  146. <el-button
  147. type="primary"
  148. @click="mergeSplit()"
  149. v-privilege="activeMenu + 'mergeSplit'"
  150. >
  151. <i class="el-icon-pie-chart"></i>
  152. 合并或拆分
  153. </el-button>
  154. </el-form-item>
  155. <el-form-item
  156. ><el-button
  157. type="primary"
  158. @click="confirmInbound"
  159. v-privilege="activeMenu + 'confirmInbound'"
  160. ><i class="el-icon-check"></i>出库确认</el-button
  161. ></el-form-item
  162. >
  163. <el-form-item
  164. ><el-button
  165. type="primary"
  166. @click="reConfirmInbound"
  167. v-privilege="activeMenu + 'reConfirmInbound'"
  168. ><i class="el-icon-check"></i>重新出库</el-button
  169. ></el-form-item
  170. >
  171. <el-form-item v-privilege="activeMenu + 'more'">
  172. <el-dropdown>
  173. <el-button type="primary">
  174. 更多<i class="el-icon-arrow-down el-icon--right"></i>
  175. </el-button>
  176. <el-dropdown-menu slot="dropdown">
  177. <el-button
  178. type="primary"
  179. @click="showSaleLog()"
  180. v-privilege="activeMenu + 'saleLog'"
  181. >
  182. <i class="el-icon-pie-chart"></i>
  183. 操作日志
  184. </el-button>
  185. <el-button type="primary" @click="ctrlColumnShow">
  186. <i class="el-icon-pie-chart"></i>
  187. 控制列显隐
  188. </el-button>
  189. </el-dropdown-menu>
  190. </el-dropdown>
  191. </el-form-item>
  192. <el-form-item>
  193. <span style="width: auto;font-size: 16px;line-height: auto;"
  194. >车数/件数/磅重: {{ totalCapacity }}/{{ totalNumber }}/{{
  195. totalNetWeight
  196. }}
  197. </span>
  198. </el-form-item>
  199. </el-form>
  200. </div>
  201. <div class="table">
  202. <el-table
  203. :data="visibleList"
  204. :span-method="objectSpanMethod"
  205. ref="tableRef"
  206. border
  207. style="width: 100%; margin-top: 20px"
  208. id="salesLogisticsStat_saleSteelReports_table"
  209. :height="maxHeight"
  210. :max-height="maxHeight"
  211. :row-class-name="tableRowClassName"
  212. @cell-click="cellClik"
  213. @cell-mouse-enter="cellMouse1"
  214. @cell-mouse-leave="cellLeave1"
  215. @row-click="rowClick"
  216. :cell-style="cellStyle"
  217. @filter-change="filterChange"
  218. :key="saleSteelKey"
  219. @select="selectOne"
  220. @selection-change="handleSelectionChange()"
  221. :header-cell-style="headCellStyle"
  222. >
  223. <el-table-column
  224. type="selection"
  225. width="50"
  226. label="选择"
  227. align="center"
  228. column-key="select"
  229. key="select"
  230. v-if="
  231. !notRoutList.includes('select') ||
  232. !columnNoRoutList.includes('选择')
  233. "
  234. ></el-table-column>
  235. <el-table-column
  236. width="50"
  237. label="序号"
  238. align="center"
  239. column-key="group"
  240. key="group"
  241. :resizable="false"
  242. v-if="!columnNoRoutList.includes('序号')"
  243. >
  244. <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
  245. </el-table-column>
  246. <el-table-column
  247. prop="orderTime"
  248. label="计划日期"
  249. width="110px"
  250. align="center"
  251. column-key="orderTime"
  252. key="orderTime"
  253. show-overflow-tooltip
  254. v-if="!columnNoRoutList.includes('计划日期')"
  255. >
  256. </el-table-column>
  257. <el-table-column
  258. prop="saleMakeDate"
  259. label="出库日期"
  260. width="110px"
  261. align="center"
  262. column-key="saleMakeDate"
  263. key="saleMakeDate"
  264. show-overflow-tooltip
  265. v-if="!columnNoRoutList.includes('出库日期')"
  266. >
  267. </el-table-column>
  268. <el-table-column
  269. prop="outboundStatus"
  270. label="出库状态"
  271. width="110px"
  272. align="center"
  273. column-key="outboundStatus"
  274. key="outboundStatus"
  275. show-overflow-tooltip
  276. :filters="filterOutboundStatus"
  277. v-if="!columnNoRoutList.includes('是否出库')"
  278. >
  279. </el-table-column>
  280. <el-table-column
  281. prop="inventoryWarehouse"
  282. label="出库库房"
  283. width="110px"
  284. align="center"
  285. column-key="inventoryWarehouse"
  286. key="inventoryWarehouse"
  287. :filters="filterWarehouse"
  288. show-overflow-tooltip
  289. v-if="!columnNoRoutList.includes('出库库房')"
  290. >
  291. </el-table-column>
  292. <el-table-column
  293. prop="saleOrderStatus"
  294. column-key="saleOrderStatus"
  295. key="saleOrderStatus"
  296. label="计划状态"
  297. width="110px"
  298. align="center"
  299. :filters="filterSaleOrderStatus"
  300. sortable
  301. v-if="!columnNoRoutList.includes('计划状态')"
  302. >
  303. </el-table-column>
  304. <el-table-column
  305. prop="consigneeName"
  306. label="收货单位"
  307. width="250px"
  308. align="center"
  309. column-key="consigneeName"
  310. key="consigneeName"
  311. show-overflow-tooltip
  312. v-if="!columnNoRoutList.includes('收货单位')"
  313. :render-header="renderHeader"
  314. >
  315. </el-table-column>
  316. <el-table-column
  317. prop="orderStatus"
  318. column-key="orderStatus"
  319. key="orderStatus"
  320. label="运单状态"
  321. align="center"
  322. :filters="filterorderStatus"
  323. v-if="!columnNoRoutList.includes('运单状态')"
  324. >
  325. </el-table-column>
  326. <el-table-column
  327. prop="orderStatusActually"
  328. column-key="orderStatusActually"
  329. key="orderStatusActually"
  330. label="订单实际状态"
  331. align="center"
  332. width="100"
  333. :filters="filterorderStatusActually"
  334. v-if="!columnNoRoutList.includes('订单实际状态')"
  335. >
  336. </el-table-column>
  337. <el-table-column
  338. prop="carrierName"
  339. label="承运商"
  340. align="center"
  341. width="80px"
  342. column-key="carrierList"
  343. key="carrierList"
  344. sortable
  345. show-overflow-tooltip
  346. :filters="filterCarrierList"
  347. v-if="!columnNoRoutList.includes('承运商')"
  348. >
  349. </el-table-column>
  350. <el-table-column
  351. prop="capacityNo"
  352. column-key="capacityNo"
  353. key="capacityNo"
  354. label="车牌号"
  355. align="center"
  356. width="90px"
  357. show-overflow-tooltip
  358. v-if="!columnNoRoutList.includes('车牌号')"
  359. :render-header="renderHeader"
  360. >
  361. </el-table-column>
  362. <el-table-column
  363. prop="materialName"
  364. column-key="materialNameList"
  365. key="materialNameList"
  366. label="物资名称"
  367. align="center"
  368. width="150px"
  369. v-if="!columnNoRoutList.includes('物资名称')"
  370. :render-header="renderHeader"
  371. >
  372. </el-table-column>
  373. <el-table-column
  374. prop="materialSpe"
  375. label="物资规格"
  376. column-key="materialSpe"
  377. key="materialSpe"
  378. align="center"
  379. width="120px"
  380. v-if="!columnNoRoutList.includes('物资规格')"
  381. :render-header="renderHeader"
  382. >
  383. </el-table-column>
  384. <el-table-column
  385. prop="materialNum"
  386. column-key="materialNum"
  387. key="materialNum"
  388. label="物资件数"
  389. align="center"
  390. width="50px"
  391. v-if="!columnNoRoutList.includes('物资件数')"
  392. >
  393. </el-table-column>
  394. <el-table-column
  395. prop="steelMeters"
  396. column-key="steelMeters"
  397. key="steelMeters"
  398. label="米数"
  399. align="center"
  400. width="50px"
  401. v-if="!columnNoRoutList.includes('米数')"
  402. >
  403. </el-table-column>
  404. <el-table-column
  405. prop="singleWeight"
  406. column-key="singleWeight"
  407. key="singleWeight"
  408. label="单重"
  409. align="center"
  410. width="50px"
  411. v-if="!columnNoRoutList.includes('单重')"
  412. >
  413. </el-table-column>
  414. <el-table-column
  415. prop="materialWeight"
  416. column-key="materialWeight"
  417. key="materialWeight"
  418. label="出库理重"
  419. align="center"
  420. width="50px"
  421. v-if="!columnNoRoutList.includes('出库理重')"
  422. >
  423. </el-table-column>
  424. <el-table-column
  425. prop="netWeight"
  426. column-key="netWeight"
  427. key="netWeight"
  428. label="出库净重"
  429. align="center"
  430. width="50px"
  431. v-if="!columnNoRoutList.includes('出库净重')"
  432. >
  433. </el-table-column>
  434. <el-table-column
  435. prop="saleRemark"
  436. column-key="saleRemark"
  437. key="saleRemark"
  438. label="摘要"
  439. width="180px"
  440. show-overflow-tooltip
  441. align="center"
  442. v-if="!columnNoRoutList.includes('摘要')"
  443. :render-header="renderHeader"
  444. >
  445. </el-table-column>
  446. <el-table-column
  447. prop="addressPlace"
  448. label="收货地址"
  449. width="250px"
  450. column-key="addressPlace"
  451. key="addressPlace"
  452. show-overflow-tooltip
  453. v-if="!columnNoRoutList.includes('收货地址')"
  454. :render-header="renderHeader"
  455. >
  456. <template slot-scope="scope">
  457. <span
  458. v-if="scope.row.addressPlace != null && scope.row.addressPlace.indexOf('新地址') >= 0"
  459. style="color:red"
  460. >{{ scope.row.addressPlace }}</span
  461. >
  462. <span v-show="scope.row.addressPlace == null || scope.row.addressPlace.indexOf('新地址') < 0">{{
  463. scope.row.addressPlace
  464. }}</span>
  465. </template>
  466. </el-table-column>
  467. <el-table-column
  468. prop="queueStartTime"
  469. column-key="queueStartTime"
  470. key="queueStartTime"
  471. label="排队开始时间"
  472. width="130px"
  473. show-overflow-tooltip
  474. v-if="!columnNoRoutList.includes('排队开始时间')"
  475. >
  476. </el-table-column>
  477. <el-table-column
  478. prop="allowEnfactoryTime"
  479. column-key="allowEnfactoryTime"
  480. key="allowEnfactoryTime"
  481. label="钢材科放行时间"
  482. width="130px"
  483. show-overflow-tooltip
  484. v-if="!columnNoRoutList.includes('钢材科放行时间')"
  485. >
  486. </el-table-column>
  487. <el-table-column
  488. prop="consigneeTel"
  489. column-key="consigneeTel"
  490. key="consigneeTel"
  491. label="收货客户电话"
  492. width="120px"
  493. align="center"
  494. v-if="!columnNoRoutList.includes('收货客户电话')"
  495. >
  496. </el-table-column>
  497. <el-table-column
  498. prop="truckRemark"
  499. column-key="truckRemark"
  500. key="truckRemark"
  501. label="备注"
  502. width="150"
  503. align="center"
  504. :render-header="renderHeader"
  505. show-overflow-tooltip
  506. v-if="!columnNoRoutList.includes('备注')"
  507. >
  508. </el-table-column>
  509. <el-table-column
  510. prop="capacityTel"
  511. column-key="capacityTel"
  512. key="capacityTel"
  513. label="司机电话"
  514. width="120px"
  515. align="center"
  516. v-if="!columnNoRoutList.includes('司机电话')"
  517. >
  518. </el-table-column>
  519. <el-table-column
  520. prop="spellNum"
  521. column-key="spellNum"
  522. key="spellNum"
  523. label="拼数"
  524. width="120px"
  525. align="center"
  526. :filters="filterSpellNum"
  527. v-if="!columnNoRoutList.includes('拼数')"
  528. >
  529. </el-table-column>
  530. <el-table-column
  531. prop="isPrintDelivery"
  532. column-key="isPrintDelivery"
  533. key="isPrintDelivery"
  534. label="送货单打印"
  535. align="center"
  536. width="100px"
  537. show-overflow-tooltip
  538. v-if="!columnNoRoutList.includes('送货单打印')"
  539. >
  540. </el-table-column>
  541. <el-table-column
  542. prop="smsResultId"
  543. column-key="smsResultId"
  544. key="smsResultId"
  545. label="短信发送"
  546. width="100px"
  547. align="center"
  548. show-overflow-tooltip
  549. v-if="!columnNoRoutList.includes('短信发送')"
  550. >
  551. </el-table-column>
  552. <el-table-column
  553. prop="arrivalAddress"
  554. column-key="arrivalAddress"
  555. key="arrivalAddress"
  556. label="抵达地址"
  557. width="280px"
  558. show-overflow-tooltip
  559. v-if="!columnNoRoutList.includes('抵达地址')"
  560. >
  561. </el-table-column>
  562. <el-table-column
  563. prop="arrivalTime"
  564. column-key="arrivalTime"
  565. key="arrivalTime"
  566. label="抵达时间"
  567. width="150px"
  568. v-if="!columnNoRoutList.includes('抵达时间')"
  569. >
  570. </el-table-column>
  571. <el-table-column
  572. prop="receiptAddress"
  573. column-key="receiptAddress"
  574. key="receiptAddress"
  575. label="签收地址"
  576. width="280px"
  577. show-overflow-tooltip
  578. v-if="!columnNoRoutList.includes('签收地址')"
  579. >
  580. </el-table-column>
  581. <el-table-column
  582. prop="receiptTime"
  583. column-key="receiptTime"
  584. key="receiptTime"
  585. label="签收时间"
  586. width="150px"
  587. v-if="!columnNoRoutList.includes('签收时间')"
  588. >
  589. </el-table-column>
  590. <el-table-column
  591. prop="orderNo"
  592. column-key="orderNo"
  593. key="orderNo"
  594. label="运输订单号"
  595. width="180px"
  596. align="center"
  597. v-if="!columnNoRoutList.includes('运输订单号')"
  598. >
  599. </el-table-column>
  600. <el-table-column
  601. prop="saler"
  602. column-key="saler"
  603. key="saler"
  604. label="业务员"
  605. align="center"
  606. v-if="!columnNoRoutList.includes('业务员')"
  607. >
  608. </el-table-column>
  609. <el-table-column
  610. prop="shipperName"
  611. column-key="shipperName"
  612. key="shipperName"
  613. label="发货单位"
  614. width="170px"
  615. align="center"
  616. show-overflow-tooltip
  617. v-if="!columnNoRoutList.includes('发货单位')"
  618. >
  619. </el-table-column>
  620. <el-table-column
  621. prop="isSelfMention"
  622. column-key="isSelfMention"
  623. key="isSelfMention"
  624. label="是否自提"
  625. align="center"
  626. v-if="!columnNoRoutList.includes('是否自提')"
  627. >
  628. </el-table-column>
  629. <el-table-column
  630. prop="saleMaterialId"
  631. column-key="saleMaterialId"
  632. key="saleMaterialId"
  633. label="分录ID"
  634. width="200px"
  635. align="center"
  636. >
  637. </el-table-column>
  638. <el-table-column
  639. prop="saleOrderNo"
  640. column-key="saleOrderNo"
  641. key="saleOrderNo"
  642. label="转运计划号"
  643. width="200px"
  644. align="center"
  645. v-if="!columnNoRoutList.includes('转运计划号')"
  646. >
  647. </el-table-column>
  648. <el-table-column
  649. prop="orderInsertUpdateRemark"
  650. column-key="orderInsertUpdateRemark"
  651. key="orderInsertUpdateRemark"
  652. label="运输订单变更记录"
  653. width="120px"
  654. show-overflow-tooltip
  655. v-if="!columnNoRoutList.includes('运输订单变更记录')"
  656. >
  657. </el-table-column>
  658. <el-table-column
  659. prop="materialPlanNumber"
  660. column-key="materialPlanNumber"
  661. key="materialPlanNumber"
  662. label="理论件数"
  663. align="center"
  664. v-if="!columnNoRoutList.includes('理论件数')"
  665. >
  666. </el-table-column>
  667. </el-table>
  668. </div>
  669. <div>
  670. <vxe-modal
  671. width="80%"
  672. height="80%"
  673. v-model="isShow3"
  674. show-footer
  675. show-zoom
  676. class="vxeModal"
  677. >
  678. <div class="demo-image__preview" v-for="(item, i) in srcList" :key="i">
  679. <span>{{ item.title }}</span>
  680. <el-image
  681. :src="item.src"
  682. fit="fill"
  683. :previewSrcList="previewSrcList"
  684. @click.prevent.right="receiveClick(item.src, '抵达')"
  685. >
  686. <div slot="error" class="image-slot">
  687. <span>司机未上传图片</span>
  688. </div>
  689. </el-image>
  690. </div>
  691. </vxe-modal>
  692. <vxe-modal width="80%" height="80%" v-model="isShow4" show-zoom>
  693. <div class="demo-image__preview" v-for="(item, i) in srcList2" :key="i">
  694. <el-image
  695. :src="item.src"
  696. fit="fill"
  697. :previewSrcList="previewSrcList2"
  698. @click.prevent.right="receiveClick(item.src, '签收')"
  699. >
  700. <div slot="error" class="image-slot">
  701. <span>司机未上传图片</span>
  702. </div>
  703. </el-image>
  704. </div>
  705. </vxe-modal>
  706. </div>
  707. <div class="dialog">
  708. <el-dialog
  709. title="运单详情"
  710. :visible.sync="centerDialogVisible"
  711. width="90%"
  712. center
  713. >
  714. <div class="steelMapClass">
  715. <div class="steelMapClass1">
  716. <div class="steelMapClass12">
  717. <span>转运计划号:</span>
  718. <span>{{ steelMap.saleOrderNo }}</span>
  719. </div>
  720. <div class="steelMapClass12">
  721. <span>订单状态:</span>
  722. <span>{{ steelMap.saleOrderStatus }}</span>
  723. </div>
  724. <div class="steelMapClass12">
  725. <span>业务员:</span>
  726. <span>{{ steelMap.saler }}</span>
  727. </div>
  728. <div class="steelMapClass12">
  729. <span>收货单位:</span>
  730. <span>{{ steelMap.consigneeName }}</span>
  731. </div>
  732. <div
  733. class="steelMapClass13"
  734. v-if="!notRoutList.includes('closeOrder')"
  735. >
  736. <span>车辆备注:</span>
  737. <span
  738. ><el-input
  739. v-model="steelMap.truckRemark"
  740. width="250px"
  741. ></el-input
  742. ></span>
  743. <!-- <span>{{ steelMap.truckRemark }}</span> -->
  744. </div>
  745. </div>
  746. <div class="steelMapClass2">
  747. <div class="steelMapClass22">
  748. <span>收货地址:</span>
  749. <el-select
  750. v-model="steelMap.addressProvince"
  751. filterable
  752. placeholder="请选择"
  753. @change="onchangeProvince"
  754. style="width:120px"
  755. :disabled="notRoutList.includes('province')"
  756. >
  757. <el-option
  758. v-for="item in provinceList"
  759. :key="item.id"
  760. :label="item.addressProvince"
  761. :value="item.id"
  762. ></el-option>
  763. </el-select>
  764. <el-select
  765. v-model="steelMap.addressDistrict"
  766. filterable
  767. placeholder="请选择"
  768. @change="onchangeCity"
  769. style="width:120px"
  770. :disabled="notRoutList.includes('city')"
  771. >
  772. <el-option
  773. v-for="item in cityList"
  774. :key="item.id"
  775. :label="item.addressDistrict"
  776. :value="item.id"
  777. ></el-option>
  778. </el-select>
  779. <el-select
  780. v-model="steelMap.addressTown"
  781. filterable
  782. placeholder="请选择"
  783. @change="onchangeCounty"
  784. style="width:120px"
  785. :disabled="notRoutList.includes('country')"
  786. >
  787. <el-option
  788. v-for="item in countyList"
  789. :key="item.id"
  790. :label="item.addressTown"
  791. :value="item.id"
  792. ></el-option>
  793. </el-select>
  794. <el-autocomplete
  795. class="inline-input"
  796. v-model="steelMap.place"
  797. :fetch-suggestions="querySearch1"
  798. placeholder="请输入具体收货地址"
  799. :trigger-on-focus="false"
  800. @select="handleSelect1"
  801. style="width:250px"
  802. :disabled="notRoutList.includes('place')"
  803. >
  804. </el-autocomplete>
  805. <el-button
  806. type="success"
  807. circle
  808. @click="addAddressClick"
  809. v-if="!notRoutList.includes('addressClick')"
  810. >提交</el-button
  811. >
  812. </div>
  813. <div
  814. class="steelMapClass23"
  815. v-if="
  816. (steelMap.carStatus == 4 ||
  817. steelMap.carStatus == 5 ||
  818. steelMap.carStatus == null) &&
  819. !notRoutList.includes('closeOrder')
  820. "
  821. ></div>
  822. <div
  823. class="steelMapClass23"
  824. v-if="
  825. steelMap.carStatus == 7 && !notRoutList.includes('closeOrder')
  826. "
  827. >
  828. <el-button type="danger" round @click="reverseCloseOrder"
  829. >反关闭运单</el-button
  830. >
  831. </div>
  832. <div v-if="!notRoutList.includes('closeOrder')">
  833. <el-button round @click="resetPrintNumber"
  834. >重置打印次数</el-button
  835. >
  836. </div>
  837. </div>
  838. <div class="steelMapClass3">
  839. <div class="steelMapClass32">
  840. <span>收货客户电话:</span>
  841. <el-input
  842. v-model="steelMap.consigneeTel"
  843. style="width:150px"
  844. :disabled="notRoutList.includes('consigeeTel')"
  845. ></el-input>
  846. <el-button
  847. type="success"
  848. circle
  849. @click="updateconsigneeTel"
  850. v-if="!notRoutList.includes('consigeeTel')"
  851. >提交</el-button
  852. >
  853. </div>
  854. <div class="steelMapClass33">
  855. <span>承运商:</span>
  856. <el-autocomplete
  857. style="width:120px"
  858. v-model="steelMap.carrierName"
  859. :fetch-suggestions="querySearchCarrier"
  860. placeholder="请输入承运商"
  861. @select="handleSelectCarrier"
  862. :disabled="notRoutList.includes('carrierName')"
  863. >
  864. </el-autocomplete>
  865. <el-button
  866. type="success"
  867. circle
  868. @click="updateTruckCarrierDebounce"
  869. v-if="!notRoutList.includes('carrierName')"
  870. >提交</el-button
  871. >
  872. </div>
  873. <div class="steelMapClass33">
  874. <span>车牌号:</span>
  875. <el-autocomplete
  876. style="width:120px"
  877. v-model="steelMap.capacityNo"
  878. :fetch-suggestions="querySearch"
  879. placeholder="请输入车牌号"
  880. @select="handleSelect()"
  881. :disabled="
  882. notRoutList.includes('capacityNo') &&
  883. steelMap.capacityId != null &&
  884. steelMap.capacityNoFlag != null
  885. "
  886. ></el-autocomplete>
  887. <el-button
  888. type="success"
  889. circle
  890. @click="updateCapacityDebounce"
  891. v-if="
  892. !(
  893. notRoutList.includes('capacityNo') &&
  894. steelMap.capacityId != null &&
  895. steelMap.capacityNoFlag != null
  896. )
  897. "
  898. >提交</el-button
  899. >
  900. <span v-show="orgCode != 'chengyunshang'">是否校验GPS:</span>
  901. <el-switch
  902. v-model="isCheckGPS"
  903. v-show="orgCode != 'chengyunshang'"
  904. :disabled="orgCode == 'chengyunshang'"
  905. >
  906. </el-switch>
  907. </div>
  908. <div class="steelMapClass33">
  909. <span>司机电话:</span>
  910. <el-input
  911. style="width:120px"
  912. v-model="steelMap.capacityTel"
  913. placeholder="请输入电话号码"
  914. ></el-input>
  915. <el-button type="success" circle @click="updateDriverTel"
  916. >提交</el-button
  917. >
  918. </div>
  919. </div>
  920. <div class="steelMapClass4">
  921. <div class="steelMapClass42" v-if="steelMap.orderNo != null">
  922. <span>运输订单号:</span>
  923. <span>{{ steelMap.orderNo }}</span>
  924. </div>
  925. <div class="steelMapClass43">
  926. <span>运单状态:</span>
  927. <span>{{ steelMap.orderStatus }}</span>
  928. </div>
  929. <div
  930. class="steelMapClass43"
  931. v-if="steelMap.orderStatusTime != null"
  932. >
  933. <span>状态更新时间:</span>
  934. <span>{{ steelMap.orderStatusTime }}</span>
  935. </div>
  936. </div>
  937. <div class="steelMapClass9">
  938. <div
  939. class="steelMapClass92"
  940. v-if="
  941. steelMap.orderNo != null && !notRoutList.includes('closeOrder')
  942. "
  943. >
  944. <el-form :inline="true">
  945. <el-form-item>
  946. <el-input
  947. v-model="steelMap.remark"
  948. placeholder="填写备注"
  949. class="steelMapClass921"
  950. type="textarea"
  951. autosize
  952. >
  953. <!-- <template slot="prepend">备注</template>
  954. <template slot="prefix">
  955. {{ steelMap.remark }}
  956. </template> -->
  957. </el-input></el-form-item
  958. >
  959. <el-form-item>
  960. <el-button @click="openRemarkPic" type="primary"
  961. >备注图片</el-button
  962. >
  963. </el-form-item>
  964. </el-form>
  965. </div>
  966. </div>
  967. <div class="steelMapClass5">
  968. <div class="steelMapClass52" v-if="steelMap.arrivalAddress != null">
  969. <span>抵达地址:</span>
  970. <span>{{ steelMap.arrivalAddress }}</span>
  971. </div>
  972. </div>
  973. <div class="steelMapClass6">
  974. <div class="steelMapClass62" v-if="steelMap.receiptAddress != null">
  975. <span>签收地址:</span>
  976. <span>{{ steelMap.receiptAddress }}</span>
  977. </div>
  978. </div>
  979. </div>
  980. <div class="table1">
  981. <el-table
  982. :data="steelMap.mapList"
  983. border
  984. style="width: 100%; margin-top: 20px"
  985. :span-method="objectSpanMethod1"
  986. >
  987. <el-table-column
  988. prop="materialName"
  989. label="物资名称"
  990. align="center"
  991. width="150px"
  992. >
  993. </el-table-column>
  994. <el-table-column
  995. prop="materialSpe"
  996. label="物资规格"
  997. align="center"
  998. sortable
  999. >
  1000. </el-table-column>
  1001. <el-table-column
  1002. prop="materialNum"
  1003. label="物资件数"
  1004. align="center"
  1005. width="200px"
  1006. >
  1007. <template slot-scope="scope">
  1008. <button
  1009. type="primary"
  1010. @click="scope.row.materialNumber--"
  1011. style="height:40px"
  1012. v-privilege="activeMenu + 'editMaterialNum'"
  1013. >
  1014. -
  1015. </button>
  1016. <input
  1017. v-model="scope.row.materialNumber"
  1018. style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
  1019. :disabled="true"
  1020. />
  1021. <button
  1022. type="primary"
  1023. @click="scope.row.materialNumber++"
  1024. style="height:40px"
  1025. v-privilege="activeMenu + 'editMaterialNum'"
  1026. >
  1027. +
  1028. </button>
  1029. <el-button
  1030. type="primary"
  1031. @click="updateBillOrder(scope.row)"
  1032. v-privilege="activeMenu + 'editMaterialNum'"
  1033. >提交</el-button
  1034. >
  1035. </template>
  1036. </el-table-column>
  1037. <el-table-column prop="loadTime" label="装货时间" width="130px">
  1038. </el-table-column>
  1039. <el-table-column prop="saleRemarkByasm" label="摘要" width="100px">
  1040. </el-table-column>
  1041. </el-table>
  1042. </div>
  1043. <span slot="footer" class="dialog-footer">
  1044. <el-button @click="centerDialogVisible = false">返 回</el-button>
  1045. <el-button @click="submitSteelDebounce(steelMap)">确定</el-button>
  1046. </span>
  1047. <div>
  1048. <vxe-modal
  1049. width="549px"
  1050. height="731px"
  1051. v-model="isShow"
  1052. show-zoom
  1053. show-footer
  1054. class="vxeModal"
  1055. title="抵达上传照片"
  1056. >
  1057. <div class="demo-image__preview">
  1058. <div
  1059. class="demo-image__preview"
  1060. v-for="(item, index) in srcList"
  1061. :key="index"
  1062. >
  1063. <span>{{ item.title }}</span>
  1064. <el-image
  1065. style="height:731px;text-align:center"
  1066. :src="item.src"
  1067. >
  1068. <div slot="error" class="image-slot">
  1069. <span>司机未上传抵达图片</span>
  1070. </div>
  1071. </el-image>
  1072. </div>
  1073. </div>
  1074. </vxe-modal>
  1075. <vxe-modal
  1076. width="549px"
  1077. height="731px"
  1078. v-model="isShow2"
  1079. show-zoom
  1080. show-footer
  1081. title="签收上传照片"
  1082. >
  1083. <div
  1084. class="demo-image__preview"
  1085. v-for="(item, index) in srcList2"
  1086. :key="index"
  1087. >
  1088. <span>{{ item.title }}</span>
  1089. <el-image style="height:731px;text-align:center" :src="item.src">
  1090. <div slot="error" class="image-slot">
  1091. <span>司机未上传签收图片</span>
  1092. </div>
  1093. </el-image>
  1094. </div>
  1095. </vxe-modal>
  1096. </div>
  1097. </el-dialog>
  1098. </div>
  1099. <div style="height: 100%">
  1100. <vxe-modal
  1101. width="1237"
  1102. height="731"
  1103. v-model="value7"
  1104. show-zoom
  1105. resize
  1106. title="轨迹查询"
  1107. >
  1108. <template #default>
  1109. <PathView v-bind.sync="pathOption"></PathView>
  1110. </template>
  1111. </vxe-modal>
  1112. </div>
  1113. <div style="height:100%">
  1114. <vxe-modal
  1115. width="1237"
  1116. height="731"
  1117. v-model="value8"
  1118. show-zoom
  1119. resize
  1120. title="实时路径"
  1121. ><currentLocation :carNumber="carNumber"></currentLocation
  1122. ></vxe-modal>
  1123. </div>
  1124. <el-dialog
  1125. title="抵达签收"
  1126. :visible.sync="arrivalReceiving"
  1127. :before-close="closeUpload"
  1128. >
  1129. <el-form style="margin-left:20%">
  1130. <el-form-item label="车牌号码">
  1131. <el-input
  1132. v-model="capacityNumber"
  1133. disabled
  1134. style="width:300px"
  1135. ></el-input>
  1136. </el-form-item>
  1137. <el-form-item label="签收地址">
  1138. <el-input
  1139. v-model="location"
  1140. style="width:400px"
  1141. :disabled="orgCode != 'wuliuyunshubu'"
  1142. ></el-input>
  1143. </el-form-item>
  1144. <el-form-item label="抵达时间">
  1145. <el-date-picker
  1146. v-model="arrivalTime"
  1147. type="datetime"
  1148. :disabled="orgCode != 'wuliuyunshubu'"
  1149. placeholder="选择日期时间"
  1150. >
  1151. </el-date-picker>
  1152. </el-form-item>
  1153. <el-form-item label="签收时间">
  1154. <el-date-picker
  1155. v-model="receiptTime"
  1156. type="datetime"
  1157. :disabled="orgCode != 'wuliuyunshubu'"
  1158. placeholder="选择日期时间"
  1159. >
  1160. </el-date-picker>
  1161. </el-form-item>
  1162. <el-form-item label="抵达图片(车头、满货箱)" style="">
  1163. <el-upload
  1164. ref="arrival"
  1165. list-type="picture-card"
  1166. :file-list="arriavlList"
  1167. action="/api/v1/otms/addtmstruckArrivalResult"
  1168. :limit="12"
  1169. :on-change="fileChange1"
  1170. :on-remove="fileChange1"
  1171. :on-preview="handlePictureCardPreview"
  1172. :on-exceed="exceed"
  1173. accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
  1174. :auto-upload="false"
  1175. >
  1176. <i class="el-icon-plus"></i>
  1177. </el-upload>
  1178. </el-form-item>
  1179. <el-form-item label="签收图片(空货箱、质保书、签收单)">
  1180. <el-upload
  1181. ref="receive"
  1182. list-type="picture-card"
  1183. :file-list="receiveList"
  1184. action="null"
  1185. :limit="11"
  1186. :on-change="fileChange2"
  1187. :on-remove="fileChange2"
  1188. :on-preview="handlePictureCardPreview"
  1189. :on-exceed="exceed"
  1190. accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
  1191. :auto-upload="false"
  1192. >
  1193. <i class="el-icon-plus"></i>
  1194. </el-upload>
  1195. </el-form-item>
  1196. </el-form>
  1197. <el-button
  1198. type="primary"
  1199. @click="arrivalAndReceive"
  1200. :loading="isLoading"
  1201. style="margin-left:40%"
  1202. >确定</el-button
  1203. >
  1204. </el-dialog>
  1205. <el-dialog
  1206. title="备注图片(图片暂存后需要点击全局确定才会保存)"
  1207. :visible.sync="remarkPic"
  1208. :before-close="closeUpload2"
  1209. >
  1210. <el-form style="margin-left:20%">
  1211. <el-form-item>
  1212. <el-upload
  1213. ref="remarkPic"
  1214. list-type="picture-card"
  1215. :file-list="remarkPicList"
  1216. action="null"
  1217. :limit="11"
  1218. :on-change="fileChange3"
  1219. :on-remove="fileChange3"
  1220. :on-preview="handlePictureCardPreview"
  1221. :on-exceed="exceed"
  1222. accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
  1223. :auto-upload="false"
  1224. >
  1225. <i class="el-icon-plus"></i>
  1226. </el-upload>
  1227. </el-form-item>
  1228. </el-form>
  1229. <el-button
  1230. type="primary"
  1231. @click="uploadRemarkPic"
  1232. :loading="isLoading"
  1233. style="margin-left:40%"
  1234. >暂存</el-button
  1235. >
  1236. </el-dialog>
  1237. <el-dialog :visible.sync="dialogVisible" width="80%">
  1238. <img width="100%" :src="dialogImageUrl" alt="" />
  1239. </el-dialog>
  1240. <el-dialog :visible.sync="batchCarrierVisible" width="55%" center>
  1241. <div class="batchCarrierClass">
  1242. <el-form :inline="true">
  1243. <span>批量授权承运商</span>
  1244. <el-form-item>
  1245. <el-autocomplete
  1246. style="width:250px"
  1247. v-model="batchCarrierName"
  1248. :fetch-suggestions="querySearchCarrier"
  1249. placeholder="请输入承运商"
  1250. @select="handleSelectCarrier"
  1251. >
  1252. </el-autocomplete>
  1253. </el-form-item>
  1254. <el-form-item>
  1255. <el-button @click="batchCarrierVisible = false">取 消</el-button>
  1256. <el-button type="primary" @click="batchCarrierMakeSure"
  1257. >确 定</el-button
  1258. >
  1259. </el-form-item>
  1260. </el-form>
  1261. </div>
  1262. <div class="batchCapacityClass">
  1263. <el-form :inline="true">
  1264. <span>批量修改车牌号</span>
  1265. <el-form-item>
  1266. <el-autocomplete
  1267. style="width:250px"
  1268. v-model="capacityNo"
  1269. :fetch-suggestions="querySearch"
  1270. placeholder="请输入车牌号"
  1271. @select="batchCapacitySelect"
  1272. >
  1273. </el-autocomplete>
  1274. </el-form-item>
  1275. <el-form-item>
  1276. <el-button @click="batchCarrierVisible = false">取 消</el-button>
  1277. <el-button type="primary" @click="batchEditCapacity"
  1278. >确 定</el-button
  1279. >
  1280. </el-form-item>
  1281. </el-form>
  1282. </div>
  1283. <div class="steelMapClass22">
  1284. <span>收货地址:</span>
  1285. <el-select
  1286. v-model="steelMap.addressProvince"
  1287. filterable
  1288. placeholder="请选择"
  1289. @change="onchangeProvince"
  1290. style="width:120px"
  1291. :disabled="notRoutList.includes('province')"
  1292. >
  1293. <el-option
  1294. v-for="item in provinceList"
  1295. :key="item.id"
  1296. :label="item.addressProvince"
  1297. :value="item.id"
  1298. ></el-option>
  1299. </el-select>
  1300. <el-select
  1301. v-model="steelMap.addressDistrict"
  1302. filterable
  1303. placeholder="请选择"
  1304. @change="onchangeCity"
  1305. style="width:120px"
  1306. :disabled="notRoutList.includes('city')"
  1307. >
  1308. <el-option
  1309. v-for="item in cityList"
  1310. :key="item.id"
  1311. :label="item.addressDistrict"
  1312. :value="item.id"
  1313. ></el-option>
  1314. </el-select>
  1315. <el-select
  1316. v-model="steelMap.addressTown"
  1317. filterable
  1318. placeholder="请选择"
  1319. @change="onchangeCounty"
  1320. style="width:120px"
  1321. :disabled="notRoutList.includes('country')"
  1322. >
  1323. <el-option
  1324. v-for="item in countyList"
  1325. :key="item.id"
  1326. :label="item.addressTown"
  1327. :value="item.id"
  1328. ></el-option>
  1329. </el-select>
  1330. <el-autocomplete
  1331. class="inline-input"
  1332. v-model="steelMap.place"
  1333. :fetch-suggestions="querySearch1"
  1334. placeholder="请输入具体收货地址"
  1335. :trigger-on-focus="false"
  1336. @select="handleSelect1"
  1337. style="width:250px"
  1338. :disabled="notRoutList.includes('place')"
  1339. >
  1340. </el-autocomplete>
  1341. <el-button
  1342. type="success"
  1343. circle
  1344. @click="batchUpdateCarAddress"
  1345. v-if="!notRoutList.includes('addressClick')"
  1346. >提交</el-button
  1347. >
  1348. </div>
  1349. <div class="batchCapacityClass" style="margin:30px">
  1350. <el-form :inline="true">
  1351. <el-form-item>
  1352. <span>批量修改收货客户电话:</span>
  1353. <el-input
  1354. v-model="consigneeTel"
  1355. style="width:150px"
  1356. :disabled="notRoutList.includes('consigeeTel')"
  1357. ></el-input>
  1358. <el-button
  1359. type="success"
  1360. circle
  1361. @click="batchUpdateconsigneeTel"
  1362. v-if="!notRoutList.includes('consigeeTel')"
  1363. >提交</el-button
  1364. >
  1365. </el-form-item>
  1366. </el-form>
  1367. </div>
  1368. </el-dialog>
  1369. <el-dialog
  1370. title="切换列的显示与隐藏"
  1371. :visible.sync="columnShowDialog"
  1372. width="50%"
  1373. center
  1374. class="columnShowDialogClass"
  1375. >
  1376. <el-tabs
  1377. v-model="schemeMap.activeName"
  1378. type="card"
  1379. editable
  1380. @edit="handleTabsEdit"
  1381. @tab-click="columnShowTabClick"
  1382. tab-position="left"
  1383. >
  1384. <el-tab-pane
  1385. :key="index"
  1386. v-for="(item, index) in schemeMap.schemeList"
  1387. :label="item.title"
  1388. :name="item.name"
  1389. >
  1390. <el-form :inline="true">
  1391. <el-form-item>
  1392. <div style="border:2px,solid,green">
  1393. <div
  1394. style="margin-left: 50%;margin-bottom: 15px;font-size: 16px;"
  1395. >
  1396. {{ schemeMap.activeName }}
  1397. </div>
  1398. <el-transfer
  1399. style="text-align: left; display: inline-block"
  1400. v-model="item.columnHiddenData"
  1401. :data="item.columnAllData"
  1402. :titles="['显示的列', '隐藏的列']"
  1403. :button-texts="['至显示列', '至隐藏列']"
  1404. ></el-transfer>
  1405. </div>
  1406. </el-form-item>
  1407. </el-form>
  1408. <el-form :inline="true">
  1409. <el-form-item>
  1410. <el-button @click="columnShowDialog = false">取 消</el-button>
  1411. <el-button type="primary" @click="columnShowOperation(item)"
  1412. >启用</el-button
  1413. >
  1414. </el-form-item>
  1415. </el-form>
  1416. </el-tab-pane>
  1417. </el-tabs>
  1418. </el-dialog>
  1419. <div class="cofirmInbound">
  1420. <el-dialog :visible.sync="confireInboundVisible" width="90%">
  1421. <div
  1422. style="font-size: 20px;font-weight:500;display: flex;justify-content: center;align-items: center;"
  1423. >
  1424. <span>出库确认</span>
  1425. </div>
  1426. <div class="steelMapClass">
  1427. <div class="steelMapClass1">
  1428. <div
  1429. class="steelMapClass12"
  1430. style="font-size: 16px;font-weight:500"
  1431. >
  1432. <span>转运计划号:</span>
  1433. <span>{{ steelMap.saleOrderNo }}</span>
  1434. </div>
  1435. <div
  1436. class="steelMapClass12"
  1437. style="font-size: 18px;font-weight:500"
  1438. >
  1439. <span>订单状态:</span>
  1440. <span>{{ steelMap.saleOrderStatus }}</span>
  1441. </div>
  1442. <div
  1443. class="steelMapClass12"
  1444. style="font-size: 16px;font-weight:500"
  1445. >
  1446. <span>业务员:</span>
  1447. <span>{{ steelMap.saler }}</span>
  1448. </div>
  1449. <div
  1450. class="steelMapClass12"
  1451. style="font-size: 16px;font-weight:500"
  1452. >
  1453. <span>收货单位:</span>
  1454. <span>{{ steelMap.consigneeName }}</span>
  1455. </div>
  1456. </div>
  1457. <div class="steelMapClass2">
  1458. <div
  1459. class="steelMapClass22"
  1460. style="font-size: 16px;font-weight:500"
  1461. >
  1462. <span>收货地址:</span>
  1463. <span>{{ steelMap.addressProvince }}</span>
  1464. <span>{{ steelMap.addressDistrict }}</span>
  1465. <span>{{ steelMap.addressTown }}</span>
  1466. <span>{{ steelMap.place }}</span>
  1467. </div>
  1468. </div>
  1469. <div class="steelMapClass3">
  1470. <div
  1471. class="steelMapClass33"
  1472. style="font-size: 16px;font-weight:500"
  1473. >
  1474. <span>承运商:</span>
  1475. <span>{{ steelMap.carrierName }}</span>
  1476. </div>
  1477. <div
  1478. class="steelMapClass33"
  1479. style="font-size: 16px;font-weight:500"
  1480. >
  1481. <span>车牌号:</span>
  1482. <span>{{ steelMap.capacityNo }}</span>
  1483. </div>
  1484. <div
  1485. class="steelMapClass33"
  1486. style="font-size: 16px;font-weight:500"
  1487. >
  1488. <span>司机电话:</span>
  1489. <span>{{ steelMap.capacityTel }}</span>
  1490. </div>
  1491. </div>
  1492. <div class="steelMapClass4">
  1493. <div
  1494. class="steelMapClass42"
  1495. v-if="steelMap.orderNo != null"
  1496. style="font-size: 16px;font-weight:500"
  1497. >
  1498. <span>运输订单号:</span>
  1499. <span>{{ steelMap.orderNo }}</span>
  1500. </div>
  1501. <div
  1502. class="steelMapClass43"
  1503. style="font-size: 16px;font-weight:500"
  1504. >
  1505. <span>运单状态:</span>
  1506. <span>{{ steelMap.orderStatus }}</span>
  1507. </div>
  1508. <div
  1509. class="steelMapClass43"
  1510. style="font-size: 16px;font-weight:500"
  1511. >
  1512. <span>厂外库</span>
  1513. </div>
  1514. </div>
  1515. </div>
  1516. <div class="table1">
  1517. <el-table
  1518. :data="steelMap.mapList"
  1519. border
  1520. style="width: 100%; margin-top: 20px"
  1521. :span-method="objectSpanMethod1"
  1522. >
  1523. <el-table-column
  1524. prop="materialName"
  1525. label="物资名称"
  1526. align="center"
  1527. width="150px"
  1528. >
  1529. </el-table-column>
  1530. <el-table-column
  1531. prop="materialSpe"
  1532. label="物资规格"
  1533. align="center"
  1534. sortable
  1535. >
  1536. </el-table-column>
  1537. <el-table-column prop="materialNum" label="物资件数" align="center">
  1538. </el-table-column>
  1539. <el-table-column prop="meter" label="米数" align="center">
  1540. </el-table-column>
  1541. <el-table-column prop="singleWeight" label="单重" align="center">
  1542. </el-table-column>
  1543. <el-table-column
  1544. prop="saleRemarkByasm"
  1545. label="摘要"
  1546. width="180px"
  1547. align="center"
  1548. >
  1549. </el-table-column>
  1550. <el-table-column label="具体仓库名称">
  1551. <template slot-scope="scope">
  1552. <el-select v-model="scope.row.inboundWarehouse">
  1553. <el-option
  1554. v-for="(item, index) in oYeWarehouseList"
  1555. :label="item.label"
  1556. :value="item.value"
  1557. :key="index"
  1558. ></el-option
  1559. ></el-select>
  1560. </template>
  1561. </el-table-column>
  1562. <el-table-column label="出库净重">
  1563. <template slot-scope="scope">
  1564. <el-input
  1565. v-model.number="scope.row.inboundNetWeight"
  1566. type="number"
  1567. ></el-input>
  1568. </template>
  1569. </el-table-column>
  1570. </el-table>
  1571. </div>
  1572. <span
  1573. slot="footer"
  1574. class="dialog-footer"
  1575. style="display: flex;justify-content: center;align-items: center;"
  1576. >
  1577. <el-button @click="confireInboundVisible = false">返 回</el-button>
  1578. <el-button @click="confireInboundTo(steelMap)">确定</el-button>
  1579. </span>
  1580. </el-dialog>
  1581. </div>
  1582. </div>
  1583. </template>
  1584. <script>
  1585. import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
  1586. import { getCookie, accMul, formatDate } from '@/utils/util.js'
  1587. import PathView from './mapTest.vue'
  1588. import currentLocation from './currentLocation.vue'
  1589. import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
  1590. export default {
  1591. components: {
  1592. PathView,
  1593. currentLocation
  1594. },
  1595. data() {
  1596. const generateStartDate = _ => {
  1597. let startDate = new Date()
  1598. let startDateStr = formatDate(startDate, 'yyyy-MM-dd')
  1599. let startTimeStr = startDateStr + ' 00:00:00'
  1600. let startTime = new Date(startTimeStr)
  1601. return startTime.getTime()
  1602. }
  1603. const generateEndDate = _ => {
  1604. let endDate = new Date()
  1605. let endDateStr = formatDate(endDate, 'yyyy-MM-dd')
  1606. let endTimeStr = endDateStr + ' 23:59:59'
  1607. let endTime = new Date(endTimeStr)
  1608. return endTime.getTime()
  1609. }
  1610. return {
  1611. dateType: '1',
  1612. activeMenu: window.top.localStorage.getItem('activeMenu'),
  1613. confireInboundVisible: false,
  1614. toggleRowIds: [],
  1615. capacityNo: null,
  1616. capacityId: null,
  1617. consigneeTel: null,
  1618. batchCapacityList: [],
  1619. batchCapacityVisible: false,
  1620. isShowSaleLog: false,
  1621. optionSaleLog: {
  1622. maxHeight: 400,
  1623. requestUrl: '/api/v1/ams/selectAllLog?apiId=522',
  1624. requestQuery: {
  1625. con: null
  1626. }
  1627. },
  1628. isCheckGPS: true,
  1629. userId: null,
  1630. orgCode: null,
  1631. taskAllNum: 0,
  1632. noticeInterval: null,
  1633. exceptionHandleVisible: false,
  1634. batchCarrierName: null,
  1635. batchCarrierVisible: false,
  1636. visibleList: [],
  1637. itemHeight: 30,
  1638. scrollTop: 0,
  1639. debounceS: false,
  1640. carNumber: '',
  1641. //弹出框
  1642. centerDialogVisible: false,
  1643. //根据车序号查询的值
  1644. steelMap: {},
  1645. //钢材子表数据
  1646. drawer: false,
  1647. isShow3: false,
  1648. isShow4: false,
  1649. input: null,
  1650. screen: '',
  1651. options: [
  1652. {
  1653. value: '客户',
  1654. lable: '客户'
  1655. },
  1656. {
  1657. value: '承运商',
  1658. lable: '承运商'
  1659. },
  1660. {
  1661. value: '车牌号',
  1662. lable: '车牌号'
  1663. },
  1664. {
  1665. value: '收货地址',
  1666. lable: '收货地址'
  1667. },
  1668. {
  1669. value: '转运计划号',
  1670. lable: '转运计划号'
  1671. }
  1672. ],
  1673. input1: null,
  1674. screen1: '',
  1675. options1: [
  1676. {
  1677. value: '客户',
  1678. lable: '客户'
  1679. },
  1680. {
  1681. value: '承运商',
  1682. lable: '承运商'
  1683. },
  1684. {
  1685. value: '车牌号',
  1686. lable: '车牌号'
  1687. },
  1688. {
  1689. value: '收货地址',
  1690. lable: '收货地址'
  1691. },
  1692. {
  1693. value: '转运计划号',
  1694. lable: '转运计划号'
  1695. }
  1696. ],
  1697. pickerOptions: {
  1698. disabledDate(time) {
  1699. return time.getTime() > Date.now()
  1700. },
  1701. shortcuts: [
  1702. {
  1703. text: '今天',
  1704. onClick(picker) {
  1705. picker.$emit('pick', new Date())
  1706. }
  1707. },
  1708. {
  1709. text: '昨天',
  1710. onClick(picker) {
  1711. const date = new Date()
  1712. date.setTime(date.getTime() - 3600 * 1000 * 24)
  1713. picker.$emit('pick', date)
  1714. }
  1715. },
  1716. {
  1717. text: '一周前',
  1718. onClick(picker) {
  1719. const date = new Date()
  1720. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  1721. picker.$emit('pick', date)
  1722. }
  1723. },
  1724. {
  1725. text: '元年',
  1726. onClick(picker) {
  1727. const date = new Date()
  1728. date.setTime(0)
  1729. picker.$emit('pick', date)
  1730. }
  1731. }
  1732. ]
  1733. },
  1734. pickerOptions1: {
  1735. disabledDate(time) {
  1736. return time.getTime() > Date.now()
  1737. },
  1738. shortcuts: [
  1739. {
  1740. text: '今天',
  1741. onClick(picker) {
  1742. picker.$emit('pick', new Date())
  1743. }
  1744. },
  1745. {
  1746. text: '昨天',
  1747. onClick(picker) {
  1748. const date = new Date()
  1749. date.setTime(date.getTime() - 3600 * 1000 * 24)
  1750. picker.$emit('pick', date)
  1751. }
  1752. },
  1753. {
  1754. text: '一周前',
  1755. onClick(picker) {
  1756. const date = new Date()
  1757. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
  1758. picker.$emit('pick', date)
  1759. }
  1760. },
  1761. {
  1762. text: '元年',
  1763. onClick(picker) {
  1764. const date = new Date()
  1765. date.setTime(0)
  1766. picker.$emit('pick', date)
  1767. }
  1768. }
  1769. ]
  1770. },
  1771. startTime: generateStartDate(),
  1772. endTime: generateEndDate(),
  1773. //合计净重
  1774. totalNumber: 0,
  1775. //合计车数
  1776. totalCapacity: 0,
  1777. //取消车数
  1778. quxiaoCapacityNum: 0,
  1779. //合计吨位
  1780. totalNetWeight: 0,
  1781. tableTitle: '销售统计报表',
  1782. capacityList: [],
  1783. carrierList: [],
  1784. tableData: [],
  1785. spanArr: [],
  1786. pos: 0,
  1787. spanArr1: [],
  1788. spanArr2: [],
  1789. spanArr3: [],
  1790. mergeListBatch: [
  1791. '净重',
  1792. '皮重时间',
  1793. '皮重',
  1794. '毛重时间',
  1795. '毛重',
  1796. '异常操作',
  1797. '具体仓库名称'
  1798. ],
  1799. pos2: 0,
  1800. pos3: 0,
  1801. pos1: 0,
  1802. //需要合并列的名称
  1803. mergeList: [
  1804. '选择',
  1805. '序号',
  1806. '整车操作',
  1807. '销售订单状态',
  1808. '销售订单号',
  1809. '发货单位',
  1810. '司机电话',
  1811. '运输订单号',
  1812. '签收地址',
  1813. '签收时间',
  1814. '抵达地址',
  1815. '抵达时间',
  1816. '出厂时间',
  1817. '进厂时间',
  1818. '车牌号',
  1819. '承运商',
  1820. '客户',
  1821. '收货地址',
  1822. '业务员',
  1823. '送货单打印',
  1824. '收货客户电话',
  1825. '是否自提',
  1826. '订单日期',
  1827. '短信发送',
  1828. '销售片区',
  1829. '抵达时间',
  1830. '签收时间',
  1831. // '摘要',
  1832. '排队开始时间',
  1833. '钢材科放行时间',
  1834. '备注',
  1835. '订单变更时间',
  1836. '异地库接收标志',
  1837. '销售订单变更记录',
  1838. '运输订单变更记录',
  1839. '拼数',
  1840. '是否继续装',
  1841. '订单上传时间',
  1842. '收款公司'
  1843. ],
  1844. //钢材多拼车辆线路ID
  1845. //索引从1-10为1-10拼路线ID
  1846. lineSpelling: [
  1847. 0,
  1848. 279973,
  1849. 279974,
  1850. 279975,
  1851. 279976,
  1852. 279977,
  1853. 279978,
  1854. 279979,
  1855. 279980,
  1856. 279981,
  1857. 279982,
  1858. 279983
  1859. ],
  1860. tableTitle: '厂外库转运出库统计报表',
  1861. //所有省
  1862. provinceList: [],
  1863. //选中的省
  1864. province: '',
  1865. //所有市
  1866. cityList: [],
  1867. //选中的市
  1868. city: '',
  1869. //所有的县(区)
  1870. countyList: [],
  1871. //选中的县
  1872. county: '',
  1873. //地址输入框的值
  1874. addresText: '',
  1875. //已选中省市县
  1876. //具体地址
  1877. //省市县Id
  1878. addressId: null,
  1879. addressRow: {},
  1880. srcList: [],
  1881. previewSrcList2: [],
  1882. src: '',
  1883. isShow: false,
  1884. srcList2: [],
  1885. previewSrcList2: [],
  1886. isShow2: false,
  1887. maxHeight: 700,
  1888. //轨迹窗口
  1889. value7: false,
  1890. //实时路径窗口
  1891. value8: false,
  1892. pathOption: {
  1893. orderNumber: '',
  1894. capacityNumber: '',
  1895. startPointName: '',
  1896. endPointName: '',
  1897. statusCode: '位置'
  1898. },
  1899. saleSteelKey: false,
  1900. tableRowIndex: '',
  1901. isRowClick: 0,
  1902. orgCodeList: [
  1903. 'wuliuyunshubu',
  1904. 'dagangadmin',
  1905. 'zidonghuabu',
  1906. 'chengyunshang'
  1907. ],
  1908. isShowOperate: false,
  1909. filterConsigneeList: [],
  1910. filterCarrierList: [],
  1911. filterCapacityList: [],
  1912. filtermaterialNameList: [],
  1913. filterorderStatusActually: [],
  1914. filterorderStatus: [
  1915. { text: '未派发', value: '未派发' },
  1916. { text: '已派单', value: '已派单' },
  1917. { text: '已接单', value: '已接单' },
  1918. { text: '排队中', value: '排队中' },
  1919. { text: '已完成', value: '已完成' },
  1920. { text: '已关闭', value: '已关闭' }
  1921. ],
  1922. filterIsContinue: [
  1923. { text: '是', value: '是' },
  1924. { text: '否', value: '否' }
  1925. ],
  1926. filterUploadTime: [],
  1927. filterSpellNum: [
  1928. { text: '0', value: '0' },
  1929. { text: '1', value: '1' },
  1930. { text: '2', value: '2' },
  1931. { text: '3', value: '3' },
  1932. { text: '4', value: '4' },
  1933. { text: '5', value: '5' },
  1934. { text: '6', value: '6' },
  1935. { text: '7', value: '7' },
  1936. { text: '8', value: '8' },
  1937. { text: '9', value: '9' }
  1938. ],
  1939. filteraddressPlace: [],
  1940. filtermaterialSpe: [],
  1941. filterSaleRemark: [],
  1942. filterTruckRemark: [],
  1943. filterSaleOrderStatus: [
  1944. { text: '待审核', value: '待审核' },
  1945. { text: '已审核', value: '已审核' }
  1946. ],
  1947. filterFlStatus: [
  1948. {
  1949. text: '关闭',
  1950. value: '关闭'
  1951. },
  1952. {
  1953. text: '正常',
  1954. value: '正常'
  1955. }
  1956. ],
  1957. filterWarehouse: [
  1958. {
  1959. text: '新田港库',
  1960. value: '新田港库'
  1961. },
  1962. {
  1963. text: '蜀道智联',
  1964. value: '蜀道智联'
  1965. }
  1966. ],
  1967. filterOutboundStatus: [
  1968. {
  1969. text: '未出库',
  1970. value: '未出库'
  1971. },
  1972. {
  1973. text: '已出库',
  1974. value: '已出库'
  1975. }
  1976. ],
  1977. filterMap: {
  1978. consigneeNameList: [],
  1979. truckRemarkList: [],
  1980. saleRemarkList: [],
  1981. saleOrderStatusList: [],
  1982. materialSpeList: [],
  1983. addressPlaceList: [],
  1984. orderStatusList: [],
  1985. saleAreaList: [],
  1986. materialNameList: [],
  1987. carrierList: [],
  1988. capacityList: [],
  1989. orderStatusActuallyList: [],
  1990. outboundStatusList: []
  1991. },
  1992. //权限控制
  1993. notRoutList: [],
  1994. remarkPic: false,
  1995. remarkPicList: [],
  1996. location: null,
  1997. orderNumber: null,
  1998. capacityNumber: null,
  1999. arrivalReceiving: false,
  2000. arriavlList: [],
  2001. receiveList: [],
  2002. fileListArrival: [],
  2003. fileListReceive: [],
  2004. dialogImageUrl: '',
  2005. dialogVisible: false,
  2006. isLoading: false,
  2007. arrivalTime: null,
  2008. receiptTime: null,
  2009. dialogFormVisible: false,
  2010. addresText: null,
  2011. originalPriceValue: null,
  2012. originalAddress: null,
  2013. aaadrawer: false,
  2014. downloadCapacityNo: null,
  2015. batchCarrierList: [],
  2016. columnNoRoutList: [],
  2017. salerExportExcelList: [
  2018. '计划日期',
  2019. '出库库房',
  2020. '出库理重',
  2021. '出库日期',
  2022. '订单日期',
  2023. '客户',
  2024. '收货单位',
  2025. '物资名称',
  2026. '物资规格',
  2027. '物资件数',
  2028. '理重',
  2029. '出库净重',
  2030. '收货地址',
  2031. '收货客户电话',
  2032. '摘要',
  2033. '备注',
  2034. '车牌号',
  2035. '司机电话',
  2036. '制单日期',
  2037. '销售订单状态',
  2038. '运单状态',
  2039. '承运商',
  2040. '排队开始时间',
  2041. '钢材科放行时间',
  2042. '进厂时间',
  2043. '皮重时间',
  2044. '皮重',
  2045. '装货时间',
  2046. '毛重时间',
  2047. '毛重',
  2048. '送货单打印',
  2049. '出厂时间',
  2050. '短信发送',
  2051. '抵达地址',
  2052. '抵达时间',
  2053. '签收地址',
  2054. '签收时间',
  2055. '实际运价',
  2056. '实际运费',
  2057. '异地库接收标志',
  2058. '运输订单号',
  2059. '业务员',
  2060. '发货单位',
  2061. '是否自提',
  2062. '销售订单号',
  2063. '金蝶分录ID',
  2064. '订单变更时间',
  2065. '销售订单变更记录',
  2066. '运输订单变更记录',
  2067. '收款公司',
  2068. '理论件数'
  2069. ],
  2070. scrollUpdateSelectFlag: 0,
  2071. scrollLeft: 0,
  2072. scrollLeftFlag: 0,
  2073. isShowOperateYeWuYuan: false,
  2074. headColumnList: [],
  2075. columnAllData: [],
  2076. columnHiddenData: [],
  2077. consigneeCheckList: [],
  2078. showPopover: false,
  2079. schemeMap: {},
  2080. statusNumData: [],
  2081. oYeWarehouseList: [],
  2082. columnShowDialog: false,
  2083. inboundWarehouse: null
  2084. }
  2085. },
  2086. created() {
  2087. if (this.$route.query.str) {
  2088. let filterMap = JSON.parse(this.$route.query.str)
  2089. if (filterMap) {
  2090. this.filterMap = filterMap
  2091. this.startTime = filterMap.startTime
  2092. this.endTime = filterMap.endTime
  2093. }
  2094. }
  2095. this.getSteelReport = this.debounce(() => {
  2096. this.getSteelReportDebounce()
  2097. }, 100)
  2098. this.orgCode = getCookie('orgCode')
  2099. this.userId = getCookie('userId')
  2100. if (getCookie('orgCode') == 'chengyunshang') {
  2101. this.noticeInterval = setInterval(() => {
  2102. this.getinformation()
  2103. }, 1000 * 180)
  2104. }
  2105. this.getSteelReport()
  2106. if (getCookie('orgCode') == 'shouhuokehu') {
  2107. //如果是收货客户,则查询
  2108. this.axios
  2109. .post('/api/v1/uc/getColumnNoRoutList', {
  2110. orgCode: getCookie('orgCode'),
  2111. userName: getCookie('loginName'),
  2112. tableName: '厂外库转运报表'
  2113. })
  2114. .then(res => {
  2115. this.columnNoRoutList = res.data
  2116. })
  2117. this.notRoutList = ['select']
  2118. } else {
  2119. this.getColumShowHideScheme()
  2120. }
  2121. if (getCookie('orgCode') == 'ouyechangwaiku') {
  2122. this.inboundWarehouse = getCookie('loginName')
  2123. }
  2124. //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
  2125. this.updateCapacityDebounce = this.debounce(() => {
  2126. this.updateCapacity()
  2127. }, 1500)
  2128. this.updateTruckCarrierDebounce = this.debounce(() => {
  2129. this.updateTruckCarrier()
  2130. }, 1500)
  2131. this.cellMouse1 = this.debounce((row, column, cell) => {
  2132. this.cellMouse(row, column, cell)
  2133. }, 200)
  2134. this.cellLeave1 = this.debounce((row, column, cell) => {
  2135. this.cellLeave(row, column, cell)
  2136. }, 200)
  2137. this.exceptionHandleMakeSure = this.debounce(() => {
  2138. this.exceptionHandleMakeSure1()
  2139. }, 500)
  2140. this.submitSteelDebounce = this.debounce(obj => {
  2141. this.submitSteel(obj)
  2142. })
  2143. },
  2144. watch: {
  2145. visibleList: {
  2146. deep: true,
  2147. immediate: true,
  2148. handler(val) {
  2149. let standList = this.$store.state.saleSteelToggleIds
  2150. this.$nextTick(() => {
  2151. this.visibleList.forEach(e => {
  2152. if (standList.includes(e.saleOrderMaterialId))
  2153. this.$refs.tableRef.toggleRowSelection(e, true)
  2154. })
  2155. })
  2156. }
  2157. },
  2158. maxHeight() {
  2159. this.visibleList = this.tableData.slice(
  2160. 0,
  2161. Math.floor(this.maxHeight / 30)
  2162. )
  2163. this.getSpanArr(this.visibleList)
  2164. document.querySelector(
  2165. '.el-table__body-wrapper .el-table__body'
  2166. ).style.transform = `translateY(${0}px)`
  2167. },
  2168. scrollTop: {
  2169. immediate: true,
  2170. deep: true,
  2171. handler(val) {
  2172. this.$nextTick(() => {
  2173. if (
  2174. val >=
  2175. this.tableData.length * 30 -
  2176. document.querySelector('.el-table__body-wrapper').offsetHeight -
  2177. 20
  2178. ) {
  2179. val =
  2180. this.tableData.length * 30 -
  2181. document.querySelector('.el-table__body-wrapper').offsetHeight
  2182. }
  2183. if (val <= 0) {
  2184. val = 0
  2185. }
  2186. const start = Math.floor(val / 30)
  2187. this.visibleList = this.tableData.slice(
  2188. start,
  2189. start + Math.floor(this.maxHeight / 30)
  2190. )
  2191. this.getSpanArr(this.visibleList)
  2192. document.querySelector(
  2193. '.el-table__body-wrapper .el-table__body'
  2194. ).style.transform = `translateY(${val}px)`
  2195. this.debounceS = false
  2196. })
  2197. }
  2198. },
  2199. scrollLeft: {
  2200. immediate: true,
  2201. deep: true,
  2202. handler(val) {
  2203. this.scrollLeftFlag = 1
  2204. }
  2205. }
  2206. },
  2207. destroyed() {
  2208. clearInterval(this.noticeInterval)
  2209. },
  2210. computed: {},
  2211. mounted() {
  2212. this.$nextTick(() => {
  2213. const that = this
  2214. window.onresize = () => {
  2215. return (() => {
  2216. console.log('我触发了表格分辨率变化的时间')
  2217. that.$nextTick(() => {
  2218. that.maxHeight =
  2219. window.innerHeight -
  2220. document.querySelector('.tableTop').offsetHeight -
  2221. 40
  2222. })
  2223. })()
  2224. }
  2225. })
  2226. this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
  2227. if (this.scrollLeftFlag == 1 && this.debounceS == true) {
  2228. this.debounceS = false
  2229. }
  2230. if (this.debounceS) return
  2231. this.debounceS = true
  2232. this.scrollTop = e.target.scrollTop
  2233. this.scrollLeft = e.target.scrollLeft
  2234. this.scrollUpdateSelectFlag = 1
  2235. })
  2236. //基础数据查询
  2237. this.getAllProvince()
  2238. //欧冶仓库
  2239. this.getOyeWarehouse()
  2240. },
  2241. activated() {
  2242. this.maxHeight =
  2243. window.innerHeight - document.querySelector('.tableTop').offsetHeight - 40
  2244. },
  2245. methods: {
  2246. getOyeWarehouse() {
  2247. this.axios
  2248. .post(
  2249. '/api/v1/ams/getOyeWarehouseSide?apiId=532&pageNum=1&pageSize=100&i=' +
  2250. new Date()
  2251. )
  2252. .then(res => {
  2253. this.oYeWarehouseList = res.data.data.list.map(item => {
  2254. let map = {}
  2255. map.label = item.warehouseName
  2256. map.value = item.warehouseName
  2257. return map
  2258. })
  2259. if (getCookie('orgCode') == 'ouyechangwaiku') {
  2260. this.oYeWarehouseList = this.oYeWarehouseList.filter(item => {
  2261. return item.remark == JSON.parse(getCookie('userInfo')).userName
  2262. })
  2263. this.steelMap.inboundWarehouse = getCookie('loginName')
  2264. }
  2265. })
  2266. },
  2267. confireInboundTo(item) {
  2268. console.log(item, 'item')
  2269. let flag = 1
  2270. let arr = item.mapList.map(e => {
  2271. let map = {}
  2272. map = JSON.parse(JSON.stringify(e))
  2273. map.capacityId = item.capacityId
  2274. map.capacityNumber = item.capacityNo
  2275. map.consigneeId = e.consigneeId
  2276. map.saleNo = item.saleOrderNo
  2277. map.inboundWarehouse = e.inboundWarehouse
  2278. map.inboundArea = '厂外库'
  2279. map.orderId = item.orderId
  2280. map.meter = e.meter
  2281. map.netWeight = e.inboundNetWeight
  2282. map.materialNumber = e.materialNumber
  2283. if (e.isPoundSale == 1) {
  2284. let theoryWeight = accMul(map.materialNumber, e.singleWeight)
  2285. map.theoryWeight = theoryWeight
  2286. }
  2287. map.materialId = e.materialId
  2288. map.saleMaterialId = e.saleMaterialId
  2289. map.saleArea = e.saleRemarkByasm
  2290. console.log(map.saleRemarkByasm, 'map.saleRemarkByasm ')
  2291. map.userName = getCookie('loginName')
  2292. map.isPoundSale = e.isPoundSale
  2293. map.inventoryId = e.inventoryId
  2294. if (map.isPoundSale == 0) {
  2295. //为0则为磅重销售,则将净重转为理重
  2296. map.theoryWeight = e.inboundNetWeight
  2297. }
  2298. return map
  2299. })
  2300. console.log(arr, 'arr')
  2301. this.confireInboundToWms(arr)
  2302. },
  2303. confireInboundToWms(data) {
  2304. this.axios
  2305. .post('/api/v1/wms/insertOyeOutboundResult', {
  2306. orderId: data[0].orderId,
  2307. reUpdateOutBound: this.steelMap.reUpdateOutBound,
  2308. mapList: data
  2309. })
  2310. .then(res => {
  2311. if (res.data.status == 'succeed') {
  2312. this.$message({
  2313. type: 'success',
  2314. message: res.data.data
  2315. })
  2316. this.confireInboundVisible = false
  2317. this.onclick(this.filterMap)
  2318. } else {
  2319. this.$message({
  2320. type: 'error',
  2321. message: res.data.data
  2322. })
  2323. }
  2324. })
  2325. },
  2326. confirmInbound() {
  2327. if (Object.values(this.steelMap).length == 0) {
  2328. this.$message.error('请点击需要执行更改操作的行!')
  2329. return
  2330. }
  2331. // 将中文逗号替换为英文逗号
  2332. if (Object.keys(this.steelMap).length > 0) {
  2333. this.axios
  2334. .post(
  2335. '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
  2336. this.steelMap.saleOrderMaterialId
  2337. )
  2338. .then(res => {
  2339. this.steelMap = res.data.data
  2340. if (this.steelMap.queueStartTime == null) {
  2341. this.$message.error('未放行无法出库')
  2342. return
  2343. }
  2344. console.log(this.steelMap, 'this.steelMap')
  2345. if (getCookie('orgCode') == 'ouyechangwaiku') {
  2346. let inboundWarehouse = getCookie('loginName')
  2347. /**
  2348. this.steelMap.mapList = this.steelMap.mapList.filter(item => {
  2349. return item.inboundWarehouse == inboundWarehouse
  2350. })
  2351. */
  2352. }
  2353. this.steelMap.userName = getCookie('loginName')
  2354. this.confireInboundVisible = true
  2355. this.getSpanArr1(res.data.data.mapList)
  2356. })
  2357. }
  2358. },
  2359. reConfirmInbound() {
  2360. if (Object.values(this.steelMap).length == 0) {
  2361. this.$message.error('请点击需要执行更改操作的行!')
  2362. return
  2363. }
  2364. // 将中文逗号替换为英文逗号
  2365. if (Object.keys(this.steelMap).length > 0) {
  2366. this.axios
  2367. .post(
  2368. '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
  2369. this.steelMap.saleOrderMaterialId
  2370. )
  2371. .then(res => {
  2372. this.steelMap = res.data.data
  2373. if (getCookie('orgCode') == 'ouyechangwaiku') {
  2374. let inboundWarehouse = getCookie('loginName')
  2375. this.steelMap.mapList = this.steelMap.mapList.filter(item => {
  2376. return item.inboundWarehouse == inboundWarehouse
  2377. })
  2378. }
  2379. this.steelMap.userName = getCookie('loginName')
  2380. this.steelMap.reUpdateOutBound = 1
  2381. this.confireInboundVisible = true
  2382. this.getSpanArr1(res.data.data.mapList)
  2383. })
  2384. }
  2385. },
  2386. openBlank() {
  2387. let page = this.$router.resolve({
  2388. name: 'saleSteelReports',
  2389. query: { id: 0, e: 0 },
  2390. meta: {
  2391. title: '销售钢材报表'
  2392. }
  2393. })
  2394. window.open(page.href, '_blank')
  2395. },
  2396. getColumShowHideScheme() {
  2397. this.axios
  2398. .post('/api/v1/uc/getColumShowHideScheme', {
  2399. userName: getCookie('loginName'),
  2400. orgCode: getCookie('orgCode'),
  2401. tableName: '厂外库转运报表'
  2402. })
  2403. .then(res => {
  2404. this.schemeMap = res.data.data
  2405. this.columnNoRoutList = this.schemeMap.columnHiddenData
  2406. })
  2407. .catch(() => {
  2408. this.columnNoRoutList = []
  2409. })
  2410. },
  2411. columnShowTabClick(e) {
  2412. this.schemeMap.activeName = e.paneName
  2413. },
  2414. //动态渲染列的显示方案
  2415. handleTabsEdit(targetName, action) {
  2416. if (action === 'add') {
  2417. this.$confirm('请输入方案名称', '提示', {
  2418. confirmButtonText: '确定',
  2419. cancelButtonText: '取消',
  2420. type: 'info',
  2421. showInput: true,
  2422. center: true
  2423. })
  2424. .then(mes => {
  2425. let newTabName = mes.value
  2426. this.schemeMap.schemeList.push({
  2427. title: newTabName,
  2428. name: newTabName,
  2429. columnAllData: this.schemeMap.columnAllData,
  2430. columnHiddenData: []
  2431. })
  2432. this.schemeMap.activeName = newTabName
  2433. })
  2434. .catch(() => {
  2435. this.$message({
  2436. type: 'info',
  2437. message: '用户取消操作'
  2438. })
  2439. })
  2440. }
  2441. if (action === 'remove') {
  2442. let map = {}
  2443. map.columnHiddenData = []
  2444. map.name = targetName || this.schemeMap.activeName
  2445. this.columnShowOperation(map)
  2446. }
  2447. },
  2448. //动态渲染表头
  2449. renderHeader(h, { column }) {
  2450. let renderColumnFilterList = []
  2451. let filterVal = ''
  2452. let optionList = []
  2453. if (column.label === '收货单位') {
  2454. filterVal = 'consigneeNameList'
  2455. renderColumnFilterList = this.filterConsigneeList
  2456. } else if (column.label === '车牌号') {
  2457. filterVal = 'capacityList'
  2458. renderColumnFilterList = this.filterCapacityList
  2459. } else if (column.label === '收货地址') {
  2460. filterVal = 'addressPlaceList'
  2461. renderColumnFilterList = this.filteraddressPlace
  2462. } else if (column.label === '摘要') {
  2463. filterVal = 'saleRemarkList'
  2464. renderColumnFilterList = this.filterSaleRemark
  2465. } else if (column.label === '备注') {
  2466. filterVal = 'truckRemarkList'
  2467. renderColumnFilterList = this.filterTruckRemark
  2468. } else if (column.label === '物资名称') {
  2469. filterVal = 'materialNameList'
  2470. renderColumnFilterList = this.filtermaterialNameList
  2471. } else if (column.label === '物资规格') {
  2472. filterVal = 'materialSpeList'
  2473. renderColumnFilterList = this.filtermaterialSpe
  2474. }
  2475. if (filterVal == '') {
  2476. return h('div', column.label, {})
  2477. }
  2478. return h(
  2479. 'div',
  2480. {
  2481. style: {
  2482. height: 'auto',
  2483. color: this.filterMap[filterVal].length > 0 ? '#409EFF' : '#ffff',
  2484. fontWeight: this.filterMap[filterVal].length > 0 ? '700' : '400',
  2485. fontSize: '12px'
  2486. }
  2487. },
  2488. [
  2489. h(
  2490. 'el-popover',
  2491. {
  2492. props: {
  2493. placement: 'bottom',
  2494. trigger: 'click',
  2495. value: this.showPopover
  2496. },
  2497. style: {
  2498. width: 'auto'
  2499. },
  2500. on: {
  2501. show: _ => {
  2502. this.$nextTick(() => {
  2503. this.$refs.filterSelectRef.focus()
  2504. })
  2505. }
  2506. }
  2507. },
  2508. [
  2509. h('span', {
  2510. slot: 'reference',
  2511. style: 'margin-top:20px',
  2512. domProps: {
  2513. innerHTML:
  2514. column.label + ' ' + '<i class="el-icon-search""/>'
  2515. }
  2516. }),
  2517. this.$createElement(
  2518. 'el-select',
  2519. {
  2520. ref: `filterSelectRef`,
  2521. style: {
  2522. 'margin-bottom': '10px',
  2523. 'border-bottom': '1px solid #efefef',
  2524. 'padding-bottom': '10px',
  2525. width: '250px'
  2526. },
  2527. props: {
  2528. placeholder: '请输入查询',
  2529. reserveKeyword: true,
  2530. filterable: true,
  2531. filterMethod: e => {
  2532. this.filterMethodChange(
  2533. e,
  2534. filterVal,
  2535. renderColumnFilterList
  2536. )
  2537. },
  2538. multiple: true,
  2539. collapseTags: true,
  2540. value: this.filterMap[filterVal]
  2541. },
  2542. on: {
  2543. change: val => {
  2544. if (val) {
  2545. this.filterMap[filterVal] = [...new Set(val)]
  2546. } else {
  2547. let i = this.filterMap[filterVal].findIndex(
  2548. row => row == val
  2549. )
  2550. this.filterMap[filterVal].splice(i, 1)
  2551. }
  2552. }
  2553. }
  2554. },
  2555. [
  2556. renderColumnFilterList.map((item, index) => {
  2557. return h('el-option', {
  2558. props: {
  2559. label: item.text,
  2560. value: item.text,
  2561. key: item.text
  2562. }
  2563. })
  2564. })
  2565. ]
  2566. ),
  2567. h('el-button', {
  2568. props: {
  2569. size: 'mini'
  2570. },
  2571. on: {
  2572. click: e => {
  2573. this.filterMap[filterVal] = []
  2574. this.onclick(this.filterMap)
  2575. }
  2576. },
  2577. domProps: {
  2578. innerHTML: '重置'
  2579. }
  2580. }),
  2581. h('el-button', {
  2582. props: {
  2583. size: 'mini',
  2584. type: 'primary'
  2585. },
  2586. on: {
  2587. click: _ => {
  2588. this.onclick(this.filterMap)
  2589. }
  2590. },
  2591. domProps: {
  2592. innerHTML: '筛选'
  2593. }
  2594. })
  2595. ]
  2596. )
  2597. ]
  2598. )
  2599. },
  2600. filterMethodChange(e, filterVal, renderColumnFilterList) {
  2601. this.filterMap[filterVal] = [e]
  2602. },
  2603. ctrlColumnShow() {
  2604. this.columnShowDialog = true
  2605. },
  2606. columnShowOperation(item) {
  2607. this.axios
  2608. .post('/api/v1/uc/updateColumnShowHidden', {
  2609. userName: getCookie('loginName'),
  2610. orgCode: getCookie('orgCode'),
  2611. tableName: '销售钢材报表',
  2612. columnHiddenData: item.columnHiddenData,
  2613. schemeName: item.name
  2614. })
  2615. .then(res => {
  2616. this.$message({
  2617. type: 'success',
  2618. message: '切换成功',
  2619. offset: '250'
  2620. })
  2621. this.$router.go(0)
  2622. })
  2623. this.columnShowDialog = false
  2624. },
  2625. headCellStyle({ row, column, rowIndex, columnIndex }) {
  2626. // console.log(row, 'row')
  2627. // console.log('headCellStyle column.property: ', column.property)
  2628. if (column.property && this.headColumnList.includes(column.property)) {
  2629. return { fontWeight: 700, fontSize: '15px' }
  2630. //return {}
  2631. }
  2632. return {}
  2633. },
  2634. clearFilter() {
  2635. this.$refs.tableRef.clearFilter()
  2636. this.headColumnList = []
  2637. this.filterMap = {
  2638. consigneeNameList: [],
  2639. truckRemarkList: [],
  2640. saleRemarkList: [],
  2641. saleOrderStatusList: [],
  2642. materialSpeList: [],
  2643. addressPlaceList: [],
  2644. orderStatusList: [],
  2645. saleAreaList: [],
  2646. materialNameList: [],
  2647. carrierList: [],
  2648. capacityList: [],
  2649. isContinueList: [],
  2650. spellNumList: [],
  2651. businessType: '500'
  2652. }
  2653. this.onclick(this.filterMap)
  2654. },
  2655. submitSteel(obj) {
  2656. this.$confirm('该操作会修改全部改动的内容,请确认核实后点击!', '提醒', {
  2657. cancelButtonText: '取消',
  2658. confirmButtonText: '确认',
  2659. center: true
  2660. }).then(() => {
  2661. let map = obj
  2662. map.userName = getCookie('loginName')
  2663. map.shipperAddressId = this.addressId
  2664. this.axios.post('/api/v1/uc/submitSteel', this.steelMap).then(res => {
  2665. let _this = this
  2666. if (res.data.responseMapFailed.length > 0) {
  2667. let responseFailTitle = res.data.responseMapFailed.join(';')
  2668. this.$message({
  2669. type: 'error',
  2670. duration: 2500,
  2671. offset: '250',
  2672. message: responseFailTitle
  2673. })
  2674. }
  2675. if (res.data.response.length == 0) {
  2676. setTimeout(() => {
  2677. _this.$message({
  2678. type: 'success',
  2679. duration: 1500,
  2680. offset: '250',
  2681. message: '未发现任何修改成功的记录!'
  2682. })
  2683. }, 2500)
  2684. } else {
  2685. let responseTitle = res.data.response.join(';')
  2686. setTimeout(() => {
  2687. _this.$message({
  2688. type: 'success',
  2689. duration: 2500,
  2690. offset: '250',
  2691. message: responseTitle
  2692. })
  2693. }, 2500)
  2694. }
  2695. this.operation(this.steelMap)
  2696. this.onclick(this.filterMap)
  2697. })
  2698. })
  2699. },
  2700. resetPrintNumber() {
  2701. this.axios
  2702. .post('/api/v1/bp/resetPrintNumber', this.steelMap)
  2703. .then(res => {
  2704. if (res.data.status == 'succeed') {
  2705. this.$message.success('重置成功!')
  2706. } else {
  2707. this.$message.error('重置失败!')
  2708. }
  2709. })
  2710. },
  2711. showBatchCapacity() {
  2712. this.capacityNo = null
  2713. this.capacityId = null
  2714. this.batchCapacityList = []
  2715. console.log(this.$refs.tableRef.selection)
  2716. //按照saleOrderMaterialId查询物资数量size,用于确定派车的线路ID
  2717. this.$refs.tableRef.selection.forEach(item1 => {
  2718. item1.size = this.visibleList.filter(item2 => {
  2719. return item1.saleOrderMaterialId == item2.saleOrderMaterialId
  2720. }).length
  2721. })
  2722. this.batchCapacityList = this.$refs.tableRef.selection
  2723. console.log(this.batchCapacityList)
  2724. // if (this.batchCapacityList.length > 0) {
  2725. // this.batchCapacityVisible = true
  2726. // } else {
  2727. // this.$message({
  2728. // type: 'warning',
  2729. // message: '请选择要批量更改车牌号的订单',
  2730. // offset: '250',
  2731. // duration: '2500'
  2732. // })
  2733. // }
  2734. },
  2735. batchCapacitySelect(selection) {
  2736. this.capacityNo = selection.capacityNumber
  2737. this.capacityId = selection.capacityId
  2738. },
  2739. //批量修改车牌号
  2740. batchEditCapacity() {
  2741. if (this.capacityId && this.capacityNo) {
  2742. if (
  2743. !(
  2744. isVehicleNumber(this.capacityNo) ||
  2745. this.capacityNo == '取消' ||
  2746. this.capacityNo == '待定' ||
  2747. this.capacityNo == '空白'
  2748. )
  2749. ) {
  2750. this.$message.error('请输入正确格式的车牌号!')
  2751. return
  2752. }
  2753. console.log('this.batchCapacityList', this.batchCapacityList)
  2754. this.batchCapacityList.forEach(row => {
  2755. row.capacityId = this.capacityId
  2756. row.capacityNumber = this.capacityNo
  2757. row.capacityNo = this.capacityNo
  2758. //是否校验GPS
  2759. row.isCheckGPS = this.isCheckGPS
  2760. row.userId = getCookie('userId')
  2761. if (row.carrierIds == 0) {
  2762. this.$message.error('请先授权承运商!')
  2763. return
  2764. }
  2765. if (row.capacityIds == 0) {
  2766. row.lineId = this.lineSpelling[row.size]
  2767. }
  2768. })
  2769. let map = {
  2770. list: this.batchCapacityList
  2771. }
  2772. this.axios.post('/api/v1/ams/batchUpdateCapacity', map).then(res => {
  2773. if (res.data.code == '200') {
  2774. this.$message.success('派车成功!')
  2775. } else {
  2776. this.$message.error(res.data.data)
  2777. }
  2778. })
  2779. this.batchCarrierVisible = false
  2780. this.onclick(this.filterMap)
  2781. } else {
  2782. this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
  2783. }
  2784. },
  2785. showSaleLog() {
  2786. this.isShowSaleLog = true
  2787. if (this.steelMap) {
  2788. this.optionSaleLog.requestQuery.con = this.steelMap.orderNo
  2789. }
  2790. },
  2791. //删除计量实绩
  2792. linkageDeleteTransportOrder(row, steelMap) {
  2793. console.log(row, 'row')
  2794. debugger
  2795. if (row.netWeight != null && row.netWeight != '') {
  2796. //如果净重不为空
  2797. let arr = []
  2798. let map = {
  2799. orderNumber: row.orderNo,
  2800. good: row.materialName,
  2801. goodspa: `${row.materialSpecification}(${row.materialModel})`,
  2802. resultCrossWeightTime: row.grossWeightTime,
  2803. saleMaterialId: row.saleMaterialId,
  2804. weightBatchId: row.weightBatchId,
  2805. userName: getCookie('loginName')
  2806. }
  2807. arr.push(map)
  2808. this.axios
  2809. .post('/api/v1/uc/linkageDeleteTransportOrder', arr)
  2810. .then(res => {
  2811. this.$message({
  2812. message: '删除计量实绩成功',
  2813. type: 'success',
  2814. offset: '250',
  2815. duration: '2500'
  2816. })
  2817. this.exceptionHandleVisible = false
  2818. this.onclick(this.filterMap)
  2819. })
  2820. }
  2821. },
  2822. mergeSplit() {
  2823. if (this.$refs.tableRef.selection.length == 1) {
  2824. this.$confirm(
  2825. `尊敬的用户${getCookie(
  2826. 'loginName'
  2827. )},系统温馨提示您进行拆分操作前,请确认所拆分的订单将不会在金蝶进行提交,审核等操作!`,
  2828. '提醒',
  2829. {
  2830. confirmButtonText: '我已确认',
  2831. cancelButtonText: '我再想想',
  2832. center: true,
  2833. type: 'warning'
  2834. }
  2835. )
  2836. .then(() => {
  2837. this.splitOrder()
  2838. })
  2839. .catch(() => {
  2840. this.$message({
  2841. type: 'info',
  2842. duration: '2500',
  2843. message: '操作取消',
  2844. offset: '250'
  2845. })
  2846. })
  2847. } else if (this.$refs.tableRef.selection.length > 1) {
  2848. this.$confirm(
  2849. `尊敬的用户${getCookie(
  2850. 'loginName'
  2851. )},系统温馨提示您进行合并操作前,请确认所合并的订单将不会在金蝶进行提交,审核等操作!`,
  2852. '提醒',
  2853. {
  2854. confirmButtonText: '我已确认',
  2855. cancelButtonText: '我再想想',
  2856. center: true,
  2857. type: 'warning'
  2858. }
  2859. )
  2860. .then(() => {
  2861. this.mergeOrder()
  2862. })
  2863. .catch(() => {
  2864. this.$message({
  2865. type: 'info',
  2866. duration: '2500',
  2867. message: '操作取消',
  2868. offset: '250'
  2869. })
  2870. })
  2871. } else {
  2872. this.$message({
  2873. type: 'warning',
  2874. message: '请勾选/点击需要操作的行',
  2875. offset: '250',
  2876. duration: '2300'
  2877. })
  2878. }
  2879. },
  2880. splitOrder() {
  2881. this.$confirm(
  2882. `勾选了${this.$refs.tableRef.selection.length}条运单将执行拆分操作`,
  2883. '提醒',
  2884. {
  2885. confirmButtonText: '确定',
  2886. cancelButtonText: '取消',
  2887. center: true
  2888. }
  2889. )
  2890. .then(() => {
  2891. let mapList = this.$refs.tableRef.selection.map(e => {
  2892. let map = {}
  2893. map.saleOrderMaterialId = e.saleOrderMaterialId
  2894. return map
  2895. })
  2896. let map = {
  2897. mapList: mapList,
  2898. userName: getCookie('loginName')
  2899. }
  2900. this.axios
  2901. .post('/api/v1/ams/splitOrder', map)
  2902. .then(res => {
  2903. if (res.data.code == '200') {
  2904. this.onclick(this.filterMap)
  2905. this.$message({
  2906. type: 'success',
  2907. message: '拆分成功',
  2908. offset: '250',
  2909. duration: '2500'
  2910. })
  2911. } else {
  2912. this.$message({
  2913. type: 'error',
  2914. message: res.data.data,
  2915. offset: '250',
  2916. duration: '2500'
  2917. })
  2918. }
  2919. })
  2920. .catch(() => {
  2921. this.$message({
  2922. type: 'error',
  2923. message: '拆分失败',
  2924. offset: '250',
  2925. duration: '2500'
  2926. })
  2927. })
  2928. })
  2929. .catch(() => {
  2930. this.$message({
  2931. type: 'info',
  2932. duration: '2500',
  2933. message: '操作取消',
  2934. offset: '250'
  2935. })
  2936. })
  2937. },
  2938. mergeOrder() {
  2939. this.$confirm(
  2940. `勾选了${this.$refs.tableRef.selection.length}条运单将执行合并操作,此操作不可逆!`,
  2941. '提醒',
  2942. {
  2943. confirmButtonText: '确定',
  2944. cancelButtonText: '取消',
  2945. center: true
  2946. }
  2947. )
  2948. .then(() => {
  2949. let mapList = this.$refs.tableRef.selection.map(e => {
  2950. let map = {}
  2951. map.saleOrderMaterialId = e.saleOrderMaterialId
  2952. map.orderId = e.orderId
  2953. map.saleOrderId = e.saleOrderId
  2954. map.orderNo = e.orderNo
  2955. map.capacityNo = e.capacityNo
  2956. map.userName = getCookie('loginName')
  2957. return map
  2958. })
  2959. let map = {
  2960. mapList: mapList,
  2961. userName: getCookie('loginName')
  2962. }
  2963. this.axios
  2964. .post('/api/v1/ams/mergeOrder', map)
  2965. .then(res => {
  2966. if (res.data.code == '200') {
  2967. this.onclick(this.filterMap)
  2968. this.$message({
  2969. type: 'success',
  2970. message: '合并成功,请提醒驾驶员!',
  2971. offset: '250',
  2972. duration: '3000'
  2973. })
  2974. } else {
  2975. this.$message({
  2976. type: 'error',
  2977. message: res.data.data,
  2978. offset: '250',
  2979. duration: '2500'
  2980. })
  2981. }
  2982. })
  2983. .catch(() => {
  2984. this.$message({
  2985. type: 'error',
  2986. message: '合并失败',
  2987. offset: '250',
  2988. duration: '2500'
  2989. })
  2990. })
  2991. })
  2992. .catch(() => {
  2993. this.$message({
  2994. type: 'info',
  2995. duration: '2500',
  2996. message: '操作取消',
  2997. offset: '250'
  2998. })
  2999. })
  3000. },
  3001. //获取通知数量
  3002. getinformation() {
  3003. this.axios
  3004. .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
  3005. .then(res => {
  3006. let taskAllNum = 0
  3007. res.data.data.forEach(e => {
  3008. if (e.insertusername == '销售审核' && e.status == 0) {
  3009. taskAllNum++
  3010. }
  3011. })
  3012. this.taskAllNum = taskAllNum
  3013. console.log('未接收数目:', this.taskAllNum)
  3014. })
  3015. },
  3016. readAll() {
  3017. this.axios
  3018. .post('/api/v1/ams/readAll', {
  3019. userId: this.userId,
  3020. insertUserName: '销售审核'
  3021. })
  3022. .then(res => {
  3023. this.taskAllNum = 0
  3024. })
  3025. },
  3026. deleteRow(index, rows) {
  3027. if (rows.length > 1) {
  3028. rows.splice(index, 1)
  3029. }
  3030. },
  3031. copyRowflu(index, row) {
  3032. console.log(index)
  3033. let copyRowflu = new Object()
  3034. Object.keys(row).forEach(key => {
  3035. copyRowflu[key] = row[key]
  3036. })
  3037. delete copyRowflu.materialId
  3038. delete copyRowflu.netWeight
  3039. delete copyRowflu.grossWeight
  3040. delete copyRowflu.grossWeightTime
  3041. delete copyRowflu.tareWeight
  3042. delete copyRowflu.tareWeightTime
  3043. delete copyRowflu.loadTime
  3044. delete copyRowflu.closeEntryId
  3045. this.steelMap.mapList.splice(index + 1, 0, copyRowflu)
  3046. },
  3047. exceptionHandleMakeSure1() {
  3048. console.log(this.steelMap)
  3049. this.$confirm(
  3050. `该操作会将${this.steelMap.capacityNo}下未出净重的分录关闭,并重新上传金蝶,确认操作?`,
  3051. '提示',
  3052. {
  3053. cancelButtonText: '取消',
  3054. confirmButtonText: '确定',
  3055. center: true
  3056. }
  3057. )
  3058. .then(() => {
  3059. let saleDateOfReceipt = null
  3060. let loadTime1 = new Date(
  3061. new Date(new Date().toLocaleDateString()).getTime() +
  3062. (3600 * 1000 * 8 - 1)
  3063. ) // 当天8点前
  3064. let loadTime2 = new Date(
  3065. new Date(new Date().toLocaleDateString()).getTime() +
  3066. (3600 * 1000 * 32 - 1)
  3067. ) // 次天8点前
  3068. if (new Date().getTime() - loadTime1 > 0) {
  3069. saleDateOfReceipt = loadTime2
  3070. } else {
  3071. saleDateOfReceipt = loadTime1
  3072. }
  3073. let closeEntryList = []
  3074. let map = this.steelMap
  3075. map.mapList.forEach(e => {
  3076. let map = {}
  3077. e.saleDateOfReceipt = sjTime(saleDateOfReceipt)
  3078. map.saleMaterialId = e.saleMaterialId
  3079. map.closeEntryId = e.closeEntryId
  3080. map.number = e.saleOrderNo
  3081. closeEntryList.push(map)
  3082. })
  3083. let mapList = map.mapList.filter(e => {
  3084. if (typeof e.netWeight == 'undefined' || e.netWeight == null) {
  3085. return e
  3086. }
  3087. })
  3088. if (mapList.length == 0) {
  3089. this.$message({
  3090. type: 'info',
  3091. message: '所有分录包含净重,退出!',
  3092. offset: '250',
  3093. duration: '2500'
  3094. })
  3095. return
  3096. }
  3097. map.mapList = mapList
  3098. map.isUploadEas = 1
  3099. this.axios
  3100. .post('/api/v1/ams/addSteelSaleOrder', map, {
  3101. timeout: 3 * 60 * 1000
  3102. })
  3103. .then(res => {
  3104. if (res.data.code == '200') {
  3105. this.axios
  3106. .post('/api/v1/ams/closingEntries', closeEntryList, {
  3107. timeout: 3 * 60 * 1000
  3108. })
  3109. .then(res => {
  3110. if (res.data.code == '200') {
  3111. this.onclick(this.filterMap)
  3112. this.$message({
  3113. type: 'success',
  3114. offset: '250',
  3115. message: '生成订单成功,关闭分录成功',
  3116. duration: 2000
  3117. })
  3118. this.exceptionHandleVisible = false
  3119. }
  3120. })
  3121. .catch(e => {})
  3122. } else {
  3123. this.$message({
  3124. type: 'error',
  3125. offset: '250',
  3126. duration: '2500',
  3127. message: '新增失败'
  3128. })
  3129. }
  3130. })
  3131. })
  3132. .catch(e => {
  3133. this.$message({
  3134. type: 'info',
  3135. message: '取消操作',
  3136. offset: '200',
  3137. duration: 2500
  3138. })
  3139. })
  3140. },
  3141. exceptionHandle() {
  3142. if (this.$refs.tableRef.selection.length == 1) {
  3143. console.log(this.$refs.tableRef.selection[0])
  3144. this.axios
  3145. .post(
  3146. '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
  3147. this.$refs.tableRef.selection[0].saleOrderMaterialId
  3148. )
  3149. .then(res => {
  3150. this.steelMap = res.data.data
  3151. this.exceptionHandleVisible = true
  3152. this.getSpanArr1(this.steelMap.mapList)
  3153. })
  3154. } else {
  3155. this.$message({
  3156. message: '异常处理单次仅能勾选一辆车',
  3157. offset: '250',
  3158. duration: '2500',
  3159. type: 'warning'
  3160. })
  3161. }
  3162. },
  3163. batchCarrierMakeSure() {
  3164. let batchCarrierId = null
  3165. this.carrierList.forEach(item => {
  3166. if (item.carrierName == this.batchCarrierName) {
  3167. batchCarrierId = item.carrierId
  3168. }
  3169. })
  3170. this.batchCarrierList.forEach(e => {
  3171. e.carrierId = batchCarrierId
  3172. })
  3173. const loading = this.$loading({
  3174. lock: true,
  3175. text: '正在批量授权承运商',
  3176. spinner: 'el-icon-loading',
  3177. background: 'rgba(0, 0, 0, 0.7)'
  3178. })
  3179. this.axios
  3180. .post('/api/v1/ams/dispatchToCarrier', this.batchCarrierList)
  3181. .then(res => {
  3182. if (res.data.code == '0') {
  3183. this.$message.success('授权承运商成功')
  3184. this.batchCarrierList = []
  3185. this.batchCarrierVisible = false
  3186. this.batchCarrierName = null
  3187. this.onclick(this.filterMap)
  3188. loading.close()
  3189. } else {
  3190. this.$message.error('授权失败,请联系管理员')
  3191. this.batchCarrierList = []
  3192. this.batchCarrierVisible = false
  3193. this.batchCarrierName = null
  3194. this.onclick(this.filterMap)
  3195. loading.close()
  3196. }
  3197. })
  3198. .catch(() => {
  3199. this.$message.error('授权失败,请联系管理员')
  3200. this.batchCarrierList = []
  3201. this.batchCarrierVisible = false
  3202. this.onclick(this.filterMap)
  3203. loading.close()
  3204. })
  3205. },
  3206. batchCarrier() {
  3207. if (this.batchCarrierList.length > 0) {
  3208. this.batchCarrierVisible = true
  3209. this.showBatchCapacity()
  3210. this.onchangeProvince()
  3211. this.onchangeCity()
  3212. this.addressId = this.steelMap.shipperAddressId
  3213. this.consigneeTel = this.steelMap.consigneeTel
  3214. } else {
  3215. this.$message({
  3216. type: 'warning',
  3217. message: '请选择要批量授权的订单',
  3218. offset: '250',
  3219. duration: '2500'
  3220. })
  3221. }
  3222. },
  3223. selectOne(selection, row) {
  3224. console.log('selection:', row)
  3225. this.rowClick(row)
  3226. },
  3227. handleSelectionChange() {
  3228. console.log(this.$refs.tableRef.selection, 'selection')
  3229. this.batchCarrierList = []
  3230. this.batchCarrierList = this.$refs.tableRef.selection.map(e => {
  3231. let map = {}
  3232. map.saleOrderMaterialId = e.saleOrderMaterialId
  3233. return map
  3234. })
  3235. console.log(this.scrollUpdateSelectFlag)
  3236. if (this.scrollUpdateSelectFlag == 0) {
  3237. let arr = []
  3238. arr = Array.from(
  3239. this.$refs.tableRef.selection.map(e => {
  3240. return e.saleOrderMaterialId
  3241. })
  3242. )
  3243. let [...arr2] = arr
  3244. this.toggleRowIds = arr2
  3245. this.$store.commit('updateSaleSteelToggleIds', {
  3246. saleSteelToggleIds: arr
  3247. })
  3248. }
  3249. },
  3250. receiveClick(src, title) {
  3251. // this.dialogImageUrl = src
  3252. downloadFile(src, `${this.downloadCapacityNo}${title}照片`, 'jpg')
  3253. // this.dialogVisible = true
  3254. },
  3255. openRemarkPic() {
  3256. //获取图片到本地
  3257. this.axios.post('/api/v1/uc/getPicture', this.steelMap).then(res => {
  3258. console.log(res)
  3259. if (res.data) {
  3260. let remarkPicList = []
  3261. res.data.forEach((e, index) => {
  3262. creatImageFile(e, 'file2-' + index).then(res => {
  3263. remarkPicList.push({
  3264. name: 'file' + index,
  3265. raw: res,
  3266. url: e
  3267. })
  3268. })
  3269. })
  3270. this.remarkPicList = remarkPicList
  3271. } else {
  3272. this.remarkPicList = []
  3273. }
  3274. this.remarkPic = true
  3275. })
  3276. },
  3277. uploadRemarkPic() {
  3278. if (this.remarkPicList.length <= 0) {
  3279. this.$message.error('请上传图片!')
  3280. return
  3281. }
  3282. //上传备注图片
  3283. let formData = new window.FormData()
  3284. this.remarkPicList.forEach((item, index) => {
  3285. formData.append('file' + index, item.raw)
  3286. })
  3287. let options = {
  3288. url: '/api/v1/uc/uploadPic',
  3289. data: formData,
  3290. method: 'post',
  3291. headers: {
  3292. 'Content-Type': 'multipart/form-data'
  3293. }
  3294. }
  3295. this.axios(options).then(res => {
  3296. console.log(res)
  3297. this.$message.success('暂存成功!')
  3298. this.remarkPic = false
  3299. this.steelMap.urls = res.data
  3300. this.closeUpload2()
  3301. })
  3302. },
  3303. closeUpload2() {
  3304. this.remarkPic = false
  3305. this.isLoading = false
  3306. this.$refs.remarkPic.clearFiles()
  3307. },
  3308. openReceive() {
  3309. this.fileListArrival = []
  3310. this.fileListReceive = []
  3311. if (Object.values(this.steelMap).length == 0) {
  3312. this.$message.warning('请选择需要补录的实绩')
  3313. return
  3314. }
  3315. let row = this.steelMap
  3316. if (row.arrivalAddress) {
  3317. //优先获取抵达地址
  3318. this.location = row.arrivalAddress
  3319. } else {
  3320. //其次获取车辆定位
  3321. this.axios
  3322. .get(
  3323. '/api/v1/otms/getCurrentLocation?capcityNumber=' + row.newCapacityNo
  3324. )
  3325. .then(res => {
  3326. if (
  3327. res.data.status == 'succeed' &&
  3328. res.data.data.result.status != 1001
  3329. ) {
  3330. this.location = res.data.data.result.adr
  3331. } else {
  3332. this.location = null
  3333. this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
  3334. }
  3335. })
  3336. }
  3337. this.orderNumber = row.orderNo
  3338. this.capacityNumber = row.capacityNo
  3339. this.arrivalTime = row.arrivalTime
  3340. this.receiptTime = row.receiptTime
  3341. this.arrivalReceiving = true
  3342. //抵达图片
  3343. this.axios
  3344. .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNo)
  3345. .then(res => {
  3346. console.log('arrivalPhoto:', res)
  3347. if (res.data) {
  3348. this.arriavlList = []
  3349. res.data.forEach((e, index) => {
  3350. creatImageFile(e, 'file1-' + index).then(res => {
  3351. this.arriavlList.push({
  3352. name: 'file' + index,
  3353. raw: res,
  3354. url: e
  3355. })
  3356. })
  3357. })
  3358. this.fileListArrival = this.arriavlList
  3359. }
  3360. })
  3361. //签收图片
  3362. this.axios
  3363. .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNo)
  3364. .then(res => {
  3365. if (res.data) {
  3366. this.receiveList = []
  3367. res.data.forEach((e, index) => {
  3368. creatImageFile(e, 'file2-' + index).then(res => {
  3369. this.receiveList.push({
  3370. name: 'file' + index,
  3371. raw: res,
  3372. url: e
  3373. })
  3374. })
  3375. })
  3376. this.fileListReceive = this.receiveList
  3377. }
  3378. })
  3379. },
  3380. arrivalAndReceive() {
  3381. console.log(this.fileListReceive, 'fileListReceive')
  3382. if (!this.location) {
  3383. this.$message.warning(
  3384. '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
  3385. )
  3386. return
  3387. }
  3388. if (this.fileListArrival.length < 3) {
  3389. this.$message.warning('抵达图至少三张')
  3390. return
  3391. }
  3392. if (this.fileListReceive.length < 2) {
  3393. this.$message.warning('签收图最少两张')
  3394. return
  3395. }
  3396. this.isLoading = true
  3397. //上传抵达
  3398. let formData = new window.FormData()
  3399. this.fileListArrival.forEach((item, index) => {
  3400. formData.append('file' + index, item.raw)
  3401. })
  3402. formData.append('orderNumber', this.orderNumber)
  3403. formData.append('resultArrivalAddress', this.location)
  3404. if (this.arrivalTime) {
  3405. formData.append('arrivalTime', sjTime(this.arrivalTime))
  3406. }
  3407. formData.append('userName', getCookie('loginName'))
  3408. let options = {
  3409. // 设置axios的参数
  3410. url: '/api/v1/otms/addtmstruckArrivalResult',
  3411. data: formData,
  3412. method: 'post',
  3413. headers: {
  3414. 'Content-Type': 'multipart/form-data'
  3415. }
  3416. }
  3417. this.axios(options).then(res => {
  3418. this.fileListArrival = []
  3419. console.log('arrivalRes:', res)
  3420. //上传签收
  3421. let formData = new window.FormData()
  3422. let request = ''
  3423. this.fileListReceive.forEach((item, index) => {
  3424. formData.append('file' + index, item.raw)
  3425. })
  3426. formData.append('orderNumber', this.orderNumber)
  3427. formData.append('resultArrivalAddress', this.location)
  3428. if (this.receiptTime) {
  3429. formData.append('receiptTime', sjTime(this.receiptTime))
  3430. }
  3431. formData.append('num', request.length)
  3432. let options = {
  3433. url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
  3434. data: formData,
  3435. method: 'post',
  3436. headers: {
  3437. 'Content-Type': 'multipart/form-data'
  3438. }
  3439. }
  3440. this.axios(options).then(res => {
  3441. console.log('receiveRes:', res)
  3442. this.$message.success('上传成功!')
  3443. this.steelMap.arrivalAddress = this.location
  3444. this.closeUpload()
  3445. this.refresh()
  3446. this.tableRowIndex = ''
  3447. this.fileListReceive = []
  3448. })
  3449. })
  3450. },
  3451. fileChange1(file, fileList) {
  3452. this.fileListArrival = fileList
  3453. },
  3454. fileChange2(file, fileList) {
  3455. this.fileListReceive = fileList
  3456. },
  3457. fileChange3(file, fileList) {
  3458. this.remarkPicList = fileList
  3459. },
  3460. exceed() {
  3461. this.$message.warning('超出上传数量!')
  3462. },
  3463. handlePictureCardPreview(file) {
  3464. this.dialogImageUrl = file.url
  3465. this.dialogVisible = true
  3466. },
  3467. closeUpload() {
  3468. this.location = null
  3469. this.arrivalTime = null
  3470. this.receiptTime = null
  3471. this.arrivalReceiving = false
  3472. this.isLoading = false
  3473. this.$refs.arrival.clearFiles()
  3474. this.$refs.receive.clearFiles()
  3475. },
  3476. //防抖函数--防止用户重复点击
  3477. debounce(func, delay) {
  3478. let timer = null
  3479. return function(...args) {
  3480. if (timer !== null) {
  3481. clearTimeout(timer)
  3482. }
  3483. timer = setTimeout(function() {
  3484. func.apply(this, args)
  3485. }, delay)
  3486. }
  3487. },
  3488. //筛选
  3489. filterChange(obj) {
  3490. //承运商筛选,后续有待优化
  3491. console.log(obj, 'filterChange obj', arguments)
  3492. if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
  3493. this.headColumnList.push('carrierName')
  3494. this.filterMap.carrierList = obj.carrierList
  3495. }
  3496. if (
  3497. typeof obj.carrierList != 'undefined' &&
  3498. obj.carrierList.length == 0
  3499. ) {
  3500. this.headColumnList.splice(
  3501. this.headColumnList.indexOf('carrierName'),
  3502. 1
  3503. )
  3504. delete this.filterMap.carrierList
  3505. }
  3506. //物资名称筛选,后续有待优化
  3507. if (
  3508. typeof obj.materialNameList != 'undefined' &&
  3509. obj.materialNameList.length > 0
  3510. ) {
  3511. this.headColumnList.push('materialName')
  3512. this.filterMap.materialNameList = obj.materialNameList
  3513. }
  3514. if (
  3515. typeof obj.materialNameList != 'undefined' &&
  3516. obj.materialNameList.length == 0
  3517. ) {
  3518. this.headColumnList.splice(
  3519. this.headColumnList.indexOf('materialName'),
  3520. 1
  3521. )
  3522. delete this.filterMap.materialNameList
  3523. }
  3524. //车牌号筛选,后续有待优化
  3525. if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
  3526. this.filterMap.capacityList = obj.capacityNo
  3527. this.headColumnList.push('capacityNo')
  3528. }
  3529. if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
  3530. this.headColumnList.splice(this.headColumnList.indexOf('capacityNo'), 1)
  3531. delete this.filterMap.capacityList
  3532. }
  3533. //客户筛选,后续有待优化
  3534. if (
  3535. typeof obj.consigneeName != 'undefined' &&
  3536. obj.consigneeName.length > 0
  3537. ) {
  3538. this.headColumnList.push('consigneeName')
  3539. this.filterMap.consigneeNameList = obj.consigneeName
  3540. }
  3541. if (
  3542. typeof obj.consigneeName != 'undefined' &&
  3543. obj.consigneeName.length == 0
  3544. ) {
  3545. this.headColumnList.splice(
  3546. this.headColumnList.indexOf('consigneeName'),
  3547. 1
  3548. )
  3549. delete this.filterMap.consigneeNameList
  3550. }
  3551. //销售片区筛选,后续有待优化
  3552. if (
  3553. typeof obj.saleAreaList != 'undefined' &&
  3554. obj.saleAreaList.length > 0
  3555. ) {
  3556. this.filterMap.saleAreaList = obj.saleAreaList
  3557. }
  3558. if (
  3559. typeof obj.saleAreaList != 'undefined' &&
  3560. obj.saleAreaList.length == 0
  3561. ) {
  3562. delete this.filterMap.saleAreaList
  3563. }
  3564. //物资规格筛选
  3565. if (typeof obj.materialSpe != 'undefined' && obj.materialSpe.length > 0) {
  3566. this.headColumnList.push('materialSpe')
  3567. this.filterMap.materialSpeList = obj.materialSpe
  3568. }
  3569. if (
  3570. typeof obj.materialSpe != 'undefined' &&
  3571. obj.materialSpe.length == 0
  3572. ) {
  3573. this.headColumnList.splice(
  3574. this.headColumnList.indexOf('materialSpe'),
  3575. 1
  3576. )
  3577. delete this.filterMap.materialSpeList
  3578. }
  3579. //收货地址筛选
  3580. if (
  3581. typeof obj.addressPlace != 'undefined' &&
  3582. obj.addressPlace.length > 0
  3583. ) {
  3584. this.headColumnList.push('addressPlace')
  3585. this.filterMap.addressPlaceList = obj.addressPlace
  3586. }
  3587. if (
  3588. typeof obj.addressPlace != 'undefined' &&
  3589. obj.addressPlace.length == 0
  3590. ) {
  3591. this.headColumnList.splice(
  3592. this.headColumnList.indexOf('addressPlace'),
  3593. 1
  3594. )
  3595. delete this.filterMap.addressPlaceList
  3596. }
  3597. if (typeof obj.orderStatus != 'undefined' && obj.orderStatus.length > 0) {
  3598. this.headColumnList.push('orderStatus')
  3599. // this.reset()
  3600. this.filterMap.orderStatusList = obj.orderStatus
  3601. }
  3602. if (
  3603. typeof obj.orderStatus != 'undefined' &&
  3604. obj.orderStatus.length == 0
  3605. ) {
  3606. this.headColumnList.splice(
  3607. this.headColumnList.indexOf('orderStatus'),
  3608. 1
  3609. )
  3610. delete this.filterMap.orderStatusList
  3611. }
  3612. if (
  3613. typeof obj.saleOrderStatus != 'undefined' &&
  3614. obj.saleOrderStatus.length > 0
  3615. ) {
  3616. this.headColumnList.push('saleOrderStatus')
  3617. this.filterMap.saleOrderStatusList = obj.saleOrderStatus
  3618. }
  3619. if (
  3620. typeof obj.saleOrderStatus != 'undefined' &&
  3621. obj.saleOrderStatus.length == 0
  3622. ) {
  3623. this.headColumnList.splice(
  3624. this.headColumnList.indexOf('saleOrderStatus'),
  3625. 1
  3626. )
  3627. delete this.filterMap.saleOrderStatusList
  3628. }
  3629. if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length > 0) {
  3630. this.headColumnList.push('saleRemark')
  3631. this.filterMap.saleRemarkList = obj.saleRemark
  3632. }
  3633. if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length == 0) {
  3634. this.headColumnList.splice(this.headColumnList.indexOf('saleRemark'), 1)
  3635. delete this.filterMap.saleRemarkList
  3636. }
  3637. if (typeof obj.truckRemark != 'undefined' && obj.truckRemark.length > 0) {
  3638. this.headColumnList.push('truckRemark')
  3639. this.filterMap.truckRemarkList = obj.truckRemark
  3640. }
  3641. if (
  3642. typeof obj.truckRemark != 'undefined' &&
  3643. obj.truckRemark.length == 0
  3644. ) {
  3645. this.headColumnList.splice(
  3646. this.headColumnList.indexOf('truckRemark'),
  3647. 1
  3648. )
  3649. delete this.filterMap.truckRemarkList
  3650. }
  3651. if (typeof obj.isContinue != 'undefined' && obj.isContinue.length > 0) {
  3652. this.headColumnList.push('isContinue')
  3653. this.filterMap.isContinueList = obj.isContinue
  3654. }
  3655. if (typeof obj.isContinue != 'undefined' && obj.isContinue.length == 0) {
  3656. this.headColumnList.splice(this.headColumnList.indexOf('isContinue'), 1)
  3657. delete this.filterMap.isContinueList
  3658. }
  3659. if (typeof obj.spellNum != 'undefined' && obj.spellNum.length > 0) {
  3660. this.headColumnList.push('spellNum')
  3661. this.filterMap.spellNumList = obj.spellNum
  3662. }
  3663. if (typeof obj.spellNum != 'undefined' && obj.spellNum.length == 0) {
  3664. this.headColumnList.splice(this.headColumnList.indexOf('spellNum'), 1)
  3665. delete this.filterMap.spellNumList
  3666. }
  3667. if (typeof obj.flStatus != 'undefined' && obj.flStatus.length > 0) {
  3668. this.headColumnList.push('flStatus')
  3669. this.filterMap.flStatusList = obj.flStatus
  3670. }
  3671. if (typeof obj.flStatus != 'undefined' && obj.flStatus.length == 0) {
  3672. this.headColumnList.splice(this.headColumnList.indexOf('flStatus'), 1)
  3673. delete this.filterMap.flStatusList
  3674. }
  3675. if (
  3676. typeof obj.orderStatusActually != 'undefined' &&
  3677. obj.orderStatusActually.length > 0
  3678. ) {
  3679. this.headColumnList.push('orderStatusActually')
  3680. this.filterMap.orderStatusActuallyList = obj.orderStatusActually
  3681. }
  3682. if (
  3683. typeof obj.orderStatusActually != 'undefined' &&
  3684. obj.orderStatusActually.length == 0
  3685. ) {
  3686. this.headColumnList.splice(
  3687. this.headColumnList.indexOf('orderStatusActually'),
  3688. 1
  3689. )
  3690. delete this.filterMap.orderStatusActuallyList
  3691. }
  3692. if (
  3693. typeof obj.inventoryWarehouse != 'undefined' &&
  3694. obj.inventoryWarehouse.length > 0
  3695. ) {
  3696. this.headColumnList.push('inventoryWarehouse')
  3697. this.filterMap.inventoryWarehouseList = obj.inventoryWarehouse
  3698. }
  3699. if (
  3700. typeof obj.inventoryWarehouse != 'undefined' &&
  3701. obj.inventoryWarehouse.length == 0
  3702. ) {
  3703. this.headColumnList.splice(
  3704. this.headColumnList.indexOf('inventoryWarehouse'),
  3705. 1
  3706. )
  3707. delete this.filterMap.inventoryWarehouseList
  3708. }
  3709. //出库状态筛选
  3710. if (
  3711. typeof obj.outboundStatus != 'undefined' &&
  3712. obj.outboundStatus.length > 0
  3713. ) {
  3714. this.headColumnList.push('outboundStatus')
  3715. this.filterMap.outboundStatusList = obj.outboundStatus
  3716. }
  3717. if (
  3718. typeof obj.outboundStatus != 'undefined' &&
  3719. obj.outboundStatus.length == 0
  3720. ) {
  3721. this.headColumnList.splice(
  3722. this.headColumnList.indexOf('outboundStatus'),
  3723. 1
  3724. )
  3725. delete this.filterMap.outboundStatusList
  3726. }
  3727. // if (obj)
  3728. this.onclick(this.filterMap)
  3729. },
  3730. //控制筛选数组变化
  3731. // filterListChange() {
  3732. // //客户筛选数组
  3733. // // let consigneeNameList = this.tableData
  3734. // // .map(e => {
  3735. // // return e.consigneeName
  3736. // // })
  3737. // // .sort()
  3738. // //承运商筛选数组
  3739. // // let carrierNameList = this.tableData
  3740. // // .map(e => {
  3741. // // return e.carrierName
  3742. // // })
  3743. // // .sort()
  3744. // //车牌号筛选数组
  3745. // // let capacityList = this.tableData
  3746. // // .map(e => {
  3747. // // return e.newCapacityNo
  3748. // // })
  3749. // // .sort()
  3750. // //物资筛选数组
  3751. // // let materialNameList = this.tableData
  3752. // // .map(e => {
  3753. // // return e.materialName
  3754. // // })
  3755. // // .filter(e => {
  3756. // // return e != null
  3757. // // })
  3758. // // .sort()
  3759. // //销售片区筛选数组
  3760. // let saleAreaList = this.tableData
  3761. // .map(e => {
  3762. // return e.areaName
  3763. // })
  3764. // .filter(e => {
  3765. // return e != null
  3766. // })
  3767. // let addressPlaceList = this.tableData
  3768. // .map(e => {
  3769. // return e.addressPlace
  3770. // })
  3771. // .filter(e => {
  3772. // return e != null
  3773. // })
  3774. // .sort()
  3775. // let orderStatusList = this.tableData
  3776. // .map(e => {
  3777. // return e.orderStatus
  3778. // })
  3779. // .filter(e => {
  3780. // return e != null
  3781. // })
  3782. // let materialSpeList = this.tableData
  3783. // .map(e => {
  3784. // return e.materialSpe
  3785. // })
  3786. // .filter(e => {
  3787. // return e != null
  3788. // })
  3789. // .sort()
  3790. // let saleOrderStatusList = this.tableData.map(e => {
  3791. // return e.saleOrderStatus
  3792. // })
  3793. // let saleRemarkList = this.tableData
  3794. // .map(e => {
  3795. // return e.saleRemark
  3796. // })
  3797. // .sort()
  3798. // // this.filterConsigneeList = []
  3799. // // this.filterCarrierList = []
  3800. // // this.filterCapacityList = []
  3801. // // this.filtermaterialNameList = []
  3802. // this.filterSaleAreaList = []
  3803. // this.filterorderStatus = []
  3804. // this.filteraddressPlace = []
  3805. // this.filtermaterialSpe = []
  3806. // this.filterSaleOrderStatus = []
  3807. // this.filterSaleRemark = []
  3808. // // Array.from(new Set(consigneeNameList)).forEach(e => {
  3809. // // let map = {}
  3810. // // map.text = e
  3811. // // map.value = e
  3812. // // this.filterConsigneeList.push(map)
  3813. // // })
  3814. // Array.from(new Set(carrierNameList)).forEach(e => {
  3815. // let map = {}
  3816. // map.text = e
  3817. // map.value = e
  3818. // this.filterCarrierList.push(map)
  3819. // })
  3820. // Array.from(new Set(capacityList)).forEach(e => {
  3821. // let map = {}
  3822. // map.text = e
  3823. // map.value = e
  3824. // this.filterCapacityList.push(map)
  3825. // })
  3826. // Array.from(new Set(materialNameList)).forEach(e => {
  3827. // let map = {}
  3828. // map.text = e
  3829. // map.value = e
  3830. // this.filtermaterialNameList.push(map)
  3831. // })
  3832. // Array.from(new Set(saleAreaList)).forEach(e => {
  3833. // let map = {}
  3834. // map.text = e
  3835. // map.value = e
  3836. // this.filterSaleAreaList.push(map)
  3837. // })
  3838. // Array.from(new Set(addressPlaceList)).forEach(e => {
  3839. // let map = {}
  3840. // map.text = e
  3841. // map.value = e
  3842. // this.filteraddressPlace.push(map)
  3843. // })
  3844. // Array.from(new Set(orderStatusList)).forEach(e => {
  3845. // let map = {}
  3846. // map.text = e
  3847. // map.value = e
  3848. // this.filterorderStatus.push(map)
  3849. // })
  3850. // Array.from(new Set(materialSpeList)).forEach(e => {
  3851. // let map = {}
  3852. // map.text = e
  3853. // map.value = e
  3854. // this.filtermaterialSpe.push(map)
  3855. // })
  3856. // Array.from(new Set(saleOrderStatusList)).forEach(e => {
  3857. // let map = {}
  3858. // map.text = e
  3859. // map.value = e
  3860. // this.filterSaleOrderStatus.push(map)
  3861. // })
  3862. // Array.from(new Set(saleRemarkList)).forEach(e => {
  3863. // let map = {}
  3864. // map.text = e
  3865. // map.value = e
  3866. // this.filterSaleRemark.push(map)
  3867. // })
  3868. // },
  3869. cellStyle({ row, column, rowIndex, columnIndex }) {
  3870. if (
  3871. column.property == 'arrivalAddress' ||
  3872. column.property == 'receiptAddress'
  3873. ) {
  3874. return { color: 'blue', height: '30px' }
  3875. } else {
  3876. return { height: '30px' }
  3877. }
  3878. },
  3879. rowClick(row, column, event) {
  3880. this.steelMap = {}
  3881. this.tableRowIndex = row.group
  3882. this.isRowClick = 1
  3883. this.steelMap = row
  3884. },
  3885. tableRowClassName({ row, rowIndex }) {
  3886. if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
  3887. return 'warning-row'
  3888. }
  3889. },
  3890. cellMouse(row, column, cell, event) {
  3891. if (this.isRowClick == 0) {
  3892. this.tableRowIndex = row.group
  3893. }
  3894. },
  3895. cellLeave(row, column, cell, event) {
  3896. if (this.isRowClick == 0) {
  3897. this.tableRowIndex = ''
  3898. }
  3899. },
  3900. reset() {
  3901. var that = this
  3902. that.$nextTick(() => {
  3903. that.saleSteelKey = !that.saleSteelKey
  3904. })
  3905. },
  3906. checkTrans(row) {
  3907. this.isRowClick = 0
  3908. if (Object.values(this.steelMap).length == 0) {
  3909. this.$message.error('请点击需要查看轨迹的行!')
  3910. return
  3911. }
  3912. if (typeof row === 'undefined') {
  3913. row = this.steelMap
  3914. }
  3915. console.log(row)
  3916. if (row.saleMakeDate == null) {
  3917. this.$message.error('该车还未出库,暂无轨迹')
  3918. return
  3919. }
  3920. let that = this
  3921. that.axios
  3922. .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNo)
  3923. .then(res => {
  3924. console.log(res.data)
  3925. if (res.data.data == '-1') {
  3926. this.$message.error('运输订单未关闭的自提车辆无权查看!')
  3927. } else if (res.data.data.startAndEndRoutes != null) {
  3928. that.pathOption.orderNumber = row.orderNo
  3929. that.pathOption.capacityNumber = row.capacityNo
  3930. that.pathOption.startPointName = '达钢集团小东门'
  3931. that.pathOption.endPointName = row.receiptAddress
  3932. that.value7 = true
  3933. if (row.orderStatus == '已完成') {
  3934. that.pathOption.statusCode = '位置'
  3935. } else {
  3936. that.pathOption.statusCode = '当前位置'
  3937. }
  3938. } else {
  3939. this.$message.error('车辆没有开启GPS')
  3940. }
  3941. })
  3942. },
  3943. cellClik(row, column, cell, event) {
  3944. if (column.property == 'arrivalAddress') {
  3945. if (row.orderNo && row.arrivalAddress) {
  3946. this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
  3947. this.toPhotoClick(row.orderNo, 1)
  3948. }
  3949. }
  3950. if (column.property == 'receiptAddress') {
  3951. if (row.orderNo && row.receiptAddress) {
  3952. this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
  3953. this.receipctPhotoClick(row.orderNo, 1)
  3954. }
  3955. }
  3956. },
  3957. //反关闭运单
  3958. reverseCloseOrder() {
  3959. this.steelMap.oYeFlag = 1
  3960. this.axios
  3961. .post('/api/v1/ams/reverseCloseOrder', this.steelMap)
  3962. .then(res => {
  3963. this.operation(this.steelMap)
  3964. this.onclick(this.filterMap)
  3965. })
  3966. },
  3967. //筛选
  3968. //筛选客户
  3969. //点击操作弹出框
  3970. operation(row) {
  3971. // this.isRowClick = 0
  3972. this.isCheckGPS = true
  3973. if (Object.values(this.steelMap).length == 0) {
  3974. this.$message.error('请点击需要执行更改操作的行!')
  3975. return
  3976. }
  3977. if (typeof row === 'undefined') {
  3978. row = this.steelMap
  3979. }
  3980. this.axios
  3981. .post(
  3982. '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
  3983. row.saleOrderMaterialId
  3984. )
  3985. .then(res => {
  3986. this.steelMap = res.data.data
  3987. this.steelMap.userName = getCookie('loginName')
  3988. this.addressId = row.shipperAddressId
  3989. this.getAllProvince()
  3990. this.onchangeProvince()
  3991. this.onchangeCity()
  3992. this.centerDialogVisible = true
  3993. this.getSpanArr1(res.data.data.mapList)
  3994. })
  3995. },
  3996. //查看抵达图
  3997. toPhotoClick(orderNo, num) {
  3998. this.axios
  3999. .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + orderNo)
  4000. .then(res => {
  4001. this.srcList = []
  4002. this.previewSrcList = res.data
  4003. console.log(res.data, 'sd')
  4004. res.data.forEach(e => {
  4005. this.srcList.push({
  4006. title: '',
  4007. src: e
  4008. })
  4009. })
  4010. // this.srcList.push({
  4011. // title: '车头照片',
  4012. // src: res.data[0]
  4013. // })
  4014. // this.srcList.push({
  4015. // title: '满货箱照片',
  4016. // src: res.data[1]
  4017. // })
  4018. if (num == 1) {
  4019. this.isShow3 = true
  4020. } else {
  4021. this.isShow = true
  4022. }
  4023. })
  4024. },
  4025. //查看实时路径
  4026. checkPoint() {
  4027. if (this.input || this.input1 || this.steelMap.capacityNo) {
  4028. this.carNumber = this.input || this.input1 || this.steelMap.capacityNo
  4029. this.value8 = true
  4030. } else {
  4031. this.$message.error('请输入或者点击有车牌号的行查询车牌号的实时路径')
  4032. }
  4033. },
  4034. //查看签收图
  4035. receipctPhotoClick(orderNo, num) {
  4036. this.axios
  4037. .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + orderNo)
  4038. .then(res => {
  4039. console.log(res.data)
  4040. if (num == 1) {
  4041. this.isShow4 = true
  4042. } else {
  4043. this.isShow2 = true
  4044. }
  4045. this.srcList2 = []
  4046. this.previewSrcList2 = res.data
  4047. if (res.data && res.data.length > 0) {
  4048. res.data.forEach(item => {
  4049. this.srcList2.push({
  4050. title: '',
  4051. src: item
  4052. })
  4053. })
  4054. }
  4055. })
  4056. },
  4057. //销售钢材报表导出excel
  4058. exportAllReportToExcel() {
  4059. const loading = this.$loading({
  4060. lock: true,
  4061. text: '正在导出Excel',
  4062. spinner: 'el-icon-loading',
  4063. background: 'rgba(0, 0, 0, 0.7)'
  4064. })
  4065. var title = this.tableTitle
  4066. let tHeader = []
  4067. let filterVal = []
  4068. if (
  4069. getCookie('orgCode') == 'shouhuokehu' ||
  4070. getCookie('orgCode') == 'xiaoshouyewuyuan'
  4071. ) {
  4072. tHeader = []
  4073. filterVal = []
  4074. let tHeader1 = this.salerExportExcelList.filter(e => {
  4075. if (this.columnNoRoutList.indexOf(e) == -1) {
  4076. return e
  4077. }
  4078. })
  4079. console.log(tHeader1)
  4080. let arr = this.$refs.tableRef.$children
  4081. for (var i = 0; i < tHeader1.length; i++) {
  4082. for (var j = 0; j < arr.length; j++) {
  4083. if (arr[j].label === tHeader1[i]) {
  4084. if (tHeader.indexOf(arr[j].label) === -1) {
  4085. tHeader.push(arr[j].label)
  4086. }
  4087. if (filterVal.indexOf(arr[j].prop) === -1) {
  4088. filterVal.push(arr[j].prop)
  4089. }
  4090. }
  4091. }
  4092. }
  4093. } else {
  4094. this.$refs.tableRef.$children.forEach(item => {
  4095. if (item.label != undefined && item.prop != undefined) {
  4096. if (tHeader.indexOf(item.label) === -1) {
  4097. tHeader.push(item.label)
  4098. }
  4099. if (filterVal.indexOf(item.prop) === -1) {
  4100. filterVal.push(item.prop)
  4101. }
  4102. }
  4103. })
  4104. }
  4105. this.downloadLoading = true
  4106. tHeader.unshift('车序号')
  4107. filterVal.unshift('saleOrderMaterialId')
  4108. require.ensure([], () => {
  4109. const {
  4110. export_json_to_excel
  4111. } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
  4112. let data = this.disposeDataToExcel(this.tableData).map(v =>
  4113. filterVal.map(j => v[j])
  4114. ) //3.formatJson格式转换
  4115. export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
  4116. })
  4117. loading.close()
  4118. },
  4119. disposeDataToExcel(data) {
  4120. //如果批次相同,只允许一条磅重和运费置为0
  4121. //首先找出批次相同的数组元素
  4122. data.reduce((prev, item) => {
  4123. if (item.weightBatchId) {
  4124. //如果有批次则走这个方法
  4125. if (prev.length > 0) {
  4126. let hash = prev[prev.length - 1]
  4127. //如果处理后的数组长度大于0,那么判断处理后的数组的最后一个元素里面的批次是否与当前批次相等,如果相等
  4128. if (
  4129. item.weightBatchId &&
  4130. hash.weightBatchId &&
  4131. item.weightBatchId == hash.weightBatchId
  4132. ) {
  4133. prev[prev.length - 1].netWeight = 0
  4134. prev[prev.length - 1].detailsAmount = 0
  4135. }
  4136. }
  4137. prev.push(item)
  4138. return prev
  4139. } else {
  4140. prev.push(item)
  4141. return prev
  4142. }
  4143. }, [])
  4144. return data
  4145. },
  4146. changeScreen() {},
  4147. //承运商弹出层
  4148. handleSelectCarrier() {
  4149. this.carrierList.forEach(item => {
  4150. if (item.carrierName == this.steelMap.carrierName) {
  4151. this.steelMap.newCarrierId = item.carrierId
  4152. this.steelMap.carrierId = item.carrierId
  4153. }
  4154. })
  4155. },
  4156. //承运商边输边查
  4157. querySearchCarrier(queryString, cb) {
  4158. if (queryString != null && queryString != '' && queryString.length > 1) {
  4159. this.axios
  4160. .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
  4161. .then(res => {
  4162. if (res.data.code == '200') {
  4163. this.carrierList = []
  4164. if (res.data.data.length == 0) {
  4165. this.$message.info('承运商不存在,请前往注册')
  4166. return
  4167. }
  4168. var restaurants = res.data.data
  4169. this.carrierList = res.data.data
  4170. var results = queryString
  4171. ? restaurants.filter(this.createFilterCarrier(queryString))
  4172. : restaurants
  4173. cb(results)
  4174. }
  4175. })
  4176. }
  4177. },
  4178. createFilterCarrier(queryString) {
  4179. return restaurants => {
  4180. return (
  4181. restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
  4182. -1
  4183. )
  4184. }
  4185. },
  4186. //以下是车牌号边输边查搜索
  4187. querySearch(queryString, cb) {
  4188. console.log(queryString)
  4189. if (
  4190. (queryString != null && queryString != '' && queryString.length > 3) ||
  4191. queryString == '取消' ||
  4192. queryString == '待定' ||
  4193. queryString == '空白'
  4194. ) {
  4195. this.axios
  4196. .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
  4197. .then(res => {
  4198. this.capacityList = []
  4199. if (res.data.code == '200') {
  4200. if (res.data.data.length == 0) {
  4201. this.$message.info('车牌号不存在,请前往注册')
  4202. return
  4203. }
  4204. var restaurants = res.data.data
  4205. this.capacityList = res.data.data
  4206. var results = queryString
  4207. ? restaurants.filter(this.createFilter(queryString))
  4208. : restaurants
  4209. // 调用 callback 返回建议列表的数据
  4210. cb(results)
  4211. }
  4212. })
  4213. }
  4214. },
  4215. createFilter(queryString) {
  4216. return restaurants => {
  4217. return (
  4218. restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
  4219. -1
  4220. )
  4221. }
  4222. },
  4223. //车牌号弹出层
  4224. handleSelect() {
  4225. this.capacityList.forEach(item => {
  4226. if (item.capacityNumber === this.steelMap.capacityNo) {
  4227. this.steelMap.newsCapacityId = item.capacityId
  4228. }
  4229. })
  4230. },
  4231. updateCapacity() {
  4232. console.log('我只想测')
  4233. this.steelMap.capacityId = this.steelMap.newsCapacityId
  4234. this.steelMap.driverTel = this.steelMap.capacityTel
  4235. this.steelMap.userId = getCookie('userId')
  4236. if (this.steelMap.newsCapacityId == null) {
  4237. this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
  4238. return
  4239. }
  4240. if (
  4241. !(
  4242. isVehicleNumber(this.steelMap.capacityNo) ||
  4243. this.steelMap.capacityNo == '取消' ||
  4244. this.steelMap.capacityNo == '待定' ||
  4245. this.steelMap.capacityNo == '空白'
  4246. )
  4247. ) {
  4248. this.$message.error('请输入正确格式的车牌号!')
  4249. return
  4250. }
  4251. //是否校验GPS
  4252. this.steelMap.isCheckGPS = this.isCheckGPS
  4253. if (this.steelMap.capacityIds != 0) {
  4254. const loading = this.$loading({
  4255. lock: true,
  4256. text: '正在变更车牌号',
  4257. spinner: 'el-icon-loading',
  4258. background: 'rgba(0, 0, 0, 0.7)'
  4259. })
  4260. this.steelMap.oYeFlag = 1
  4261. this.axios
  4262. .post('/api/v1/ams/updateCapacityNumberInFactory', this.steelMap)
  4263. .then(res => {
  4264. if (res.data.code == 200) {
  4265. this.$message({
  4266. type: 'success',
  4267. message: '变更车号成功,请通知驾驶员',
  4268. duration: 2500,
  4269. offset: '250'
  4270. })
  4271. this.operation(this.steelMap)
  4272. this.onclick(this.filterMap)
  4273. loading.close()
  4274. } else {
  4275. this.$alert(res.data.data, '提示', {
  4276. confirmButtonText: '确定',
  4277. center: true,
  4278. type: 'warning',
  4279. callback: action => {
  4280. this.onclick(this.filterMap)
  4281. this.operation(this.steelMap)
  4282. }
  4283. })
  4284. loading.close()
  4285. }
  4286. })
  4287. .catch(() => {
  4288. this.$message.success('变更失败,请联系管理员')
  4289. loading.close()
  4290. })
  4291. } else {
  4292. if (this.steelMap.carrierIds == 0) {
  4293. this.$message.error('请先选择承运商!')
  4294. return
  4295. }
  4296. this.steelMap.lineId = this.lineSpelling[this.steelMap.mapList.length]
  4297. this.steelMap.driverTel = this.steelMap.capacityTel
  4298. this.steelMap.capacityNumber = this.steelMap.capacityNo
  4299. this.steelMap.oYeFlag = 1
  4300. let arr = []
  4301. arr.push(this.steelMap)
  4302. const loading = this.$loading({
  4303. lock: true,
  4304. text: '正在派车,请稍候',
  4305. spinner: 'el-icon-loading',
  4306. background: 'rgba(0, 0, 0, 0.7)'
  4307. })
  4308. this.axios
  4309. .post('/api/v1/ams/dispatchSteelOrder', arr)
  4310. .then(res => {
  4311. if (res.data.code == '200') {
  4312. this.$message.success('派车成功!')
  4313. this.operation(this.steelMap)
  4314. this.axios
  4315. .post(
  4316. '/api/v1/ams/matchingDriverTelRecently?capacityNumber=' +
  4317. this.steelMap.capacityNo
  4318. )
  4319. .then(res => {
  4320. // if (res.data.data != null) {
  4321. // this.steelMap.capacityTel = res.data.data
  4322. // this.updateDriverTel()
  4323. // }
  4324. })
  4325. this.onclick(this.filterMap)
  4326. loading.close()
  4327. } else {
  4328. loading.close()
  4329. this.$alert(res.data.data, '提示', {
  4330. confirmButtonText: '确定',
  4331. center: true,
  4332. callback: action => {
  4333. this.onclick(this.filterMap)
  4334. this.operation(this.steelMap)
  4335. }
  4336. })
  4337. }
  4338. })
  4339. .catch(() => {
  4340. this.$message.error(res.data.data)
  4341. this.operation(this.steelMap)
  4342. this.onclick(this.filterMap)
  4343. loading.close()
  4344. })
  4345. }
  4346. },
  4347. //修改司机电话号码
  4348. updateDriverTel() {
  4349. const loading = this.$loading({
  4350. lock: true,
  4351. text: '修改电话号码中',
  4352. spinner: 'el-icon-loading',
  4353. background: 'rgba(0, 0, 0, 0.7)'
  4354. })
  4355. if (
  4356. this.steelMap.capacityTel == null ||
  4357. this.steelMap.capacityTel == ''
  4358. ) {
  4359. this.$message.error('电话号码不能为空')
  4360. loading.close()
  4361. return
  4362. }
  4363. var regex = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/
  4364. if (!regex.test(this.steelMap.capacityTel)) {
  4365. this.$message.error('电话号码不符合规则')
  4366. loading.close()
  4367. return
  4368. }
  4369. this.axios
  4370. .post('/api/v1/uc/updateDriverTel', {
  4371. orderId: parseInt(this.steelMap.orderId),
  4372. saleOrderMaterialId: parseInt(this.steelMap.saleOrderMaterialId),
  4373. driverTel: this.steelMap.capacityTel,
  4374. oYeFlag: 1
  4375. })
  4376. .then(res => {
  4377. if (res.data.code == '200') {
  4378. this.$message({
  4379. type: 'success',
  4380. duration: 2000,
  4381. message: '修改电话号码成功',
  4382. offset: 250
  4383. })
  4384. this.operation(this.steelMap)
  4385. this.onclick(this.filterMap)
  4386. loading.close()
  4387. } else {
  4388. this.$message.error('修改失败')
  4389. this.operation(this.steelMap)
  4390. this.onclick(this.filterMap)
  4391. loading.close()
  4392. }
  4393. })
  4394. .catch(() => {
  4395. this.$message.error('修改失败')
  4396. this.operation(this.steelMap)
  4397. this.onclick(this.filterMap)
  4398. loading.close()
  4399. })
  4400. },
  4401. //修改收货客户电话
  4402. updateconsigneeTel() {
  4403. const loading = this.$loading({
  4404. lock: true,
  4405. text: '修改电话号码中',
  4406. spinner: 'el-icon-loading',
  4407. background: 'rgba(0, 0, 0, 0.7)'
  4408. })
  4409. if (
  4410. this.steelMap.consigneeTel == null ||
  4411. this.steelMap.consigneeTel == ''
  4412. ) {
  4413. this.$message.error('电话号码不能为空')
  4414. return
  4415. }
  4416. this.axios
  4417. .post('/api/v1/ams/updateConsigneeTel', {
  4418. saleOrderNo: this.steelMap.saleOrderNo,
  4419. saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
  4420. consigneeTel: this.steelMap.consigneeTel
  4421. })
  4422. .then(res => {
  4423. if (res.data.code == '200') {
  4424. this.$message.success('修改成功')
  4425. this.operation(this.steelMap)
  4426. this.onclick(this.filterMap)
  4427. loading.close()
  4428. } else {
  4429. this.$message.error('修改失败')
  4430. this.operation(this.steelMap)
  4431. this.onclick(this.filterMap)
  4432. loading.close()
  4433. }
  4434. })
  4435. .catch(() => {
  4436. this.$message.error('修改失败')
  4437. this.operation(this.steelMap)
  4438. this.onclick(this.filterMap)
  4439. loading.close()
  4440. })
  4441. },
  4442. //批量修改收货客户电话
  4443. batchUpdateconsigneeTel() {
  4444. const loading = this.$loading({
  4445. lock: true,
  4446. text: '修改电话号码中',
  4447. spinner: 'el-icon-loading',
  4448. background: 'rgba(0, 0, 0, 0.7)'
  4449. })
  4450. if (!this.consigneeTel) {
  4451. this.$message.error('电话号码不能为空')
  4452. loading.close()
  4453. return
  4454. }
  4455. this.batchCapacityList.forEach(row => {
  4456. this.axios
  4457. .post('/api/v1/ams/updateConsigneeTel', {
  4458. saleOrderNo: row.saleOrderNo,
  4459. saleOrderMaterialId: row.saleOrderMaterialId,
  4460. consigneeTel: this.consigneeTel,
  4461. oYeFlag: 1
  4462. })
  4463. .then(res => {
  4464. if (res.data.code == '200') {
  4465. this.$message.success('修改成功')
  4466. } else {
  4467. this.$message.error('修改失败')
  4468. }
  4469. })
  4470. .catch(() => {
  4471. this.$message.error('修改失败')
  4472. })
  4473. })
  4474. this.onclick(this.filterMap)
  4475. loading.close()
  4476. this.batchCarrierVisible = false
  4477. },
  4478. //修改承运商授权
  4479. updateTruckCarrier() {
  4480. if (this.steelMap.newCarrierId == null) {
  4481. this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
  4482. this.onclick(this.filterMap)
  4483. return
  4484. }
  4485. if (this.steelMap.carrierIds != 0) {
  4486. const loading = this.$loading({
  4487. lock: true,
  4488. text: '正在修改承运商授权',
  4489. spinner: 'el-icon-loading',
  4490. background: 'rgba(0, 0, 0, 0.7)'
  4491. })
  4492. this.steelMap.oYeFlag = 1
  4493. this.axios
  4494. .post('/api/v1/ams/updateTruckNoCarrier', this.steelMap)
  4495. .then(res => {
  4496. if (res.data.code == '200') {
  4497. this.$message.success('修改承运商授权成功')
  4498. this.operation(this.steelMap)
  4499. this.onclick(this.filterMap)
  4500. loading.close()
  4501. } else {
  4502. this.$message.error('修改失败,请联系管理员!')
  4503. this.operation(this.steelMap)
  4504. this.onclick(this.filterMap)
  4505. loading.close()
  4506. }
  4507. })
  4508. .catch(() => {
  4509. this.$message.error('修改失败,请联系管理员!')
  4510. this.operation(this.steelMap)
  4511. this.onclick(this.filterMap)
  4512. loading.close()
  4513. })
  4514. } else {
  4515. //授权承运商
  4516. let arr = []
  4517. this.steelMap.oYeFlag = 1
  4518. arr.push(this.steelMap)
  4519. const loading = this.$loading({
  4520. lock: true,
  4521. text: '正在授权承运商',
  4522. spinner: 'el-icon-loading',
  4523. background: 'rgba(0, 0, 0, 0.7)'
  4524. })
  4525. this.axios
  4526. .post('/api/v1/ams/dispatchToCarrier', arr)
  4527. .then(res => {
  4528. if (res.data.code == '0') {
  4529. this.$message.success('授权承运商成功')
  4530. this.operation(this.steelMap)
  4531. this.onclick(this.filterMap)
  4532. loading.close()
  4533. } else {
  4534. this.$message.error('授权失败,请联系管理员')
  4535. this.operation(this.steelMap)
  4536. this.onclick(this.filterMap)
  4537. loading.close()
  4538. }
  4539. })
  4540. .catch(() => {
  4541. this.$message.error('授权失败,请联系管理员')
  4542. this.operation(this.steelMap)
  4543. this.onclick(this.filterMap)
  4544. loading.close()
  4545. })
  4546. }
  4547. },
  4548. updateAddress(row) {
  4549. this.drawer = true
  4550. this.addressRow = row
  4551. this.province = row.addressProvince
  4552. this.city = row.addressDistrict
  4553. this.county = row.addressTown
  4554. this.addressId = row.shipperAddressId
  4555. this.getAllProvince()
  4556. this.onchangeProvince()
  4557. this.onchangeCity()
  4558. },
  4559. //获取所有省数据
  4560. getAllProvince() {
  4561. // this.provinceList = []
  4562. // return
  4563. this.axios
  4564. .post('/api/v1/uc/getAllProvince')
  4565. .then(res => {
  4566. // console.log(res.data.data)
  4567. this.provinceList = res.data.data
  4568. })
  4569. .catch(e => {
  4570. console.log(e)
  4571. })
  4572. },
  4573. //省改变
  4574. onchangeProvince() {
  4575. this.axios
  4576. .post(
  4577. '/api/v1/uc/getDistrictByProvince?addressProvince=' +
  4578. this.steelMap.addressProvince +
  4579. '&i=' +
  4580. new Date()
  4581. )
  4582. .then(res => {
  4583. this.cityList = res.data.data
  4584. // this.city = "";
  4585. // this.county = "";
  4586. })
  4587. },
  4588. //市改变
  4589. onchangeCity() {
  4590. this.axios
  4591. .post(
  4592. '/api/v1/uc/getTownByDistrict?addressDistrict=' +
  4593. this.steelMap.addressDistrict +
  4594. '&i=' +
  4595. new Date()
  4596. )
  4597. .then(res => {
  4598. this.countyList = res.data.data
  4599. })
  4600. },
  4601. //县(区)改变
  4602. onchangeCounty() {
  4603. let mapValue = {
  4604. addressProvince: this.steelMap.addressProvince,
  4605. addressDistrict: this.steelMap.addressDistrict,
  4606. addressTown: this.steelMap.addressTown
  4607. }
  4608. this.axios.post('/api/v1/uc/getPlaceByAllAddress', mapValue).then(res => {
  4609. this.addressId = res.data.data[0].addressId
  4610. })
  4611. },
  4612. //收货地址弹出层
  4613. handleSelect1(item) {
  4614. console.log('获取所有下拉值!')
  4615. },
  4616. //以下是收货地址边输边查搜索
  4617. querySearch1(queryString, cb) {
  4618. this.axios
  4619. .post(
  4620. '/api/v1/ams/getRealAddressByLike?addressId=' +
  4621. this.addressId +
  4622. '&index=' +
  4623. queryString
  4624. )
  4625. .then(res => {
  4626. if (res.data.code == '200') {
  4627. var restaurants = res.data.data
  4628. var results = queryString
  4629. ? restaurants.filter(this.createFilter1(queryString))
  4630. : restaurants
  4631. // 调用 callback 返回建议列表的数据
  4632. cb(results)
  4633. }
  4634. })
  4635. },
  4636. createFilter1(queryString) {
  4637. return restaurants => {
  4638. return (
  4639. restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
  4640. -1
  4641. )
  4642. }
  4643. },
  4644. //修改收货地址
  4645. addAddressClick() {
  4646. const loading = this.$loading({
  4647. lock: true,
  4648. text: '正在修改收货地址',
  4649. spinner: 'el-icon-loading',
  4650. background: 'rgba(0, 0, 0, 0.7)'
  4651. })
  4652. let map = this.steelMap
  4653. map.isCloseEas = Number(1)
  4654. map.isNewCar = Number(1)
  4655. map.userName = getCookie('loginName')
  4656. map.shipperAddressId = this.addressId
  4657. map.oYeFlag = 1
  4658. this.axios
  4659. .post('/api/v1/ams/updateCarAddress', map)
  4660. .then(res => {
  4661. if (res.data.code == '200') {
  4662. // this.$message.success('修改收货地址成功!')
  4663. this.$message({
  4664. type: 'success',
  4665. message:
  4666. '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
  4667. offset: '250',
  4668. duration: 2500
  4669. })
  4670. this.operation(this.steelMap)
  4671. this.onclick(this.filterMap)
  4672. loading.close()
  4673. } else {
  4674. this.$message.error('修改失败,请联系管理员!')
  4675. this.operation(this.steelMap)
  4676. this.onclick(this.filterMap)
  4677. loading.close()
  4678. }
  4679. })
  4680. .catch(() => {
  4681. this.$message.error('修改失败,请联系管理员!')
  4682. this.operation(this.steelMap)
  4683. this.onclick(this.filterMap)
  4684. loading.close()
  4685. })
  4686. },
  4687. //批量修改收货地址
  4688. batchUpdateCarAddress() {
  4689. const loading = this.$loading({
  4690. lock: true,
  4691. text: '正在修改收货地址',
  4692. spinner: 'el-icon-loading',
  4693. background: 'rgba(0, 0, 0, 0.7)'
  4694. })
  4695. this.batchCapacityList.forEach(row => {
  4696. let map = row
  4697. map.place = this.steelMap.place
  4698. map.isCloseEas = Number(1)
  4699. map.isNewCar = Number(1)
  4700. map.shipperAddressId = this.addressId
  4701. map.userName = getCookie('loginName')
  4702. map.oYeFlag = 1
  4703. this.axios
  4704. .post('/api/v1/ams/updateCarAddress', map)
  4705. .then(res => {
  4706. if (res.data.code == '200') {
  4707. this.$message({
  4708. type: 'success',
  4709. message:
  4710. '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
  4711. offset: '250',
  4712. duration: 2500
  4713. })
  4714. } else {
  4715. this.$message.error('修改失败,请联系管理员!')
  4716. }
  4717. })
  4718. .catch(() => {
  4719. this.$message.error('修改失败,请联系管理员!')
  4720. })
  4721. })
  4722. this.onclick(this.filterMap)
  4723. loading.close()
  4724. this.batchCarrierVisible = false
  4725. },
  4726. //将序号确定下来
  4727. // getNodeNum(data) {
  4728. // for (var i = 0; i < data.length; i++) {
  4729. // if (i === 0) {
  4730. // data[i].group = i
  4731. // data[i].rowKey = i
  4732. // } else {
  4733. // // 判断当前元素与上一个元素是否相同
  4734. // if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
  4735. // data[i].group = data[i - 1].group
  4736. // data[i].rowKey = i
  4737. // } else {
  4738. // data[i].group = data[i - 1].group + 1
  4739. // data[i].rowKey = i
  4740. // }
  4741. // }
  4742. // }
  4743. // },
  4744. //记录每一行的合并数
  4745. getSpanArr(data) {
  4746. //每次调用方法初始化
  4747. this.spanArr = []
  4748. this.spanArr2 = []
  4749. for (var i = 0; i < data.length; i++) {
  4750. if (i === 0) {
  4751. this.spanArr.push(1)
  4752. this.spanArr2.push(1)
  4753. // data[i].group = i
  4754. this.pos = 0
  4755. this.pos2 = 0
  4756. } else {
  4757. // 判断当前元素与上一个元素是否相同
  4758. if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
  4759. this.spanArr[this.pos] += 1
  4760. // data[i].group = data[i - 1].group
  4761. this.spanArr.push(0)
  4762. if (
  4763. data[i].weightBatchId &&
  4764. data[i].weightBatchId === data[i - 1].weightBatchId
  4765. ) {
  4766. //批次合并
  4767. this.spanArr2[this.pos2] += 1
  4768. this.spanArr2.push(0)
  4769. } else {
  4770. this.spanArr2.push(1)
  4771. this.pos2 = i
  4772. }
  4773. } else {
  4774. this.spanArr.push(1)
  4775. this.pos = i
  4776. // data[i].group = data[i - 1].group + 1
  4777. this.spanArr2.push(1)
  4778. this.pos2 = i
  4779. }
  4780. }
  4781. }
  4782. },
  4783. getSpanArr1(data) {
  4784. //每次调用方法初始化
  4785. this.spanArr1 = []
  4786. this.spanArr3 = []
  4787. for (var i = 0; i < data.length; i++) {
  4788. if (i === 0) {
  4789. this.spanArr1.push(1)
  4790. this.spanArr3.push(1)
  4791. // data[i].group = i
  4792. this.pos1 = 0
  4793. this.pos3 = 0
  4794. } else {
  4795. // 判断当前元素与上一个元素是否相同
  4796. if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
  4797. this.spanArr1[this.pos] += 1
  4798. // data[i].group = data[i - 1].group
  4799. this.spanArr1.push(0)
  4800. if (
  4801. data[i].weightBatchId &&
  4802. data[i].weightBatchId === data[i - 1].weightBatchId
  4803. ) {
  4804. //批次合并
  4805. this.spanArr3[this.pos3] += 1
  4806. this.spanArr3.push(0)
  4807. } else {
  4808. this.spanArr3.push(1)
  4809. this.pos3 = i
  4810. }
  4811. } else {
  4812. this.spanArr1.push(1)
  4813. this.pos1 = i
  4814. this.spanArr3.push(1)
  4815. this.pos3 = i
  4816. // data[i].group = data[i - 1].group + 1
  4817. }
  4818. }
  4819. }
  4820. },
  4821. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  4822. if (this.mergeList.indexOf(column.label) != -1) {
  4823. const _row = this.spanArr[rowIndex]
  4824. const _col = _row > 0 ? 1 : 0
  4825. return {
  4826. rowspan: _row,
  4827. colspan: _col
  4828. }
  4829. } else if (this.mergeListBatch.indexOf(column.label) != -1) {
  4830. const _row = this.spanArr2[rowIndex]
  4831. const _col = _row > 0 ? 1 : 0
  4832. return {
  4833. rowspan: _row,
  4834. colspan: _col
  4835. }
  4836. }
  4837. },
  4838. objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
  4839. if (this.mergeList.indexOf(column.label) != -1) {
  4840. const _row = this.spanArr1[rowIndex]
  4841. const _col = _row > 0 ? 1 : 0
  4842. return {
  4843. rowspan: _row,
  4844. colspan: _col
  4845. }
  4846. } else if (this.mergeListBatch.indexOf(column.label) != -1) {
  4847. const _row = this.spanArr3[rowIndex]
  4848. const _col = _row > 0 ? 1 : 0
  4849. return {
  4850. rowspan: _row,
  4851. colspan: _col
  4852. }
  4853. }
  4854. },
  4855. objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
  4856. if (this.mergeList.indexOf(column.label) != -1) {
  4857. const _row = this.spanArr1[rowIndex]
  4858. const _col = _row > 0 ? 1 : 0
  4859. return {
  4860. rowspan: _row,
  4861. colspan: _col
  4862. }
  4863. } else if (this.mergeListBatch.indexOf(column.label) != -1) {
  4864. const _row = this.spanArr3[rowIndex]
  4865. const _col = _row > 0 ? 1 : 0
  4866. return {
  4867. rowspan: _row,
  4868. colspan: _col
  4869. }
  4870. }
  4871. },
  4872. //计算总件数和总车数
  4873. // getTotalNum(data) {
  4874. // //通过车序号的个数来计算车数
  4875. // let arr = []
  4876. // arr = data.map(e => {
  4877. // if (
  4878. // e.capacityNo != '取消' &&
  4879. // e.saleOrderStatus != '反审批' &&
  4880. // e.orderStatus != '已关闭'
  4881. // ) {
  4882. // return e.saleOrderMaterialId
  4883. // }
  4884. // })
  4885. // this.totalCapacity = Array.from(new Set(arr)).length
  4886. // this.totalNumber = data.reduce(function(prev, item) {
  4887. // return prev + item.materialNum
  4888. // }, 0)
  4889. // },
  4890. //减少物资件数
  4891. updateBillOrder(row) {
  4892. const loading = this.$loading({
  4893. lock: true,
  4894. text: '修改物资件数中',
  4895. spinner: 'el-icon-loading',
  4896. background: 'rgba(0, 0, 0, 0.7)'
  4897. })
  4898. let map = {
  4899. materialId: row.materialId,
  4900. materialNum: row.materialNumber,
  4901. oYeFlag: 1
  4902. }
  4903. let arr = []
  4904. arr.push(map)
  4905. let updateMap = {
  4906. orderId: this.steelMap.orderId,
  4907. saleOrderId: this.steelMap.saleOrderId,
  4908. saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
  4909. mapList: arr,
  4910. oYeFlag: 1
  4911. }
  4912. this.axios
  4913. .post('/api/v1/oms/updateMaterialMes', updateMap)
  4914. .then(res => {
  4915. if (res.data.code == '200') {
  4916. this.$message.success('修改物资数量成功')
  4917. this.onclick(this.filterMap)
  4918. loading.close()
  4919. } else {
  4920. this.$message.error('修改物资数量失败,请联系管理员')
  4921. this.onclick(this.filterMap)
  4922. loading.close()
  4923. }
  4924. })
  4925. .catch(() => {
  4926. this.$message.error('修改物资数量失败,请联系管理员')
  4927. this.onclick(this.filterMap)
  4928. loading.close()
  4929. })
  4930. },
  4931. getStatusNum(data) {
  4932. //未派发、取消
  4933. },
  4934. //查询,输入查询条件
  4935. onclick(obj) {
  4936. this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
  4937. this.isRowClick = 0
  4938. this.showPopover = false
  4939. const loading = this.$loading({
  4940. lock: true,
  4941. text: '正在获取数据',
  4942. spinner: 'el-icon-loading',
  4943. background: 'rgba(0, 0, 0, 0.7)'
  4944. })
  4945. let startTime = null
  4946. let endTime = null
  4947. let carrierSsoId = null
  4948. let carrierName = null
  4949. let consigneeName = null
  4950. let capacityNo = null
  4951. let remark = null
  4952. let saler = null
  4953. let easPrimaryId = null
  4954. let consigneeLoginName = null
  4955. let receiveAddress = null
  4956. let inboundWarehouse = null
  4957. obj.receiveAddress = null
  4958. obj.saleNo = null
  4959. obj.receiveCustomer = null
  4960. if (this.startTime && this.endTime) {
  4961. startTime = sjTime(this.startTime)
  4962. endTime = sjTime(this.endTime)
  4963. }
  4964. if (getCookie('orgCode') == 'chengyunshang') {
  4965. carrierSsoId = getCookie('userId')
  4966. }
  4967. if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
  4968. saler = getCookie('loginName')
  4969. }
  4970. if (getCookie('orgCode') == 'shouhuokehu') {
  4971. consigneeLoginName =
  4972. JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
  4973. obj.consigneeLoginName = consigneeLoginName
  4974. }
  4975. if (getCookie('orgCode') == 'ouyechangwaiku') {
  4976. inboundWarehouse = getCookie('loginName')
  4977. }
  4978. obj.inboundWarehouse = inboundWarehouse
  4979. if (this.screen == '客户') {
  4980. consigneeName = this.input
  4981. } else if (this.screen == '承运商') {
  4982. carrierName = this.input
  4983. } else if (this.screen == '车牌号') {
  4984. capacityNo = this.input
  4985. } else if (this.screen == '分录ID') {
  4986. easPrimaryId = this.input
  4987. } else if (this.screen == '收货地址') {
  4988. receiveAddress = this.input
  4989. obj.receiveAddress = receiveAddress
  4990. } else if (this.screen == '销售订单号') {
  4991. obj.saleNo = this.input
  4992. } else if (this.screen == '收款公司') {
  4993. obj.receiveCustomer = this.input
  4994. } else {
  4995. remark = this.input
  4996. }
  4997. if (this.screen1 == '客户' && this.input1 != null && this.input1 != '') {
  4998. consigneeName = this.input1
  4999. } else if (
  5000. this.screen1 == '承运商' &&
  5001. this.input1 != null &&
  5002. this.input1 != ''
  5003. ) {
  5004. carrierName = this.input1
  5005. } else if (
  5006. this.screen1 == '车牌号' &&
  5007. this.input1 != null &&
  5008. this.input1 != ''
  5009. ) {
  5010. capacityNo = this.input1
  5011. } else if (
  5012. this.screen1 == '分录ID' &&
  5013. this.input1 != null &&
  5014. this.input1 != ''
  5015. ) {
  5016. easPrimaryId = this.input1
  5017. } else if (
  5018. this.screen1 == '收货地址' &&
  5019. this.input1 != null &&
  5020. this.input1 != ''
  5021. ) {
  5022. receiveAddress = this.input1
  5023. obj.receiveAddress = receiveAddress
  5024. } else if (
  5025. this.screen1 == '销售订单号' &&
  5026. this.input1 != null &&
  5027. this.input1 != ''
  5028. ) {
  5029. obj.saleNo = this.input1
  5030. } else if (this.screen1 == '收款公司') {
  5031. obj.receiveCustomer = this.input1
  5032. } else if (this.input1 != null && this.input1 != '') {
  5033. remark = this.input1
  5034. }
  5035. obj.dateType = this.dateType
  5036. this.axios
  5037. .post(
  5038. '/api/v1/tms/getOyeSteelReport?startTime=' +
  5039. startTime +
  5040. '&endTime=' +
  5041. endTime +
  5042. '&carrierSsoId=' +
  5043. carrierSsoId +
  5044. '&i=' +
  5045. new Date() +
  5046. '&remark=' +
  5047. remark +
  5048. '&consigneeName=' +
  5049. consigneeName +
  5050. '&carrierName=' +
  5051. carrierName +
  5052. '&capacityNo=' +
  5053. capacityNo +
  5054. '&saler=' +
  5055. saler +
  5056. '&easPrimaryId=' +
  5057. encodeURIComponent(easPrimaryId),
  5058. obj,
  5059. {
  5060. timeout: 10 * 60 * 1000
  5061. }
  5062. )
  5063. .then(res => {
  5064. this.tableData = res.data.data
  5065. if (res.data.data.length > 0) {
  5066. this.totalNumber = `${res.data.data[0].totalNumber}件`
  5067. this.totalCapacity = `${res.data.data[0].totalCapacity}车`
  5068. this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
  5069. this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
  5070. console.log(obj, 'obj')
  5071. if (this.filterMap) {
  5072. this.filterRefreshCtrl(res.data.data, this.filterMap)
  5073. }
  5074. }
  5075. this.maxHeight =
  5076. window.innerHeight -
  5077. document.querySelector('.tableTop').offsetHeight -
  5078. 40
  5079. let a = 1
  5080. if (
  5081. this.visibleList.length > 0 &&
  5082. this.visibleList.length < this.tableData.length
  5083. ) {
  5084. a = this.visibleList[0].rowKey
  5085. }
  5086. this.visibleList = []
  5087. this.visibleList = this.tableData.slice(
  5088. 0,
  5089. Math.floor(this.maxHeight / this.itemHeight) + 1
  5090. )
  5091. this.getSpanArr(this.visibleList)
  5092. this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
  5093. // this.getTotalNum(this.tableData)
  5094. loading.close()
  5095. })
  5096. .catch(() => {
  5097. loading.close()
  5098. this.maxHeight =
  5099. window.innerHeight -
  5100. document.querySelector('.tableTop').offsetHeight -
  5101. 40
  5102. this.$message.error('查询失败')
  5103. })
  5104. },
  5105. filterRefreshCtrl(data, obj) {
  5106. if (!obj.truckRemarkList || obj.truckRemarkList.length === 0) {
  5107. this.filterTruckRemark = data[0].filterTruckRemark
  5108. }
  5109. if (!obj.saleRemarkList || obj.saleRemarkList.length === 0) {
  5110. this.filterSaleRemark = data[0].filterSaleRemark
  5111. }
  5112. if (!obj.consigneeNameList || obj.consigneeNameList.length === 0) {
  5113. this.filterConsigneeList = data[0].filterConsigneeList
  5114. }
  5115. if (!obj.addressPlaceList || obj.addressPlaceList.length === 0) {
  5116. this.filteraddressPlace = data[0].filteraddressPlace
  5117. }
  5118. if (!obj.materialSpeList || obj.materialSpeList.length === 0) {
  5119. this.filtermaterialSpe = data[0].filtermaterialSpe
  5120. }
  5121. if (!obj.capacityList || obj.capacityList.length === 0) {
  5122. this.filterCapacityList = data[0].filterCapacityList
  5123. }
  5124. if (!obj.materialNameList || obj.materialNameList.length === 0) {
  5125. this.filtermaterialNameList = data[0].filtermaterialNameList
  5126. }
  5127. if (!obj.carrierList || obj.carrierList.length === 0) {
  5128. this.filterCarrierList = data[0].filterCarrierList
  5129. }
  5130. if (!obj.orderStatusList || obj.orderStatusList.length === 0) {
  5131. this.filterorderStatus = data[0].filterorderStatus
  5132. }
  5133. if (!obj.areaNameList || obj.areaNameList.length === 0) {
  5134. this.filterAreaName = data[0].filterAreaName
  5135. }
  5136. if (
  5137. !obj.orderStatusActuallyList ||
  5138. obj.orderStatusActuallyList.length === 0
  5139. ) {
  5140. this.filterorderStatusActually = data[0].filterorderStatusActually
  5141. }
  5142. },
  5143. //重新获取表格数据
  5144. refresh() {
  5145. this.filterMap = {
  5146. consigneeNameList: [],
  5147. truckRemarkList: [],
  5148. saleRemarkList: [],
  5149. saleOrderStatusList: [],
  5150. materialSpeList: [],
  5151. addressPlaceList: [],
  5152. orderStatusList: [],
  5153. saleAreaList: [],
  5154. materialNameList: [],
  5155. carrierList: [],
  5156. capacityList: []
  5157. }
  5158. this.visibleList = []
  5159. this.getSteelReport()
  5160. },
  5161. //获取钢材统计报表
  5162. getSteelReportDebounce() {
  5163. this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
  5164. console.log('---------------------------1111')
  5165. const loading = this.$loading({
  5166. lock: true,
  5167. text: '正在获取数据,请稍候',
  5168. spinner: 'el-icon-loading',
  5169. background: 'rgba(0, 0, 0, 0.7)'
  5170. })
  5171. // this.isRowClick = 0
  5172. let startTime = null
  5173. let endTime = null
  5174. let carrierSsoId = null
  5175. let carrierName = null
  5176. let consigneeName = null
  5177. let consigneeLoginName = null
  5178. let capacityNo = null
  5179. let remark = null
  5180. let saler = null
  5181. let inboundWarehouse = null
  5182. if (this.startTime && this.endTime) {
  5183. startTime = sjTime(this.startTime)
  5184. endTime = sjTime(this.endTime)
  5185. }
  5186. if (getCookie('orgCode') == 'chengyunshang') {
  5187. carrierSsoId = getCookie('userId')
  5188. }
  5189. if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
  5190. saler = getCookie('loginName')
  5191. }
  5192. if (getCookie('orgCode') == 'shouhuokehu') {
  5193. consigneeLoginName =
  5194. JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
  5195. // console.log('userinfo')
  5196. // JSON.parse(getCookie('userInfo')).userCode
  5197. this.filterMap.consigneeLoginName = consigneeLoginName
  5198. }
  5199. if (getCookie('orgCode') == 'ouyechangwaiku') {
  5200. inboundWarehouse = getCookie('loginName')
  5201. }
  5202. this.filterMap.inboundWarehouse = inboundWarehouse
  5203. if (this.screen == '客户') {
  5204. consigneeName = this.input
  5205. } else if (this.screen == '承运商') {
  5206. carrierName = this.input
  5207. } else if (this.screen == '车牌号') {
  5208. capacityNo = this.input
  5209. } else {
  5210. remark = this.input
  5211. }
  5212. if (this.screen1 == '客户') {
  5213. consigneeName = this.input1
  5214. } else if (this.screen1 == '承运商') {
  5215. carrierName = this.input1
  5216. } else if (this.screen1 == '车牌号') {
  5217. capacityNo = this.input1
  5218. } else {
  5219. remark = this.input1
  5220. }
  5221. if (getCookie('orgCode') == 'chengyunshang') {
  5222. carrierSsoId = getCookie('userId')
  5223. }
  5224. if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
  5225. saler = getCookie('loginName')
  5226. }
  5227. this.filterMap.dateType = this.dateType
  5228. this.filterMap.businessType = '500'
  5229. this.axios
  5230. .post(
  5231. '/api/v1/tms/getOyeSteelReport?startTime=' +
  5232. startTime +
  5233. '&endTime=' +
  5234. endTime +
  5235. '&carrierSsoId=' +
  5236. carrierSsoId +
  5237. '&saler=' +
  5238. saler +
  5239. '&i=' +
  5240. new Date() +
  5241. '&remark=' +
  5242. remark +
  5243. '&consigneeName=' +
  5244. consigneeName +
  5245. '&carrierName=' +
  5246. carrierName +
  5247. '&capacityNo=' +
  5248. capacityNo,
  5249. this.filterMap,
  5250. { timeout: 6000000 }
  5251. )
  5252. .then(res => {
  5253. this.tableData = res.data.data
  5254. if (res.data.data.length > 0) {
  5255. this.totalNumber = `${res.data.data[0].totalNumber}件`
  5256. this.totalCapacity = `${res.data.data[0].totalCapacity}车`
  5257. this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
  5258. this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
  5259. this.filterConsigneeList = res.data.data[0].filterConsigneeList
  5260. this.filterCarrierList = res.data.data[0].filterCarrierList
  5261. this.filterCapacityList = res.data.data[0].filterCapacityList
  5262. this.filtermaterialNameList =
  5263. res.data.data[0].filtermaterialNameList
  5264. // this.filterorderStatus = res.data.data[0].filterorderStatus
  5265. this.filteraddressPlace = res.data.data[0].filteraddressPlace
  5266. this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
  5267. this.filterSaleRemark = res.data.data[0].filterSaleRemark
  5268. this.filterTruckRemark = res.data.data[0].filterTruckRemark
  5269. this.filterorderStatusActually =
  5270. res.data.data[0].filterorderStatusActually
  5271. }
  5272. this.maxHeight =
  5273. window.innerHeight -
  5274. document.querySelector('.tableTop').offsetHeight -
  5275. 40
  5276. let a = 1
  5277. if (
  5278. this.visibleList.length > 0 &&
  5279. this.visibleList.length < this.tableData.length
  5280. ) {
  5281. a = this.visibleList[0].rowKey
  5282. }
  5283. this.visibleList = []
  5284. // this.getNodeLNum(this.tableData)
  5285. this.visibleList = this.tableData.slice(
  5286. 0,
  5287. Math.floor(this.maxHeight / this.itemHeight) + 1
  5288. )
  5289. this.getSpanArr(this.visibleList)
  5290. this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
  5291. loading.close()
  5292. })
  5293. .catch(() => {
  5294. this.maxHeight =
  5295. window.innerHeight -
  5296. document.querySelector('.tableTop').offsetHeight -
  5297. 40
  5298. loading.close()
  5299. })
  5300. }
  5301. }
  5302. }
  5303. </script>
  5304. <style lang="scss" scoped>
  5305. .saleSteelReports {
  5306. .tableTop {
  5307. margin-left: 20px;
  5308. margin-top: 20px;
  5309. // height: ;
  5310. }
  5311. .table {
  5312. margin-left: 20px;
  5313. margin-top: 20px;
  5314. /deep/ .el-tooltip {
  5315. width: auto !important;
  5316. }
  5317. /deep/ .el-table__body {
  5318. overflow-y: auto;
  5319. position: absolute !important;
  5320. tr:hover > td {
  5321. background-color: #fff;
  5322. }
  5323. }
  5324. ::-webkit-scrollbar {
  5325. height: 20px;
  5326. width: 10px;
  5327. background-color: transparent;
  5328. }
  5329. /deep/ .scrollBarClass {
  5330. max-height: 200px;
  5331. width: 220px;
  5332. }
  5333. }
  5334. /deep/ .el-tabs__new-tab {
  5335. font-size: 20px;
  5336. line-height: 20px;
  5337. font-weight: 700 !important;
  5338. color: #000;
  5339. }
  5340. .batchCarrierClass {
  5341. display: flex;
  5342. justify-content: center;
  5343. align-items: center;
  5344. }
  5345. .batchCapacityClass {
  5346. display: flex;
  5347. justify-content: center;
  5348. align-items: center;
  5349. }
  5350. .dialog {
  5351. .exceptionHandleClass {
  5352. display: flex;
  5353. justify-content: center;
  5354. align-items: center;
  5355. font-size: 20px;
  5356. margin-top: 20px;
  5357. margin-bottom: 20px;
  5358. }
  5359. .steelMapClass {
  5360. .steelMapClass1 {
  5361. display: flex;
  5362. flex-direction: row;
  5363. justify-content: flex-start;
  5364. align-items: flex-start;
  5365. font-size: 16px;
  5366. .steelMapClass12 {
  5367. margin-left: 50px;
  5368. margin-right: 10px;
  5369. }
  5370. .steelMapClass13 {
  5371. display: flex;
  5372. margin-left: 50px;
  5373. margin-right: 10px;
  5374. }
  5375. }
  5376. .steelMapClass2 {
  5377. margin-top: 20px;
  5378. display: flex;
  5379. flex-direction: row;
  5380. justify-content: flex-start;
  5381. align-items: flex-start;
  5382. font-size: 16px;
  5383. .steelMapClass22 {
  5384. margin-left: 50px;
  5385. margin-right: 10px;
  5386. .el-select {
  5387. .el-input .el-input--suffix {
  5388. .el-input__inner {
  5389. border: 0px solid !important;
  5390. }
  5391. }
  5392. }
  5393. }
  5394. }
  5395. .steelMapClass3 {
  5396. margin-top: 20px;
  5397. display: flex;
  5398. flex-direction: row;
  5399. justify-content: flex-start;
  5400. align-items: flex-start;
  5401. font-size: 16px;
  5402. .steelMapClass32 {
  5403. margin-left: 50px;
  5404. // margin-right: 10px;
  5405. }
  5406. .steelMapClass33 {
  5407. margin-left: 20px;
  5408. // margin-right: 10px;
  5409. }
  5410. }
  5411. .steelMapClass4 {
  5412. margin-top: 20px;
  5413. display: flex;
  5414. flex-direction: row;
  5415. justify-content: flex-start;
  5416. align-items: flex-start;
  5417. font-size: 16px;
  5418. .steelMapClass42 {
  5419. margin-left: 50px;
  5420. margin-right: 10px;
  5421. }
  5422. .steelMapClass43 {
  5423. margin-left: 50px;
  5424. margin-right: 10px;
  5425. }
  5426. .steelMapClass44 {
  5427. margin-left: 50px;
  5428. margin-right: 10px;
  5429. }
  5430. }
  5431. .steelMapClass5 {
  5432. margin-top: 20px;
  5433. display: flex;
  5434. flex-direction: row;
  5435. justify-content: flex-start;
  5436. align-items: flex-start;
  5437. font-size: 16px;
  5438. .steelMapClass52 {
  5439. margin-left: 50px;
  5440. margin-right: 10px;
  5441. .steelMapClass521 {
  5442. margin-left: 20px;
  5443. }
  5444. }
  5445. }
  5446. .steelMapClass9 {
  5447. margin-top: 20px;
  5448. display: flex;
  5449. flex-direction: row;
  5450. justify-content: flex-start;
  5451. align-items: flex-start;
  5452. font-size: 16px;
  5453. .steelMapClass92 {
  5454. margin-left: 50px;
  5455. margin-right: 10px;
  5456. .steelMapClass921 {
  5457. text-align: start;
  5458. min-width: 350px;
  5459. .el-textarea {
  5460. width: auto;
  5461. }
  5462. // /deep/ .el-input__prefix {
  5463. // display: inline-block;
  5464. // position: relative;
  5465. // border: 1px solid #dcdfe6;
  5466. // box-sizing: border-box;
  5467. // color: #606266;
  5468. // font-size: inherit;
  5469. // height: 40px;
  5470. // line-height: 40px;
  5471. // padding: 0 30px;
  5472. // transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  5473. // padding-left: 30px;
  5474. // left: 0;
  5475. // visibility: hidden;
  5476. // }
  5477. // /deep/ .el-textarea__inner {
  5478. // position: absolute;
  5479. // }
  5480. }
  5481. }
  5482. }
  5483. .steelMapClass6 {
  5484. margin-top: 20px;
  5485. display: flex;
  5486. flex-direction: row;
  5487. justify-content: flex-start;
  5488. align-items: flex-start;
  5489. font-size: 16px;
  5490. .steelMapClass62 {
  5491. margin-left: 50px;
  5492. margin-right: 10px;
  5493. }
  5494. }
  5495. .steelMapClass7 {
  5496. margin-top: 20px;
  5497. display: flex;
  5498. flex-direction: row;
  5499. justify-content: flex-start;
  5500. align-items: flex-start;
  5501. font-size: 16px;
  5502. .steelMapClass72 {
  5503. margin-left: 50px;
  5504. margin-right: 10px;
  5505. }
  5506. }
  5507. }
  5508. .table1 {
  5509. margin-left: 20px;
  5510. margin-top: 20px;
  5511. .el-tooltip {
  5512. width: auto !important;
  5513. }
  5514. }
  5515. .columnShowDialogClass {
  5516. display: flex;
  5517. justify-content: center;
  5518. align-items: center;
  5519. }
  5520. }
  5521. }
  5522. </style>