1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359 |
- //钢材统计报表
- <template>
- <div class="saleSteelReports">
- <div class="tableTop">
- <el-form :inline="true">
- <el-form-item>
- <el-select
- v-model="screen"
- placeholder="请选择需筛选的内容"
- clearable
- @change="changeScreen"
- style="width:90px"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-input
- style="width:150px"
- v-model="input"
- placeholder="请输入查询条件"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model="screen1"
- placeholder="请选择需筛选的内容"
- clearable
- @change="changeScreen"
- style="width:90px"
- >
- <el-option
- v-for="item in options1"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-input
- style="width:150px"
- v-model="input1"
- placeholder="请输入查询条件"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item>
- <label class="el-form-item__label" style="width: auto;"
- >计划日期:</label
- >
- <el-date-picker
- v-model="startTime"
- type="date"
- placeholder="选择日期"
- style="width:140px"
- :picker-options="pickerOptions"
- >
- </el-date-picker>
- <span>至</span>
- <el-date-picker
- v-model="endTime"
- type="date"
- placeholder="选择日期"
- style="width:140px"
- :picker-options="pickerOptions1"
- >
- </el-date-picker>
- <el-button type="primary" class="btn" @click="onclick(filterMap)">
- <i class="el-icon-search"></i>
- </el-button>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="exportAllReportToExcel"
- >下载Excel</el-button
- >
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="clearFilter"
- >清除所有筛选</el-button
- >
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="refresh">
- <i class="el-icon-refresh"></i>
- </el-button>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="checkTrans()"
- ><i class="el-icon-truck"></i>轨迹</el-button
- >
- </el-form-item>
- <el-form-item v-if="isShowOperate">
- <el-button type="primary" @click="operation()">
- <i class="el-icon-edit"></i>更改
- <span>
- <!-- || orgCode!='chengyunshang' -->
- <el-badge
- :value="taskAllNum"
- :max="99"
- :hidden="taskAllNum < 1"
- ></el-badge>
- </span>
- </el-button>
- <!-- <el-button type="primary" @click="batchoperation()"
- ><i class="el-icon-edit"></i>批量更改</el-button
- > -->
- <el-button
- type="primary"
- @click="checkPoint()"
- v-if="!notRoutList.includes('checkPoint')"
- ><i class="el-icon-map-location"></i>实时路径</el-button
- >
- </el-form-item>
- <el-form-item v-if="isShowOperate">
- <el-button type="primary" @click="openReceive()">
- <i class="el-icon-document"></i>签收抵达</el-button
- >
- </el-form-item>
- <el-form-item v-if="isShowOperate">
- <el-button
- type="primary"
- @click="batchCarrier()"
- v-if="!notRoutList.includes('batchCarrier')"
- >
- <i class="el-icon-share"></i>批量</el-button
- >
- </el-form-item>
- <el-form-item v-if="isShowOperateYeWuYuan">
- <el-button type="primary" @click="mergeSplit()">
- <i class="el-icon-pie-chart"></i>
- 合并或拆分
- </el-button>
- </el-form-item>
- <el-form-item
- ><el-button type="primary" @click="confirmInbound"
- ><i class="el-icon-check"></i>出库确认</el-button
- ></el-form-item
- >
- <el-form-item v-if="isShowOperate">
- <el-dropdown>
- <el-button type="primary">
- 更多<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-button
- type="primary"
- @click="mergeSplit()"
- v-if="!notRoutList.includes('mergeSplit')"
- >
- <i class="el-icon-pie-chart"></i>
- 合并或拆分
- </el-button>
- <el-button
- type="primary"
- @click="showSaleLog()"
- v-if="!notRoutList.includes('saleLog')"
- >
- <i class="el-icon-pie-chart"></i>
- 操作日志
- </el-button>
- <el-button type="primary" @click="ctrlColumnShow">
- <i class="el-icon-pie-chart"></i>
- 控制列显隐
- </el-button>
- </el-dropdown-menu>
- </el-dropdown>
- </el-form-item>
- <el-form-item>
- <span style="width: auto;font-size: 16px;line-height: auto;"
- >车数/件数/磅重/取消: {{ totalCapacity }}/{{ totalNumber }}/{{
- totalNetWeight
- }}/{{ quxiaoCapacityNum }}
- </span>
- </el-form-item>
- </el-form>
- </div>
- <div class="table">
- <el-table
- :data="visibleList"
- :span-method="objectSpanMethod"
- ref="tableRef"
- border
- style="width: 100%; margin-top: 20px"
- id="salesLogisticsStat_saleSteelReports_table"
- :height="maxHeight"
- :max-height="maxHeight"
- :row-class-name="tableRowClassName"
- @cell-click="cellClik"
- @cell-mouse-enter="cellMouse1"
- @cell-mouse-leave="cellLeave1"
- @row-click="rowClick"
- :cell-style="cellStyle"
- @filter-change="filterChange"
- :key="saleSteelKey"
- @select="selectOne"
- @selection-change="handleSelectionChange()"
- :header-cell-style="headCellStyle"
- >
- <el-table-column
- type="selection"
- width="50"
- label="选择"
- align="center"
- column-key="select"
- key="select"
- v-if="
- !notRoutList.includes('select') ||
- !columnNoRoutList.includes('选择')
- "
- ></el-table-column>
- <el-table-column
- width="50"
- label="序号"
- align="center"
- column-key="group"
- key="group"
- :resizable="false"
- v-if="!columnNoRoutList.includes('序号')"
- >
- <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
- </el-table-column>
- <el-table-column
- prop="orderTime"
- label="计划日期"
- width="110px"
- align="center"
- column-key="orderTime"
- key="orderTime"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('订单日期')"
- >
- </el-table-column>
- <el-table-column
- prop="saleOrderStatus"
- column-key="saleOrderStatus"
- key="saleOrderStatus"
- label="计划状态"
- width="110px"
- align="center"
- :filters="filterSaleOrderStatus"
- sortable
- v-if="!columnNoRoutList.includes('销售订单状态')"
- >
- </el-table-column>
- <el-table-column
- prop="consigneeName"
- label="收货单位"
- width="250px"
- align="center"
- column-key="consigneeName"
- key="consigneeName"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('客户')"
- :render-header="renderHeader"
- >
- </el-table-column>
- <el-table-column
- prop="orderStatus"
- column-key="orderStatus"
- key="orderStatus"
- label="运单状态"
- align="center"
- :filters="filterorderStatus"
- v-if="!columnNoRoutList.includes('运单状态')"
- >
- </el-table-column>
- <el-table-column
- prop="orderStatusActually"
- column-key="orderStatusActually"
- key="orderStatusActually"
- label="订单实际状态"
- align="center"
- width="100"
- :filters="filterorderStatusActually"
- v-if="!columnNoRoutList.includes('运单状态')"
- >
- </el-table-column>
- <el-table-column
- prop="carrierName"
- label="承运商"
- align="center"
- width="80px"
- column-key="carrierList"
- key="carrierList"
- sortable
- show-overflow-tooltip
- :filters="filterCarrierList"
- v-if="!columnNoRoutList.includes('承运商')"
- >
- </el-table-column>
- <el-table-column
- prop="capacityNo"
- column-key="capacityNo"
- key="capacityNo"
- label="车牌号"
- align="center"
- width="90px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('车牌号')"
- :render-header="renderHeader"
- >
- </el-table-column>
- <el-table-column
- prop="materialName"
- column-key="materialNameList"
- key="materialNameList"
- label="物资名称"
- align="center"
- width="150px"
- v-if="!columnNoRoutList.includes('物资名称')"
- :render-header="renderHeader"
- >
- </el-table-column>
- <el-table-column
- prop="materialSpe"
- label="物资规格"
- column-key="materialSpe"
- key="materialSpe"
- align="center"
- width="120px"
- v-if="!columnNoRoutList.includes('物资规格')"
- :render-header="renderHeader"
- >
- </el-table-column>
- <el-table-column
- prop="materialMeter"
- column-key="materialMeter"
- key="materialMeter"
- label="米数"
- align="center"
- width="50px"
- v-if="!columnNoRoutList.includes('物资件数')"
- >
- </el-table-column>
- <el-table-column
- prop="singleWeight"
- column-key="singleWeight"
- key="singleWeight"
- label="单重"
- align="center"
- width="50px"
- v-if="!columnNoRoutList.includes('物资件数')"
- >
- </el-table-column>
- <el-table-column
- prop="materialNum"
- column-key="materialNum"
- key="materialNum"
- label="物资件数"
- align="center"
- width="50px"
- v-if="!columnNoRoutList.includes('物资件数')"
- >
- </el-table-column>
- <el-table-column
- prop="materialThoWeight"
- column-key="materialThoWeight"
- key="materialThoWeight"
- label="理重"
- align="center"
- width="50px"
- v-if="!columnNoRoutList.includes('理重')"
- >
- </el-table-column>
- <el-table-column
- prop="addressPlace"
- label="收货地址"
- width="250px"
- column-key="addressPlace"
- key="addressPlace"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('收货地址')"
- :render-header="renderHeader"
- >
- <template slot-scope="scope">
- <span
- v-if="scope.row.addressPlace.indexOf('新地址') >= 0"
- style="color:red"
- >{{ scope.row.addressPlace }}</span
- >
- <span v-show="scope.row.addressPlace.indexOf('新地址') < 0">{{
- scope.row.addressPlace
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="consigneeTel"
- column-key="consigneeTel"
- key="consigneeTel"
- label="收货客户电话"
- width="120px"
- align="center"
- v-if="!columnNoRoutList.includes('收货客户电话')"
- >
- </el-table-column>
- <el-table-column
- prop="saleRemark"
- column-key="saleRemark"
- key="saleRemark"
- label="摘要"
- width="180px"
- show-overflow-tooltip
- align="center"
- v-if="!columnNoRoutList.includes('摘要')"
- :render-header="renderHeader"
- >
- </el-table-column>
- <el-table-column
- prop="truckRemark"
- column-key="truckRemark"
- key="truckRemark"
- label="备注"
- width="150"
- align="center"
- :render-header="renderHeader"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('备注')"
- >
- </el-table-column>
- <el-table-column
- prop="capacityTel"
- column-key="capacityTel"
- key="capacityTel"
- label="司机电话"
- width="120px"
- align="center"
- v-if="!columnNoRoutList.includes('司机电话')"
- >
- </el-table-column>
- <el-table-column
- prop="spellNum"
- column-key="spellNum"
- key="spellNum"
- label="拼数"
- width="120px"
- align="center"
- :filters="filterSpellNum"
- v-if="!columnNoRoutList.includes('拼数')"
- >
- </el-table-column>
- <el-table-column
- prop="loadTime"
- column-key="loadTime"
- key="loadTime"
- label="装货时间"
- width="130px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('装货时间')"
- >
- </el-table-column>
- <el-table-column
- prop="isPrintDelivery"
- column-key="isPrintDelivery"
- key="isPrintDelivery"
- label="送货单打印"
- align="center"
- width="100px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('送货单打印')"
- >
- </el-table-column>
- <el-table-column
- prop="smsResultId"
- column-key="smsResultId"
- key="smsResultId"
- label="短信发送"
- width="100px"
- align="center"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('短信发送')"
- >
- </el-table-column>
- <el-table-column
- prop="arrivalAddress"
- column-key="arrivalAddress"
- key="arrivalAddress"
- label="抵达地址"
- width="280px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('抵达地址')"
- >
- </el-table-column>
- <el-table-column
- prop="arrivalTime"
- column-key="arrivalTime"
- key="arrivalTime"
- label="抵达时间"
- width="150px"
- v-if="!columnNoRoutList.includes('抵达时间')"
- >
- </el-table-column>
- <el-table-column
- prop="receiptAddress"
- column-key="receiptAddress"
- key="receiptAddress"
- label="签收地址"
- width="280px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('签收地址')"
- >
- </el-table-column>
- <el-table-column
- prop="receiptTime"
- column-key="receiptTime"
- key="receiptTime"
- label="签收时间"
- width="150px"
- v-if="!columnNoRoutList.includes('签收时间')"
- >
- </el-table-column>
- <el-table-column
- prop="orderNo"
- column-key="orderNo"
- key="orderNo"
- label="运输订单号"
- width="180px"
- align="center"
- v-if="!columnNoRoutList.includes('运输订单号')"
- >
- </el-table-column>
- <el-table-column
- prop="saler"
- column-key="saler"
- key="saler"
- label="业务员"
- align="center"
- v-if="!columnNoRoutList.includes('业务员')"
- >
- </el-table-column>
- <el-table-column
- prop="shipperName"
- column-key="shipperName"
- key="shipperName"
- label="发货单位"
- width="170px"
- align="center"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('发货单位')"
- >
- </el-table-column>
- <el-table-column
- prop="isSelfMention"
- column-key="isSelfMention"
- key="isSelfMention"
- label="是否自提"
- align="center"
- v-if="!columnNoRoutList.includes('是否自提')"
- >
- </el-table-column>
- <el-table-column
- prop="saleOrderNo"
- column-key="saleOrderNo"
- key="saleOrderNo"
- label="转运计划号"
- width="200px"
- align="center"
- v-if="!columnNoRoutList.includes('销售订单号')"
- >
- </el-table-column>
- <el-table-column
- prop="orderInsertUpdateRemark"
- column-key="orderInsertUpdateRemark"
- key="orderInsertUpdateRemark"
- label="运输订单变更记录"
- width="120px"
- show-overflow-tooltip
- v-if="!columnNoRoutList.includes('运输订单变更记录')"
- >
- </el-table-column>
- <el-table-column
- prop="materialPlanNumber"
- column-key="materialPlanNumber"
- key="materialPlanNumber"
- label="理论件数"
- align="center"
- v-if="!columnNoRoutList.includes('理论件数')"
- >
- </el-table-column>
- </el-table>
- </div>
- <div>
- <vxe-modal
- width="80%"
- height="80%"
- v-model="isShow3"
- show-footer
- show-zoom
- class="vxeModal"
- >
- <div class="demo-image__preview" v-for="(item, i) in srcList" :key="i">
- <span>{{ item.title }}</span>
- <el-image
- :src="item.src"
- fit="fill"
- :previewSrcList="previewSrcList"
- @click.prevent.right="receiveClick(item.src, '抵达')"
- >
- <div slot="error" class="image-slot">
- <span>司机未上传图片</span>
- </div>
- </el-image>
- </div>
- </vxe-modal>
- <vxe-modal width="80%" height="80%" v-model="isShow4" show-zoom>
- <div class="demo-image__preview" v-for="(item, i) in srcList2" :key="i">
- <el-image
- :src="item.src"
- fit="fill"
- :previewSrcList="previewSrcList2"
- @click.prevent.right="receiveClick(item.src, '签收')"
- >
- <div slot="error" class="image-slot">
- <span>司机未上传图片</span>
- </div>
- </el-image>
- </div>
- </vxe-modal>
- </div>
- <div class="dialog">
- <el-dialog
- title="运单详情"
- :visible.sync="centerDialogVisible"
- width="90%"
- center
- >
- <div class="steelMapClass">
- <div class="steelMapClass1">
- <div class="steelMapClass12">
- <span>转运计划号:</span>
- <span>{{ steelMap.saleOrderNo }}</span>
- </div>
- <div class="steelMapClass12">
- <span>订单状态:</span>
- <span>{{ steelMap.saleOrderStatus }}</span>
- </div>
- <div class="steelMapClass12">
- <span>业务员:</span>
- <span>{{ steelMap.saler }}</span>
- </div>
- <div class="steelMapClass12">
- <span>收货单位:</span>
- <span>{{ steelMap.consigneeName }}</span>
- </div>
- <div
- class="steelMapClass13"
- v-if="!notRoutList.includes('closeOrder')"
- >
- <span>车辆备注:</span>
- <span
- ><el-input
- v-model="steelMap.truckRemark"
- width="250px"
- ></el-input
- ></span>
- <!-- <span>{{ steelMap.truckRemark }}</span> -->
- </div>
- </div>
- <div class="steelMapClass2">
- <div class="steelMapClass22">
- <span>收货地址:</span>
- <el-select
- v-model="steelMap.addressProvince"
- filterable
- placeholder="请选择"
- @change="onchangeProvince"
- style="width:120px"
- :disabled="notRoutList.includes('province')"
- >
- <el-option
- v-for="item in provinceList"
- :key="item.id"
- :label="item.addressProvince"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-select
- v-model="steelMap.addressDistrict"
- filterable
- placeholder="请选择"
- @change="onchangeCity"
- style="width:120px"
- :disabled="notRoutList.includes('city')"
- >
- <el-option
- v-for="item in cityList"
- :key="item.id"
- :label="item.addressDistrict"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-select
- v-model="steelMap.addressTown"
- filterable
- placeholder="请选择"
- @change="onchangeCounty"
- style="width:120px"
- :disabled="notRoutList.includes('country')"
- >
- <el-option
- v-for="item in countyList"
- :key="item.id"
- :label="item.addressTown"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-autocomplete
- class="inline-input"
- v-model="steelMap.place"
- :fetch-suggestions="querySearch1"
- placeholder="请输入具体收货地址"
- :trigger-on-focus="false"
- @select="handleSelect1"
- style="width:250px"
- :disabled="notRoutList.includes('place')"
- >
- </el-autocomplete>
- <el-button
- type="success"
- circle
- @click="addAddressClick"
- v-if="!notRoutList.includes('addressClick')"
- >提交</el-button
- >
- </div>
- <div
- class="steelMapClass23"
- v-if="
- (steelMap.carStatus == 4 ||
- steelMap.carStatus == 5 ||
- steelMap.carStatus == null) &&
- !notRoutList.includes('closeOrder')
- "
- ></div>
- <div
- class="steelMapClass23"
- v-if="
- steelMap.carStatus == 7 && !notRoutList.includes('closeOrder')
- "
- >
- <el-button type="danger" round @click="reverseCloseOrder"
- >反关闭运单</el-button
- >
- </div>
- <div v-if="!notRoutList.includes('closeOrder')">
- <el-button round @click="resetPrintNumber"
- >重置打印次数</el-button
- >
- </div>
- </div>
- <div class="steelMapClass3">
- <div class="steelMapClass32">
- <span>收货客户电话:</span>
- <el-input
- v-model="steelMap.consigneeTel"
- style="width:150px"
- :disabled="notRoutList.includes('consigeeTel')"
- ></el-input>
- <el-button
- type="success"
- circle
- @click="updateconsigneeTel"
- v-if="!notRoutList.includes('consigeeTel')"
- >提交</el-button
- >
- </div>
- <div class="steelMapClass33">
- <span>承运商:</span>
- <el-autocomplete
- style="width:120px"
- v-model="steelMap.carrierName"
- :fetch-suggestions="querySearchCarrier"
- placeholder="请输入承运商"
- @select="handleSelectCarrier"
- :disabled="notRoutList.includes('carrierName')"
- >
- </el-autocomplete>
- <el-button
- type="success"
- circle
- @click="updateTruckCarrierDebounce"
- v-if="!notRoutList.includes('carrierName')"
- >提交</el-button
- >
- </div>
- <div class="steelMapClass33">
- <span>车牌号:</span>
- <el-autocomplete
- style="width:120px"
- v-model="steelMap.capacityNo"
- :fetch-suggestions="querySearch"
- placeholder="请输入车牌号"
- @select="handleSelect()"
- :disabled="
- notRoutList.includes('capacityNo') &&
- steelMap.capacityId != null &&
- steelMap.capacityNoFlag != null
- "
- ></el-autocomplete>
- <el-button
- type="success"
- circle
- @click="updateCapacityDebounce"
- v-if="
- !(
- notRoutList.includes('capacityNo') &&
- steelMap.capacityId != null &&
- steelMap.capacityNoFlag != null
- )
- "
- >提交</el-button
- >
- <span v-show="orgCode != 'chengyunshang'">是否校验GPS:</span>
- <el-switch
- v-model="isCheckGPS"
- v-show="orgCode != 'chengyunshang'"
- :disabled="orgCode == 'chengyunshang'"
- >
- </el-switch>
- </div>
- <div class="steelMapClass33">
- <span>司机电话:</span>
- <el-input
- style="width:120px"
- v-model="steelMap.capacityTel"
- placeholder="请输入电话号码"
- ></el-input>
- <el-button type="success" circle @click="updateDriverTel"
- >提交</el-button
- >
- </div>
- </div>
- <div class="steelMapClass4">
- <div class="steelMapClass42" v-if="steelMap.orderNo != null">
- <span>运输订单号:</span>
- <span>{{ steelMap.orderNo }}</span>
- </div>
- <div class="steelMapClass43">
- <span>运单状态:</span>
- <span>{{ steelMap.orderStatus }}</span>
- </div>
- <div
- class="steelMapClass43"
- v-if="steelMap.orderStatusTime != null"
- >
- <span>状态更新时间:</span>
- <span>{{ steelMap.orderStatusTime }}</span>
- </div>
- </div>
- <div class="steelMapClass9">
- <div
- class="steelMapClass92"
- v-if="
- steelMap.orderNo != null && !notRoutList.includes('closeOrder')
- "
- >
- <el-form :inline="true">
- <el-form-item>
- <el-input
- v-model="steelMap.remark"
- placeholder="填写备注"
- class="steelMapClass921"
- type="textarea"
- autosize
- >
- <!-- <template slot="prepend">备注</template>
- <template slot="prefix">
- {{ steelMap.remark }}
- </template> -->
- </el-input></el-form-item
- >
- <el-form-item>
- <el-button @click="openRemarkPic" type="primary"
- >备注图片</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- </div>
- <div class="steelMapClass5">
- <div class="steelMapClass52" v-if="steelMap.arrivalAddress != null">
- <span>抵达地址:</span>
- <span>{{ steelMap.arrivalAddress }}</span>
- </div>
- </div>
- <div class="steelMapClass6">
- <div class="steelMapClass62" v-if="steelMap.receiptAddress != null">
- <span>签收地址:</span>
- <span>{{ steelMap.receiptAddress }}</span>
- </div>
- </div>
- </div>
- <div class="table1">
- <el-table
- :data="steelMap.mapList"
- border
- style="width: 100%; margin-top: 20px"
- :span-method="objectSpanMethod1"
- >
- <el-table-column
- prop="materialName"
- label="物资名称"
- align="center"
- width="150px"
- >
- </el-table-column>
- <el-table-column
- prop="materialSpe"
- label="物资规格"
- align="center"
- sortable
- >
- </el-table-column>
- <el-table-column
- prop="materialNum"
- label="物资件数"
- align="center"
- width="200px"
- >
- <template slot-scope="scope">
- <button
- type="primary"
- @click="scope.row.materialNumber--"
- style="height:40px"
- v-if="!notRoutList.includes('materialNum')"
- >
- -
- </button>
- <input
- v-model="scope.row.materialNumber"
- style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
- :disabled="notRoutList.includes('materialNum')"
- />
- <button
- type="primary"
- @click="scope.row.materialNumber++"
- style="height:40px"
- :disabled="scope.row.saleOrderStatus == 4"
- v-if="!notRoutList.includes('materialNum')"
- >
- +
- </button>
- <el-button
- type="primary"
- @click="updateBillOrder(scope.row)"
- v-if="!notRoutList.includes('materialNum')"
- >提交</el-button
- >
- </template>
- </el-table-column>
- <el-table-column prop="loadTime" label="装货时间" width="130px">
- </el-table-column>
- <el-table-column prop="saleRemarkByasm" label="摘要" width="100px">
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="centerDialogVisible = false">返 回</el-button>
- <el-button @click="submitSteelDebounce(steelMap)">确定</el-button>
- </span>
- <div>
- <vxe-modal
- width="549px"
- height="731px"
- v-model="isShow"
- show-zoom
- show-footer
- class="vxeModal"
- title="抵达上传照片"
- >
- <div class="demo-image__preview">
- <div
- class="demo-image__preview"
- v-for="(item, index) in srcList"
- :key="index"
- >
- <span>{{ item.title }}</span>
- <el-image
- style="height:731px;text-align:center"
- :src="item.src"
- >
- <div slot="error" class="image-slot">
- <span>司机未上传抵达图片</span>
- </div>
- </el-image>
- </div>
- </div>
- </vxe-modal>
- <vxe-modal
- width="549px"
- height="731px"
- v-model="isShow2"
- show-zoom
- show-footer
- title="签收上传照片"
- >
- <div
- class="demo-image__preview"
- v-for="(item, index) in srcList2"
- :key="index"
- >
- <span>{{ item.title }}</span>
- <el-image style="height:731px;text-align:center" :src="item.src">
- <div slot="error" class="image-slot">
- <span>司机未上传签收图片</span>
- </div>
- </el-image>
- </div>
- </vxe-modal>
- </div>
- </el-dialog>
- </div>
- <div style="height: 100%">
- <vxe-modal
- width="1237"
- height="731"
- v-model="value7"
- show-zoom
- resize
- title="轨迹查询"
- >
- <template #default>
- <PathView v-bind.sync="pathOption"></PathView>
- </template>
- </vxe-modal>
- </div>
- <div style="height:100%">
- <vxe-modal
- width="1237"
- height="731"
- v-model="value8"
- show-zoom
- resize
- title="实时路径"
- ><currentLocation :carNumber="carNumber"></currentLocation
- ></vxe-modal>
- </div>
- <el-dialog
- title="抵达签收"
- :visible.sync="arrivalReceiving"
- :before-close="closeUpload"
- >
- <el-form style="margin-left:20%">
- <el-form-item label="车牌号码">
- <el-input
- v-model="capacityNumber"
- disabled
- style="width:300px"
- ></el-input>
- </el-form-item>
- <el-form-item label="签收地址">
- <el-input
- v-model="location"
- style="width:400px"
- :disabled="orgCode != 'wuliuyunshubu'"
- ></el-input>
- </el-form-item>
- <el-form-item label="抵达时间">
- <el-date-picker
- v-model="arrivalTime"
- type="datetime"
- :disabled="orgCode != 'wuliuyunshubu'"
- placeholder="选择日期时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="签收时间">
- <el-date-picker
- v-model="receiptTime"
- type="datetime"
- :disabled="orgCode != 'wuliuyunshubu'"
- placeholder="选择日期时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="抵达图片(车头、满货箱)" style="">
- <el-upload
- ref="arrival"
- list-type="picture-card"
- :file-list="arriavlList"
- action="/api/v1/otms/addtmstruckArrivalResult"
- :limit="12"
- :on-change="fileChange1"
- :on-remove="fileChange1"
- :on-preview="handlePictureCardPreview"
- :on-exceed="exceed"
- accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
- :auto-upload="false"
- >
- <i class="el-icon-plus"></i>
- </el-upload>
- </el-form-item>
- <el-form-item label="签收图片(空货箱、质保书、签收单)">
- <el-upload
- ref="receive"
- list-type="picture-card"
- :file-list="receiveList"
- action="null"
- :limit="11"
- :on-change="fileChange2"
- :on-remove="fileChange2"
- :on-preview="handlePictureCardPreview"
- :on-exceed="exceed"
- accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
- :auto-upload="false"
- >
- <i class="el-icon-plus"></i>
- </el-upload>
- </el-form-item>
- </el-form>
- <el-button
- type="primary"
- @click="arrivalAndReceive"
- :loading="isLoading"
- style="margin-left:40%"
- >确定</el-button
- >
- </el-dialog>
- <el-dialog
- title="备注图片(图片暂存后需要点击全局确定才会保存)"
- :visible.sync="remarkPic"
- :before-close="closeUpload2"
- >
- <el-form style="margin-left:20%">
- <el-form-item>
- <el-upload
- ref="remarkPic"
- list-type="picture-card"
- :file-list="remarkPicList"
- action="null"
- :limit="11"
- :on-change="fileChange3"
- :on-remove="fileChange3"
- :on-preview="handlePictureCardPreview"
- :on-exceed="exceed"
- accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
- :auto-upload="false"
- >
- <i class="el-icon-plus"></i>
- </el-upload>
- </el-form-item>
- </el-form>
- <el-button
- type="primary"
- @click="uploadRemarkPic"
- :loading="isLoading"
- style="margin-left:40%"
- >暂存</el-button
- >
- </el-dialog>
- <el-dialog :visible.sync="dialogVisible" width="80%">
- <img width="100%" :src="dialogImageUrl" alt="" />
- </el-dialog>
- <el-dialog :visible.sync="batchCarrierVisible" width="55%" center>
- <div class="batchCarrierClass">
- <el-form :inline="true">
- <span>批量授权承运商</span>
- <el-form-item>
- <el-autocomplete
- style="width:250px"
- v-model="batchCarrierName"
- :fetch-suggestions="querySearchCarrier"
- placeholder="请输入承运商"
- @select="handleSelectCarrier"
- >
- </el-autocomplete>
- </el-form-item>
- <el-form-item>
- <el-button @click="batchCarrierVisible = false">取 消</el-button>
- <el-button type="primary" @click="batchCarrierMakeSure"
- >确 定</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- <div class="batchCapacityClass">
- <el-form :inline="true">
- <span>批量修改车牌号</span>
- <el-form-item>
- <el-autocomplete
- style="width:250px"
- v-model="capacityNo"
- :fetch-suggestions="querySearch"
- placeholder="请输入车牌号"
- @select="batchCapacitySelect"
- >
- </el-autocomplete>
- </el-form-item>
- <el-form-item>
- <el-button @click="batchCarrierVisible = false">取 消</el-button>
- <el-button type="primary" @click="batchEditCapacity"
- >确 定</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- <div class="steelMapClass22">
- <span>收货地址:</span>
- <el-select
- v-model="steelMap.addressProvince"
- filterable
- placeholder="请选择"
- @change="onchangeProvince"
- style="width:120px"
- :disabled="notRoutList.includes('province')"
- >
- <el-option
- v-for="item in provinceList"
- :key="item.id"
- :label="item.addressProvince"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-select
- v-model="steelMap.addressDistrict"
- filterable
- placeholder="请选择"
- @change="onchangeCity"
- style="width:120px"
- :disabled="notRoutList.includes('city')"
- >
- <el-option
- v-for="item in cityList"
- :key="item.id"
- :label="item.addressDistrict"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-select
- v-model="steelMap.addressTown"
- filterable
- placeholder="请选择"
- @change="onchangeCounty"
- style="width:120px"
- :disabled="notRoutList.includes('country')"
- >
- <el-option
- v-for="item in countyList"
- :key="item.id"
- :label="item.addressTown"
- :value="item.id"
- ></el-option>
- </el-select>
- <el-autocomplete
- class="inline-input"
- v-model="steelMap.place"
- :fetch-suggestions="querySearch1"
- placeholder="请输入具体收货地址"
- :trigger-on-focus="false"
- @select="handleSelect1"
- style="width:250px"
- :disabled="notRoutList.includes('place')"
- >
- </el-autocomplete>
- <el-button
- type="success"
- circle
- @click="batchUpdateCarAddress"
- v-if="!notRoutList.includes('addressClick')"
- >提交</el-button
- >
- </div>
- <div class="batchCapacityClass" style="margin:30px">
- <el-form :inline="true">
- <el-form-item>
- <span>批量修改收货客户电话:</span>
- <el-input
- v-model="consigneeTel"
- style="width:150px"
- :disabled="notRoutList.includes('consigeeTel')"
- ></el-input>
- <el-button
- type="success"
- circle
- @click="batchUpdateconsigneeTel"
- v-if="!notRoutList.includes('consigeeTel')"
- >提交</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- </el-dialog>
- <el-dialog
- title="切换列的显示与隐藏"
- :visible.sync="columnShowDialog"
- width="50%"
- center
- class="columnShowDialogClass"
- >
- <el-tabs
- v-model="schemeMap.activeName"
- type="card"
- editable
- @edit="handleTabsEdit"
- @tab-click="columnShowTabClick"
- tab-position="left"
- >
- <el-tab-pane
- :key="index"
- v-for="(item, index) in schemeMap.schemeList"
- :label="item.title"
- :name="item.name"
- >
- <el-form :inline="true">
- <el-form-item>
- <div style="border:2px,solid,green">
- <div
- style="margin-left: 50%;margin-bottom: 15px;font-size: 16px;"
- >
- {{ schemeMap.activeName }}
- </div>
- <el-transfer
- style="text-align: left; display: inline-block"
- v-model="item.columnHiddenData"
- :data="item.columnAllData"
- :titles="['显示的列', '隐藏的列']"
- :button-texts="['至显示列', '至隐藏列']"
- ></el-transfer>
- </div>
- </el-form-item>
- </el-form>
- <el-form :inline="true">
- <el-form-item>
- <el-button @click="columnShowDialog = false">取 消</el-button>
- <el-button type="primary" @click="columnShowOperation(item)"
- >启用</el-button
- >
- </el-form-item>
- </el-form>
- </el-tab-pane>
- </el-tabs>
- </el-dialog>
- <div class="cofirmInbound">
- <el-dialog :visible.sync="confireInboundVisible" width="90%">
- <div
- style="font-size: 20px;font-weight:500;display: flex;justify-content: center;align-items: center;"
- >
- <span>出库确认</span>
- </div>
- <div class="steelMapClass">
- <div class="steelMapClass1">
- <div
- class="steelMapClass12"
- style="font-size: 16px;font-weight:500"
- >
- <span>转运计划号:</span>
- <span>{{ steelMap.saleOrderNo }}</span>
- </div>
- <div
- class="steelMapClass12"
- style="font-size: 18px;font-weight:500"
- >
- <span>订单状态:</span>
- <span>{{ steelMap.saleOrderStatus }}</span>
- </div>
- <div
- class="steelMapClass12"
- style="font-size: 16px;font-weight:500"
- >
- <span>业务员:</span>
- <span>{{ steelMap.saler }}</span>
- </div>
- <div
- class="steelMapClass12"
- style="font-size: 16px;font-weight:500"
- >
- <span>收货单位:</span>
- <span>{{ steelMap.consigneeName }}</span>
- </div>
- </div>
- <div class="steelMapClass2">
- <div
- class="steelMapClass22"
- style="font-size: 16px;font-weight:500"
- >
- <span>收货地址:</span>
- <span>{{ steelMap.addressProvince }}</span>
- <span>{{ steelMap.addressDistrict }}</span>
- <span>{{ steelMap.addressTown }}</span>
- <span>{{ steelMap.place }}</span>
- </div>
- </div>
- <div class="steelMapClass3">
- <div
- class="steelMapClass33"
- style="font-size: 16px;font-weight:500"
- >
- <span>承运商:</span>
- <span>{{ steelMap.carrierName }}</span>
- </div>
- <div
- class="steelMapClass33"
- style="font-size: 16px;font-weight:500"
- >
- <span>车牌号:</span>
- <span>{{ steelMap.capacityNo }}</span>
- </div>
- <div
- class="steelMapClass33"
- style="font-size: 16px;font-weight:500"
- >
- <span>司机电话:</span>
- <span>{{ steelMap.capacityTel }}</span>
- </div>
- </div>
- <div class="steelMapClass4">
- <div
- class="steelMapClass42"
- v-if="steelMap.orderNo != null"
- style="font-size: 16px;font-weight:500"
- >
- <span>运输订单号:</span>
- <span>{{ steelMap.orderNo }}</span>
- </div>
- <div
- class="steelMapClass43"
- style="font-size: 16px;font-weight:500"
- >
- <span>运单状态:</span>
- <span>{{ steelMap.orderStatus }}</span>
- </div>
- <div
- class="steelMapClass43"
- style="font-size: 16px;font-weight:500"
- >
- <span>厂外库</span>
- <span>欧冶库</span>
- </div>
- </div>
- </div>
- <div class="table1">
- <el-table
- :data="steelMap.mapList"
- border
- style="width: 100%; margin-top: 20px"
- :span-method="objectSpanMethod1"
- >
- <el-table-column
- prop="materialName"
- label="物资名称"
- align="center"
- width="150px"
- >
- </el-table-column>
- <el-table-column
- prop="materialSpe"
- label="物资规格"
- align="center"
- sortable
- >
- </el-table-column>
- <el-table-column prop="materialNum" label="物资件数" align="center">
- </el-table-column>
- <el-table-column prop="meter" label="米数" align="center">
- </el-table-column>
- <el-table-column prop="singleWeight" label="单重" align="center">
- </el-table-column>
- <el-table-column
- prop="saleRemarkByasm"
- label="摘要"
- width="180px"
- align="center"
- >
- </el-table-column>
- <el-table-column label="具体仓库名称">
- <template slot-scope="scope">
- <el-select v-model="scope.row.inboundWarehouse">
- <el-option
- v-for="(item, index) in oYeWarehouseList"
- :label="item.label"
- :value="item.value"
- :key="index"
- ></el-option
- ></el-select>
- </template>
- </el-table-column>
- <el-table-column label="出库净重">
- <template slot-scope="scope">
- <el-input
- v-model.number="scope.row.inboundNetWeight"
- type="number"
- ></el-input>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span
- slot="footer"
- class="dialog-footer"
- style="display: flex;justify-content: center;align-items: center;"
- >
- <el-button @click="confireInboundVisible = false">返 回</el-button>
- <el-button @click="confireInboundTo(steelMap)">确定</el-button>
- </span>
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import { sjTime, isVehicleNumber } from '@/utils/sharedJsFile'
- import { getCookie } from '@/utils/util.js'
- import PathView from './mapTest.vue'
- import currentLocation from './currentLocation.vue'
- import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
- export default {
- components: {
- PathView,
- currentLocation
- },
- data() {
- const generateStartDate = _ => {
- let startDate = new Date()
- console.log(startDate, 'generateStartDate')
- if (
- new Date(startDate.getTime() - 86400000).getMonth() ===
- new Date(startDate.getTime() - 8 * 60 * 60 * 1000).getMonth() &&
- new Date(startDate.getTime() - 86400000).getDate() ===
- new Date(startDate.getTime() - 8 * 60 * 60 * 1000).getDate()
- ) {
- startDate = new Date(startDate.getTime() - 86400000)
- }
- return startDate
- }
- return {
- confireInboundVisible: false,
- toggleRowIds: [],
- capacityNo: null,
- capacityId: null,
- consigneeTel: null,
- batchCapacityList: [],
- batchCapacityVisible: false,
- isShowSaleLog: false,
- optionSaleLog: {
- maxHeight: 400,
- requestUrl: '/api/v1/ams/selectAllLog?apiId=522',
- requestQuery: {
- con: null
- }
- },
- isCheckGPS: true,
- userId: null,
- orgCode: null,
- taskAllNum: 0,
- noticeInterval: null,
- exceptionHandleVisible: false,
- batchCarrierName: null,
- batchCarrierVisible: false,
- visibleList: [],
- itemHeight: 30,
- scrollTop: 0,
- debounceS: false,
- carNumber: '',
- //弹出框
- centerDialogVisible: false,
- //根据车序号查询的值
- steelMap: {},
- //钢材子表数据
- drawer: false,
- isShow3: false,
- isShow4: false,
- input: null,
- screen: '',
- options: [
- {
- value: '客户',
- lable: '客户'
- },
- {
- value: '承运商',
- lable: '承运商'
- },
- {
- value: '车牌号',
- lable: '车牌号'
- },
- {
- value: '收货地址',
- lable: '收货地址'
- },
- {
- value: '转运计划号',
- lable: '转运计划号'
- }
- ],
- input1: null,
- screen1: '',
- options1: [
- {
- value: '客户',
- lable: '客户'
- },
- {
- value: '承运商',
- lable: '承运商'
- },
- {
- value: '车牌号',
- lable: '车牌号'
- },
- {
- value: '收货地址',
- lable: '收货地址'
- },
- {
- value: '转运计划号',
- lable: '转运计划号'
- }
- ],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now()
- },
- shortcuts: [
- {
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date())
- }
- },
- {
- text: '昨天',
- onClick(picker) {
- const date = new Date()
- date.setTime(date.getTime() - 3600 * 1000 * 24)
- picker.$emit('pick', date)
- }
- },
- {
- text: '一周前',
- onClick(picker) {
- const date = new Date()
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
- picker.$emit('pick', date)
- }
- },
- {
- text: '元年',
- onClick(picker) {
- const date = new Date()
- date.setTime(0)
- picker.$emit('pick', date)
- }
- }
- ]
- },
- pickerOptions1: {
- disabledDate(time) {
- return time.getTime() > Date.now()
- },
- shortcuts: [
- {
- text: '今天',
- onClick(picker) {
- picker.$emit('pick', new Date())
- }
- },
- {
- text: '昨天',
- onClick(picker) {
- const date = new Date()
- date.setTime(date.getTime() - 3600 * 1000 * 24)
- picker.$emit('pick', date)
- }
- },
- {
- text: '一周前',
- onClick(picker) {
- const date = new Date()
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
- picker.$emit('pick', date)
- }
- },
- {
- text: '元年',
- onClick(picker) {
- const date = new Date()
- date.setTime(0)
- picker.$emit('pick', date)
- }
- }
- ]
- },
- startTime: generateStartDate(),
- endTime: generateStartDate(),
- //合计净重
- totalNumber: 0,
- //合计车数
- totalCapacity: 0,
- //取消车数
- quxiaoCapacityNum: 0,
- //合计吨位
- totalNetWeight: 0,
- tableTitle: '销售统计报表',
- capacityList: [],
- carrierList: [],
- tableData: [],
- spanArr: [],
- pos: 0,
- spanArr1: [],
- spanArr2: [],
- spanArr3: [],
- mergeListBatch: [
- '净重',
- '皮重时间',
- '皮重',
- '毛重时间',
- '毛重',
- '异常操作',
- '具体仓库名称'
- ],
- pos2: 0,
- pos3: 0,
- pos1: 0,
- //需要合并列的名称
- mergeList: [
- '选择',
- '序号',
- '整车操作',
- '销售订单状态',
- '销售订单号',
- '发货单位',
- '司机电话',
- '运输订单号',
- '签收地址',
- '签收时间',
- '抵达地址',
- '抵达时间',
- '出厂时间',
- '进厂时间',
- '运单状态',
- '订单实际状态',
- '车牌号',
- '承运商',
- '客户',
- '收货地址',
- '业务员',
- '送货单打印',
- '收货客户电话',
- '是否自提',
- '订单日期',
- '短信发送',
- '销售片区',
- '抵达时间',
- '签收时间',
- // '摘要',
- '排队开始时间',
- '钢材科放行时间',
- '备注',
- '订单变更时间',
- '异地库接收标志',
- '销售订单变更记录',
- '运输订单变更记录',
- '拼数',
- '是否继续装',
- '订单上传时间',
- '收款公司'
- ],
- //钢材多拼车辆线路ID
- //索引从1-10为1-10拼路线ID
- lineSpelling: [
- 0,
- 279973,
- 279974,
- 279975,
- 279976,
- 279977,
- 279978,
- 279979,
- 279980,
- 279981,
- 279982,
- 279983
- ],
- tableTitle: '销售钢材统计报表',
- //所有省
- provinceList: [],
- //选中的省
- province: '',
- //所有市
- cityList: [],
- //选中的市
- city: '',
- //所有的县(区)
- countyList: [],
- //选中的县
- county: '',
- //地址输入框的值
- addresText: '',
- //已选中省市县
- //具体地址
- //省市县Id
- addressId: null,
- addressRow: {},
- srcList: [],
- previewSrcList2: [],
- src: '',
- isShow: false,
- srcList2: [],
- previewSrcList2: [],
- isShow2: false,
- maxHeight: 700,
- //轨迹窗口
- value7: false,
- //实时路径窗口
- value8: false,
- pathOption: {
- orderNumber: '',
- capacityNumber: '',
- startPointName: '',
- endPointName: '',
- statusCode: '位置'
- },
- saleSteelKey: false,
- tableRowIndex: '',
- isRowClick: 0,
- orgCodeList: [
- 'wuliuyunshubu',
- 'dagangadmin',
- 'zidonghuabu',
- 'chengyunshang'
- ],
- isShowOperate: false,
- filterConsigneeList: [],
- filterCarrierList: [],
- filterCapacityList: [],
- filtermaterialNameList: [],
- filterorderStatusActually: [],
- filterorderStatus: [
- { text: '未派发', value: '未派发' },
- { text: '已派单', value: '已派单' },
- { text: '已接单', value: '已接单' },
- { text: '排队中', value: '排队中' },
- { text: '已完成', value: '已完成' },
- { text: '已关闭', value: '已关闭' }
- ],
- filterIsContinue: [
- { text: '是', value: '是' },
- { text: '否', value: '否' }
- ],
- filterUploadTime: [],
- filterSpellNum: [
- { text: '0', value: '0' },
- { text: '1', value: '1' },
- { text: '2', value: '2' },
- { text: '3', value: '3' },
- { text: '4', value: '4' },
- { text: '5', value: '5' },
- { text: '6', value: '6' },
- { text: '7', value: '7' },
- { text: '8', value: '8' },
- { text: '9', value: '9' }
- ],
- filteraddressPlace: [],
- filtermaterialSpe: [],
- filterSaleRemark: [],
- filterTruckRemark: [],
- filterSaleOrderStatus: [
- { text: '待审核', value: '待审核' },
- { text: '已审核', value: '已审核' }
- ],
- filterFlStatus: [
- {
- text: '关闭',
- value: '关闭'
- },
- {
- text: '正常',
- value: '正常'
- }
- ],
- filterMap: {
- consigneeNameList: [],
- truckRemarkList: [],
- saleRemarkList: [],
- saleOrderStatusList: [],
- materialSpeList: [],
- addressPlaceList: [],
- orderStatusList: [],
- saleAreaList: [],
- materialNameList: [],
- carrierList: [],
- capacityList: [],
- orderStatusActuallyList: []
- },
- //权限控制
- notRoutList: [],
- remarkPic: false,
- remarkPicList: [],
- location: null,
- orderNumber: null,
- capacityNumber: null,
- arrivalReceiving: false,
- arriavlList: [],
- receiveList: [],
- fileListArrival: [],
- fileListReceive: [],
- dialogImageUrl: '',
- dialogVisible: false,
- isLoading: false,
- arrivalTime: null,
- receiptTime: null,
- dialogFormVisible: false,
- addresText: null,
- originalPriceValue: null,
- originalAddress: null,
- aaadrawer: false,
- downloadCapacityNo: null,
- batchCarrierList: [],
- columnNoRoutList: [],
- salerExportExcelList: [
- '订单日期',
- '客户',
- '物资名称',
- '物资规格',
- '物资件数',
- '理重',
- '净重',
- '收货地址',
- '收货客户电话',
- '摘要',
- '备注',
- '车牌号',
- '司机电话',
- '制单日期',
- '销售订单状态',
- '运单状态',
- '承运商',
- '排队开始时间',
- '钢材科放行时间',
- '进厂时间',
- '皮重时间',
- '皮重',
- '装货时间',
- '毛重时间',
- '毛重',
- '送货单打印',
- '出厂时间',
- '短信发送',
- '抵达地址',
- '抵达时间',
- '签收地址',
- '签收时间',
- '实际运价',
- '实际运费',
- '异地库接收标志',
- '运输订单号',
- '业务员',
- '发货单位',
- '是否自提',
- '销售订单号',
- '金蝶分录ID',
- '订单变更时间',
- '销售订单变更记录',
- '运输订单变更记录',
- '收款公司',
- '理论件数'
- ],
- scrollUpdateSelectFlag: 0,
- scrollLeft: 0,
- scrollLeftFlag: 0,
- isShowOperateYeWuYuan: false,
- headColumnList: [],
- columnAllData: [],
- columnHiddenData: [],
- consigneeCheckList: [],
- showPopover: false,
- schemeMap: {},
- statusNumData: [],
- oYeWarehouseList: [],
- columnShowDialog: false
- }
- },
- created() {
- if (this.$route.query.str) {
- let filterMap = JSON.parse(this.$route.query.str)
- if (filterMap) {
- this.filterMap = filterMap
- this.startTime = filterMap.startTime
- this.endTime = filterMap.endTime
- }
- }
- this.getSteelReport = this.debounce(() => {
- this.getSteelReportDebounce()
- }, 100)
- this.orgCode = getCookie('orgCode')
- this.userId = getCookie('userId')
- if (this.orgCodeList.includes(getCookie('orgCode'))) {
- this.isShowOperate = true
- }
- if (getCookie('orgCode') == 'chengyunshang') {
- this.notRoutList = [
- 'checkPoint',
- 'checkTrans',
- 'carrierName',
- 'consigeeTel',
- 'province',
- 'city',
- 'country',
- 'place',
- 'addressClick',
- 'closeOrder',
- 'materialNum',
- 'closeEntry',
- 'capacityNo',
- 'batchCarrier',
- 'select',
- 'exceptionHandle',
- 'mergeSplit',
- 'saleLog',
- 'batchCapacity'
- ]
- this.noticeInterval = setInterval(() => {
- this.getinformation()
- }, 1000 * 180)
- }
- this.getSteelReport()
- if (getCookie('orgCode') == 'shouhuokehu') {
- //如果是收货客户,则查询
- this.axios
- .post('/api/v1/uc/getColumnNoRoutList', {
- orgCode: getCookie('orgCode'),
- userName: getCookie('loginName'),
- tableName: '销售钢材报表'
- })
- .then(res => {
- this.columnNoRoutList = res.data
- })
- this.notRoutList = ['select']
- } else {
- this.getColumShowHideScheme()
- }
- if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
- this.isShowOperateYeWuYuan = true
- }
- //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
- this.updateCapacityDebounce = this.debounce(() => {
- this.updateCapacity()
- }, 1500)
- this.updateTruckCarrierDebounce = this.debounce(() => {
- this.updateTruckCarrier()
- }, 1500)
- this.cellMouse1 = this.debounce((row, column, cell) => {
- this.cellMouse(row, column, cell)
- }, 200)
- this.cellLeave1 = this.debounce((row, column, cell) => {
- this.cellLeave(row, column, cell)
- }, 200)
- this.exceptionHandleMakeSure = this.debounce(() => {
- this.exceptionHandleMakeSure1()
- }, 500)
- this.submitSteelDebounce = this.debounce(obj => {
- this.submitSteel(obj)
- })
- },
- watch: {
- visibleList: {
- deep: true,
- immediate: true,
- handler(val) {
- let standList = this.$store.state.saleSteelToggleIds
- this.$nextTick(() => {
- this.visibleList.forEach(e => {
- if (standList.includes(e.saleOrderMaterialId))
- this.$refs.tableRef.toggleRowSelection(e, true)
- })
- })
- }
- },
- maxHeight() {
- this.visibleList = this.tableData.slice(
- 0,
- Math.floor(this.maxHeight / 30)
- )
- this.getSpanArr(this.visibleList)
- document.querySelector(
- '.el-table__body-wrapper .el-table__body'
- ).style.transform = `translateY(${0}px)`
- },
- scrollTop: {
- immediate: true,
- deep: true,
- handler(val) {
- this.$nextTick(() => {
- if (
- val >=
- this.tableData.length * 30 -
- document.querySelector('.el-table__body-wrapper').offsetHeight -
- 20
- ) {
- val =
- this.tableData.length * 30 -
- document.querySelector('.el-table__body-wrapper').offsetHeight
- }
- if (val <= 0) {
- val = 0
- }
- const start = Math.floor(val / 30)
- this.visibleList = this.tableData.slice(
- start,
- start + Math.floor(this.maxHeight / 30)
- )
- this.getSpanArr(this.visibleList)
- document.querySelector(
- '.el-table__body-wrapper .el-table__body'
- ).style.transform = `translateY(${val}px)`
- this.debounceS = false
- })
- }
- },
- scrollLeft: {
- immediate: true,
- deep: true,
- handler(val) {
- this.scrollLeftFlag = 1
- }
- }
- },
- destroyed() {
- clearInterval(this.noticeInterval)
- },
- computed: {},
- mounted() {
- this.$nextTick(() => {
- const that = this
- window.onresize = () => {
- return (() => {
- console.log('我触发了表格分辨率变化的时间')
- that.$nextTick(() => {
- that.maxHeight =
- window.innerHeight -
- document.querySelector('.tableTop').offsetHeight -
- 40
- })
- })()
- }
- })
- this.$refs.tableRef.bodyWrapper.addEventListener('scroll', e => {
- if (this.scrollLeftFlag == 1 && this.debounceS == true) {
- this.debounceS = false
- }
- if (this.debounceS) return
- this.debounceS = true
- this.scrollTop = e.target.scrollTop
- this.scrollLeft = e.target.scrollLeft
- this.scrollUpdateSelectFlag = 1
- })
- //基础数据查询
- this.getAllProvince()
- //欧冶仓库
- this.getOyeWarehouse()
- },
- activated() {
- this.maxHeight =
- window.innerHeight - document.querySelector('.tableTop').offsetHeight - 40
- },
- methods: {
- getOyeWarehouse() {
- this.axios
- .post(
- '/api/v1/ams/getOyeWarehouse?apiId=532&pageNum=1&pageSize=100&i=' +
- new Date()
- )
- .then(res => {
- this.oYeWarehouseList = res.data.data.list.map(item => {
- let map = {}
- map.label = item.warehouseName
- map.value = item.warehouseName
- return map
- })
- if (getCookie('orgCode') == 'chengyunshang') {
- this.oYeWarehouseList = this.oYeWarehouseList.filter(item => {
- return item.remark == JSON.parse(getCookie('userInfo')).userName
- })
- }
- })
- },
- confireInboundTo(item) {
- console.log(item, 'item')
- let flag = 1
- let arr = item.mapList.map(e => {
- let map = {}
- map.capacityId = item.capacityId
- map.capacityNumber = item.capacityNo
- map.consigneeId = e.consigneeId
- map.saleNo = item.saleOrderNo
- map.inboundWarehouse = e.inboundWarehouse
- map.inboundArea = '欧冶库'
- map.orderId = item.orderId
- map.meter = e.meter
- map.netWeight = e.inboundNetWeight
- map.materialNumber = e.materialNumber
- map.theoryWeight = e.materialThoWeight
- map.materialId = e.materialId
- map.saleMaterialId = e.saleMaterialId
- map.saleArea = e.saleRemarkByasm
- console.log(map.saleRemarkByasm, 'map.saleRemarkByasm ')
- map.userName = getCookie('loginName')
- map.isPoundSale = e.isPoundSale
- if (map.isPoundSale == 0) {
- //为0则为磅重销售,则将净重转为理重
- map.theoryWeight = e.inboundNetWeight
- }
- return map
- })
- console.log(arr, 'arr')
- this.confireInboundToWms(arr)
- },
- confireInboundToWms(data) {
- this.axios
- .post('/api/v1/wms/insertOyeOutboundResult', {
- mapList: data
- })
- .then(res => {
- if (res.data.status == 'succeed') {
- this.$message({
- type: 'success',
- message: res.data.data
- })
- this.confireInboundVisible = false
- this.onclick(this.filterMap)
- } else {
- this.$message({
- type: 'error',
- message: res.data.data
- })
- }
- })
- },
- confirmInbound() {
- if (Object.values(this.steelMap).length == 0) {
- this.$message.error('请点击需要执行更改操作的行!')
- return
- }
- // 将中文逗号替换为英文逗号
- if (Object.keys(this.steelMap).length > 0) {
- this.axios
- .post(
- '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
- this.steelMap.saleOrderMaterialId
- )
- .then(res => {
- this.steelMap = res.data.data
- this.steelMap.userName = getCookie('loginName')
- this.confireInboundVisible = true
- this.getSpanArr1(res.data.data.mapList)
- })
- }
- },
- openBlank() {
- let page = this.$router.resolve({
- name: 'saleSteelReports',
- query: { id: 0, e: 0 },
- meta: {
- title: '销售钢材报表'
- }
- })
- window.open(page.href, '_blank')
- },
- getColumShowHideScheme() {
- this.axios
- .post('/api/v1/uc/getColumShowHideScheme', {
- userName: getCookie('loginName'),
- orgCode: getCookie('orgCode'),
- tableName: '销售钢材报表'
- })
- .then(res => {
- this.schemeMap = res.data.data
- this.columnNoRoutList = this.schemeMap.columnHiddenData
- })
- .catch(() => {
- this.columnNoRoutList = []
- })
- },
- columnShowTabClick(e) {
- this.schemeMap.activeName = e.paneName
- },
- //动态渲染列的显示方案
- handleTabsEdit(targetName, action) {
- if (action === 'add') {
- this.$confirm('请输入方案名称', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'info',
- showInput: true,
- center: true
- })
- .then(mes => {
- let newTabName = mes.value
- this.schemeMap.schemeList.push({
- title: newTabName,
- name: newTabName,
- columnAllData: this.schemeMap.columnAllData,
- columnHiddenData: []
- })
- this.schemeMap.activeName = newTabName
- })
- .catch(() => {
- this.$message({
- type: 'info',
- message: '用户取消操作'
- })
- })
- }
- if (action === 'remove') {
- let map = {}
- map.columnHiddenData = []
- map.name = targetName || this.schemeMap.activeName
- this.columnShowOperation(map)
- }
- },
- //动态渲染表头
- renderHeader(h, { column }) {
- let renderColumnFilterList = []
- let filterVal = ''
- let optionList = []
- if (column.label === '客户') {
- filterVal = 'consigneeNameList'
- renderColumnFilterList = this.filterConsigneeList
- } else if (column.label === '车牌号') {
- filterVal = 'capacityList'
- renderColumnFilterList = this.filterCapacityList
- } else if (column.label === '收货地址') {
- filterVal = 'addressPlaceList'
- renderColumnFilterList = this.filteraddressPlace
- } else if (column.label === '摘要') {
- filterVal = 'saleRemarkList'
- renderColumnFilterList = this.filterSaleRemark
- } else if (column.label === '备注') {
- filterVal = 'truckRemarkList'
- renderColumnFilterList = this.filterTruckRemark
- } else if (column.label === '物资名称') {
- filterVal = 'materialNameList'
- renderColumnFilterList = this.filtermaterialNameList
- } else if (column.label === '物资规格') {
- filterVal = 'materialSpeList'
- renderColumnFilterList = this.filtermaterialSpe
- }
- if (filterVal == '') {
- return h('div', column.label, {})
- }
- return h(
- 'div',
- {
- style: {
- height: 'auto',
- color: this.filterMap[filterVal].length > 0 ? '#409EFF' : '#ffff',
- fontWeight: this.filterMap[filterVal].length > 0 ? '700' : '400',
- fontSize: '12px'
- }
- },
- [
- h(
- 'el-popover',
- {
- props: {
- placement: 'bottom',
- trigger: 'click',
- value: this.showPopover
- },
- style: {
- width: 'auto'
- },
- on: {
- show: _ => {
- this.$nextTick(() => {
- this.$refs.filterSelectRef.focus()
- })
- }
- }
- },
- [
- h('span', {
- slot: 'reference',
- style: 'margin-top:20px',
- domProps: {
- innerHTML:
- column.label + ' ' + '<i class="el-icon-search""/>'
- }
- }),
- this.$createElement(
- 'el-select',
- {
- ref: `filterSelectRef`,
- style: {
- 'margin-bottom': '10px',
- 'border-bottom': '1px solid #efefef',
- 'padding-bottom': '10px',
- width: '250px'
- },
- props: {
- placeholder: '请输入查询',
- reserveKeyword: true,
- filterable: true,
- filterMethod: e => {
- this.filterMethodChange(
- e,
- filterVal,
- renderColumnFilterList
- )
- },
- multiple: true,
- collapseTags: true,
- value: this.filterMap[filterVal]
- },
- on: {
- change: val => {
- if (val) {
- this.filterMap[filterVal] = [...new Set(val)]
- } else {
- let i = this.filterMap[filterVal].findIndex(
- row => row == val
- )
- this.filterMap[filterVal].splice(i, 1)
- }
- }
- }
- },
- [
- renderColumnFilterList.map((item, index) => {
- return h('el-option', {
- props: {
- label: item.text,
- value: item.text,
- key: item.text
- }
- })
- })
- ]
- ),
- h('el-button', {
- props: {
- size: 'mini'
- },
- on: {
- click: e => {
- this.filterMap[filterVal] = []
- this.onclick(this.filterMap)
- }
- },
- domProps: {
- innerHTML: '重置'
- }
- }),
- h('el-button', {
- props: {
- size: 'mini',
- type: 'primary'
- },
- on: {
- click: _ => {
- this.onclick(this.filterMap)
- }
- },
- domProps: {
- innerHTML: '筛选'
- }
- })
- ]
- )
- ]
- )
- },
- filterMethodChange(e, filterVal, renderColumnFilterList) {
- this.filterMap[filterVal] = [e]
- },
- ctrlColumnShow() {
- this.columnShowDialog = true
- },
- columnShowOperation(item) {
- this.axios
- .post('/api/v1/uc/updateColumnShowHidden', {
- userName: getCookie('loginName'),
- orgCode: getCookie('orgCode'),
- tableName: '销售钢材报表',
- columnHiddenData: item.columnHiddenData,
- schemeName: item.name
- })
- .then(res => {
- this.$message({
- type: 'success',
- message: '切换成功',
- offset: '250'
- })
- this.$router.go(0)
- })
- this.columnShowDialog = false
- },
- headCellStyle({ row, column, rowIndex, columnIndex }) {
- // console.log(row, 'row')
- // console.log('headCellStyle column.property: ', column.property)
- if (column.property && this.headColumnList.includes(column.property)) {
- return { fontWeight: 700, fontSize: '15px' }
- //return {}
- }
- return {}
- },
- clearFilter() {
- this.$refs.tableRef.clearFilter()
- this.headColumnList = []
- this.filterMap = {
- consigneeNameList: [],
- truckRemarkList: [],
- saleRemarkList: [],
- saleOrderStatusList: [],
- materialSpeList: [],
- addressPlaceList: [],
- orderStatusList: [],
- saleAreaList: [],
- materialNameList: [],
- carrierList: [],
- capacityList: [],
- isContinueList: [],
- spellNumList: []
- }
- this.onclick(this.filterMap)
- },
- submitSteel(obj) {
- this.$confirm('该操作会修改全部改动的内容,请确认核实后点击!', '提醒', {
- cancelButtonText: '取消',
- confirmButtonText: '确认',
- center: true
- }).then(() => {
- let map = obj
- map.userName = getCookie('loginName')
- map.shipperAddressId = this.addressId
- this.axios.post('/api/v1/uc/submitSteel', this.steelMap).then(res => {
- let _this = this
- if (res.data.responseMapFailed.length > 0) {
- let responseFailTitle = res.data.responseMapFailed.join(';')
- this.$message({
- type: 'error',
- duration: 2500,
- offset: '250',
- message: responseFailTitle
- })
- }
- if (res.data.response.length == 0) {
- setTimeout(() => {
- _this.$message({
- type: 'success',
- duration: 1500,
- offset: '250',
- message: '未发现任何修改成功的记录!'
- })
- }, 2500)
- } else {
- let responseTitle = res.data.response.join(';')
- setTimeout(() => {
- _this.$message({
- type: 'success',
- duration: 2500,
- offset: '250',
- message: responseTitle
- })
- }, 2500)
- }
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- })
- })
- },
- resetPrintNumber() {
- this.axios
- .post('/api/v1/bp/resetPrintNumber', this.steelMap)
- .then(res => {
- if (res.data.status == 'succeed') {
- this.$message.success('重置成功!')
- } else {
- this.$message.error('重置失败!')
- }
- })
- },
- showBatchCapacity() {
- this.capacityNo = null
- this.capacityId = null
- this.batchCapacityList = []
- console.log(this.$refs.tableRef.selection)
- //按照saleOrderMaterialId查询物资数量size,用于确定派车的线路ID
- this.$refs.tableRef.selection.forEach(item1 => {
- item1.size = this.visibleList.filter(item2 => {
- return item1.saleOrderMaterialId == item2.saleOrderMaterialId
- }).length
- })
- this.batchCapacityList = this.$refs.tableRef.selection
- console.log(this.batchCapacityList)
- // if (this.batchCapacityList.length > 0) {
- // this.batchCapacityVisible = true
- // } else {
- // this.$message({
- // type: 'warning',
- // message: '请选择要批量更改车牌号的订单',
- // offset: '250',
- // duration: '2500'
- // })
- // }
- },
- batchCapacitySelect(selection) {
- this.capacityNo = selection.capacityNumber
- this.capacityId = selection.capacityId
- },
- //批量修改车牌号
- batchEditCapacity() {
- if (this.capacityId && this.capacityNo) {
- if (
- !(
- isVehicleNumber(this.capacityNo) ||
- this.capacityNo == '取消' ||
- this.capacityNo == '待定' ||
- this.capacityNo == '空白'
- )
- ) {
- this.$message.error('请输入正确格式的车牌号!')
- return
- }
- console.log('this.batchCapacityList', this.batchCapacityList)
- this.batchCapacityList.forEach(row => {
- row.capacityId = this.capacityId
- row.capacityNumber = this.capacityNo
- row.capacityNo = this.capacityNo
- //是否校验GPS
- row.isCheckGPS = this.isCheckGPS
- row.userId = getCookie('userId')
- if (row.carrierIds == 0) {
- this.$message.error('请先授权承运商!')
- return
- }
- if (row.capacityIds == 0) {
- row.lineId = this.lineSpelling[row.size]
- }
- })
- let map = {
- list: this.batchCapacityList
- }
- this.axios.post('/api/v1/ams/batchUpdateCapacity', map).then(res => {
- if (res.data.code == '200') {
- this.$message.success('派车成功!')
- } else {
- this.$message.error(res.data.data)
- }
- })
- this.batchCarrierVisible = false
- this.onclick(this.filterMap)
- } else {
- this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
- }
- },
- showSaleLog() {
- this.isShowSaleLog = true
- if (this.steelMap) {
- this.optionSaleLog.requestQuery.con = this.steelMap.orderNo
- }
- },
- //删除计量实绩
- linkageDeleteTransportOrder(row, steelMap) {
- console.log(row, 'row')
- debugger
- if (row.netWeight != null && row.netWeight != '') {
- //如果净重不为空
- let arr = []
- let map = {
- orderNumber: row.orderNo,
- good: row.materialName,
- goodspa: `${row.materialSpecification}(${row.materialModel})`,
- resultCrossWeightTime: row.grossWeightTime,
- saleMaterialId: row.saleMaterialId,
- weightBatchId: row.weightBatchId,
- userName: getCookie('loginName')
- }
- arr.push(map)
- this.axios
- .post('/api/v1/uc/linkageDeleteTransportOrder', arr)
- .then(res => {
- this.$message({
- message: '删除计量实绩成功',
- type: 'success',
- offset: '250',
- duration: '2500'
- })
- this.exceptionHandleVisible = false
- this.onclick(this.filterMap)
- })
- }
- },
- mergeSplit() {
- if (this.$refs.tableRef.selection.length == 1) {
- this.$confirm(
- `尊敬的用户${getCookie(
- 'loginName'
- )},系统温馨提示您进行拆分操作前,请确认所拆分的订单将不会在金蝶进行提交,审核等操作!`,
- '提醒',
- {
- confirmButtonText: '我已确认',
- cancelButtonText: '我再想想',
- center: true,
- type: 'warning'
- }
- )
- .then(() => {
- this.splitOrder()
- })
- .catch(() => {
- this.$message({
- type: 'info',
- duration: '2500',
- message: '操作取消',
- offset: '250'
- })
- })
- } else if (this.$refs.tableRef.selection.length > 1) {
- this.$confirm(
- `尊敬的用户${getCookie(
- 'loginName'
- )},系统温馨提示您进行合并操作前,请确认所合并的订单将不会在金蝶进行提交,审核等操作!`,
- '提醒',
- {
- confirmButtonText: '我已确认',
- cancelButtonText: '我再想想',
- center: true,
- type: 'warning'
- }
- )
- .then(() => {
- this.mergeOrder()
- })
- .catch(() => {
- this.$message({
- type: 'info',
- duration: '2500',
- message: '操作取消',
- offset: '250'
- })
- })
- } else {
- this.$message({
- type: 'warning',
- message: '请勾选/点击需要操作的行',
- offset: '250',
- duration: '2300'
- })
- }
- },
- splitOrder() {
- this.$confirm(
- `勾选了${this.$refs.tableRef.selection.length}条运单将执行拆分操作`,
- '提醒',
- {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- center: true
- }
- )
- .then(() => {
- let mapList = this.$refs.tableRef.selection.map(e => {
- let map = {}
- map.saleOrderMaterialId = e.saleOrderMaterialId
- return map
- })
- let map = {
- mapList: mapList,
- userName: getCookie('loginName')
- }
- this.axios
- .post('/api/v1/ams/splitOrder', map)
- .then(res => {
- if (res.data.code == '200') {
- this.onclick(this.filterMap)
- this.$message({
- type: 'success',
- message: '拆分成功',
- offset: '250',
- duration: '2500'
- })
- } else {
- this.$message({
- type: 'error',
- message: res.data.data,
- offset: '250',
- duration: '2500'
- })
- }
- })
- .catch(() => {
- this.$message({
- type: 'error',
- message: '拆分失败',
- offset: '250',
- duration: '2500'
- })
- })
- })
- .catch(() => {
- this.$message({
- type: 'info',
- duration: '2500',
- message: '操作取消',
- offset: '250'
- })
- })
- },
- mergeOrder() {
- this.$confirm(
- `勾选了${this.$refs.tableRef.selection.length}条运单将执行合并操作,此操作不可逆!`,
- '提醒',
- {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- center: true
- }
- )
- .then(() => {
- let mapList = this.$refs.tableRef.selection.map(e => {
- let map = {}
- map.saleOrderMaterialId = e.saleOrderMaterialId
- map.orderId = e.orderId
- map.saleOrderId = e.saleOrderId
- map.orderNo = e.orderNo
- map.capacityNo = e.capacityNo
- map.userName = getCookie('loginName')
- return map
- })
- let map = {
- mapList: mapList,
- userName: getCookie('loginName')
- }
- this.axios
- .post('/api/v1/ams/mergeOrder', map)
- .then(res => {
- if (res.data.code == '200') {
- this.onclick(this.filterMap)
- this.$message({
- type: 'success',
- message: '合并成功,请提醒驾驶员!',
- offset: '250',
- duration: '3000'
- })
- } else {
- this.$message({
- type: 'error',
- message: res.data.data,
- offset: '250',
- duration: '2500'
- })
- }
- })
- .catch(() => {
- this.$message({
- type: 'error',
- message: '合并失败',
- offset: '250',
- duration: '2500'
- })
- })
- })
- .catch(() => {
- this.$message({
- type: 'info',
- duration: '2500',
- message: '操作取消',
- offset: '250'
- })
- })
- },
- //获取通知数量
- getinformation() {
- this.axios
- .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
- .then(res => {
- let taskAllNum = 0
- res.data.data.forEach(e => {
- if (e.insertusername == '销售审核' && e.status == 0) {
- taskAllNum++
- }
- })
- this.taskAllNum = taskAllNum
- console.log('未接收数目:', this.taskAllNum)
- })
- },
- readAll() {
- this.axios
- .post('/api/v1/ams/readAll', {
- userId: this.userId,
- insertUserName: '销售审核'
- })
- .then(res => {
- this.taskAllNum = 0
- })
- },
- deleteRow(index, rows) {
- if (rows.length > 1) {
- rows.splice(index, 1)
- }
- },
- copyRowflu(index, row) {
- console.log(index)
- let copyRowflu = new Object()
- Object.keys(row).forEach(key => {
- copyRowflu[key] = row[key]
- })
- delete copyRowflu.materialId
- delete copyRowflu.netWeight
- delete copyRowflu.grossWeight
- delete copyRowflu.grossWeightTime
- delete copyRowflu.tareWeight
- delete copyRowflu.tareWeightTime
- delete copyRowflu.loadTime
- delete copyRowflu.closeEntryId
- this.steelMap.mapList.splice(index + 1, 0, copyRowflu)
- },
- exceptionHandleMakeSure1() {
- console.log(this.steelMap)
- this.$confirm(
- `该操作会将${this.steelMap.capacityNo}下未出净重的分录关闭,并重新上传金蝶,确认操作?`,
- '提示',
- {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- center: true
- }
- )
- .then(() => {
- let saleDateOfReceipt = null
- let loadTime1 = new Date(
- new Date(new Date().toLocaleDateString()).getTime() +
- (3600 * 1000 * 8 - 1)
- ) // 当天8点前
- let loadTime2 = new Date(
- new Date(new Date().toLocaleDateString()).getTime() +
- (3600 * 1000 * 32 - 1)
- ) // 次天8点前
- if (new Date().getTime() - loadTime1 > 0) {
- saleDateOfReceipt = loadTime2
- } else {
- saleDateOfReceipt = loadTime1
- }
- let closeEntryList = []
- let map = this.steelMap
- map.mapList.forEach(e => {
- let map = {}
- e.saleDateOfReceipt = sjTime(saleDateOfReceipt)
- map.saleMaterialId = e.saleMaterialId
- map.closeEntryId = e.closeEntryId
- map.number = e.saleOrderNo
- closeEntryList.push(map)
- })
- let mapList = map.mapList.filter(e => {
- if (typeof e.netWeight == 'undefined' || e.netWeight == null) {
- return e
- }
- })
- if (mapList.length == 0) {
- this.$message({
- type: 'info',
- message: '所有分录包含净重,退出!',
- offset: '250',
- duration: '2500'
- })
- return
- }
- map.mapList = mapList
- map.isUploadEas = 1
- this.axios
- .post('/api/v1/ams/addSteelSaleOrder', map, {
- timeout: 3 * 60 * 1000
- })
- .then(res => {
- if (res.data.code == '200') {
- this.axios
- .post('/api/v1/ams/closingEntries', closeEntryList, {
- timeout: 3 * 60 * 1000
- })
- .then(res => {
- if (res.data.code == '200') {
- this.onclick(this.filterMap)
- this.$message({
- type: 'success',
- offset: '250',
- message: '生成订单成功,关闭分录成功',
- duration: 2000
- })
- this.exceptionHandleVisible = false
- }
- })
- .catch(e => {})
- } else {
- this.$message({
- type: 'error',
- offset: '250',
- duration: '2500',
- message: '新增失败'
- })
- }
- })
- })
- .catch(e => {
- this.$message({
- type: 'info',
- message: '取消操作',
- offset: '200',
- duration: 2500
- })
- })
- },
- exceptionHandle() {
- if (this.$refs.tableRef.selection.length == 1) {
- console.log(this.$refs.tableRef.selection[0])
- this.axios
- .post(
- '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
- this.$refs.tableRef.selection[0].saleOrderMaterialId
- )
- .then(res => {
- this.steelMap = res.data.data
- this.exceptionHandleVisible = true
- this.getSpanArr1(this.steelMap.mapList)
- })
- } else {
- this.$message({
- message: '异常处理单次仅能勾选一辆车',
- offset: '250',
- duration: '2500',
- type: 'warning'
- })
- }
- },
- batchCarrierMakeSure() {
- let batchCarrierId = null
- this.carrierList.forEach(item => {
- if (item.carrierName == this.batchCarrierName) {
- batchCarrierId = item.carrierId
- }
- })
- this.batchCarrierList.forEach(e => {
- e.carrierId = batchCarrierId
- })
- const loading = this.$loading({
- lock: true,
- text: '正在批量授权承运商',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.axios
- .post('/api/v1/ams/dispatchToCarrier', this.batchCarrierList)
- .then(res => {
- if (res.data.code == '0') {
- this.$message.success('授权承运商成功')
- this.batchCarrierList = []
- this.batchCarrierVisible = false
- this.batchCarrierName = null
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('授权失败,请联系管理员')
- this.batchCarrierList = []
- this.batchCarrierVisible = false
- this.batchCarrierName = null
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('授权失败,请联系管理员')
- this.batchCarrierList = []
- this.batchCarrierVisible = false
- this.onclick(this.filterMap)
- loading.close()
- })
- },
- batchCarrier() {
- if (this.batchCarrierList.length > 0) {
- this.batchCarrierVisible = true
- this.showBatchCapacity()
- this.onchangeProvince()
- this.onchangeCity()
- this.addressId = this.steelMap.shipperAddressId
- this.consigneeTel = this.steelMap.consigneeTel
- } else {
- this.$message({
- type: 'warning',
- message: '请选择要批量授权的订单',
- offset: '250',
- duration: '2500'
- })
- }
- },
- selectOne(selection, row) {
- console.log('selection:', row)
- this.rowClick(row)
- },
- handleSelectionChange() {
- console.log(this.$refs.tableRef.selection, 'selection')
- this.batchCarrierList = []
- this.batchCarrierList = this.$refs.tableRef.selection.map(e => {
- let map = {}
- map.saleOrderMaterialId = e.saleOrderMaterialId
- return map
- })
- console.log(this.scrollUpdateSelectFlag)
- if (this.scrollUpdateSelectFlag == 0) {
- let arr = []
- arr = Array.from(
- this.$refs.tableRef.selection.map(e => {
- return e.saleOrderMaterialId
- })
- )
- let [...arr2] = arr
- this.toggleRowIds = arr2
- this.$store.commit('updateSaleSteelToggleIds', {
- saleSteelToggleIds: arr
- })
- }
- },
- receiveClick(src, title) {
- // this.dialogImageUrl = src
- downloadFile(src, `${this.downloadCapacityNo}${title}照片`, 'jpg')
- // this.dialogVisible = true
- },
- openRemarkPic() {
- //获取图片到本地
- this.axios.post('/api/v1/uc/getPicture', this.steelMap).then(res => {
- console.log(res)
- if (res.data) {
- let remarkPicList = []
- res.data.forEach((e, index) => {
- creatImageFile(e, 'file2-' + index).then(res => {
- remarkPicList.push({
- name: 'file' + index,
- raw: res,
- url: e
- })
- })
- })
- this.remarkPicList = remarkPicList
- } else {
- this.remarkPicList = []
- }
- this.remarkPic = true
- })
- },
- uploadRemarkPic() {
- if (this.remarkPicList.length <= 0) {
- this.$message.error('请上传图片!')
- return
- }
- //上传备注图片
- let formData = new window.FormData()
- this.remarkPicList.forEach((item, index) => {
- formData.append('file' + index, item.raw)
- })
- let options = {
- url: '/api/v1/uc/uploadPic',
- data: formData,
- method: 'post',
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- }
- this.axios(options).then(res => {
- console.log(res)
- this.$message.success('暂存成功!')
- this.remarkPic = false
- this.steelMap.urls = res.data
- this.closeUpload2()
- })
- },
- closeUpload2() {
- this.remarkPic = false
- this.isLoading = false
- this.$refs.remarkPic.clearFiles()
- },
- openReceive() {
- this.fileListArrival = []
- this.fileListReceive = []
- if (Object.values(this.steelMap).length == 0) {
- this.$message.warning('请选择需要补录的实绩')
- return
- }
- let row = this.steelMap
- if (!row.outGateTime) {
- this.$message.warning('该车未出厂,不允许签收')
- return
- }
- if (row.arrivalAddress) {
- //优先获取抵达地址
- this.location = row.arrivalAddress
- } else {
- //其次获取车辆定位
- this.axios
- .get(
- '/api/v1/otms/getCurrentLocation?capcityNumber=' + row.newCapacityNo
- )
- .then(res => {
- if (
- res.data.status == 'succeed' &&
- res.data.data.result.status != 1001
- ) {
- this.location = res.data.data.result.adr
- } else {
- this.location = null
- this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
- }
- })
- }
- this.orderNumber = row.orderNo
- this.capacityNumber = row.capacityNo
- this.arrivalTime = row.arrivalTime
- this.receiptTime = row.receiptTime
- this.arrivalReceiving = true
- //抵达图片
- this.axios
- .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNo)
- .then(res => {
- console.log('arrivalPhoto:', res)
- if (res.data) {
- this.arriavlList = []
- res.data.forEach((e, index) => {
- creatImageFile(e, 'file1-' + index).then(res => {
- this.arriavlList.push({
- name: 'file' + index,
- raw: res,
- url: e
- })
- })
- })
- this.fileListArrival = this.arriavlList
- }
- })
- //签收图片
- this.axios
- .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNo)
- .then(res => {
- if (res.data) {
- this.receiveList = []
- res.data.forEach((e, index) => {
- creatImageFile(e, 'file2-' + index).then(res => {
- this.receiveList.push({
- name: 'file' + index,
- raw: res,
- url: e
- })
- })
- })
- this.fileListReceive = this.receiveList
- }
- })
- },
- arrivalAndReceive() {
- console.log(this.fileListReceive, 'fileListReceive')
- if (!this.location) {
- this.$message.warning(
- '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
- )
- return
- }
- if (this.fileListArrival.length < 3) {
- this.$message.warning('抵达图至少三张')
- return
- }
- if (this.fileListReceive.length < 2) {
- this.$message.warning('签收图最少两张')
- return
- }
- this.isLoading = true
- //上传抵达
- let formData = new window.FormData()
- this.fileListArrival.forEach((item, index) => {
- formData.append('file' + index, item.raw)
- })
- formData.append('orderNumber', this.orderNumber)
- formData.append('resultArrivalAddress', this.location)
- if (this.arrivalTime) {
- formData.append('arrivalTime', sjTime(this.arrivalTime))
- }
- formData.append('userName', getCookie('loginName'))
- let options = {
- // 设置axios的参数
- url: '/api/v1/otms/addtmstruckArrivalResult',
- data: formData,
- method: 'post',
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- }
- this.axios(options).then(res => {
- this.fileListArrival = []
- console.log('arrivalRes:', res)
- //上传签收
- let formData = new window.FormData()
- let request = ''
- this.fileListReceive.forEach((item, index) => {
- formData.append('file' + index, item.raw)
- })
- formData.append('orderNumber', this.orderNumber)
- formData.append('resultArrivalAddress', this.location)
- if (this.receiptTime) {
- formData.append('receiptTime', sjTime(this.receiptTime))
- }
- formData.append('num', request.length)
- let options = {
- url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
- data: formData,
- method: 'post',
- headers: {
- 'Content-Type': 'multipart/form-data'
- }
- }
- this.axios(options).then(res => {
- console.log('receiveRes:', res)
- this.$message.success('上传成功!')
- this.steelMap.arrivalAddress = this.location
- this.closeUpload()
- this.refresh()
- this.tableRowIndex = ''
- this.fileListReceive = []
- })
- })
- },
- fileChange1(file, fileList) {
- this.fileListArrival = fileList
- },
- fileChange2(file, fileList) {
- this.fileListReceive = fileList
- },
- fileChange3(file, fileList) {
- this.remarkPicList = fileList
- },
- exceed() {
- this.$message.warning('超出上传数量!')
- },
- handlePictureCardPreview(file) {
- this.dialogImageUrl = file.url
- this.dialogVisible = true
- },
- closeUpload() {
- this.location = null
- this.arrivalTime = null
- this.receiptTime = null
- this.arrivalReceiving = false
- this.isLoading = false
- this.$refs.arrival.clearFiles()
- this.$refs.receive.clearFiles()
- },
- //防抖函数--防止用户重复点击
- debounce(func, delay) {
- let timer = null
- return function(...args) {
- if (timer !== null) {
- clearTimeout(timer)
- }
- timer = setTimeout(function() {
- func.apply(this, args)
- }, delay)
- }
- },
- //筛选
- filterChange(obj) {
- //承运商筛选,后续有待优化
- console.log(obj, 'filterChange obj', arguments)
- if (typeof obj.carrierList != 'undefined' && obj.carrierList.length > 0) {
- this.headColumnList.push('carrierName')
- this.filterMap.carrierList = obj.carrierList
- }
- if (
- typeof obj.carrierList != 'undefined' &&
- obj.carrierList.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('carrierName'),
- 1
- )
- delete this.filterMap.carrierList
- }
- //物资名称筛选,后续有待优化
- if (
- typeof obj.materialNameList != 'undefined' &&
- obj.materialNameList.length > 0
- ) {
- this.headColumnList.push('materialName')
- this.filterMap.materialNameList = obj.materialNameList
- }
- if (
- typeof obj.materialNameList != 'undefined' &&
- obj.materialNameList.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('materialName'),
- 1
- )
- delete this.filterMap.materialNameList
- }
- //车牌号筛选,后续有待优化
- if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length > 0) {
- this.filterMap.capacityList = obj.capacityNo
- this.headColumnList.push('capacityNo')
- }
- if (typeof obj.capacityNo != 'undefined' && obj.capacityNo.length == 0) {
- this.headColumnList.splice(this.headColumnList.indexOf('capacityNo'), 1)
- delete this.filterMap.capacityList
- }
- //客户筛选,后续有待优化
- if (
- typeof obj.consigneeName != 'undefined' &&
- obj.consigneeName.length > 0
- ) {
- this.headColumnList.push('consigneeName')
- this.filterMap.consigneeNameList = obj.consigneeName
- }
- if (
- typeof obj.consigneeName != 'undefined' &&
- obj.consigneeName.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('consigneeName'),
- 1
- )
- delete this.filterMap.consigneeNameList
- }
- //销售片区筛选,后续有待优化
- if (
- typeof obj.saleAreaList != 'undefined' &&
- obj.saleAreaList.length > 0
- ) {
- this.filterMap.saleAreaList = obj.saleAreaList
- }
- if (
- typeof obj.saleAreaList != 'undefined' &&
- obj.saleAreaList.length == 0
- ) {
- delete this.filterMap.saleAreaList
- }
- //物资规格筛选
- if (typeof obj.materialSpe != 'undefined' && obj.materialSpe.length > 0) {
- this.headColumnList.push('materialSpe')
- this.filterMap.materialSpeList = obj.materialSpe
- }
- if (
- typeof obj.materialSpe != 'undefined' &&
- obj.materialSpe.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('materialSpe'),
- 1
- )
- delete this.filterMap.materialSpeList
- }
- //收货地址筛选
- if (
- typeof obj.addressPlace != 'undefined' &&
- obj.addressPlace.length > 0
- ) {
- this.headColumnList.push('addressPlace')
- this.filterMap.addressPlaceList = obj.addressPlace
- }
- if (
- typeof obj.addressPlace != 'undefined' &&
- obj.addressPlace.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('addressPlace'),
- 1
- )
- delete this.filterMap.addressPlaceList
- }
- if (typeof obj.orderStatus != 'undefined' && obj.orderStatus.length > 0) {
- this.headColumnList.push('orderStatus')
- // this.reset()
- this.filterMap.orderStatusList = obj.orderStatus
- }
- if (
- typeof obj.orderStatus != 'undefined' &&
- obj.orderStatus.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('orderStatus'),
- 1
- )
- delete this.filterMap.orderStatusList
- }
- if (
- typeof obj.saleOrderStatus != 'undefined' &&
- obj.saleOrderStatus.length > 0
- ) {
- this.headColumnList.push('saleOrderStatus')
- this.filterMap.saleOrderStatusList = obj.saleOrderStatus
- }
- if (
- typeof obj.saleOrderStatus != 'undefined' &&
- obj.saleOrderStatus.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('saleOrderStatus'),
- 1
- )
- delete this.filterMap.saleOrderStatusList
- }
- if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length > 0) {
- this.headColumnList.push('saleRemark')
- this.filterMap.saleRemarkList = obj.saleRemark
- }
- if (typeof obj.saleRemark != 'undefined' && obj.saleRemark.length == 0) {
- this.headColumnList.splice(this.headColumnList.indexOf('saleRemark'), 1)
- delete this.filterMap.saleRemarkList
- }
- if (typeof obj.truckRemark != 'undefined' && obj.truckRemark.length > 0) {
- this.headColumnList.push('truckRemark')
- this.filterMap.truckRemarkList = obj.truckRemark
- }
- if (
- typeof obj.truckRemark != 'undefined' &&
- obj.truckRemark.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('truckRemark'),
- 1
- )
- delete this.filterMap.truckRemarkList
- }
- if (typeof obj.isContinue != 'undefined' && obj.isContinue.length > 0) {
- this.headColumnList.push('isContinue')
- this.filterMap.isContinueList = obj.isContinue
- }
- if (typeof obj.isContinue != 'undefined' && obj.isContinue.length == 0) {
- this.headColumnList.splice(this.headColumnList.indexOf('isContinue'), 1)
- delete this.filterMap.isContinueList
- }
- if (typeof obj.spellNum != 'undefined' && obj.spellNum.length > 0) {
- this.headColumnList.push('spellNum')
- this.filterMap.spellNumList = obj.spellNum
- }
- if (typeof obj.spellNum != 'undefined' && obj.spellNum.length == 0) {
- this.headColumnList.splice(this.headColumnList.indexOf('spellNum'), 1)
- delete this.filterMap.spellNumList
- }
- if (typeof obj.flStatus != 'undefined' && obj.flStatus.length > 0) {
- this.headColumnList.push('flStatus')
- this.filterMap.flStatusList = obj.flStatus
- }
- if (typeof obj.flStatus != 'undefined' && obj.flStatus.length == 0) {
- this.headColumnList.splice(this.headColumnList.indexOf('flStatus'), 1)
- delete this.filterMap.flStatusList
- }
- if (
- typeof obj.orderStatusActually != 'undefined' &&
- obj.orderStatusActually.length > 0
- ) {
- this.headColumnList.push('orderStatusActually')
- this.filterMap.orderStatusActuallyList = obj.orderStatusActually
- }
- if (
- typeof obj.orderStatusActually != 'undefined' &&
- obj.orderStatusActually.length == 0
- ) {
- this.headColumnList.splice(
- this.headColumnList.indexOf('orderStatusActually'),
- 1
- )
- delete this.filterMap.orderStatusActuallyList
- }
- // if (obj)
- this.onclick(this.filterMap)
- },
- //控制筛选数组变化
- // filterListChange() {
- // //客户筛选数组
- // // let consigneeNameList = this.tableData
- // // .map(e => {
- // // return e.consigneeName
- // // })
- // // .sort()
- // //承运商筛选数组
- // // let carrierNameList = this.tableData
- // // .map(e => {
- // // return e.carrierName
- // // })
- // // .sort()
- // //车牌号筛选数组
- // // let capacityList = this.tableData
- // // .map(e => {
- // // return e.newCapacityNo
- // // })
- // // .sort()
- // //物资筛选数组
- // // let materialNameList = this.tableData
- // // .map(e => {
- // // return e.materialName
- // // })
- // // .filter(e => {
- // // return e != null
- // // })
- // // .sort()
- // //销售片区筛选数组
- // let saleAreaList = this.tableData
- // .map(e => {
- // return e.areaName
- // })
- // .filter(e => {
- // return e != null
- // })
- // let addressPlaceList = this.tableData
- // .map(e => {
- // return e.addressPlace
- // })
- // .filter(e => {
- // return e != null
- // })
- // .sort()
- // let orderStatusList = this.tableData
- // .map(e => {
- // return e.orderStatus
- // })
- // .filter(e => {
- // return e != null
- // })
- // let materialSpeList = this.tableData
- // .map(e => {
- // return e.materialSpe
- // })
- // .filter(e => {
- // return e != null
- // })
- // .sort()
- // let saleOrderStatusList = this.tableData.map(e => {
- // return e.saleOrderStatus
- // })
- // let saleRemarkList = this.tableData
- // .map(e => {
- // return e.saleRemark
- // })
- // .sort()
- // // this.filterConsigneeList = []
- // // this.filterCarrierList = []
- // // this.filterCapacityList = []
- // // this.filtermaterialNameList = []
- // this.filterSaleAreaList = []
- // this.filterorderStatus = []
- // this.filteraddressPlace = []
- // this.filtermaterialSpe = []
- // this.filterSaleOrderStatus = []
- // this.filterSaleRemark = []
- // // Array.from(new Set(consigneeNameList)).forEach(e => {
- // // let map = {}
- // // map.text = e
- // // map.value = e
- // // this.filterConsigneeList.push(map)
- // // })
- // Array.from(new Set(carrierNameList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterCarrierList.push(map)
- // })
- // Array.from(new Set(capacityList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterCapacityList.push(map)
- // })
- // Array.from(new Set(materialNameList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filtermaterialNameList.push(map)
- // })
- // Array.from(new Set(saleAreaList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterSaleAreaList.push(map)
- // })
- // Array.from(new Set(addressPlaceList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filteraddressPlace.push(map)
- // })
- // Array.from(new Set(orderStatusList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterorderStatus.push(map)
- // })
- // Array.from(new Set(materialSpeList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filtermaterialSpe.push(map)
- // })
- // Array.from(new Set(saleOrderStatusList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterSaleOrderStatus.push(map)
- // })
- // Array.from(new Set(saleRemarkList)).forEach(e => {
- // let map = {}
- // map.text = e
- // map.value = e
- // this.filterSaleRemark.push(map)
- // })
- // },
- cellStyle({ row, column, rowIndex, columnIndex }) {
- if (
- column.property == 'arrivalAddress' ||
- column.property == 'receiptAddress'
- ) {
- return { color: 'blue', height: '30px' }
- } else {
- return { height: '30px' }
- }
- },
- rowClick(row, column, event) {
- this.steelMap = {}
- this.tableRowIndex = row.group
- this.isRowClick = 1
- this.steelMap = row
- },
- tableRowClassName({ row, rowIndex }) {
- if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
- return 'warning-row'
- }
- },
- cellMouse(row, column, cell, event) {
- if (this.isRowClick == 0) {
- this.tableRowIndex = row.group
- }
- },
- cellLeave(row, column, cell, event) {
- if (this.isRowClick == 0) {
- this.tableRowIndex = ''
- }
- },
- reset() {
- var that = this
- that.$nextTick(() => {
- that.saleSteelKey = !that.saleSteelKey
- })
- },
- checkTrans(row) {
- this.isRowClick = 0
- if (Object.values(this.steelMap).length == 0) {
- this.$message.error('请点击需要查看轨迹的行!')
- return
- }
- if (typeof row === 'undefined') {
- row = this.steelMap
- }
- if (row.outGateTime == null) {
- this.$message.error('该车还未出厂,暂无轨迹')
- return
- }
- let that = this
- that.axios
- .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNo)
- .then(res => {
- console.log(res.data)
- if (res.data.data == '-1') {
- this.$message.error('运输订单未关闭的自提车辆无权查看!')
- } else if (res.data.data.startAndEndRoutes != null) {
- that.pathOption.orderNumber = row.orderNo
- that.pathOption.capacityNumber = row.capacityNo
- that.pathOption.startPointName = '达钢集团小东门'
- that.pathOption.endPointName = row.receiptAddress
- that.value7 = true
- if (row.orderStatus == '已完成') {
- that.pathOption.statusCode = '位置'
- } else {
- that.pathOption.statusCode = '当前位置'
- }
- } else {
- this.$message.error('车辆没有开启GPS')
- }
- })
- },
- cellClik(row, column, cell, event) {
- if (column.property == 'arrivalAddress') {
- if (row.orderNo && row.arrivalAddress) {
- this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
- this.toPhotoClick(row.orderNo, 1)
- }
- }
- if (column.property == 'receiptAddress') {
- if (row.orderNo && row.receiptAddress) {
- this.downloadCapacityNo = `${row.orderTime}-${row.capacityNo}`
- this.receipctPhotoClick(row.orderNo, 1)
- }
- }
- },
- //反关闭运单
- reverseCloseOrder() {
- this.steelMap.oYeFlag = 1
- this.axios
- .post('/api/v1/ams/reverseCloseOrder', this.steelMap)
- .then(res => {
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- })
- },
- //筛选
- //筛选客户
- //点击操作弹出框
- operation(row) {
- // this.isRowClick = 0
- this.isCheckGPS = true
- if (Object.values(this.steelMap).length == 0) {
- this.$message.error('请点击需要执行更改操作的行!')
- return
- }
- if (typeof row === 'undefined') {
- row = this.steelMap
- }
- this.axios
- .post(
- '/api/v1/tms/getOyeSteelReportDetailsBySmId?saleOrderMaterialId=' +
- row.saleOrderMaterialId
- )
- .then(res => {
- this.steelMap = res.data.data
- this.steelMap.userName = getCookie('loginName')
- this.addressId = row.shipperAddressId
- this.getAllProvince()
- this.onchangeProvince()
- this.onchangeCity()
- this.centerDialogVisible = true
- this.getSpanArr1(res.data.data.mapList)
- })
- },
- //查看抵达图
- toPhotoClick(orderNo, num) {
- this.axios
- .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + orderNo)
- .then(res => {
- this.srcList = []
- this.previewSrcList = res.data
- console.log(res.data, 'sd')
- res.data.forEach(e => {
- this.srcList.push({
- title: '',
- src: e
- })
- })
- // this.srcList.push({
- // title: '车头照片',
- // src: res.data[0]
- // })
- // this.srcList.push({
- // title: '满货箱照片',
- // src: res.data[1]
- // })
- if (num == 1) {
- this.isShow3 = true
- } else {
- this.isShow = true
- }
- })
- },
- //查看实时路径
- checkPoint() {
- if (this.input || this.input1 || this.steelMap.capacityNo) {
- this.carNumber = this.input || this.input1 || this.steelMap.capacityNo
- this.value8 = true
- } else {
- this.$message.error('请输入或者点击有车牌号的行查询车牌号的实时路径')
- }
- },
- //查看签收图
- receipctPhotoClick(orderNo, num) {
- this.axios
- .post('/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + orderNo)
- .then(res => {
- console.log(res.data)
- if (num == 1) {
- this.isShow4 = true
- } else {
- this.isShow2 = true
- }
- this.srcList2 = []
- this.previewSrcList2 = res.data
- if (res.data && res.data.length > 0) {
- res.data.forEach(item => {
- this.srcList2.push({
- title: '',
- src: item
- })
- })
- }
- })
- },
- //销售钢材报表导出excel
- exportAllReportToExcel() {
- const loading = this.$loading({
- lock: true,
- text: '正在导出Excel',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- var title = this.tableTitle
- let tHeader = []
- let filterVal = []
- if (
- getCookie('orgCode') == 'shouhuokehu' ||
- getCookie('orgCode') == 'xiaoshouyewuyuan'
- ) {
- tHeader = []
- filterVal = []
- let tHeader1 = this.salerExportExcelList.filter(e => {
- if (this.columnNoRoutList.indexOf(e) == -1) {
- return e
- }
- })
- console.log(tHeader1)
- let arr = this.$refs.tableRef.$children
- for (var i = 0; i < tHeader1.length; i++) {
- for (var j = 0; j < arr.length; j++) {
- if (arr[j].label === tHeader1[i]) {
- if (tHeader.indexOf(arr[j].label) === -1) {
- tHeader.push(arr[j].label)
- }
- if (filterVal.indexOf(arr[j].prop) === -1) {
- filterVal.push(arr[j].prop)
- }
- }
- }
- }
- } else {
- this.$refs.tableRef.$children.forEach(item => {
- if (item.label != undefined && item.prop != undefined) {
- if (tHeader.indexOf(item.label) === -1) {
- tHeader.push(item.label)
- }
- if (filterVal.indexOf(item.prop) === -1) {
- filterVal.push(item.prop)
- }
- }
- })
- }
- this.downloadLoading = true
- tHeader.unshift('车序号')
- filterVal.unshift('saleOrderMaterialId')
- require.ensure([], () => {
- const {
- export_json_to_excel
- } = require('@/assets/excel/Export2Excel.js') //这里必须使用绝对路径,使用@/+存放export2Excel的路径
- let data = this.disposeDataToExcel(this.tableData).map(v =>
- filterVal.map(j => v[j])
- ) //3.formatJson格式转换
- export_json_to_excel(tHeader, data, title) // (title)导出的表格名称
- })
- loading.close()
- },
- disposeDataToExcel(data) {
- //如果批次相同,只允许一条磅重和运费置为0
- //首先找出批次相同的数组元素
- data.reduce((prev, item) => {
- if (item.weightBatchId) {
- //如果有批次则走这个方法
- if (prev.length > 0) {
- let hash = prev[prev.length - 1]
- //如果处理后的数组长度大于0,那么判断处理后的数组的最后一个元素里面的批次是否与当前批次相等,如果相等
- if (
- item.weightBatchId &&
- hash.weightBatchId &&
- item.weightBatchId == hash.weightBatchId
- ) {
- prev[prev.length - 1].netWeight = 0
- prev[prev.length - 1].detailsAmount = 0
- }
- }
- prev.push(item)
- return prev
- } else {
- prev.push(item)
- return prev
- }
- }, [])
- return data
- },
- changeScreen() {},
- //承运商弹出层
- handleSelectCarrier() {
- this.carrierList.forEach(item => {
- if (item.carrierName == this.steelMap.carrierName) {
- this.steelMap.newCarrierId = item.carrierId
- this.steelMap.carrierId = item.carrierId
- }
- })
- },
- //承运商边输边查
- querySearchCarrier(queryString, cb) {
- if (queryString != null && queryString != '' && queryString.length > 1) {
- this.axios
- .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
- .then(res => {
- if (res.data.code == '200') {
- this.carrierList = []
- if (res.data.data.length == 0) {
- this.$message.info('承运商不存在,请前往注册')
- return
- }
- var restaurants = res.data.data
- this.carrierList = res.data.data
- var results = queryString
- ? restaurants.filter(this.createFilterCarrier(queryString))
- : restaurants
- cb(results)
- }
- })
- }
- },
- createFilterCarrier(queryString) {
- return restaurants => {
- return (
- restaurants.value1.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- )
- }
- },
- //以下是车牌号边输边查搜索
- querySearch(queryString, cb) {
- console.log(queryString)
- if (
- (queryString != null && queryString != '' && queryString.length > 3) ||
- queryString == '取消' ||
- queryString == '待定' ||
- queryString == '空白'
- ) {
- this.axios
- .post('/api/v1/uc/getCapacityByLike?index=' + queryString)
- .then(res => {
- this.capacityList = []
- if (res.data.code == '200') {
- if (res.data.data.length == 0) {
- this.$message.info('车牌号不存在,请前往注册')
- return
- }
- var restaurants = res.data.data
- this.capacityList = res.data.data
- var results = queryString
- ? restaurants.filter(this.createFilter(queryString))
- : restaurants
- // 调用 callback 返回建议列表的数据
- cb(results)
- }
- })
- }
- },
- createFilter(queryString) {
- return restaurants => {
- return (
- restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- )
- }
- },
- //车牌号弹出层
- handleSelect() {
- this.capacityList.forEach(item => {
- if (item.capacityNumber === this.steelMap.capacityNo) {
- this.steelMap.newsCapacityId = item.capacityId
- }
- })
- },
- updateCapacity() {
- console.log('我只想测')
- this.steelMap.capacityId = this.steelMap.newsCapacityId
- this.steelMap.driverTel = this.steelMap.capacityTel
- this.steelMap.userId = getCookie('userId')
- if (this.steelMap.newsCapacityId == null) {
- this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
- return
- }
- if (
- !(
- isVehicleNumber(this.steelMap.capacityNo) ||
- this.steelMap.capacityNo == '取消' ||
- this.steelMap.capacityNo == '待定' ||
- this.steelMap.capacityNo == '空白'
- )
- ) {
- this.$message.error('请输入正确格式的车牌号!')
- return
- }
- //是否校验GPS
- this.steelMap.isCheckGPS = this.isCheckGPS
- if (this.steelMap.capacityIds != 0) {
- const loading = this.$loading({
- lock: true,
- text: '正在变更车牌号',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.steelMap.oYeFlag = 1
- this.axios
- .post('/api/v1/ams/updateCapacityNumberInFactory', this.steelMap)
- .then(res => {
- if (res.data.code == 200) {
- this.$message({
- type: 'success',
- message: '变更车号成功,请通知驾驶员',
- duration: 2500,
- offset: '250'
- })
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$alert(res.data.data, '提示', {
- confirmButtonText: '确定',
- center: true,
- type: 'warning',
- callback: action => {
- this.onclick(this.filterMap)
- this.operation(this.steelMap)
- }
- })
- loading.close()
- }
- })
- .catch(() => {
- this.$message.success('变更失败,请联系管理员')
- loading.close()
- })
- } else {
- if (this.steelMap.carrierIds == 0) {
- this.$message.error('请先选择承运商!')
- return
- }
- this.steelMap.lineId = this.lineSpelling[this.steelMap.mapList.length]
- this.steelMap.driverTel = this.steelMap.capacityTel
- this.steelMap.capacityNumber = this.steelMap.capacityNo
- this.steelMap.oYeFlag = 1
- let arr = []
- arr.push(this.steelMap)
- const loading = this.$loading({
- lock: true,
- text: '正在派车,请稍候',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.axios
- .post('/api/v1/ams/dispatchSteelOrder', arr)
- .then(res => {
- if (res.data.code == '200') {
- this.$message.success('派车成功!')
- this.operation(this.steelMap)
- this.axios
- .post(
- '/api/v1/ams/matchingDriverTelRecently?capacityNumber=' +
- this.steelMap.capacityNo
- )
- .then(res => {
- // if (res.data.data != null) {
- // this.steelMap.capacityTel = res.data.data
- // this.updateDriverTel()
- // }
- })
- this.onclick(this.filterMap)
- loading.close()
- } else {
- loading.close()
- this.$alert(res.data.data, '提示', {
- confirmButtonText: '确定',
- center: true,
- callback: action => {
- this.onclick(this.filterMap)
- this.operation(this.steelMap)
- }
- })
- }
- })
- .catch(() => {
- this.$message.error(res.data.data)
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- }
- },
- //修改司机电话号码
- updateDriverTel() {
- const loading = this.$loading({
- lock: true,
- text: '修改电话号码中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- if (
- this.steelMap.capacityTel == null ||
- this.steelMap.capacityTel == ''
- ) {
- this.$message.error('电话号码不能为空')
- loading.close()
- return
- }
- var regex = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/
- if (!regex.test(this.steelMap.capacityTel)) {
- this.$message.error('电话号码不符合规则')
- loading.close()
- return
- }
- this.axios
- .post('/api/v1/uc/updateDriverTel', {
- orderId: parseInt(this.steelMap.orderId),
- saleOrderMaterialId: parseInt(this.steelMap.saleOrderMaterialId),
- driverTel: this.steelMap.capacityTel,
- oYeFlag: 1
- })
- .then(res => {
- if (res.data.code == '200') {
- this.$message({
- type: 'success',
- duration: 2000,
- message: '修改电话号码成功',
- offset: 250
- })
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('修改失败')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('修改失败')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- },
- //修改收货客户电话
- updateconsigneeTel() {
- const loading = this.$loading({
- lock: true,
- text: '修改电话号码中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- if (
- this.steelMap.consigneeTel == null ||
- this.steelMap.consigneeTel == ''
- ) {
- this.$message.error('电话号码不能为空')
- return
- }
- this.axios
- .post('/api/v1/ams/updateConsigneeTel', {
- saleOrderNo: this.steelMap.saleOrderNo,
- saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
- consigneeTel: this.steelMap.consigneeTel
- })
- .then(res => {
- if (res.data.code == '200') {
- this.$message.success('修改成功')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('修改失败')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('修改失败')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- },
- //批量修改收货客户电话
- batchUpdateconsigneeTel() {
- const loading = this.$loading({
- lock: true,
- text: '修改电话号码中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- if (!this.consigneeTel) {
- this.$message.error('电话号码不能为空')
- loading.close()
- return
- }
- this.batchCapacityList.forEach(row => {
- this.axios
- .post('/api/v1/ams/updateConsigneeTel', {
- saleOrderNo: row.saleOrderNo,
- saleOrderMaterialId: row.saleOrderMaterialId,
- consigneeTel: this.consigneeTel,
- oYeFlag: 1
- })
- .then(res => {
- if (res.data.code == '200') {
- this.$message.success('修改成功')
- } else {
- this.$message.error('修改失败')
- }
- })
- .catch(() => {
- this.$message.error('修改失败')
- })
- })
- this.onclick(this.filterMap)
- loading.close()
- this.batchCarrierVisible = false
- },
- //修改承运商授权
- updateTruckCarrier() {
- if (this.steelMap.newCarrierId == null) {
- this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
- this.onclick(this.filterMap)
- return
- }
- if (this.steelMap.carrierIds != 0) {
- const loading = this.$loading({
- lock: true,
- text: '正在修改承运商授权',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.steelMap.oYeFlag = 1
- this.axios
- .post('/api/v1/ams/updateTruckNoCarrier', this.steelMap)
- .then(res => {
- if (res.data.code == '200') {
- this.$message.success('修改承运商授权成功')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('修改失败,请联系管理员!')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('修改失败,请联系管理员!')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- } else {
- //授权承运商
- let arr = []
- this.steelMap.oYeFlag = 1
- arr.push(this.steelMap)
- const loading = this.$loading({
- lock: true,
- text: '正在授权承运商',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.axios
- .post('/api/v1/ams/dispatchToCarrier', arr)
- .then(res => {
- if (res.data.code == '0') {
- this.$message.success('授权承运商成功')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('授权失败,请联系管理员')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('授权失败,请联系管理员')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- }
- },
- updateAddress(row) {
- this.drawer = true
- this.addressRow = row
- this.province = row.addressProvince
- this.city = row.addressDistrict
- this.county = row.addressTown
- this.addressId = row.shipperAddressId
- this.getAllProvince()
- this.onchangeProvince()
- this.onchangeCity()
- },
- //获取所有省数据
- getAllProvince() {
- // this.provinceList = []
- // return
- this.axios
- .post('/api/v1/uc/getAllProvince')
- .then(res => {
- // console.log(res.data.data)
- this.provinceList = res.data.data
- })
- .catch(e => {
- console.log(e)
- })
- },
- //省改变
- onchangeProvince() {
- this.axios
- .post(
- '/api/v1/uc/getDistrictByProvince?addressProvince=' +
- this.steelMap.addressProvince +
- '&i=' +
- new Date()
- )
- .then(res => {
- this.cityList = res.data.data
- // this.city = "";
- // this.county = "";
- })
- },
- //市改变
- onchangeCity() {
- this.axios
- .post(
- '/api/v1/uc/getTownByDistrict?addressDistrict=' +
- this.steelMap.addressDistrict +
- '&i=' +
- new Date()
- )
- .then(res => {
- this.countyList = res.data.data
- })
- },
- //县(区)改变
- onchangeCounty() {
- let mapValue = {
- addressProvince: this.steelMap.addressProvince,
- addressDistrict: this.steelMap.addressDistrict,
- addressTown: this.steelMap.addressTown
- }
- this.axios.post('/api/v1/uc/getPlaceByAllAddress', mapValue).then(res => {
- this.addressId = res.data.data[0].addressId
- })
- },
- //收货地址弹出层
- handleSelect1(item) {
- console.log('获取所有下拉值!')
- },
- //以下是收货地址边输边查搜索
- querySearch1(queryString, cb) {
- this.axios
- .post(
- '/api/v1/ams/getRealAddressByLike?addressId=' +
- this.addressId +
- '&index=' +
- queryString
- )
- .then(res => {
- if (res.data.code == '200') {
- var restaurants = res.data.data
- var results = queryString
- ? restaurants.filter(this.createFilter1(queryString))
- : restaurants
- // 调用 callback 返回建议列表的数据
- cb(results)
- }
- })
- },
- createFilter1(queryString) {
- return restaurants => {
- return (
- restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
- -1
- )
- }
- },
- //修改收货地址
- addAddressClick() {
- const loading = this.$loading({
- lock: true,
- text: '正在修改收货地址',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- let map = this.steelMap
- map.isCloseEas = Number(1)
- map.isNewCar = Number(1)
- map.userName = getCookie('loginName')
- map.shipperAddressId = this.addressId
- map.oYeFlag = 1
- this.axios
- .post('/api/v1/ams/updateCarAddress', map)
- .then(res => {
- if (res.data.code == '200') {
- // this.$message.success('修改收货地址成功!')
- this.$message({
- type: 'success',
- message:
- '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
- offset: '250',
- duration: 2500
- })
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('修改失败,请联系管理员!')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('修改失败,请联系管理员!')
- this.operation(this.steelMap)
- this.onclick(this.filterMap)
- loading.close()
- })
- },
- //批量修改收货地址
- batchUpdateCarAddress() {
- const loading = this.$loading({
- lock: true,
- text: '正在修改收货地址',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- this.batchCapacityList.forEach(row => {
- let map = row
- map.place = this.steelMap.place
- map.isCloseEas = Number(1)
- map.isNewCar = Number(1)
- map.shipperAddressId = this.addressId
- map.userName = getCookie('loginName')
- map.oYeFlag = 1
- this.axios
- .post('/api/v1/ams/updateCarAddress', map)
- .then(res => {
- if (res.data.code == '200') {
- this.$message({
- type: 'success',
- message:
- '修改收货地址成功,请提醒相关人员核对单价及详单数据是否生成正确',
- offset: '250',
- duration: 2500
- })
- } else {
- this.$message.error('修改失败,请联系管理员!')
- }
- })
- .catch(() => {
- this.$message.error('修改失败,请联系管理员!')
- })
- })
- this.onclick(this.filterMap)
- loading.close()
- this.batchCarrierVisible = false
- },
- //将序号确定下来
- // getNodeNum(data) {
- // for (var i = 0; i < data.length; i++) {
- // if (i === 0) {
- // data[i].group = i
- // data[i].rowKey = i
- // } else {
- // // 判断当前元素与上一个元素是否相同
- // if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
- // data[i].group = data[i - 1].group
- // data[i].rowKey = i
- // } else {
- // data[i].group = data[i - 1].group + 1
- // data[i].rowKey = i
- // }
- // }
- // }
- // },
- //记录每一行的合并数
- getSpanArr(data) {
- //每次调用方法初始化
- this.spanArr = []
- this.spanArr2 = []
- for (var i = 0; i < data.length; i++) {
- if (i === 0) {
- this.spanArr.push(1)
- this.spanArr2.push(1)
- // data[i].group = i
- this.pos = 0
- this.pos2 = 0
- } else {
- // 判断当前元素与上一个元素是否相同
- if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
- this.spanArr[this.pos] += 1
- // data[i].group = data[i - 1].group
- this.spanArr.push(0)
- if (
- data[i].weightBatchId &&
- data[i].weightBatchId === data[i - 1].weightBatchId
- ) {
- //批次合并
- this.spanArr2[this.pos2] += 1
- this.spanArr2.push(0)
- } else {
- this.spanArr2.push(1)
- this.pos2 = i
- }
- } else {
- this.spanArr.push(1)
- this.pos = i
- // data[i].group = data[i - 1].group + 1
- this.spanArr2.push(1)
- this.pos2 = i
- }
- }
- }
- },
- getSpanArr1(data) {
- //每次调用方法初始化
- this.spanArr1 = []
- this.spanArr3 = []
- for (var i = 0; i < data.length; i++) {
- if (i === 0) {
- this.spanArr1.push(1)
- this.spanArr3.push(1)
- // data[i].group = i
- this.pos1 = 0
- this.pos3 = 0
- } else {
- // 判断当前元素与上一个元素是否相同
- if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
- this.spanArr1[this.pos] += 1
- // data[i].group = data[i - 1].group
- this.spanArr1.push(0)
- if (
- data[i].weightBatchId &&
- data[i].weightBatchId === data[i - 1].weightBatchId
- ) {
- //批次合并
- this.spanArr3[this.pos3] += 1
- this.spanArr3.push(0)
- } else {
- this.spanArr3.push(1)
- this.pos3 = i
- }
- } else {
- this.spanArr1.push(1)
- this.pos1 = i
- this.spanArr3.push(1)
- this.pos3 = i
- // data[i].group = data[i - 1].group + 1
- }
- }
- }
- },
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
- if (this.mergeList.indexOf(column.label) != -1) {
- const _row = this.spanArr[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- } else if (this.mergeListBatch.indexOf(column.label) != -1) {
- const _row = this.spanArr2[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- }
- },
- objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
- if (this.mergeList.indexOf(column.label) != -1) {
- const _row = this.spanArr1[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- } else if (this.mergeListBatch.indexOf(column.label) != -1) {
- const _row = this.spanArr3[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- }
- },
- objectSpanMethod2({ row, column, rowIndex, columnIndex }) {
- if (this.mergeList.indexOf(column.label) != -1) {
- const _row = this.spanArr1[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- } else if (this.mergeListBatch.indexOf(column.label) != -1) {
- const _row = this.spanArr3[rowIndex]
- const _col = _row > 0 ? 1 : 0
- return {
- rowspan: _row,
- colspan: _col
- }
- }
- },
- //计算总件数和总车数
- // getTotalNum(data) {
- // //通过车序号的个数来计算车数
- // let arr = []
- // arr = data.map(e => {
- // if (
- // e.capacityNo != '取消' &&
- // e.saleOrderStatus != '反审批' &&
- // e.orderStatus != '已关闭'
- // ) {
- // return e.saleOrderMaterialId
- // }
- // })
- // this.totalCapacity = Array.from(new Set(arr)).length
- // this.totalNumber = data.reduce(function(prev, item) {
- // return prev + item.materialNum
- // }, 0)
- // },
- //减少物资件数
- updateBillOrder(row) {
- const loading = this.$loading({
- lock: true,
- text: '修改物资件数中',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- let map = {
- materialId: row.materialId,
- materialNum: row.materialNumber,
- oYeFlag: 1
- }
- let arr = []
- arr.push(map)
- let updateMap = {
- orderId: this.steelMap.orderId,
- saleOrderId: this.steelMap.saleOrderId,
- saleOrderMaterialId: this.steelMap.saleOrderMaterialId,
- mapList: arr,
- oYeFlag: 1
- }
- this.axios
- .post('/api/v1/oms/updateMaterialMes', updateMap)
- .then(res => {
- if (res.data.code == '200') {
- this.$message.success('修改物资数量成功')
- this.onclick(this.filterMap)
- loading.close()
- } else {
- this.$message.error('修改物资数量失败,请联系管理员')
- this.onclick(this.filterMap)
- loading.close()
- }
- })
- .catch(() => {
- this.$message.error('修改物资数量失败,请联系管理员')
- this.onclick(this.filterMap)
- loading.close()
- })
- },
- getStatusNum(data) {
- //未派发、取消
- },
- //查询,输入查询条件
- onclick(obj) {
- this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
- this.isRowClick = 0
- this.showPopover = false
- const loading = this.$loading({
- lock: true,
- text: '正在获取数据',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- let startTime = null
- let endTime = null
- let carrierSsoId = null
- let carrierName = null
- let consigneeName = null
- let capacityNo = null
- let remark = null
- let saler = null
- let easPrimaryId = null
- let consigneeLoginName = null
- let receiveAddress = null
- obj.receiveAddress = null
- obj.saleNo = null
- obj.receiveCustomer = null
- if (this.startTime && this.endTime) {
- startTime = sjTime(this.startTime)
- endTime = sjTime(this.endTime)
- }
- if (getCookie('orgCode') == 'chengyunshang') {
- carrierSsoId = getCookie('userId')
- }
- if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
- saler = getCookie('loginName')
- }
- if (getCookie('orgCode') == 'shouhuokehu') {
- consigneeLoginName =
- JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
- obj.consigneeLoginName = consigneeLoginName
- }
- if (this.screen == '客户') {
- consigneeName = this.input
- } else if (this.screen == '承运商') {
- carrierName = this.input
- } else if (this.screen == '车牌号') {
- capacityNo = this.input
- } else if (this.screen == '分录ID') {
- easPrimaryId = this.input
- } else if (this.screen == '收货地址') {
- receiveAddress = this.input
- obj.receiveAddress = receiveAddress
- } else if (this.screen == '销售订单号') {
- obj.saleNo = this.input
- } else if (this.screen == '收款公司') {
- obj.receiveCustomer = this.input
- } else {
- remark = this.input
- }
- if (this.screen1 == '客户' && this.input1 != null && this.input1 != '') {
- consigneeName = this.input1
- } else if (
- this.screen1 == '承运商' &&
- this.input1 != null &&
- this.input1 != ''
- ) {
- carrierName = this.input1
- } else if (
- this.screen1 == '车牌号' &&
- this.input1 != null &&
- this.input1 != ''
- ) {
- capacityNo = this.input1
- } else if (
- this.screen1 == '分录ID' &&
- this.input1 != null &&
- this.input1 != ''
- ) {
- easPrimaryId = this.input1
- } else if (
- this.screen1 == '收货地址' &&
- this.input1 != null &&
- this.input1 != ''
- ) {
- receiveAddress = this.input1
- obj.receiveAddress = receiveAddress
- } else if (
- this.screen1 == '销售订单号' &&
- this.input1 != null &&
- this.input1 != ''
- ) {
- obj.saleNo = this.input1
- } else if (this.screen1 == '收款公司') {
- obj.receiveCustomer = this.input1
- } else if (this.input1 != null && this.input1 != '') {
- remark = this.input1
- }
- this.axios
- .post(
- '/api/v1/tms/getOyeSteelReport?startTime=' +
- startTime +
- '&endTime=' +
- endTime +
- '&carrierSsoId=' +
- carrierSsoId +
- '&i=' +
- new Date() +
- '&remark=' +
- remark +
- '&consigneeName=' +
- consigneeName +
- '&carrierName=' +
- carrierName +
- '&capacityNo=' +
- capacityNo +
- '&saler=' +
- saler +
- '&easPrimaryId=' +
- encodeURIComponent(easPrimaryId),
- obj,
- {
- timeout: 10 * 60 * 1000
- }
- )
- .then(res => {
- this.tableData = res.data.data
- if (res.data.data.length > 0) {
- this.totalNumber = `${res.data.data[0].totalNumber}件`
- this.totalCapacity = `${res.data.data[0].totalCapacity}车`
- this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
- this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
- console.log(obj, 'obj')
- if (this.filterMap) {
- this.filterRefreshCtrl(res.data.data, this.filterMap)
- }
- }
- this.maxHeight =
- window.innerHeight -
- document.querySelector('.tableTop').offsetHeight -
- 40
- let a = 1
- if (
- this.visibleList.length > 0 &&
- this.visibleList.length < this.tableData.length
- ) {
- a = this.visibleList[0].rowKey
- }
- this.visibleList = []
- this.visibleList = this.tableData.slice(
- 0,
- Math.floor(this.maxHeight / this.itemHeight) + 1
- )
- this.getSpanArr(this.visibleList)
- this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
- // this.getTotalNum(this.tableData)
- loading.close()
- })
- .catch(() => {
- loading.close()
- this.maxHeight =
- window.innerHeight -
- document.querySelector('.tableTop').offsetHeight -
- 40
- this.$message.error('查询失败')
- })
- },
- filterRefreshCtrl(data, obj) {
- if (!obj.truckRemarkList || obj.truckRemarkList.length === 0) {
- this.filterTruckRemark = data[0].filterTruckRemark
- }
- if (!obj.saleRemarkList || obj.saleRemarkList.length === 0) {
- this.filterSaleRemark = data[0].filterSaleRemark
- }
- if (!obj.consigneeNameList || obj.consigneeNameList.length === 0) {
- this.filterConsigneeList = data[0].filterConsigneeList
- }
- if (!obj.addressPlaceList || obj.addressPlaceList.length === 0) {
- this.filteraddressPlace = data[0].filteraddressPlace
- }
- if (!obj.materialSpeList || obj.materialSpeList.length === 0) {
- this.filtermaterialSpe = data[0].filtermaterialSpe
- }
- if (!obj.capacityList || obj.capacityList.length === 0) {
- this.filterCapacityList = data[0].filterCapacityList
- }
- if (!obj.materialNameList || obj.materialNameList.length === 0) {
- this.filtermaterialNameList = data[0].filtermaterialNameList
- }
- if (!obj.carrierList || obj.carrierList.length === 0) {
- this.filterCarrierList = data[0].filterCarrierList
- }
- if (!obj.orderStatusList || obj.orderStatusList.length === 0) {
- this.filterorderStatus = data[0].filterorderStatus
- }
- if (!obj.areaNameList || obj.areaNameList.length === 0) {
- this.filterAreaName = data[0].filterAreaName
- }
- if (
- !obj.orderStatusActuallyList ||
- obj.orderStatusActuallyList.length === 0
- ) {
- this.filterorderStatusActually = data[0].filterorderStatusActually
- }
- },
- //重新获取表格数据
- refresh() {
- this.filterMap = {
- consigneeNameList: [],
- truckRemarkList: [],
- saleRemarkList: [],
- saleOrderStatusList: [],
- materialSpeList: [],
- addressPlaceList: [],
- orderStatusList: [],
- saleAreaList: [],
- materialNameList: [],
- carrierList: [],
- capacityList: []
- }
- this.visibleList = []
- this.getSteelReport()
- },
- //获取钢材统计报表
- getSteelReportDebounce() {
- this.$store.commit('updateSaleSteelToggleIds', { isClear: 1 })
- console.log('---------------------------1111')
- const loading = this.$loading({
- lock: true,
- text: '正在获取数据,请稍候',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- // this.isRowClick = 0
- let startTime = null
- let endTime = null
- let carrierSsoId = null
- let carrierName = null
- let consigneeName = null
- let consigneeLoginName = null
- let capacityNo = null
- let remark = null
- let saler = null
- if (this.startTime && this.endTime) {
- startTime = sjTime(this.startTime)
- endTime = sjTime(this.endTime)
- }
- if (getCookie('orgCode') == 'chengyunshang') {
- carrierSsoId = getCookie('userId')
- }
- if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
- saler = getCookie('loginName')
- }
- if (getCookie('orgCode') == 'shouhuokehu') {
- consigneeLoginName =
- JSON.parse(getCookie('userInfo')).userCode || getCookie('loginName')
- // console.log('userinfo')
- // JSON.parse(getCookie('userInfo')).userCode
- this.filterMap.consigneeLoginName = consigneeLoginName
- }
- if (this.screen == '客户') {
- consigneeName = this.input
- } else if (this.screen == '承运商') {
- carrierName = this.input
- } else if (this.screen == '车牌号') {
- capacityNo = this.input
- } else {
- remark = this.input
- }
- if (this.screen1 == '客户') {
- consigneeName = this.input1
- } else if (this.screen1 == '承运商') {
- carrierName = this.input1
- } else if (this.screen1 == '车牌号') {
- capacityNo = this.input1
- } else {
- remark = this.input1
- }
- if (getCookie('orgCode') == 'chengyunshang') {
- carrierSsoId = getCookie('userId')
- }
- if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
- saler = getCookie('loginName')
- }
- this.axios
- .post(
- '/api/v1/tms/getOyeSteelReport?startTime=' +
- startTime +
- '&endTime=' +
- endTime +
- '&carrierSsoId=' +
- carrierSsoId +
- '&saler=' +
- saler +
- '&i=' +
- new Date() +
- '&remark=' +
- remark +
- '&consigneeName=' +
- consigneeName +
- '&carrierName=' +
- carrierName +
- '&capacityNo=' +
- capacityNo,
- this.filterMap,
- { timeout: 6000000 }
- )
- .then(res => {
- this.tableData = res.data.data
- if (res.data.data.length > 0) {
- this.totalNumber = `${res.data.data[0].totalNumber}件`
- this.totalCapacity = `${res.data.data[0].totalCapacity}车`
- this.quxiaoCapacityNum = `${res.data.data[0].quxiaoCapacityNum}车`
- this.totalNetWeight = `${res.data.data[0].totalNetWeight}吨`
- this.filterConsigneeList = res.data.data[0].filterConsigneeList
- this.filterCarrierList = res.data.data[0].filterCarrierList
- this.filterCapacityList = res.data.data[0].filterCapacityList
- this.filtermaterialNameList =
- res.data.data[0].filtermaterialNameList
- // this.filterorderStatus = res.data.data[0].filterorderStatus
- this.filteraddressPlace = res.data.data[0].filteraddressPlace
- this.filtermaterialSpe = res.data.data[0].filtermaterialSpe
- this.filterSaleRemark = res.data.data[0].filterSaleRemark
- this.filterTruckRemark = res.data.data[0].filterTruckRemark
- this.filterorderStatusActually =
- res.data.data[0].filterorderStatusActually
- }
- this.maxHeight =
- window.innerHeight -
- document.querySelector('.tableTop').offsetHeight -
- 40
- let a = 1
- if (
- this.visibleList.length > 0 &&
- this.visibleList.length < this.tableData.length
- ) {
- a = this.visibleList[0].rowKey
- }
- this.visibleList = []
- // this.getNodeLNum(this.tableData)
- this.visibleList = this.tableData.slice(
- 0,
- Math.floor(this.maxHeight / this.itemHeight) + 1
- )
- this.getSpanArr(this.visibleList)
- this.$refs.tableRef.bodyWrapper.scrollTop = 30 * (a - 1)
- loading.close()
- })
- .catch(() => {
- this.maxHeight =
- window.innerHeight -
- document.querySelector('.tableTop').offsetHeight -
- 40
- loading.close()
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .saleSteelReports {
- .tableTop {
- margin-left: 20px;
- margin-top: 20px;
- // height: ;
- }
- .table {
- margin-left: 20px;
- margin-top: 20px;
- /deep/ .el-tooltip {
- width: auto !important;
- }
- /deep/ .el-table__body {
- overflow-y: auto;
- position: absolute !important;
- tr:hover > td {
- background-color: #fff;
- }
- }
- ::-webkit-scrollbar {
- height: 20px;
- width: 10px;
- background-color: transparent;
- }
- /deep/ .scrollBarClass {
- max-height: 200px;
- width: 220px;
- }
- }
- /deep/ .el-tabs__new-tab {
- font-size: 20px;
- line-height: 20px;
- font-weight: 700 !important;
- color: #000;
- }
- .batchCarrierClass {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .batchCapacityClass {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .dialog {
- .exceptionHandleClass {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 20px;
- margin-top: 20px;
- margin-bottom: 20px;
- }
- .steelMapClass {
- .steelMapClass1 {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass12 {
- margin-left: 50px;
- margin-right: 10px;
- }
- .steelMapClass13 {
- display: flex;
- margin-left: 50px;
- margin-right: 10px;
- }
- }
- .steelMapClass2 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass22 {
- margin-left: 50px;
- margin-right: 10px;
- .el-select {
- .el-input .el-input--suffix {
- .el-input__inner {
- border: 0px solid !important;
- }
- }
- }
- }
- }
- .steelMapClass3 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass32 {
- margin-left: 50px;
- // margin-right: 10px;
- }
- .steelMapClass33 {
- margin-left: 20px;
- // margin-right: 10px;
- }
- }
- .steelMapClass4 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass42 {
- margin-left: 50px;
- margin-right: 10px;
- }
- .steelMapClass43 {
- margin-left: 50px;
- margin-right: 10px;
- }
- .steelMapClass44 {
- margin-left: 50px;
- margin-right: 10px;
- }
- }
- .steelMapClass5 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass52 {
- margin-left: 50px;
- margin-right: 10px;
- .steelMapClass521 {
- margin-left: 20px;
- }
- }
- }
- .steelMapClass9 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass92 {
- margin-left: 50px;
- margin-right: 10px;
- .steelMapClass921 {
- text-align: start;
- min-width: 350px;
- .el-textarea {
- width: auto;
- }
- // /deep/ .el-input__prefix {
- // display: inline-block;
- // position: relative;
- // border: 1px solid #dcdfe6;
- // box-sizing: border-box;
- // color: #606266;
- // font-size: inherit;
- // height: 40px;
- // line-height: 40px;
- // padding: 0 30px;
- // transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
- // padding-left: 30px;
- // left: 0;
- // visibility: hidden;
- // }
- // /deep/ .el-textarea__inner {
- // position: absolute;
- // }
- }
- }
- }
- .steelMapClass6 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass62 {
- margin-left: 50px;
- margin-right: 10px;
- }
- }
- .steelMapClass7 {
- margin-top: 20px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-start;
- font-size: 16px;
- .steelMapClass72 {
- margin-left: 50px;
- margin-right: 10px;
- }
- }
- }
- .table1 {
- margin-left: 20px;
- margin-top: 20px;
- .el-tooltip {
- width: auto !important;
- }
- }
- .columnShowDialogClass {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
- </style>
|