index.vue 228 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845
  1. <template>
  2. <div class="app-container">
  3. <div
  4. v-if="isPercentage"
  5. class="percentage"
  6. style="
  7. width: 210px;
  8. height: 90px;
  9. background: #fff;
  10. position: fixed;
  11. bottom: 0;
  12. left: 0;
  13. z-index: 9999999999999;
  14. "
  15. >
  16. <h4 style="padding-left: 10px; line-height: 0">导出进度:</h4>
  17. <el-progress
  18. style="padding-left: 10px"
  19. :text-inside="true"
  20. :stroke-width="26"
  21. :percentage="percentage"
  22. />
  23. </div>
  24. <div class="filter-container">
  25. <!-- @change="changePastureName" -->
  26. <el-select
  27. v-model="getdataListParm.parammaps.pastureArr"
  28. style="width: 220px"
  29. placeholder="牧场"
  30. multiple
  31. collapse-tags
  32. collapse-tags-tooltip
  33. class="filter-item"
  34. >
  35. <el-option
  36. v-for="item in findAllPasture"
  37. :key="item.id"
  38. :label="item.name"
  39. :value="item.name"
  40. />
  41. </el-select>
  42. <el-input
  43. v-model="getdataListParm.parammaps.orderNumber"
  44. placeholder="申购单号"
  45. style="width: 200px"
  46. class="filter-item"
  47. />
  48. <el-select
  49. v-model="getdataListParm.parammaps.stuteSH"
  50. style="width: 140px"
  51. clearable
  52. placeholder="审核状态"
  53. class="filter-item"
  54. >
  55. <el-option
  56. v-for="item in statues"
  57. :key="item.id"
  58. :label="item.name"
  59. :value="item.id"
  60. />
  61. </el-select>
  62. <el-select
  63. v-model="getdataListParm.parammaps.departmentId"
  64. clearable
  65. style="width: 140px"
  66. placeholder="申购部门"
  67. class="filter-item"
  68. >
  69. <el-option
  70. v-for="item in findAllDepart"
  71. :key="item.id"
  72. :label="item.name"
  73. :value="item.id"
  74. />
  75. </el-select>
  76. <el-select
  77. v-model="getdataListParm.parammaps.purchase_type"
  78. clearable
  79. style="width: 140px"
  80. placeholder="申购类型"
  81. class="filter-item"
  82. >
  83. <el-option
  84. v-for="item in subscriptionStatusList"
  85. :key="item.id"
  86. :label="item.name"
  87. :value="item.id"
  88. />
  89. </el-select>
  90. <el-input
  91. v-model="getdataListParm.parammaps.empName"
  92. placeholder="申购人"
  93. style="width: 200px"
  94. class="filter-item"
  95. />
  96. <!-- <el-select v-model="getdataListParm.parammaps.empName " style="width: 140px;" placeholder="申购人" class="filter-item">
  97. <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
  98. </el-select> -->
  99. <el-date-picker
  100. ref="inputDatetime"
  101. v-model="getdataListParm.parammaps.inputDatetime"
  102. class="inputDatetime"
  103. type="datetimerange"
  104. style="width: 270px; top: -3px"
  105. format="yyyy-MM-dd"
  106. value-format="yyyy-MM-dd"
  107. range-separator="至"
  108. start-placeholder="开始日期"
  109. end-placeholder="结束日期"
  110. />
  111. <el-button
  112. v-waves
  113. class="filter-item"
  114. type="primary"
  115. icon="el-icon-search"
  116. @click="form_search"
  117. >搜索</el-button>
  118. <div>
  119. <el-button
  120. v-if="isSubscribeAdd"
  121. class="filter-item"
  122. type="primary"
  123. icon="el-icon-edit"
  124. @click="apply_subscribe"
  125. >新增</el-button>
  126. <el-button
  127. v-if="isSubscribeSpecial"
  128. class="filter-item"
  129. type="primary"
  130. icon="el-icon-edit"
  131. @click="handle_specialSubscription"
  132. >特殊申购</el-button>
  133. <el-button
  134. v-if="isSubscribeMilk"
  135. class="filter-item"
  136. type="primary"
  137. icon="el-icon-edit"
  138. @click="handle_milkSubscription"
  139. >奶厅申购</el-button>
  140. <el-button
  141. v-if="isSubscribeExport"
  142. v-waves
  143. class="filter-item"
  144. type="success"
  145. icon="el-icon-upload2"
  146. @click="handleDownload"
  147. >导出</el-button>
  148. <el-radio-group
  149. v-model="radioAll"
  150. style="margin-top: -9px"
  151. @change="changeAll()"
  152. >
  153. <el-radio-button label="全部" />
  154. <el-badge :value="pending.total" class="item">
  155. <el-radio-button label="待处理" />
  156. </el-badge>
  157. <el-radio-button label="已处理" />
  158. </el-radio-group>
  159. </div>
  160. </div>
  161. <div class="filter-button" />
  162. <el-table
  163. :key="tableKey"
  164. v-loading="listLoading"
  165. element-loading-text="给我一点时间"
  166. :data="list"
  167. border
  168. fit
  169. highlight-current-row
  170. style="width: 100%"
  171. :row-style="rowStyle"
  172. :cell-style="cellStyle"
  173. class="elTable"
  174. :max-height="myHeight"
  175. >
  176. <el-table-column label="序号" align="center" type="index" width="50px">
  177. <template slot-scope="scope">
  178. <span>{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</span>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="申购单号" min-width="150px" align="center">
  182. <template slot-scope="scope">
  183. <span>{{ scope.row.orderNumber }}</span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="牧场" min-width="90px" align="center">
  187. <template slot-scope="scope">
  188. <span>{{ scope.row.pastureName }}</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column
  192. label="申购日期"
  193. sortable
  194. prop="inputTime"
  195. min-width="80px"
  196. align="center"
  197. />
  198. <el-table-column label="申购类型" min-width="80px" align="center">
  199. <template slot-scope="scope">
  200. <span v-if="scope.row.purchase_type == 1">暂估申购</span>
  201. <span v-else-if="scope.row.purchase_type == 3">赠品申购</span>
  202. <span v-else-if="scope.row.departmentName == '挤奶处'">奶厅申购</span>
  203. <span v-else>新增申购</span>
  204. </template>
  205. </el-table-column>
  206. <el-table-column
  207. label="审核状态"
  208. min-width="80px"
  209. align="center"
  210. :formatter="statue"
  211. />
  212. <el-table-column
  213. label="操作"
  214. align="center"
  215. width="250"
  216. class-name="small-padding fixed-width"
  217. fixed="right"
  218. >
  219. <template slot-scope="{ row }">
  220. <el-button
  221. v-if="isSubscribeSee"
  222. type="primary"
  223. size="mini"
  224. @click="form_see(row)"
  225. >查看</el-button>
  226. <el-button
  227. v-if="
  228. row.statue == 4 ||
  229. row.statue == 6 ||
  230. row.statue == 8 ||
  231. row.statue == 10 ||
  232. row.statue == 12 ||
  233. row.statue == 14
  234. "
  235. style="display: inline-block"
  236. type="success"
  237. size="mini"
  238. @click="form_edit(row)"
  239. >编辑</el-button>
  240. <el-button
  241. v-else
  242. style="display: none"
  243. type="success"
  244. size="mini"
  245. @click="form_edit(row)"
  246. >编辑</el-button>
  247. <!-- 库管 -->
  248. <el-button
  249. v-if="
  250. isSubscribeExamineKG &&
  251. row.statue == 2 &&
  252. row.departmentName == '挤奶处'
  253. "
  254. style="display: inline-block"
  255. type="success"
  256. size="mini"
  257. @click="handleExamine1(row)"
  258. >审核</el-button>
  259. <el-button
  260. v-if="
  261. isSubscribeExamineKG &&
  262. row.statue == 2 &&
  263. row.departmentName !== '挤奶处'
  264. "
  265. style="display: inline-block"
  266. type="success"
  267. size="mini"
  268. @click="form_edit1(row)"
  269. >合单</el-button>
  270. <el-button
  271. v-if="
  272. isSubscribeExamineKG &&
  273. row.statue == 2 &&
  274. row.departmentName !== '挤奶处'
  275. "
  276. style="display: inline-block"
  277. type="success"
  278. size="mini"
  279. @click="form_modify1(row)"
  280. >提交</el-button>
  281. <!-- 设备 -->
  282. <el-button
  283. v-if="isSubscribeExamineSBZG && row.statue == 3"
  284. style="display: inline-block"
  285. type="success"
  286. size="mini"
  287. @click="handleExamine2(row)"
  288. >审核</el-button>
  289. <!-- 供应商主管 -->
  290. <el-button
  291. v-if="isSubscribeExamineZG && row.statue == 9"
  292. style="display: inline-block"
  293. type="success"
  294. size="mini"
  295. @click="handleExamine3(row)"
  296. >审核</el-button>
  297. <!-- 场长 -->
  298. <el-button
  299. v-if="
  300. sdchangzhangshenhe &&
  301. row.statue == 5 &&
  302. row.departmentName == '挤奶处' &&
  303. row.examine == 1
  304. "
  305. style="display: inline-block"
  306. type="success"
  307. size="mini"
  308. @click="handleExamine4(row)"
  309. >审核</el-button>
  310. <el-button
  311. v-else-if="
  312. sdchangzhangshenhe &&
  313. row.statue == 5 &&
  314. row.departmentName !== '挤奶处'
  315. "
  316. style="display: inline-block"
  317. type="success"
  318. size="mini"
  319. @click="handleExamine4(row)"
  320. >审核</el-button>
  321. <!-- 采购 -->
  322. <el-button
  323. v-if="isSubscribeExamineCG && (row.statue == 11 || row.statue == 15)"
  324. style="display: inline-block"
  325. type="success"
  326. size="mini"
  327. @click="handleExamine5(row)"
  328. >审核</el-button>
  329. <!-- 财务 -->
  330. <el-button
  331. v-if="
  332. isSubscribeExamineCW && row.purchase_type == 1 && row.statue == 7
  333. "
  334. style="display: inline-block"
  335. type="success"
  336. size="mini"
  337. @click="handleExamine6(row)"
  338. >审核</el-button>
  339. <!-- 奶厅 -->
  340. <el-button
  341. v-if="
  342. isSubscribeExamineNT &&
  343. row.departmentName == '挤奶处' &&
  344. ((row.examine !== 1 && row.statue == 5) || row.statue == 11)
  345. "
  346. style="display: inline-block"
  347. type="success"
  348. size="mini"
  349. @click="handleExamine7(row)"
  350. >审核</el-button>
  351. <el-button
  352. v-if="
  353. isSubscribeDelete &&
  354. (row.statue == 4 ||
  355. row.statue == 6 ||
  356. row.statue == 8 ||
  357. row.statue == 10 ||
  358. row.statue == 12 ||
  359. row.statue == 14 ||
  360. row.statue == 16)
  361. "
  362. style="display: inline-block"
  363. type="danger"
  364. size="mini"
  365. @click="form_delete(row)"
  366. >删除</el-button>
  367. <el-button
  368. v-else
  369. style="display: none"
  370. type="danger"
  371. size="mini"
  372. @click="form_delete(row)"
  373. >删除</el-button>
  374. </template>
  375. </el-table-column>
  376. </el-table>
  377. <pagination
  378. v-show="total > 0"
  379. :total="total"
  380. :page.sync="getdataListParm.offset"
  381. :limit.sync="getdataListParm.pagecount"
  382. @pagination="get_table_data"
  383. />
  384. <!-- 弹出层新增or修改 -->
  385. <el-dialog
  386. :title="textMap[dialogStatus]"
  387. :visible.sync="dialogFormVisible"
  388. :close-on-click-modal="false"
  389. width="90%"
  390. >
  391. <div class="app-container">
  392. <el-form
  393. ref="createTemp"
  394. :rules="rules"
  395. :model="createTemp"
  396. label-position="right"
  397. label-width="100px"
  398. style="width: 90%; margin: 0 auto"
  399. >
  400. <el-row>
  401. <el-col :span="8">
  402. <el-form-item label="申购单号:" prop="orderNumber">
  403. <el-input
  404. ref="orderNumber"
  405. v-model="createTemp.orderNumber"
  406. disabled
  407. />
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="8">
  411. <el-form-item label="牧场:" prop="pastureId">
  412. <el-select
  413. v-model="createTemp.pastureId"
  414. placeholder="牧场"
  415. class="filter-item"
  416. style="width: 100%"
  417. :disabled="dialogStatus === 'update'"
  418. @change="changePasture"
  419. >
  420. <el-option
  421. v-for="item in findAllPasture"
  422. :key="item.id"
  423. :label="item.name"
  424. :value="item.id"
  425. />
  426. </el-select>
  427. </el-form-item>
  428. </el-col>
  429. <el-col :span="8">
  430. <el-form-item label="申购部门:" prop="departmentId">
  431. <el-select
  432. v-model="createTemp.departmentId"
  433. placeholder="申购部门"
  434. class="filter-item"
  435. style="width: 100%"
  436. :disabled="dialogStatus === 'update' || isMilk"
  437. @change="changeDepart"
  438. >
  439. <el-option
  440. v-for="item in createDepartList"
  441. :key="item.id"
  442. :label="item.name"
  443. :value="item.id"
  444. :disabled="item.name == '挤奶处'"
  445. />
  446. </el-select>
  447. </el-form-item>
  448. </el-col>
  449. </el-row>
  450. <el-row>
  451. <el-col :span="8">
  452. <el-form-item label="申购人:" prop="employeId">
  453. <el-select
  454. v-model="createTemp.employeId"
  455. placeholder="申购人"
  456. class="filter-item"
  457. style="width: 100%"
  458. :disabled="dialogStatus === 'update'"
  459. >
  460. <el-option
  461. v-for="item in findAllEmploye"
  462. :key="item.id"
  463. :label="item.name"
  464. :value="item.id"
  465. />
  466. </el-select>
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="8">
  470. <el-form-item label="申购日期:" prop="createTime">
  471. <el-date-picker
  472. v-model="createTemp.createTime"
  473. :picker-options="pickerOptions"
  474. type="datetime"
  475. placeholder="申购日期"
  476. style="width: 100%"
  477. :disabled="dialogStatus === 'update'"
  478. />
  479. </el-form-item>
  480. </el-col>
  481. <el-col v-if="dialogStatus === 'create'" :span="8">
  482. <el-form-item label="线上采购:" prop="providerId">
  483. <el-select
  484. v-model="createTemp.providerId"
  485. placeholder="线上采购"
  486. clearable
  487. class="filter-item"
  488. style="width: 100%"
  489. @change="changeProvider"
  490. >
  491. <el-option
  492. v-for="item in onlineSubscriptionList"
  493. :key="item.id"
  494. :label="item.providerName"
  495. :value="item.id"
  496. />
  497. </el-select>
  498. </el-form-item>
  499. </el-col>
  500. <el-col v-if="dialogStatus === 'update'" :span="8">
  501. <el-form-item label="线上采购:" prop="providerName">
  502. <el-input
  503. ref="providerName"
  504. v-model="createTemp.providerName"
  505. disabled
  506. />
  507. </el-form-item>
  508. </el-col>
  509. </el-row>
  510. <el-row>
  511. <el-col :span="16">
  512. <el-form-item label="备件:" prop="partCode">
  513. <el-autocomplete
  514. ref="autocomplete"
  515. v-model="createTemp.partCode"
  516. value-key="name"
  517. class="inline-input"
  518. :fetch-suggestions="sparePartSearch"
  519. placeholder="请输入备件编号或备件名称或备件规格"
  520. style="width: 100%"
  521. @select="handleSelectSparePart"
  522. >
  523. <template slot-scope="{ item }">
  524. <b>备件编号:</b>
  525. <div class="name" style="display: inline">
  526. {{ item.partCode }}
  527. </div>
  528. &nbsp; | &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp; | &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
  529. </template>
  530. </el-autocomplete>
  531. </el-form-item>
  532. </el-col>
  533. </el-row>
  534. </el-form>
  535. <el-table
  536. :key="tableKey"
  537. v-loading="listLoading"
  538. element-loading-text="给我一点时间"
  539. :data="listAdd"
  540. border
  541. fit
  542. highlight-current-row
  543. style="width: 100%; margin-bottom: 30px"
  544. :row-style="rowStyle"
  545. :cell-style="cellStyle"
  546. class="elTable"
  547. :row-class-name="getRowClass"
  548. >
  549. <!-- table表格 -->
  550. <el-table-column
  551. label="序号"
  552. align="center"
  553. type="index"
  554. width="50px"
  555. />
  556. <el-table-column
  557. label="备件编号"
  558. prop="partCode"
  559. align="center"
  560. min-width="90"
  561. >
  562. <template slot-scope="scope">
  563. <span>{{ scope.row.partCode }}</span>
  564. </template>
  565. </el-table-column>
  566. <el-table-column
  567. label="备件名称"
  568. prop="partName"
  569. align="center"
  570. min-width="90"
  571. >
  572. <template slot-scope="scope">
  573. <span>{{ scope.row.partName }}</span>
  574. </template>
  575. </el-table-column>
  576. <el-table-column
  577. label="备件规格"
  578. prop="specification"
  579. min-width="80px"
  580. align="center"
  581. >
  582. <template slot-scope="scope">
  583. <span>{{ scope.row.specification }}</span>
  584. </template>
  585. </el-table-column>
  586. <el-table-column
  587. label="备件图片"
  588. prop="picpath"
  589. min-width="110px"
  590. align="center"
  591. >
  592. <template slot-scope="scope">
  593. <el-popover placement="right" title="" trigger="hover">
  594. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  595. <img
  596. v-if="scope.row.picpath !== ''"
  597. slot="reference"
  598. :src="scope.row.picpath"
  599. :alt="scope.row.srcpath"
  600. style="height: 100px; width: 100px"
  601. >
  602. </el-popover>
  603. </template>
  604. </el-table-column>
  605. <el-table-column
  606. label="备件品牌"
  607. prop="brand"
  608. align="center"
  609. min-width="60"
  610. >
  611. <template slot-scope="scope">
  612. <span v-if="dialogStatus === 'create'">{{
  613. scope.row.brandName
  614. }}</span>
  615. <span v-if="dialogStatus === 'update'">{{
  616. scope.row.brandName
  617. }}</span>
  618. </template>
  619. </el-table-column>
  620. <el-table-column
  621. label="计量单位"
  622. prop="unit"
  623. align="center"
  624. min-width="60"
  625. >
  626. <template slot-scope="scope">
  627. <span>{{ scope.row.unit }}</span>
  628. </template>
  629. </el-table-column>
  630. <el-table-column
  631. label="现有库存"
  632. prop="reportery"
  633. align="center"
  634. min-width="60"
  635. >
  636. <template slot-scope="scope">
  637. <span
  638. v-if="
  639. createTemp.providerId == '' ||
  640. parseFloat(createTemp.purchaseType) > 0
  641. "
  642. >{{ scope.row.reportery }}</span>
  643. </template>
  644. </el-table-column>
  645. <el-table-column
  646. label="价格"
  647. prop="price"
  648. align="center"
  649. min-width="150"
  650. >
  651. <template slot-scope="scope">
  652. <div
  653. v-if="
  654. scope.row.contractId == '' ||
  655. parseInt(scope.row.contractId) < 0 ||
  656. parseInt(scope.row.contractId) == 0
  657. "
  658. >
  659. <el-form :model="scope.row" :rules="rules">
  660. <el-form-item>
  661. <el-input
  662. v-model="scope.row.price"
  663. style="margin-top: 15px"
  664. />
  665. </el-form-item>
  666. </el-form>
  667. </div>
  668. <div v-for="item in scope.row.pricearr" v-else>
  669. <el-tooltip class="item" effect="dark" placement="top-start">
  670. <div slot="content">{{ item }}</div>
  671. <div
  672. style="
  673. overflow: hidden;
  674. white-space: nowrap;
  675. text-overflow: ellipsis;
  676. "
  677. >
  678. {{ item }}
  679. </div>
  680. </el-tooltip>
  681. </div>
  682. </template>
  683. </el-table-column>
  684. <el-table-column
  685. v-if="
  686. dialogStatus === 'create' ||
  687. (createTemp.purchase_type !== 1 && createTemp.purchase_type !== 3)
  688. "
  689. label="使用周期"
  690. min-width="120px"
  691. align="center"
  692. >
  693. <template slot-scope="scope">
  694. <div v-for="item in scope.row.lifeCyclearr">
  695. <el-tooltip class="item" effect="dark" placement="top-start">
  696. <div slot="content">{{ item }}</div>
  697. <div
  698. style="
  699. overflow: hidden;
  700. white-space: nowrap;
  701. text-overflow: ellipsis;
  702. "
  703. >
  704. {{ item }}
  705. </div>
  706. </el-tooltip>
  707. </div>
  708. </template>
  709. </el-table-column>
  710. <el-table-column
  711. v-if="
  712. dialogStatus === 'create' ||
  713. (createTemp.purchase_type !== 1 && createTemp.purchase_type !== 3)
  714. "
  715. label="合同差异项"
  716. min-width="120px"
  717. align="center"
  718. >
  719. <template slot-scope="scope">
  720. <div v-for="item in scope.row.contractVarianceItemarr">
  721. <el-tooltip class="item" effect="dark" placement="top-start">
  722. <div slot="content">{{ item }}</div>
  723. <div
  724. style="
  725. overflow: hidden;
  726. white-space: nowrap;
  727. text-overflow: ellipsis;
  728. "
  729. >
  730. {{ item }}
  731. </div>
  732. </el-tooltip>
  733. </div>
  734. </template>
  735. </el-table-column>
  736. <el-table-column
  737. label="申购数量"
  738. min-width="100px"
  739. align="center"
  740. valign="middle"
  741. >
  742. <template slot-scope="scope">
  743. <el-form :model="scope.row" :rules="rules">
  744. <el-form-item prop="amount">
  745. <el-input
  746. v-model="scope.row.amount"
  747. style="margin-top: 15px"
  748. />
  749. </el-form-item>
  750. </el-form>
  751. </template>
  752. </el-table-column>
  753. <!-- <el-table-column label="部门" min-width="110px" align="center" prop="purpose" valign="middle" /> -->
  754. <el-table-column
  755. v-if="textMap.create == '新增'"
  756. label="驳回说明"
  757. min-width="110px"
  758. align="center"
  759. prop="explain1"
  760. valign="middle"
  761. />
  762. <el-table-column
  763. label="备注"
  764. min-width="110px"
  765. align="center"
  766. valign="middle"
  767. >
  768. <template slot-scope="scope">
  769. <el-input v-model="scope.row.purpose" />
  770. </template>
  771. </el-table-column>
  772. <el-table-column
  773. label="操作"
  774. align="center"
  775. width="100"
  776. class-name="small-padding fixed-width"
  777. fixed="right"
  778. >
  779. <template slot-scope="{ row }">
  780. <a class="del" @click="partDelete(row)">删除</a>
  781. </template>
  782. </el-table-column>
  783. </el-table>
  784. <div slot="footer" class="dialog-footer" style="bottom: 10px">
  785. <el-button
  786. v-if="dialogStatus === 'create'"
  787. type="primary"
  788. :disabled="isokDisable"
  789. @click="add_dialog_save()"
  790. >保存并关闭</el-button>
  791. <el-button
  792. v-else-if="dialogStatus === 'update'"
  793. type="primary"
  794. :disabled="isokDisable"
  795. @click="edit_dialog_save()"
  796. >保存并关闭</el-button>
  797. <el-button
  798. @click="
  799. dialogFormVisible = false
  800. get_table_data()
  801. "
  802. >取消并关闭</el-button>
  803. </div>
  804. </div>
  805. </el-dialog>
  806. <!-- 特殊申购 -->
  807. <el-dialog
  808. :title="textMap[dialogStatus]"
  809. :visible.sync="dialogFormVisible2"
  810. :close-on-click-modal="false"
  811. width="90%"
  812. >
  813. <div class="app-container">
  814. <el-form
  815. ref="createTemp"
  816. :rules="rules"
  817. :model="createTemp"
  818. label-position="right"
  819. label-width="100px"
  820. style="width: 90%; margin: 0 auto"
  821. >
  822. <el-row>
  823. <el-col :span="8">
  824. <el-form-item label="申购单号:" prop="orderNumber">
  825. <el-input
  826. ref="orderNumber"
  827. v-model="createTemp.orderNumber"
  828. disabled
  829. />
  830. </el-form-item>
  831. </el-col>
  832. <el-col :span="8">
  833. <el-form-item label="牧场:" prop="pastureId">
  834. <el-select
  835. v-model="createTemp.pastureId"
  836. placeholder="牧场"
  837. class="filter-item"
  838. style="width: 100%"
  839. :disabled="dialogStatus === 'update'"
  840. @change="changePasture"
  841. >
  842. <el-option
  843. v-for="item in findAllPasture"
  844. :key="item.id"
  845. :label="item.name"
  846. :value="item.id"
  847. />
  848. </el-select>
  849. </el-form-item>
  850. </el-col>
  851. <el-col :span="8">
  852. <el-form-item label="申购部门:" prop="departmentId">
  853. <el-select
  854. v-model="createTemp.departmentId"
  855. placeholder="申购部门"
  856. class="filter-item"
  857. style="width: 100%"
  858. :disabled="dialogStatus === 'update'"
  859. @change="changeDepart"
  860. >
  861. <el-option
  862. v-for="item in createDepartList"
  863. :key="item.id"
  864. :label="item.name"
  865. :value="item.id"
  866. />
  867. </el-select>
  868. </el-form-item>
  869. </el-col>
  870. </el-row>
  871. <el-row>
  872. <el-col :span="8">
  873. <el-form-item label="申购人:" prop="employeId">
  874. <el-select
  875. v-model="createTemp.employeId"
  876. placeholder="申购人"
  877. class="filter-item"
  878. style="width: 100%"
  879. :disabled="dialogStatus === 'update'"
  880. >
  881. <el-option
  882. v-for="item in findAllEmploye"
  883. :key="item.id"
  884. :label="item.name"
  885. :value="item.id"
  886. />
  887. </el-select>
  888. </el-form-item>
  889. </el-col>
  890. <el-col :span="8">
  891. <el-form-item label="申购日期:" prop="createTime">
  892. <el-date-picker
  893. v-model="createTemp.createTime"
  894. :picker-options="pickerOptions"
  895. type="datetime"
  896. placeholder="申购日期"
  897. style="width: 100%"
  898. :disabled="dialogStatus === 'update'"
  899. />
  900. </el-form-item>
  901. </el-col>
  902. <el-col
  903. v-if="
  904. (dialogStatus === 'special' &&
  905. createTemp.purchaseType == '1') ||
  906. createTemp.purchaseType == '3'
  907. "
  908. :span="8"
  909. >
  910. <el-form-item label="供应商:" prop="providerId">
  911. <el-select
  912. v-model="createTemp.providerId"
  913. filterable
  914. placeholder="供应商"
  915. class="filter-item"
  916. style="width: 100%"
  917. :disabled="dialogStatus === 'update'"
  918. >
  919. <el-option
  920. v-for="item in providerList"
  921. :key="item.id"
  922. :label="item.providerName"
  923. :value="item.id"
  924. />
  925. </el-select>
  926. </el-form-item>
  927. </el-col>
  928. <el-col
  929. v-if="
  930. dialogStatus === 'special' && createTemp.purchaseType == '2'
  931. "
  932. :span="8"
  933. >
  934. <el-form-item label="供应商:" prop="providerId">
  935. <el-input
  936. ref="providerName"
  937. v-model="createTemp.providerName"
  938. />
  939. <!-- <el-select v-model="createTemp.providerId" placeholder="供应商" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
  940. <el-option v-for="item in providerList" :key="item.id" :label="item.providerName" :value="item.id" />
  941. </el-select> -->
  942. </el-form-item>
  943. </el-col>
  944. <el-col
  945. v-if="
  946. dialogStatus === 'special' && createTemp.purchaseType == '2'
  947. "
  948. :span="8"
  949. >
  950. <el-form-item label="垫付人:" prop="funderId">
  951. <el-select
  952. v-model="createTemp.funderId"
  953. filterable
  954. placeholder="垫付人"
  955. class="filter-item"
  956. style="width: 100%"
  957. :disabled="dialogStatus === 'update'"
  958. >
  959. <el-option
  960. v-for="item in findAllEmploye"
  961. :key="item.id"
  962. :label="item.name"
  963. :value="item.id"
  964. />
  965. </el-select>
  966. </el-form-item>
  967. </el-col>
  968. </el-row>
  969. <el-row>
  970. <el-col :span="24">
  971. <el-form-item label="申购类型:" prop="purchaseType">
  972. <el-radio
  973. v-model="createTemp.purchaseType"
  974. label="1"
  975. @change="changeType()"
  976. >暂估</el-radio>
  977. <!-- <el-radio v-model="createTemp.purchaseType" label="2" @change="changeType()">垫付</el-radio> -->
  978. <el-radio
  979. v-model="createTemp.purchaseType"
  980. label="3"
  981. @change="changeType()"
  982. >赠品</el-radio>
  983. </el-form-item>
  984. </el-col>
  985. </el-row>
  986. <el-row>
  987. <el-col :span="16">
  988. <el-form-item label="备件:" prop="partCode">
  989. <el-autocomplete
  990. ref="autocomplete"
  991. v-model="createTemp.partCode"
  992. value-key="name"
  993. class="inline-input"
  994. :fetch-suggestions="sparePartSearch"
  995. placeholder="请输入备件编号或备件名称或备件规格"
  996. style="width: 100%"
  997. @select="handleSelectSparePart"
  998. >
  999. <template slot-scope="{ item }">
  1000. <b>备件编号:</b>
  1001. <div class="name" style="display: inline">
  1002. {{ item.partCode }}
  1003. </div>
  1004. &nbsp; | &nbsp;<b>备件名称:</b><span class="addr">{{ item.partName }}</span>&nbsp; | &nbsp;<b>备件规格:</b><span class="addr">{{ item.specification }}</span>
  1005. </template>
  1006. </el-autocomplete>
  1007. </el-form-item>
  1008. </el-col>
  1009. </el-row>
  1010. </el-form>
  1011. <el-table
  1012. :key="tableKey"
  1013. v-loading="listLoading"
  1014. element-loading-text="给我一点时间"
  1015. :data="listAdd"
  1016. border
  1017. fit
  1018. highlight-current-row
  1019. style="width: 100%; margin-bottom: 30px"
  1020. :row-style="rowStyle"
  1021. :cell-style="cellStyle"
  1022. :row-class-name="getRowClass"
  1023. >
  1024. <el-table-column
  1025. label="序号"
  1026. align="center"
  1027. type="index"
  1028. width="50px"
  1029. />
  1030. <el-table-column
  1031. label="备件编号"
  1032. prop="partCode"
  1033. align="center"
  1034. min-width="90"
  1035. >
  1036. <template slot-scope="scope">
  1037. <span>{{ scope.row.partCode }}</span>
  1038. </template>
  1039. </el-table-column>
  1040. <el-table-column
  1041. label="备件名称"
  1042. prop="partName"
  1043. align="center"
  1044. min-width="90"
  1045. >
  1046. <template slot-scope="scope">
  1047. <span>{{ scope.row.partName }}</span>
  1048. </template>
  1049. </el-table-column>
  1050. <el-table-column
  1051. label="备件规格"
  1052. prop="specification"
  1053. min-width="80px"
  1054. align="center"
  1055. >
  1056. <template slot-scope="scope">
  1057. <span>{{ scope.row.specification }}</span>
  1058. </template>
  1059. </el-table-column>
  1060. <el-table-column
  1061. label="备件图片"
  1062. prop="picpath"
  1063. min-width="110px"
  1064. align="center"
  1065. >
  1066. <template slot-scope="scope">
  1067. <el-popover placement="right" title="" trigger="hover">
  1068. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  1069. <img
  1070. v-if="scope.row.picpath !== ''"
  1071. slot="reference"
  1072. :src="scope.row.picpath"
  1073. :alt="scope.row.srcpath"
  1074. style="height: 100px; width: 100px"
  1075. >
  1076. </el-popover>
  1077. </template>
  1078. </el-table-column>
  1079. <el-table-column
  1080. label="备件品牌"
  1081. prop="brand"
  1082. align="center"
  1083. min-width="160"
  1084. >
  1085. <template slot-scope="scope">
  1086. <el-form :model="scope.row" :rules="rules">
  1087. <el-form-item prop="brandName">
  1088. <el-autocomplete
  1089. v-model="scope.row.brandName"
  1090. value-key="brandName"
  1091. class="inline-input"
  1092. :fetch-suggestions="brandSearch"
  1093. placeholder="请输入品牌"
  1094. style="width: 100%"
  1095. @select="
  1096. (value) => {
  1097. handleSelectBrand(value, scope.row)
  1098. }
  1099. "
  1100. />
  1101. </el-form-item>
  1102. </el-form>
  1103. </template>
  1104. </el-table-column>
  1105. <el-table-column
  1106. label="计量单位"
  1107. prop="unit"
  1108. align="center"
  1109. min-width="60"
  1110. >
  1111. <template slot-scope="scope">
  1112. <span>{{ scope.row.unit }}</span>
  1113. </template>
  1114. </el-table-column>
  1115. <el-table-column
  1116. label="现有库存"
  1117. prop="reportery"
  1118. align="center"
  1119. min-width="60"
  1120. >
  1121. <template slot-scope="scope">
  1122. <span
  1123. v-if="
  1124. createTemp.providerId == '' ||
  1125. parseFloat(createTemp.purchaseType) > 0
  1126. "
  1127. >{{ scope.row.reportery }}</span>
  1128. </template>
  1129. </el-table-column>
  1130. <!-- <el-table-column v-if="createTemp.purchaseType == '1'" label="价格" prop="price" align="center" min-width="150">
  1131. <template slot-scope="scope">
  1132. <div v-if="createTemp.purchaseType == '1'" v-for="item in scope.row.pricearr" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
  1133. <el-tooltip class="item" effect="dark" placement="top-start">
  1134. <div slot="content">{{item}}</div>
  1135. <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item}}</div>
  1136. </el-tooltip>
  1137. </div>
  1138. </template>
  1139. </el-table-column> -->
  1140. <el-table-column
  1141. label="价格"
  1142. prop="price"
  1143. align="center"
  1144. min-width="150"
  1145. >
  1146. <template slot-scope="scope">
  1147. <el-form :model="scope.row" :rules="rules">
  1148. <el-form-item prop="price">
  1149. <el-input
  1150. v-model="scope.row.price"
  1151. style="margin-top: 15px"
  1152. />
  1153. </el-form-item>
  1154. </el-form>
  1155. </template>
  1156. </el-table-column>
  1157. <el-table-column
  1158. label="申购数量"
  1159. min-width="100px"
  1160. align="center"
  1161. valign="middle"
  1162. >
  1163. <template slot-scope="scope">
  1164. <el-form :model="scope.row" :rules="rules">
  1165. <el-form-item prop="amount">
  1166. <el-input
  1167. v-model="scope.row.amount"
  1168. style="margin-top: 15px"
  1169. />
  1170. </el-form-item>
  1171. </el-form>
  1172. </template>
  1173. </el-table-column>
  1174. <el-table-column
  1175. v-if="createTemp.purchaseType == '1'"
  1176. label="驳回说明"
  1177. min-width="110px"
  1178. align="center"
  1179. prop="explain1"
  1180. valign="middle"
  1181. />
  1182. <el-table-column
  1183. label="备注"
  1184. min-width="110px"
  1185. align="center"
  1186. valign="middle"
  1187. >
  1188. <template slot-scope="scope">
  1189. <el-input v-model="scope.row.purpose" />
  1190. </template>
  1191. </el-table-column>
  1192. <el-table-column
  1193. label="操作"
  1194. align="center"
  1195. width="100"
  1196. class-name="small-padding fixed-width"
  1197. fixed="right"
  1198. >
  1199. <template slot-scope="{ row }">
  1200. <a class="del" @click="partDelete(row)">删除</a>
  1201. </template>
  1202. </el-table-column>
  1203. </el-table>
  1204. <div slot="footer" class="dialog-footer" style="bottom: 10px">
  1205. <el-button
  1206. v-if="dialogStatus === 'special'"
  1207. type="primary"
  1208. :disabled="isokDisable"
  1209. @click="special_dialog_save()"
  1210. >保存并关闭</el-button>
  1211. <el-button
  1212. @click="
  1213. dialogFormVisible2 = false
  1214. get_table_data()
  1215. "
  1216. >取消并关闭</el-button>
  1217. </div>
  1218. </div>
  1219. </el-dialog>
  1220. <!-- 查看 -->
  1221. <el-dialog
  1222. :title="textMap[dialogStatus]"
  1223. :visible.sync="dialogFormVisibleSee"
  1224. :close-on-click-modal="false"
  1225. width="90%"
  1226. >
  1227. <div class="app-containerSee">
  1228. <el-form
  1229. ref="seeTemp"
  1230. :rules="rules"
  1231. :model="seeTemp"
  1232. label-position="right"
  1233. label-width="100px"
  1234. style="width: 90%; margin: 0 auto"
  1235. >
  1236. <el-row>
  1237. <el-col :span="8">
  1238. <el-form-item label="申购单号:" prop="orderNumber">
  1239. <el-input
  1240. ref="orderNumber"
  1241. v-model="seeTemp.orderNumber"
  1242. disabled
  1243. />
  1244. </el-form-item>
  1245. </el-col>
  1246. <el-col :span="8">
  1247. <el-form-item label="牧场:" prop="pastureId">
  1248. <el-select
  1249. v-model="seeTemp.pastureId"
  1250. placeholder="牧场"
  1251. class="filter-item"
  1252. disabled
  1253. style="width: 100%"
  1254. >
  1255. <el-option
  1256. v-for="item in findAllPasture"
  1257. :key="item.id"
  1258. :label="item.name"
  1259. :value="item.id"
  1260. />
  1261. </el-select>
  1262. </el-form-item>
  1263. </el-col>
  1264. <el-col :span="8">
  1265. <el-form-item label="申购部门:" prop="departmentName">
  1266. <el-input
  1267. ref="departmentName"
  1268. v-model="seeTemp.departmentName"
  1269. disabled
  1270. />
  1271. </el-form-item>
  1272. </el-col>
  1273. </el-row>
  1274. <el-row>
  1275. <el-col :span="8">
  1276. <el-form-item label="申购人:" prop="empname">
  1277. <el-input ref="empname" v-model="seeTemp.empname" disabled />
  1278. </el-form-item>
  1279. </el-col>
  1280. <el-col :span="8">
  1281. <el-form-item label="申购日期:" prop="inputTime">
  1282. <el-date-picker
  1283. v-model="seeTemp.inputTime"
  1284. :picker-options="pickerOptions"
  1285. type="date"
  1286. placeholder="申购日期"
  1287. format="yyyy-MM-dd"
  1288. value-format="yyyy-MM-dd"
  1289. style="width: 100%"
  1290. disabled
  1291. />
  1292. </el-form-item>
  1293. </el-col>
  1294. <el-col v-if="seeTemp.purchaseType == '2'" :span="8">
  1295. <el-form-item label="供应商:" prop="funderProviderName ">
  1296. <el-input
  1297. ref="funderProviderName "
  1298. v-model="seeTemp.funderProviderName"
  1299. disabled
  1300. />
  1301. </el-form-item>
  1302. </el-col>
  1303. <el-col
  1304. v-if="seeTemp.purchase_type > 0 && seeTemp.purchaseType !== '2'"
  1305. :span="8"
  1306. >
  1307. <el-form-item label="供应商:" prop="providerName">
  1308. <el-input
  1309. ref="providerName"
  1310. v-model="seeTemp.providerName"
  1311. disabled
  1312. />
  1313. </el-form-item>
  1314. </el-col>
  1315. <el-col v-if="seeTemp.purchaseType == '2'" :span="8">
  1316. <el-form-item label="垫付人:" prop="funder_name">
  1317. <el-input
  1318. ref="funder_name"
  1319. v-model="seeTemp.funder_name"
  1320. disabled
  1321. />
  1322. </el-form-item>
  1323. </el-col>
  1324. <el-col v-if="seeTemp.purchase_type < 1" :span="8">
  1325. <el-form-item label="线上采购:" prop="providerName">
  1326. <el-input
  1327. ref="providerName"
  1328. v-model="seeTemp.providerName"
  1329. disabled
  1330. />
  1331. </el-form-item>
  1332. </el-col>
  1333. </el-row>
  1334. <el-row v-if="seeTemp.purchase_type > 0">
  1335. <el-col :span="24">
  1336. <el-form-item label="申购类型:" prop="purchaseType">
  1337. <!-- <el-radio v-model="seeTemp.purchaseType" disabled label="1">暂估</el-radio> -->
  1338. <!-- <el-radio v-model="seeTemp.purchaseType" disabled label="2">垫付</el-radio> -->
  1339. <el-radio
  1340. v-model="seeTemp.purchaseType"
  1341. disabled
  1342. label="3"
  1343. >赠品</el-radio>
  1344. </el-form-item>
  1345. </el-col>
  1346. </el-row>
  1347. </el-form>
  1348. <el-table
  1349. :key="tableKey"
  1350. v-loading="listLoadingSee"
  1351. element-loading-text="给我一点时间"
  1352. :data="listSee"
  1353. border
  1354. fit
  1355. highlight-current-row
  1356. style="width: 100%; margin-bottom: 30px"
  1357. :row-style="rowStyle"
  1358. :cell-style="cellStyle"
  1359. class="elTable"
  1360. @sort-change="tableSort"
  1361. >
  1362. <el-table-column
  1363. type="index"
  1364. label="序号"
  1365. align="center"
  1366. width="50px"
  1367. />
  1368. <el-table-column
  1369. label="备件编号"
  1370. prop="partCode"
  1371. align="center"
  1372. min-width="90"
  1373. >
  1374. <template slot-scope="scope">
  1375. <span>{{ scope.row.partCode }}</span>
  1376. </template>
  1377. </el-table-column>
  1378. <el-table-column
  1379. label="备件名称"
  1380. prop="partName"
  1381. align="center"
  1382. min-width="90"
  1383. >
  1384. <template slot-scope="scope">
  1385. <span>{{ scope.row.partName }}</span>
  1386. </template>
  1387. </el-table-column>
  1388. <el-table-column
  1389. label="备件规格"
  1390. prop="specification"
  1391. min-width="90px"
  1392. align="center"
  1393. >
  1394. <template slot-scope="scope">
  1395. <span>{{ scope.row.specification }}</span>
  1396. </template>
  1397. </el-table-column>
  1398. <el-table-column
  1399. label="备件图片"
  1400. prop="picpath"
  1401. min-width="110px"
  1402. align="center"
  1403. >
  1404. <template slot-scope="scope">
  1405. <el-popover placement="right" title="" trigger="hover">
  1406. <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
  1407. <img
  1408. v-if="scope.row.picpath !== ''"
  1409. slot="reference"
  1410. :src="scope.row.picpath"
  1411. :alt="scope.row.srcpath"
  1412. style="height: 100px; width: 100px"
  1413. >
  1414. </el-popover>
  1415. </template>
  1416. </el-table-column>
  1417. <el-table-column
  1418. label="备件品牌"
  1419. prop="brandName"
  1420. align="center"
  1421. min-width="60"
  1422. >
  1423. <template slot-scope="scope">
  1424. <span>{{ scope.row.brandName }}</span>
  1425. </template>
  1426. </el-table-column>
  1427. <el-table-column
  1428. label="计量单位"
  1429. prop="unit"
  1430. align="center"
  1431. min-width="60"
  1432. >
  1433. <template slot-scope="scope">
  1434. <span>{{ scope.row.unit }}</span>
  1435. </template>
  1436. </el-table-column>
  1437. <el-table-column
  1438. label="现有库存"
  1439. sortable
  1440. prop="storageAmount"
  1441. align="center"
  1442. min-width="60"
  1443. />
  1444. <!-- <el-table-column label="价格" sortable prop="price" align="center" min-width="60" /> -->
  1445. <el-table-column label="价格" min-width="150px" align="center">
  1446. <template slot-scope="scope">
  1447. <div
  1448. v-for="item in scope.row.pricearr"
  1449. style="
  1450. overflow: hidden;
  1451. white-space: nowrap;
  1452. text-overflow: ellipsis;
  1453. "
  1454. >
  1455. <el-tooltip class="item" effect="dark" placement="top-start">
  1456. <div slot="content">{{ item }}</div>
  1457. <div
  1458. style="
  1459. overflow: hidden;
  1460. white-space: nowrap;
  1461. text-overflow: ellipsis;
  1462. "
  1463. >
  1464. {{ item }}
  1465. </div>
  1466. </el-tooltip>
  1467. </div>
  1468. </template>
  1469. </el-table-column>
  1470. <el-table-column label="使用周期" min-width="120px" align="center">
  1471. <template slot-scope="scope">
  1472. <div
  1473. v-for="item in scope.row.lifeCyclearr"
  1474. style="
  1475. overflow: hidden;
  1476. white-space: nowrap;
  1477. text-overflow: ellipsis;
  1478. "
  1479. >
  1480. <el-tooltip class="item" effect="dark" placement="top-start">
  1481. <div slot="content">{{ item }}</div>
  1482. <div
  1483. style="
  1484. overflow: hidden;
  1485. white-space: nowrap;
  1486. text-overflow: ellipsis;
  1487. "
  1488. >
  1489. {{ item }}
  1490. </div>
  1491. </el-tooltip>
  1492. </div>
  1493. </template>
  1494. </el-table-column>
  1495. <el-table-column label="合同差异项" min-width="120px" align="center">
  1496. <template slot-scope="scope">
  1497. <div
  1498. v-for="item in scope.row.contractVarianceItemarr"
  1499. style="
  1500. overflow: hidden;
  1501. white-space: nowrap;
  1502. text-overflow: ellipsis;
  1503. "
  1504. >
  1505. <el-tooltip class="item" effect="dark" placement="top-start">
  1506. <div slot="content">{{ item }}</div>
  1507. <div
  1508. style="
  1509. overflow: hidden;
  1510. white-space: nowrap;
  1511. text-overflow: ellipsis;
  1512. "
  1513. >
  1514. {{ item }}
  1515. </div>
  1516. </el-tooltip>
  1517. </div>
  1518. </template>
  1519. </el-table-column>
  1520. <el-table-column
  1521. label="申购数量"
  1522. sortable
  1523. prop="amount"
  1524. align="center"
  1525. min-width="60"
  1526. />
  1527. <el-table-column
  1528. label="驳回说明"
  1529. min-width="110px"
  1530. align="center"
  1531. prop="explain1"
  1532. valign="middle"
  1533. />
  1534. <el-table-column
  1535. label="备注"
  1536. min-width="110px"
  1537. align="center"
  1538. prop="purpose"
  1539. />
  1540. </el-table>
  1541. <el-form
  1542. ref="seeTemp"
  1543. :rules="rules"
  1544. :model="seeTemp"
  1545. label-position="right"
  1546. label-width="100px"
  1547. style="width: 90%; margin: 0 auto"
  1548. >
  1549. <el-row>
  1550. <el-col>
  1551. <el-form-item label="流程进度" />
  1552. <el-steps :active="active" align-center finish-status="success">
  1553. <el-step
  1554. v-for="(item, index) in activeList"
  1555. :key="index"
  1556. :title="item.title"
  1557. :status="item.status"
  1558. >
  1559. <template slot="description">
  1560. <div class="step-row">
  1561. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  1562. <div>{{ item.reason }}</div>
  1563. </div>
  1564. </template>
  1565. </el-step>
  1566. </el-steps>
  1567. </el-col>
  1568. </el-row>
  1569. <el-row>
  1570. <el-col>
  1571. <el-form-item label="操作:">
  1572. <!-- 库管 -->
  1573. <el-button
  1574. v-if="
  1575. isSubscribeExamineKG &&
  1576. seeTemp.statue == 2 &&
  1577. seeTemp.departmentName == '挤奶处'
  1578. "
  1579. type="success"
  1580. style="display: inline-block"
  1581. @click="handleExamine1(row)"
  1582. >审核</el-button>
  1583. <!-- 设备 -->
  1584. <el-button
  1585. v-if="isSubscribeExamineSBZG && seeTemp.statue == 3"
  1586. type="success"
  1587. style="display: inline-block"
  1588. @click="handleExamine2(row)"
  1589. >审核</el-button>
  1590. <!-- 供应商主管 -->
  1591. <el-button
  1592. v-if="isSubscribeExamineZG && seeTemp.statue == 9"
  1593. type="success"
  1594. style="display: inline-block"
  1595. @click="handleExamine3(row)"
  1596. >审核</el-button>
  1597. <!-- 场长 -->
  1598. <el-button
  1599. v-if="
  1600. sdchangzhangshenhe &&
  1601. seeTemp.statue == 5 &&
  1602. seeTemp.departmentName == '挤奶处' &&
  1603. seeTemp.examine == 1
  1604. "
  1605. type="success"
  1606. style="display: inline-block"
  1607. @click="handleExamine4(row)"
  1608. >审核</el-button>
  1609. <el-button
  1610. v-else-if="
  1611. sdchangzhangshenhe &&
  1612. seeTemp.statue == 5 &&
  1613. seeTemp.departmentName !== '挤奶处'
  1614. "
  1615. type="success"
  1616. style="display: inline-block"
  1617. @click="handleExamine4(row)"
  1618. >审核</el-button>
  1619. <!-- 采购 -->
  1620. <el-button
  1621. v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
  1622. type="success"
  1623. style="display: inline-block"
  1624. @click="handleExamine5(row)"
  1625. >审核</el-button>
  1626. <!-- 财务 -->
  1627. <el-button
  1628. v-if="
  1629. isSubscribeExamineCW &&
  1630. seeTemp.purchase_type == 1 &&
  1631. seeTemp.statue == 7
  1632. "
  1633. style="display: inline-block"
  1634. type="success"
  1635. size="mini"
  1636. @click="handleExamine6(row)"
  1637. >审核</el-button>
  1638. <!-- 奶厅 -->
  1639. <el-button
  1640. v-if="
  1641. isSubscribeExamineNT &&
  1642. seeTemp.departmentName == '挤奶处' &&
  1643. ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
  1644. seeTemp.statue == 11)
  1645. "
  1646. style="display: inline-block"
  1647. type="success"
  1648. size="mini"
  1649. @click="handleExamine7(row)"
  1650. >审核</el-button>
  1651. </el-form-item>
  1652. </el-col>
  1653. </el-row>
  1654. </el-form>
  1655. <div slot="footer" class="dialog-footer" style="bottom: 5px">
  1656. <el-button @click="dialogFormVisibleSee = false">关闭</el-button>
  1657. </div>
  1658. </div>
  1659. </el-dialog>
  1660. <!-- 审核 -->
  1661. <el-dialog
  1662. :title="textMap[dialogStatus]"
  1663. :visible.sync="dialogFormVisible_Examine"
  1664. :close-on-click-modal="false"
  1665. width="30%"
  1666. >
  1667. <div class="app-examine">
  1668. <h3 style="width: 100%; margin: 0 0 0 5%; line-height: 50px">
  1669. 请确认审核结果:
  1670. </h3>
  1671. <el-form
  1672. ref="examineTemp"
  1673. :rules="rules"
  1674. :model="examineTemp"
  1675. label-position="right"
  1676. style="width: 50%; margin: 0 auto"
  1677. >
  1678. <el-row style="width: 88%; height: 150px; margin: 0 auto">
  1679. <el-col :span="20">
  1680. <el-form-item>
  1681. <el-radio-group
  1682. v-model="examineTemp.statue"
  1683. @change="changeStatue"
  1684. >
  1685. <el-radio :label="1" checked>通过</el-radio>
  1686. <el-radio :label="2">不通过</el-radio>
  1687. </el-radio-group>
  1688. </el-form-item>
  1689. </el-col>
  1690. <el-col v-if="statueReason" :span="20">
  1691. <el-input
  1692. v-model="examineTemp.workflowNote"
  1693. type="textarea"
  1694. :autosize="{ minRows: 2, maxRows: 4 }"
  1695. placeholder="请输入不通过原因"
  1696. />
  1697. </el-col>
  1698. </el-row>
  1699. </el-form>
  1700. </div>
  1701. <div slot="footer" class="dialog-footer">
  1702. <el-button
  1703. v-if="dialogStatus === 'examine1'"
  1704. type="primary"
  1705. :disabled="isokDisable"
  1706. @click="createExamineData1()"
  1707. >确认</el-button>
  1708. <el-button
  1709. v-if="dialogStatus === 'examine2'"
  1710. type="primary"
  1711. :disabled="isokDisable"
  1712. @click="createExamineData2()"
  1713. >确认</el-button>
  1714. <el-button
  1715. v-if="dialogStatus === 'examine3'"
  1716. type="primary"
  1717. :disabled="isokDisable"
  1718. @click="createExamineData3()"
  1719. >确认</el-button>
  1720. <el-button
  1721. v-if="dialogStatus === 'examine4'"
  1722. type="primary"
  1723. :disabled="isokDisable"
  1724. @click="createExamineData4()"
  1725. >确认</el-button>
  1726. <el-button
  1727. v-if="dialogStatus === 'examine5'"
  1728. type="primary"
  1729. :disabled="isokDisable"
  1730. @click="createExamineData5()"
  1731. >确认</el-button>
  1732. <el-button
  1733. v-if="dialogStatus === 'examine6'"
  1734. type="primary"
  1735. :disabled="isokDisable"
  1736. @click="createExamineData6()"
  1737. >确认</el-button>
  1738. <el-button
  1739. v-if="dialogStatus === 'examine7'"
  1740. type="primary"
  1741. :disabled="isokDisable"
  1742. @click="createExamineData7()"
  1743. >确认</el-button>
  1744. <el-button @click="dialogFormVisible_Examine = false">关闭</el-button>
  1745. </div>
  1746. </el-dialog>
  1747. <!-- 查看备件 -->
  1748. <el-dialog
  1749. :title="textMap[dialogStatus]"
  1750. :visible.sync="dialogFormVisible_seepart"
  1751. :close-on-click-modal="false"
  1752. width="90%"
  1753. >
  1754. <div>
  1755. <el-input
  1756. v-model="seepart.getdataListParm.parammaps.partName"
  1757. placeholder="备件"
  1758. style="width: 200px"
  1759. class="filter-item"
  1760. />
  1761. <el-button
  1762. v-waves
  1763. class="filter-item"
  1764. type="primary"
  1765. icon="el-icon-search"
  1766. @click="seepart_search"
  1767. >搜索</el-button>
  1768. <h3
  1769. v-if="seepartList.length == 0"
  1770. style="text-align: center; height: 300px; line-height: 300px"
  1771. >
  1772. 呆滞库存查询(如可调拨使用,请优先消耗)
  1773. </h3>
  1774. <div v-else>
  1775. <el-table
  1776. :key="seepart.tableKey"
  1777. v-loading="seepart.listLoading"
  1778. element-loading-text="给我一点时间"
  1779. :data="seepartList"
  1780. border
  1781. fit
  1782. highlight-current-row
  1783. style="width: 100%; margin-bottom: 30px; margin-top: 20px"
  1784. :row-style="rowStyle"
  1785. :cell-style="cellStyle"
  1786. class="elTable"
  1787. height="300"
  1788. >
  1789. <el-table-column
  1790. label="序号"
  1791. align="center"
  1792. type="index"
  1793. width="50px"
  1794. />
  1795. <el-table-column
  1796. label="牧场名称"
  1797. prop="pastureName"
  1798. align="center"
  1799. min-width="90"
  1800. />
  1801. <el-table-column
  1802. label="备件编号"
  1803. prop="partCode"
  1804. align="center"
  1805. min-width="90"
  1806. />
  1807. <el-table-column
  1808. label="备件名称"
  1809. prop="partName"
  1810. align="center"
  1811. min-width="90"
  1812. />
  1813. <el-table-column
  1814. label="备件规格"
  1815. prop="specification"
  1816. align="center"
  1817. min-width="90"
  1818. />
  1819. <el-table-column
  1820. label="备件图片"
  1821. prop="picpath"
  1822. align="center"
  1823. min-width="90"
  1824. >
  1825. <template slot-scope="scope">
  1826. <el-popover placement="right" title="" trigger="hover">
  1827. <img
  1828. v-if="scope.row.picpath !== ''"
  1829. :src="scope.row.picpath"
  1830. >
  1831. <img
  1832. v-if="scope.row.picpath !== ''"
  1833. slot="reference"
  1834. :src="scope.row.picpath"
  1835. :alt="scope.row.srcpath"
  1836. style="height: 100px; width: 100px"
  1837. >
  1838. </el-popover>
  1839. </template>
  1840. </el-table-column>
  1841. <el-table-column
  1842. label="备件品牌"
  1843. prop="brand"
  1844. align="center"
  1845. min-width="90"
  1846. />
  1847. <el-table-column
  1848. label="计量单位"
  1849. prop="unit"
  1850. align="center"
  1851. min-width="90"
  1852. />
  1853. <el-table-column
  1854. label="现有库存"
  1855. sortable
  1856. prop="reportery"
  1857. align="center"
  1858. min-width="60"
  1859. />
  1860. <el-table-column
  1861. label="价格"
  1862. sortable
  1863. prop="price"
  1864. align="center"
  1865. min-width="60"
  1866. />
  1867. <el-table-column
  1868. label="在库天数"
  1869. sortable
  1870. prop="daysInStorage"
  1871. align="center"
  1872. min-width="60"
  1873. />
  1874. <el-table-column
  1875. label="负责人"
  1876. prop="dutyPersonal"
  1877. align="center"
  1878. min-width="90"
  1879. />
  1880. <el-table-column
  1881. label="联系方式"
  1882. prop="telphone"
  1883. align="center"
  1884. min-width="90"
  1885. />
  1886. </el-table>
  1887. <pagination
  1888. v-show="seepart.total > 0"
  1889. :total="seepart.total"
  1890. :page.sync="seepart.getdataListParm.offset"
  1891. :limit.sync="seepart.getdataListParm.pagecount"
  1892. @pagination="get_seepart_data"
  1893. />
  1894. </div>
  1895. </div>
  1896. <div slot="footer" class="dialog-footer">
  1897. <el-button
  1898. type="primary"
  1899. :disabled="isokDisable"
  1900. @click="form_add()"
  1901. >继续申购</el-button>
  1902. <el-button
  1903. @click="
  1904. dialogFormVisible_seepart = false
  1905. seepart.getdataListParm.parammaps.partName = ''
  1906. "
  1907. >取消</el-button>
  1908. </div>
  1909. </el-dialog>
  1910. <!-- 合单 -->
  1911. <el-dialog
  1912. :title="textMap[dialogStatus]"
  1913. :visible.sync="dialogFormVisible_modify"
  1914. :close-on-click-modal="false"
  1915. width="90%"
  1916. >
  1917. <div>
  1918. <el-form
  1919. ref="modifyTemp"
  1920. :rules="rules"
  1921. :model="modifyTemp"
  1922. label-position="right"
  1923. label-width="100px"
  1924. style="width: 90%; margin: 0 auto"
  1925. >
  1926. <el-row>
  1927. <el-col :span="8">
  1928. <el-form-item label="申购单号:" prop="orderNumber">
  1929. <el-input
  1930. ref="orderNumber"
  1931. v-model="modifyTemp.orderNumber"
  1932. disabled
  1933. />
  1934. </el-form-item>
  1935. </el-col>
  1936. <el-col :span="8">
  1937. <el-form-item label="牧场:" prop="pastureId">
  1938. <el-select
  1939. v-model="modifyTemp.pastureId"
  1940. placeholder="牧场"
  1941. class="filter-item"
  1942. style="width: 100%"
  1943. :disabled="dialogStatus === 'update'"
  1944. @change="changePasture"
  1945. >
  1946. <el-option
  1947. v-for="item in findAllPasture"
  1948. :key="item.id"
  1949. :label="item.name"
  1950. :value="item.id"
  1951. />
  1952. </el-select>
  1953. </el-form-item>
  1954. </el-col>
  1955. </el-row>
  1956. </el-form>
  1957. <span
  1958. v-if="modifyTemp.purchase_type == 1"
  1959. style="float: right; font-size: 16px; margin-bottom: 10px"
  1960. >总金额:{{ modifyTemp.sumPrices }}</span>
  1961. <el-table
  1962. :key="tableKey"
  1963. v-loading="listLoading"
  1964. element-loading-text="给我一点时间"
  1965. :data="modifylist"
  1966. border
  1967. fit
  1968. highlight-current-row
  1969. style="width: 100%; margin-bottom: 30px"
  1970. :row-style="rowStyle"
  1971. :cell-style="cellStyle"
  1972. class="elTable"
  1973. >
  1974. <!-- table表格 -->
  1975. <el-table-column
  1976. label="序号"
  1977. align="center"
  1978. type="index"
  1979. width="50px"
  1980. />
  1981. <el-table-column
  1982. label="备件编号"
  1983. prop="partCode"
  1984. align="center"
  1985. min-width="90"
  1986. />
  1987. <el-table-column
  1988. label="备件名称"
  1989. prop="partName"
  1990. align="center"
  1991. min-width="90"
  1992. />
  1993. <el-table-column
  1994. label="备件规格"
  1995. prop="specification"
  1996. min-width="80px"
  1997. align="center"
  1998. />
  1999. <el-table-column
  2000. label="供应商"
  2001. prop="providerName"
  2002. align="center"
  2003. min-width="60"
  2004. />
  2005. <el-table-column
  2006. label="备件品牌"
  2007. prop="brandName"
  2008. align="center"
  2009. min-width="60"
  2010. />
  2011. <el-table-column
  2012. label="计量单位"
  2013. prop="unit"
  2014. align="center"
  2015. min-width="60"
  2016. />
  2017. <el-table-column
  2018. label="现有库存"
  2019. prop="reportery"
  2020. align="center"
  2021. min-width="60"
  2022. />
  2023. <el-table-column
  2024. label="价格"
  2025. prop="price"
  2026. align="center"
  2027. min-width="150"
  2028. >
  2029. <template slot-scope="scope">
  2030. <div v-for="item in scope.row.pricearr">
  2031. <el-tooltip class="item" effect="dark" placement="top-start">
  2032. <div slot="content">{{ item }}</div>
  2033. <div
  2034. style="
  2035. overflow: hidden;
  2036. white-space: nowrap;
  2037. text-overflow: ellipsis;
  2038. "
  2039. >
  2040. {{ item }}
  2041. </div>
  2042. </el-tooltip>
  2043. </div>
  2044. </template>
  2045. </el-table-column>
  2046. <el-table-column
  2047. v-if="
  2048. modifyTemp.purchase_type !== 1 && modifyTemp.purchase_type !== 3
  2049. "
  2050. label="使用周期"
  2051. min-width="120px"
  2052. align="center"
  2053. >
  2054. <template slot-scope="scope">
  2055. <div v-for="item in scope.row.lifeCyclearr">
  2056. <el-tooltip class="item" effect="dark" placement="top-start">
  2057. <div slot="content">{{ item }}</div>
  2058. <div
  2059. style="
  2060. overflow: hidden;
  2061. white-space: nowrap;
  2062. text-overflow: ellipsis;
  2063. "
  2064. >
  2065. {{ item }}
  2066. </div>
  2067. </el-tooltip>
  2068. </div>
  2069. </template>
  2070. </el-table-column>
  2071. <el-table-column
  2072. v-if="
  2073. modifyTemp.purchase_type !== 1 && modifyTemp.purchase_type !== 3
  2074. "
  2075. label="合同差异项"
  2076. min-width="120px"
  2077. align="center"
  2078. >
  2079. <template slot-scope="scope">
  2080. <div v-for="item in scope.row.contractVarianceItemarr">
  2081. <el-tooltip class="item" effect="dark" placement="top-start">
  2082. <div slot="content">{{ item }}</div>
  2083. <div
  2084. style="
  2085. overflow: hidden;
  2086. white-space: nowrap;
  2087. text-overflow: ellipsis;
  2088. "
  2089. >
  2090. {{ item }}
  2091. </div>
  2092. </el-tooltip>
  2093. </div>
  2094. </template>
  2095. </el-table-column>
  2096. <el-table-column
  2097. label="部门"
  2098. prop="departmentName"
  2099. align="center"
  2100. min-width="60"
  2101. />
  2102. <el-table-column
  2103. label="申购人"
  2104. prop="empname"
  2105. align="center"
  2106. min-width="60"
  2107. />
  2108. <el-table-column
  2109. label="申购日期"
  2110. prop="date"
  2111. align="center"
  2112. min-width="60"
  2113. />
  2114. <el-table-column
  2115. label="备注"
  2116. min-width="110px"
  2117. align="center"
  2118. valign="middle"
  2119. prop="purpose"
  2120. />
  2121. <el-table-column
  2122. label="操作"
  2123. align="center"
  2124. width="100"
  2125. class-name="small-padding fixed-width"
  2126. fixed="right"
  2127. >
  2128. <template slot-scope="{ row }">
  2129. <a class="del" @click="partReject(row)">驳回</a>
  2130. </template>
  2131. </el-table-column>
  2132. </el-table>
  2133. </div>
  2134. <div slot="footer" class="dialog-footer">
  2135. <el-button
  2136. type="primary"
  2137. :disabled="isokDisable"
  2138. @click="form_modify()"
  2139. >提交</el-button>
  2140. <el-button @click="dialogFormVisible_modify = false">取消</el-button>
  2141. </div>
  2142. </el-dialog>
  2143. <el-dialog
  2144. :title="textMap[dialogStatus]"
  2145. :visible.sync="dialogFormVisibleSee1"
  2146. :close-on-click-modal="false"
  2147. width="90%"
  2148. >
  2149. <div class="app-containerSee">
  2150. <el-form
  2151. ref="seeTemp"
  2152. :rules="rules"
  2153. :model="seeTemp"
  2154. label-position="right"
  2155. label-width="100px"
  2156. style="width: 90%; margin: 0 auto"
  2157. >
  2158. <el-row>
  2159. <el-col :span="8">
  2160. <el-form-item label="申购单号:" prop="orderNumber">
  2161. <el-input
  2162. ref="orderNumber"
  2163. v-model="seeTemp.orderNumber"
  2164. disabled
  2165. />
  2166. </el-form-item>
  2167. </el-col>
  2168. <el-col :span="8">
  2169. <el-form-item label="牧场:" prop="pastureId">
  2170. <el-select
  2171. v-model="seeTemp.pastureId"
  2172. placeholder="牧场"
  2173. class="filter-item"
  2174. disabled
  2175. style="width: 100%"
  2176. >
  2177. <el-option
  2178. v-for="item in findAllPasture"
  2179. :key="item.id"
  2180. :label="item.name"
  2181. :value="item.id"
  2182. />
  2183. </el-select>
  2184. </el-form-item>
  2185. </el-col>
  2186. </el-row>
  2187. </el-form>
  2188. <span
  2189. v-if="seeTemp.purchase_type == 1"
  2190. style="float: right; font-size: 16px; margin-bottom: 10px"
  2191. >总金额:{{ seeTemp.sumPrices }}</span>
  2192. <el-table
  2193. :key="tableKey"
  2194. v-loading="listLoadingSee"
  2195. element-loading-text="给我一点时间"
  2196. :data="listSee"
  2197. border
  2198. fit
  2199. highlight-current-row
  2200. style="width: 100%; margin-bottom: 30px"
  2201. :row-style="rowStyle"
  2202. :cell-style="cellStyle"
  2203. class="elTable"
  2204. @sort-change="tableSort"
  2205. >
  2206. <el-table-column
  2207. type="index"
  2208. label="序号"
  2209. align="center"
  2210. width="50px"
  2211. />
  2212. <el-table-column
  2213. label="备件编号"
  2214. prop="partCode"
  2215. align="center"
  2216. min-width="90"
  2217. />
  2218. <el-table-column
  2219. label="备件名称"
  2220. prop="partName"
  2221. align="center"
  2222. min-width="90"
  2223. />
  2224. <el-table-column
  2225. label="备件规格"
  2226. prop="specification"
  2227. min-width="90px"
  2228. align="center"
  2229. />
  2230. <el-table-column
  2231. label="供应商"
  2232. prop="providerName"
  2233. align="center"
  2234. min-width="60"
  2235. />
  2236. <el-table-column
  2237. label="备件品牌"
  2238. prop="brandName"
  2239. align="center"
  2240. min-width="60"
  2241. />
  2242. <el-table-column
  2243. label="计量单位"
  2244. prop="unit"
  2245. align="center"
  2246. min-width="60"
  2247. />
  2248. <el-table-column
  2249. label="现有库存"
  2250. sortable
  2251. prop="storageAmount"
  2252. align="center"
  2253. min-width="60"
  2254. />
  2255. <el-table-column
  2256. label="申购数量"
  2257. sortable
  2258. prop="amount"
  2259. align="center"
  2260. min-width="60"
  2261. />
  2262. <el-table-column label="价格" min-width="110px" align="center">
  2263. <template slot-scope="scope">
  2264. <div
  2265. v-for="item in scope.row.pricearr"
  2266. style="
  2267. overflow: hidden;
  2268. white-space: nowrap;
  2269. text-overflow: ellipsis;
  2270. "
  2271. >
  2272. <el-tooltip class="item" effect="dark" placement="top-start">
  2273. <div slot="content">{{ item }}</div>
  2274. <div
  2275. style="
  2276. overflow: hidden;
  2277. white-space: nowrap;
  2278. text-overflow: ellipsis;
  2279. "
  2280. >
  2281. {{ item }}
  2282. </div>
  2283. </el-tooltip>
  2284. </div>
  2285. </template>
  2286. </el-table-column>
  2287. <el-table-column
  2288. v-if="seeTemp.purchase_type !== 1 && seeTemp.purchase_type !== 3"
  2289. label="使用周期"
  2290. min-width="100px"
  2291. align="center"
  2292. >
  2293. <template slot-scope="scope">
  2294. <div
  2295. v-for="item in scope.row.lifeCyclearr"
  2296. style="
  2297. overflow: hidden;
  2298. white-space: nowrap;
  2299. text-overflow: ellipsis;
  2300. "
  2301. >
  2302. <el-tooltip class="item" effect="dark" placement="top-start">
  2303. <div slot="content">{{ item }}</div>
  2304. <div
  2305. style="
  2306. overflow: hidden;
  2307. white-space: nowrap;
  2308. text-overflow: ellipsis;
  2309. "
  2310. >
  2311. {{ item }}
  2312. </div>
  2313. </el-tooltip>
  2314. </div>
  2315. </template>
  2316. </el-table-column>
  2317. <el-table-column
  2318. v-if="seeTemp.purchase_type !== 1 && seeTemp.purchase_type !== 3"
  2319. label="合同差异项"
  2320. min-width="100px"
  2321. align="center"
  2322. >
  2323. <template slot-scope="scope">
  2324. <div
  2325. v-for="item in scope.row.contractVarianceItemarr"
  2326. style="
  2327. overflow: hidden;
  2328. white-space: nowrap;
  2329. text-overflow: ellipsis;
  2330. "
  2331. >
  2332. <el-tooltip class="item" effect="dark" placement="top-start">
  2333. <div slot="content">{{ item }}</div>
  2334. <div
  2335. style="
  2336. overflow: hidden;
  2337. white-space: nowrap;
  2338. text-overflow: ellipsis;
  2339. "
  2340. >
  2341. {{ item }}
  2342. </div>
  2343. </el-tooltip>
  2344. </div>
  2345. </template>
  2346. </el-table-column>
  2347. <el-table-column
  2348. label="部门"
  2349. sortable
  2350. prop="departmentName"
  2351. align="center"
  2352. min-width="80"
  2353. />
  2354. <el-table-column
  2355. label="申购人"
  2356. sortable
  2357. prop="empname"
  2358. align="center"
  2359. min-width="60"
  2360. />
  2361. <el-table-column
  2362. label="申购日期"
  2363. sortable
  2364. prop="date"
  2365. align="center"
  2366. min-width="100"
  2367. />
  2368. <el-table-column
  2369. label="备注"
  2370. min-width="110px"
  2371. align="center"
  2372. prop="purpose"
  2373. />
  2374. </el-table>
  2375. <el-form
  2376. ref="seeTemp"
  2377. :rules="rules"
  2378. :model="seeTemp"
  2379. label-position="right"
  2380. label-width="100px"
  2381. style="width: 90%; margin: 0 auto"
  2382. >
  2383. <el-row>
  2384. <el-col>
  2385. <el-form-item label="流程进度" />
  2386. <el-steps :active="active" align-center finish-status="success">
  2387. <el-step
  2388. v-for="(item, index) in activeList"
  2389. :key="index"
  2390. :title="item.title"
  2391. :status="item.status"
  2392. >
  2393. <template slot="description">
  2394. <div class="step-row">
  2395. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  2396. <div>{{ item.reason }}</div>
  2397. </div>
  2398. </template>
  2399. </el-step>
  2400. </el-steps>
  2401. </el-col>
  2402. </el-row>
  2403. <el-row>
  2404. <el-col>
  2405. <el-form-item label="操作:">
  2406. <!-- 库管 -->
  2407. <el-button
  2408. v-if="
  2409. isSubscribeExamineKG &&
  2410. seeTemp.statue == 2 &&
  2411. seeTemp.departmentName == '挤奶处'
  2412. "
  2413. type="success"
  2414. style="display: inline-block"
  2415. @click="handleExamine1(row)"
  2416. >审核</el-button>
  2417. <!-- 设备 -->
  2418. <el-button
  2419. v-if="isSubscribeExamineSBZG && seeTemp.statue == 3"
  2420. type="success"
  2421. style="display: inline-block"
  2422. @click="handleExamine2(row)"
  2423. >审核</el-button>
  2424. <!-- 供应商主管 -->
  2425. <el-button
  2426. v-if="isSubscribeExamineZG && seeTemp.statue == 9"
  2427. type="success"
  2428. style="display: inline-block"
  2429. @click="handleExamine3(row)"
  2430. >审核</el-button>
  2431. <!-- 场长 -->
  2432. <el-button
  2433. v-if="
  2434. sdchangzhangshenhe &&
  2435. seeTemp.statue == 5 &&
  2436. seeTemp.departmentName == '挤奶处' &&
  2437. seeTemp.examine == 1
  2438. "
  2439. type="success"
  2440. style="display: inline-block"
  2441. @click="handleExamine4(row)"
  2442. >审核</el-button>
  2443. <el-button
  2444. v-else-if="
  2445. sdchangzhangshenhe &&
  2446. seeTemp.statue == 5 &&
  2447. seeTemp.departmentName !== '挤奶处'
  2448. "
  2449. type="success"
  2450. style="display: inline-block"
  2451. @click="handleExamine4(row)"
  2452. >审核</el-button>
  2453. <!-- 采购 -->
  2454. <el-button
  2455. v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
  2456. type="success"
  2457. style="display: inline-block"
  2458. @click="handleExamine5(row)"
  2459. >审核</el-button>
  2460. <!-- 财务 -->
  2461. <el-button
  2462. v-if="
  2463. isSubscribeExamineCW &&
  2464. seeTemp.purchase_type == 1 &&
  2465. seeTemp.statue == 7
  2466. "
  2467. style="display: inline-block"
  2468. type="success"
  2469. @click="handleExamine6(row)"
  2470. >审核</el-button>
  2471. <!-- 奶厅 -->
  2472. <el-button
  2473. v-if="
  2474. isSubscribeExamineNT &&
  2475. seeTemp.departmentName == '挤奶处' &&
  2476. ((seeTemp.examine !== 1 && seeTemp.statue == 5) ||
  2477. seeTemp.statue == 11)
  2478. "
  2479. style="display: inline-block"
  2480. type="success"
  2481. @click="handleExamine7(row)"
  2482. >审核</el-button>
  2483. </el-form-item>
  2484. </el-col>
  2485. </el-row>
  2486. </el-form>
  2487. <div slot="footer" class="dialog-footer" style="bottom: 5px">
  2488. <el-button @click="dialogFormVisibleSee1 = false">关闭</el-button>
  2489. </div>
  2490. </div>
  2491. </el-dialog>
  2492. </div>
  2493. </template>
  2494. <script>
  2495. // / 引入
  2496. import {
  2497. GetDataByName,
  2498. postJson,
  2499. GetDataByNames,
  2500. partslistSGv2,
  2501. PostDataByName,
  2502. ExecDataByConfig,
  2503. checkButtons,
  2504. failproccess,
  2505. GetAccount
  2506. } from '@/api/common'
  2507. import waves from '@/directive/waves' // waves directive
  2508. import { parseTime, sortChange, json2excel } from '@/utils/index.js'
  2509. // eslint-disable-next-line no-unused-vars
  2510. import { validateEMail } from '@/utils/validate.js'
  2511. import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  2512. import { MessageBox } from 'element-ui'
  2513. import Cookies from 'js-cookie'
  2514. import { getToken } from '@/utils/auth'
  2515. export default {
  2516. name: 'Subscribe',
  2517. components: { Pagination },
  2518. directives: { waves },
  2519. data() {
  2520. return {
  2521. providerNames: '',
  2522. isSubscribeAdd: [],
  2523. isSubscribeSpecial: [],
  2524. isSubscribeExamineSBZG: [],
  2525. isSubscribeTemplate: [],
  2526. isSubscribeImport: [],
  2527. isSubscribeExport: [],
  2528. isSubscribeSee: [],
  2529. isSubscribeDelete: [],
  2530. isSubscribeExamineKG: [],
  2531. isSubscribeExamineCG: [],
  2532. isSubscribeExamineCW: [],
  2533. isSubscribeExamineZG: [],
  2534. isSubscribeExamineNT: [],
  2535. sdchangzhangshenhe: [],
  2536. isSubscribeMilk: [],
  2537. isokDisable: false,
  2538. findAllProvider: [],
  2539. findAllPasture: [],
  2540. findAllDepart: [],
  2541. findAllEmploye: [],
  2542. subscriptionStatusList: [
  2543. { id: 0, name: '新增申购' },
  2544. { id: 1, name: '暂估申购' },
  2545. { id: 3, name: '赠品申购' },
  2546. { id: 4, name: '奶厅申购' }
  2547. ], // 申购状态
  2548. onlineSubscriptionList: [],
  2549. createDepartList: [],
  2550. edit: 0,
  2551. requestParams: [
  2552. { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
  2553. {
  2554. name: 'findAllMainPasture',
  2555. offset: 0,
  2556. pagecount: 0,
  2557. returntype: 'Map',
  2558. parammaps: { id: Cookies.get('pastureid') }
  2559. },
  2560. {
  2561. name: 'findAllEmploye',
  2562. offset: 0,
  2563. pagecount: 0,
  2564. parammaps: { pastureId: Cookies.get('pastureid') }
  2565. },
  2566. { name: 'getflexProviderList', offset: 0, pagecount: 0, parammaps: {}}
  2567. ],
  2568. getDepartParam: {
  2569. name: 'findAllDepart',
  2570. offset: 0,
  2571. pagecount: 0,
  2572. parammaps: {
  2573. pastureId: Cookies.get('pastureid'),
  2574. eId: Cookies.get('employeid')
  2575. }
  2576. },
  2577. pickerOptions: {
  2578. disabledDate(time) {
  2579. return time.getTime() > Date.now() // 当天之前的时间可选
  2580. }
  2581. },
  2582. textMap: {
  2583. update: '编辑',
  2584. create: '新增',
  2585. see: '查看',
  2586. examine1: '库管审核',
  2587. examine2: '设备主管审核',
  2588. examine3: '供应商主管审核',
  2589. examine4: '场长审核',
  2590. examine5: '采购审核',
  2591. examine6: '财务审核',
  2592. examine7: '职能中心审核',
  2593. special: '特殊申购',
  2594. seepart: '备件申购'
  2595. },
  2596. rules: {
  2597. equipmentName: [{ required: true, message: '必填', trigger: 'blur' }]
  2598. },
  2599. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  2600. cellStyle: { padding: 0 + 'px' },
  2601. statues: [
  2602. { id: '0', name: '审核中' },
  2603. { id: '1', name: '已通过' },
  2604. { id: '2', name: '未通过' }
  2605. ],
  2606. radioAll: '全部',
  2607. getdataListParm: {
  2608. name:'getpartpurchaseList' , // 'getpartpurchaseList',
  2609. page: 1,
  2610. offset: 1,
  2611. pagecount: 10,
  2612. returntype: 'Map',
  2613. parammaps: {
  2614. pastureName: Cookies.get('pasturename'),
  2615. pastureArr:[],
  2616. empId: Cookies.get('employeid'),
  2617. orderNumber: '',
  2618. stuteSH: '',
  2619. departmentId: '',
  2620. inputDatetime: '',
  2621. startTime: '',
  2622. stopTime: '',
  2623. loginId: Cookies.get('employeid'),
  2624. menu: 'Subscribe',
  2625. logindeptId: Cookies.get('departmentid'),
  2626. loginpastureId: Cookies.get('pastureid'),
  2627. purchase_type: ''
  2628. }
  2629. },
  2630. tableKey: 0,
  2631. listLoading: true,
  2632. total: 0,
  2633. list: [],
  2634. dialogStatus: '',
  2635. dialogFormVisible: false,
  2636. dialogFormVisible_milk: false,
  2637. dialogFormVisible2: false,
  2638. dialogFormVisibleSee: false,
  2639. dialogFormVisibleSee1: false,
  2640. listLoadingSee: true,
  2641. listSee: [],
  2642. totalSee: 0,
  2643. seeTemp: {},
  2644. getdataListSee: {
  2645. name: 'getpartpurchaseBybig',
  2646. returntype: 'Map',
  2647. parammaps: {}
  2648. },
  2649. createTemp: {
  2650. pastureId: this.$store.state.user.pastureid,
  2651. departmentId: this.$store.state.user.departmentid,
  2652. employeId: this.$store.state.user.employeid,
  2653. createTime: parseTime(new Date(), '{y}-{m}-{d}'),
  2654. providerId: '',
  2655. purchaseType: '1',
  2656. funderId: '',
  2657. partCode: ''
  2658. },
  2659. requestSparePart: {
  2660. name: 'getPartsListSG',
  2661. page: 1,
  2662. offset: 1,
  2663. pagecount: 20,
  2664. returntype: 'Map',
  2665. parammaps: {
  2666. pastureId: Cookies.get('pastureid')
  2667. }
  2668. },
  2669. getParmCreateNumber: {
  2670. name: 'autoCreatCode',
  2671. page: 0,
  2672. offset: 0,
  2673. pagecount: 0,
  2674. returntype: 'Map',
  2675. parammaps: {
  2676. pastureId: Cookies.get('pastureid'),
  2677. codeType: 'SG'
  2678. }
  2679. },
  2680. getParmCreateAmount: {
  2681. name: 'getPartsListSGv2',
  2682. page: 0,
  2683. offset: 0,
  2684. pagecount: 0,
  2685. returntype: 'Map',
  2686. parammaps: {
  2687. pastureId: Cookies.get('pastureid'),
  2688. pastureName: Cookies.get('pasturename')
  2689. }
  2690. },
  2691. listAdd: [],
  2692. postDataPramas: {},
  2693. requestParam: {
  2694. parammaps: { partCode: '' }
  2695. },
  2696. dialogFormVisible_Examine: false,
  2697. examineTemp: {
  2698. statue: 1
  2699. },
  2700. statueReason: false,
  2701. activeList: [],
  2702. active: 3,
  2703. buttons: [],
  2704. downloadParam: {},
  2705. isPercentage: false,
  2706. percentage: 1,
  2707. pending: {
  2708. total: 0,
  2709. getdataListParm: {
  2710. name: 'getpartpurchaseWebListNO',
  2711. page: 1,
  2712. offset: 1,
  2713. getTotal: 'total3',
  2714. pagecount: 10,
  2715. returntype: 'Map',
  2716. parammaps: {
  2717. loginId: Cookies.get('employeid'),
  2718. menu: 'Subscribe',
  2719. logindeptId: Cookies.get('departmentid'),
  2720. loginpastureId: Cookies.get('pastureid'),
  2721. empId: Cookies.get('employeid'),
  2722. pastureId: Cookies.get('pastureid'),
  2723. deptId: Cookies.get('departmentid')
  2724. }
  2725. }
  2726. },
  2727. providerList: [],
  2728. dialogFormVisible_seepart: false,
  2729. seepartList: [],
  2730. seepart: {
  2731. tableKey: 0,
  2732. listLoading: true,
  2733. total: 0,
  2734. getdataListParm: {
  2735. page: 1,
  2736. offset: 1,
  2737. pagecount: 10,
  2738. name: 'getIdleSpareParts',
  2739. parammaps: {
  2740. partName: ''
  2741. }
  2742. }
  2743. },
  2744. apply_subscribeData: {},
  2745. isApplyEx4: true,
  2746. isMilk: false, // 标记是不是奶厅申购
  2747. myHeight: document.documentElement.clientHeight - 85 - 150,
  2748. dialogFormVisible_modify: false,
  2749. modifyTemp: {
  2750. orderNumber: ''
  2751. },
  2752. modifylist: [{}],
  2753. requestBrand: {
  2754. name: 'getBrandByPartCode',
  2755. page: 0,
  2756. offset: 0,
  2757. pagecount: 10,
  2758. returntype: 'Map',
  2759. parammaps: {}
  2760. },
  2761. BrandList: [],
  2762. isDepartmentId: false // 部门是挤奶处且点击新增按钮
  2763. }
  2764. },
  2765. created() {
  2766. const that = this
  2767. GetDataByName({
  2768. name: 'getUserPCButtons',
  2769. parammaps: { jwt_username: Cookies.get('name') }
  2770. }).then((response) => {
  2771. that.buttons = response.data.list
  2772. that.get_auto_buttons()
  2773. })
  2774. this.get_select_list()
  2775. // this.get_table_data()
  2776. this.getPendingList()
  2777. this.getProviderList()
  2778. },
  2779. methods: {
  2780. tableSort(column) {
  2781. sortChange(column, this.listSee)
  2782. },
  2783. get_auto_buttons() {
  2784. // 新增
  2785. const SubscribeAdd = 'customs:subscribe:add'
  2786. const isSubscribeAdd = checkButtons(
  2787. this.$store.state.user.buttons,
  2788. SubscribeAdd
  2789. )
  2790. this.isSubscribeAdd = isSubscribeAdd
  2791. // isSubscribeSpecial
  2792. // 特殊申购
  2793. const SubscribeSpecial = 'customs:subscribe:special'
  2794. const isSubscribeSpecial = checkButtons(
  2795. this.$store.state.user.buttons,
  2796. SubscribeSpecial
  2797. )
  2798. this.isSubscribeSpecial = isSubscribeSpecial
  2799. // 奶厅申购
  2800. const SubscribeMilk = 'customs:subscribe:milk'
  2801. const isSubscribeMilk = checkButtons(
  2802. this.$store.state.user.buttons,
  2803. SubscribeMilk
  2804. )
  2805. this.isSubscribeMilk = isSubscribeMilk
  2806. // 模板
  2807. // eslint-disable-next-line no-redeclare
  2808. const SubscribeTemplate = 'customs:subscribe:template'
  2809. const isSubscribeTemplate = checkButtons(
  2810. this.$store.state.user.buttons,
  2811. SubscribeTemplate
  2812. )
  2813. this.isSubscribeTemplate = isSubscribeTemplate
  2814. // 导入
  2815. // eslint-disable-next-line no-redeclare
  2816. const SubscribeImport = 'customs:subscribe:import'
  2817. const isSubscribeImport = checkButtons(
  2818. this.$store.state.user.buttons,
  2819. SubscribeImport
  2820. )
  2821. this.isSubscribeImport = isSubscribeImport
  2822. // 导出
  2823. // eslint-disable-next-line no-redeclare
  2824. const SubscribeExport = 'customs:subscribe:export'
  2825. const isSubscribeExport = checkButtons(
  2826. this.$store.state.user.buttons,
  2827. SubscribeExport
  2828. )
  2829. this.isSubscribeExport = isSubscribeExport
  2830. // 查看
  2831. // eslint-disable-next-line no-redeclare
  2832. const SubscribeSee = 'customs:subscribe:see'
  2833. const isSubscribeSee = checkButtons(
  2834. this.$store.state.user.buttons,
  2835. SubscribeSee
  2836. )
  2837. this.isSubscribeSee = isSubscribeSee
  2838. // 删除
  2839. // eslint-disable-next-line no-redeclare
  2840. const SubscribeDelete = 'customs:subscribe:delete'
  2841. const isSubscribeDelete = checkButtons(
  2842. this.$store.state.user.buttons,
  2843. SubscribeDelete
  2844. )
  2845. this.isSubscribeDelete = isSubscribeDelete
  2846. // 库管审核
  2847. // eslint-disable-next-line no-redeclare
  2848. const SubscribeExamineKG = 'customs:subscribe:examineKG'
  2849. const isSubscribeExamineKG = checkButtons(
  2850. this.$store.state.user.buttons,
  2851. SubscribeExamineKG
  2852. )
  2853. this.isSubscribeExamineKG = isSubscribeExamineKG
  2854. // 设备主管审核
  2855. const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
  2856. const isSubscribeExamineSBZG = checkButtons(
  2857. this.$store.state.user.buttons,
  2858. SubscribeExamineSBZG
  2859. )
  2860. this.isSubscribeExamineSBZG = isSubscribeExamineSBZG
  2861. // 主管审核
  2862. // eslint-disable-next-line no-redeclare
  2863. const SubscribeExamineZG = 'customs:subscribe:examineZG'
  2864. const isSubscribeExamineZG = checkButtons(
  2865. this.$store.state.user.buttons,
  2866. SubscribeExamineZG
  2867. )
  2868. this.isSubscribeExamineZG = isSubscribeExamineZG
  2869. const changzhangshenhe = 'changzhangshenhe'
  2870. const sdchangzhangshenhe = checkButtons(
  2871. this.$store.state.user.buttons,
  2872. changzhangshenhe
  2873. )
  2874. this.sdchangzhangshenhe = sdchangzhangshenhe
  2875. // 采购审核
  2876. // eslint-disable-next-line no-redeclare
  2877. const SubscribeExamineCG = 'customs:subscribe:examineCG'
  2878. const isSubscribeExamineCG = checkButtons(
  2879. this.$store.state.user.buttons,
  2880. SubscribeExamineCG
  2881. )
  2882. this.isSubscribeExamineCG = isSubscribeExamineCG
  2883. // 财务审核
  2884. const SubscribeExamineCW = 'customs:subscribe:examineCW'
  2885. const isSubscribeExamineCW = checkButtons(
  2886. this.$store.state.user.buttons,
  2887. SubscribeExamineCW
  2888. )
  2889. this.isSubscribeExamineCW = isSubscribeExamineCW
  2890. // 财务审核
  2891. const SubscribeExamineNT = 'customs:subscribe:examineNT'
  2892. const isSubscribeExamineNT = checkButtons(
  2893. this.$store.state.user.buttons,
  2894. SubscribeExamineNT
  2895. )
  2896. this.isSubscribeExamineNT = isSubscribeExamineNT
  2897. },
  2898. getPendingList() {
  2899. this.pending.getdataListParm.parammaps.pastureName =
  2900. this.getdataListParm.parammaps.pastureName
  2901. this.pending.getdataListParm.parammaps.orderNumber =
  2902. this.getdataListParm.parammaps.orderNumber
  2903. this.pending.getdataListParm.parammaps.stuteSH =
  2904. this.getdataListParm.parammaps.stuteSH
  2905. this.pending.getdataListParm.parammaps.departmentId =
  2906. this.getdataListParm.parammaps.departmentId
  2907. this.pending.getdataListParm.parammaps.inputDatetime =
  2908. this.getdataListParm.parammaps.inputDatetime
  2909. this.pending.getdataListParm.parammaps.loginId =
  2910. this.getdataListParm.parammaps.loginId
  2911. this.pending.getdataListParm.parammaps.menu =
  2912. this.getdataListParm.parammaps.menu
  2913. this.pending.getdataListParm.parammaps.logindeptId =
  2914. this.getdataListParm.parammaps.logindeptId
  2915. this.pending.getdataListParm.parammaps.loginpastureId =
  2916. this.getdataListParm.parammaps.loginpastureId
  2917. this.pending.getdataListParm.parammaps.empId =
  2918. this.getdataListParm.parammaps.empId
  2919. this.pending.getdataListParm.parammaps.pastureId =
  2920. Cookies.get('pastureid')
  2921. this.pending.getdataListParm.parammaps.deptId =
  2922. Cookies.get('departmentid')
  2923. GetDataByName(this.pending.getdataListParm).then((response) => {
  2924. this.pending.total = response.data.total3
  2925. })
  2926. },
  2927. get_table_data() {
  2928. this.listLoading = true
  2929. if (
  2930. this.$refs['inputDatetime'] !== undefined &&
  2931. this.$refs['inputDatetime'].value !== null
  2932. ) {
  2933. this.getdataListParm.parammaps.startTime =
  2934. this.$refs['inputDatetime'].value[0]
  2935. this.getdataListParm.parammaps.stopTime =
  2936. this.$refs['inputDatetime'].value[1]
  2937. } else {
  2938. this.getdataListParm.parammaps.startTime = ''
  2939. this.getdataListParm.parammaps.stopTime = ''
  2940. }
  2941. // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
  2942. if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
  2943. const arr = this.findAllPasture.filter((item) => {
  2944. if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
  2945. return item
  2946. }
  2947. })
  2948. const ids = arr.map((child) => { return child.id })
  2949. console.log(arr,ids,'999999')
  2950. this.getdataListParm.parammaps.pastureId = ids.toString();
  2951. }
  2952. GetDataByName(this.getdataListParm).then((response) => {
  2953. if (response.data.list !== null) {
  2954. console.log('table数据', response.data.list)
  2955. this.list = response.data.list
  2956. this.pageNum = response.data.pageNum
  2957. this.pageSize = response.data.pageSize
  2958. } else {
  2959. this.list = []
  2960. }
  2961. this.total = response.data.total
  2962. setTimeout(() => {
  2963. this.listLoading = false
  2964. }, 100)
  2965. })
  2966. },
  2967. changeAll() {
  2968. console.log(this.radioAll)
  2969. if (this.radioAll === '全部') {
  2970. this.getdataListParm.name = 'getpartpurchaseList'
  2971. this.getdataListParm.offset = 1
  2972. this.getdataListParm.parammaps = {
  2973. pastureName: Cookies.get('pasturename'),
  2974. orderNumber: '',
  2975. departmentId: '',
  2976. inputDatetime: '',
  2977. startTime: '',
  2978. stopTime: '',
  2979. loginId: Cookies.get('employeid'),
  2980. menu: 'Subscribe',
  2981. logindeptId: Cookies.get('departmentid'),
  2982. loginpastureId: Cookies.get('pastureid')
  2983. }
  2984. this.get_table_data()
  2985. } else if (this.radioAll === '待处理') {
  2986. this.getdataListParm.name = 'getpartpurchaseWebListNO'
  2987. this.getdataListParm.offset = 1
  2988. this.getdataListParm.parammaps = {
  2989. pastureName: this.getdataListParm.parammaps.pastureName,
  2990. orderNumber: this.getdataListParm.parammaps.orderNumber,
  2991. stuteSH: this.getdataListParm.parammaps.stuteSH,
  2992. departmentId: this.getdataListParm.parammaps.departmentId,
  2993. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  2994. startTime: this.getdataListParm.parammaps.startTime,
  2995. stopTime: this.getdataListParm.parammaps.stopTime,
  2996. loginId: Cookies.get('employeid'),
  2997. menu: 'Subscribe',
  2998. logindeptId: Cookies.get('departmentid'),
  2999. loginpastureId: Cookies.get('pastureid'),
  3000. empId: Cookies.get('employeid'),
  3001. pastureId: Cookies.get('pastureid'),
  3002. deptId: Cookies.get('departmentid')
  3003. }
  3004. this.get_table_data()
  3005. } else if (this.radioAll === '已处理') {
  3006. this.getdataListParm.name = 'getpartpurchaseWebList'
  3007. this.getdataListParm.offset = 1
  3008. this.getdataListParm.parammaps = {
  3009. pastureName: this.getdataListParm.parammaps.pastureName,
  3010. orderNumber: this.getdataListParm.parammaps.orderNumber,
  3011. stuteSH: this.getdataListParm.parammaps.stuteSH,
  3012. departmentId: this.getdataListParm.parammaps.departmentId,
  3013. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  3014. startTime: this.getdataListParm.parammaps.startTime,
  3015. stopTime: this.getdataListParm.parammaps.stopTime,
  3016. loginId: Cookies.get('employeid'),
  3017. menu: 'Subscribe',
  3018. logindeptId: Cookies.get('departmentid'),
  3019. loginpastureId: Cookies.get('pastureid'),
  3020. empId: Cookies.get('employeid'),
  3021. pastureId: Cookies.get('pastureid'),
  3022. deptId: Cookies.get('departmentid')
  3023. }
  3024. this.get_table_data()
  3025. }
  3026. },
  3027. statue: function(cellValue) {
  3028. // console.log(cellValue)
  3029. // departmentName
  3030. // purchase_type
  3031. if (cellValue.purchase_type == 1) {
  3032. // 特殊申购-暂估
  3033. if (
  3034. cellValue.statue == 2 ||
  3035. cellValue.statue == 3 ||
  3036. cellValue.statue == 5 ||
  3037. cellValue.statue == 7 ||
  3038. cellValue.statue == 9 ||
  3039. cellValue.statue == 11 ||
  3040. cellValue.statue == 15
  3041. ) {
  3042. return '审核中'
  3043. } else if (cellValue.statue == 13) {
  3044. return '已通过'
  3045. } else {
  3046. return '未通过'
  3047. }
  3048. } else if (cellValue.purchase_type == 3) {
  3049. // 特殊申购-赠品
  3050. return '已通过'
  3051. } else {
  3052. if (
  3053. cellValue.statue == 2 ||
  3054. cellValue.statue == 3 ||
  3055. cellValue.statue == 5 ||
  3056. cellValue.statue == 9 ||
  3057. cellValue.statue == 15 ||
  3058. cellValue.statue == 11
  3059. ) {
  3060. return '审核中'
  3061. } else if (cellValue.statue == 7) {
  3062. return '已通过'
  3063. } else {
  3064. return '未通过'
  3065. }
  3066. }
  3067. },
  3068. form_search() {
  3069. console.log('点击了table搜索')
  3070. if (this.getdataListParm.parammaps.inputDatetime === null) {
  3071. this.getdataListParm.parammaps.inputDatetime = ''
  3072. }
  3073. this.getdataListParm.offset = 1
  3074. this.listLoading = true
  3075. this.get_table_data()
  3076. this.getPendingList()
  3077. },
  3078. resetCreateTemp() {
  3079. this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
  3080. // 如果获取的部门是挤奶处,在点击新增按钮的时候,是无法让他选择挤奶处,默认申购部门为第一
  3081. this.createTemp.departmentId = parseInt(Cookies.get('departmentid')) // departmentId
  3082. this.createTemp.departmentName = Cookies.get('departmentname')
  3083. this.createTemp.employeId = parseInt(Cookies.get('employeid'))
  3084. this.createTemp.createTime = parseTime(
  3085. new Date(),
  3086. '{y}-{m}-{d} {h}:{i}:{s}'
  3087. )
  3088. this.createTemp.orderNumber = ''
  3089. this.createTemp.providerId = ''
  3090. this.createTemp.funderId = ''
  3091. this.createTemp.partCode = ''
  3092. // this.requestSparePart.parammaps['partCode'] = ''
  3093. this.$set(this.createTemp, 'partCode', '')
  3094. // this.$set(this.requestSparePart.parammaps,'partCode','')
  3095. this.createTemp.purchaseType = '1'
  3096. this.listAdd = []
  3097. },
  3098. form_add() {
  3099. this.getdataListSee.parammaps.id = ''
  3100. this.textMap.create = '新增'
  3101. this.isMilk = false
  3102. this.seepart.getdataListParm.parammaps.partName = ''
  3103. this.resetCreateTemp()
  3104. this.edit = 1
  3105. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  3106. this.getCreateDepartDownList()
  3107. this.dialogStatus = 'create'
  3108. this.dialogFormVisible = true
  3109. this.dialogFormVisible_seepart = false
  3110. this.$nextTick(() => {
  3111. this.$refs['createTemp'].clearValidate()
  3112. })
  3113. this.getBigPartpurchase(0)
  3114. },
  3115. getBigPartpurchase(type) {
  3116. const data = {
  3117. name: 'getBigPartpurchase',
  3118. parammaps: {
  3119. purchaseType: type,
  3120. pastureId: parseInt(Cookies.get('pastureid'))
  3121. }
  3122. }
  3123. GetDataByName(data).then((response) => {
  3124. console.log(response, 'response=====')
  3125. if (response.data.list && response.data.list.length > 0) {
  3126. this.createTemp.markBackend = true
  3127. this.createTemp.pastureId = response.data.list[0].pastureId
  3128. this.createTemp.orderNumber = response.data.list[0].orderNumber
  3129. this.createTemp.createTime = parseTime(
  3130. new Date(),
  3131. '{y}-{m}-{d} {h}:{i}:{s}'
  3132. )
  3133. this.createTemp.bigId = response.data.list[0].id
  3134. this.getdataListSee.parammaps.id = response.data.list[0].id
  3135. if (this.dialogStatus == 'create') {
  3136. this.getdataListSee.parammaps.purchaseType = 0
  3137. } else if (this.dialogStatus == 'special') {
  3138. if (this.createTemp.purchaseType == '1') {
  3139. this.getdataListSee.parammaps.purchaseType = 1
  3140. }
  3141. }
  3142. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  3143. this.getSeeList()
  3144. } else {
  3145. this.createTemp.markBackend = false
  3146. this.getCreateNumber()
  3147. if (this.dialogStatus == 'create') {
  3148. this.getdataListSee.parammaps.purchaseType = 0
  3149. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  3150. this.getSeeList()
  3151. } else if (this.dialogStatus == 'special') {
  3152. if (this.createTemp.purchaseType == '1') {
  3153. this.getdataListSee.parammaps.purchaseType = 1
  3154. this.getdataListSee.parammaps.empId = Cookies.get('employeid')
  3155. this.getSeeList()
  3156. }
  3157. }
  3158. }
  3159. })
  3160. },
  3161. getCreateNumber() {
  3162. GetDataByName(this.getParmCreateNumber).then((response) => {
  3163. this.$nextTick(() => {
  3164. console.log(
  3165. '新增申购单号',
  3166. response.data.list[0].orderCode,
  3167. this.dialogStatus
  3168. )
  3169. if (this.createTemp.purchaseType == 3) {
  3170. console.log(111)
  3171. this.createTemp.orderNumber = response.data.list[0].orderCode
  3172. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  3173. this.$forceUpdate()
  3174. } else if (this.createTemp.purchaseType == 1) {
  3175. console.log(222)
  3176. if (this.createTemp.orderNumber == '') {
  3177. this.createTemp.orderNumber = response.data.list[0].orderCode
  3178. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  3179. this.$forceUpdate()
  3180. }
  3181. } else {
  3182. console.log(333)
  3183. // this.textMap.create = '新增'
  3184. // this.dialogStatus = 'create'
  3185. this.createTemp.orderNumber = response.data.list[0].orderCode
  3186. this.modifyTemp.orderNumber = response.data.list[0].orderCode
  3187. this.$forceUpdate()
  3188. }
  3189. })
  3190. })
  3191. },
  3192. // getPartsListSG
  3193. changeProvider(item) {
  3194. console.log(item, 'item')
  3195. if (item !== '') {
  3196. this.createTemp.providerName = this.onlineSubscriptionList.find(
  3197. (obj) => obj.id == item
  3198. ).providerName
  3199. } else {
  3200. this.$set(this.createTemp, 'providerName', '')
  3201. this.$set(this.createTemp, 'providerId', '')
  3202. }
  3203. // this.listAdd = []
  3204. },
  3205. sparePartSearch(queryString, cb) {
  3206. console.log('备件模糊查询输入值', queryString)
  3207. if (this.dialogStatus === 'special') {
  3208. if (
  3209. this.createTemp.purchaseType == 1 ||
  3210. this.createTemp.purchaseType == '3'
  3211. ) {
  3212. if (this.createTemp.providerId == '') {
  3213. this.$message({ type: 'warning', message: '请选择供应商' })
  3214. return false
  3215. } else {
  3216. if (this.createTemp.purchaseType == '3') {
  3217. this.requestSparePart.name = 'getStockListByGiveaway'
  3218. this.requestSparePart.parammaps['providerName'] =
  3219. this.providerList.find(
  3220. (obj) => obj.id == this.createTemp.providerId
  3221. ).providerName
  3222. this.requestSparePart.parammaps['providerId'] =
  3223. this.createTemp.providerId
  3224. this.requestSparePart.parammaps['pastureId'] =
  3225. this.createTemp.pastureId
  3226. } else if (this.createTemp.purchaseType == '1') {
  3227. this.requestSparePart.name = 'getPartsListSGFlex'
  3228. this.requestSparePart.parammaps.providerId =
  3229. this.createTemp.providerId
  3230. this.requestSparePart.parammaps['providerName'] =
  3231. this.providerList.find(
  3232. (obj) => obj.id == this.createTemp.providerId
  3233. ).providerName
  3234. this.requestSparePart.parammaps.providerName =
  3235. this.createTemp.providerName
  3236. } else {
  3237. this.requestSparePart.name = 'getPartsListSG'
  3238. this.requestSparePart.parammaps['providerId'] =
  3239. this.createTemp.providerId
  3240. }
  3241. }
  3242. }
  3243. } else {
  3244. if (this.createTemp.providerId == '') {
  3245. this.requestSparePart.name = 'getPartsListSG'
  3246. this.requestSparePart.parammaps['providerName'] = ''
  3247. this.requestSparePart.parammaps['providerId'] = ''
  3248. } else {
  3249. this.requestSparePart.name = 'getPartsListSGFlex'
  3250. this.requestSparePart.parammaps.providerId =
  3251. this.createTemp.providerId
  3252. this.requestSparePart.parammaps.providerName =
  3253. this.createTemp.providerName
  3254. }
  3255. }
  3256. this.requestSparePart.parammaps['partCode'] = queryString
  3257. // this.createTemp.partCode = queryString
  3258. this.$set(this.requestSparePart.parammaps, 'partCode', queryString)
  3259. this.$set(this.createTemp, 'partCode', queryString)
  3260. GetDataByName(this.requestSparePart).then((response) => {
  3261. console.log('备件模糊查询搜索data', response.data.list)
  3262. if (response.data.list == null) {
  3263. cb([])
  3264. } else {
  3265. cb(response.data.list)
  3266. }
  3267. })
  3268. },
  3269. brandSearch(queryString, cb) {
  3270. console.log('品牌模糊查询输入值', queryString)
  3271. this.requestBrand.parammaps['brandName'] = queryString
  3272. GetDataByName(this.requestBrand).then((response) => {
  3273. console.log('品牌模糊查询搜索data', response.data.list)
  3274. this.BrandList = response.data.list
  3275. cb(this.BrandList)
  3276. })
  3277. },
  3278. handleSelectBrand(item, row) {
  3279. console.log('品牌模糊查询选中值', item)
  3280. this.$set(row, 'brandName', item.brandName)
  3281. this.$set(row, 'brandId', item.brandId)
  3282. this.$forceUpdate()
  3283. },
  3284. handleSelectSparePart(item) {
  3285. console.log('备件模糊查询选中值', item)
  3286. console.log('备件模糊查询选中值', item.partId)
  3287. console.log(this.listAdd)
  3288. if (
  3289. this.dialogStatus === 'special' &&
  3290. this.createTemp.purchaseType == '1' &&
  3291. this.createTemp.providerId == ''
  3292. ) {
  3293. this.createTemp.providerId = item.providerId
  3294. }
  3295. this.public_select(item)
  3296. },
  3297. apply_subscribe() {
  3298. this.dialogStatus = 'seepart'
  3299. this.seepartList = []
  3300. this.dialogFormVisible_seepart = true
  3301. // 点击新增 判断是否是在 挤奶处 id=46
  3302. this.isDepartmentId = parseInt(Cookies.get('departmentid')) == 46
  3303. },
  3304. seepart_search() {
  3305. this.get_seepart_data()
  3306. },
  3307. get_seepart_data() {
  3308. this.seepart.listLoading = true
  3309. GetDataByName(this.seepart.getdataListParm).then((response) => {
  3310. if (response.data.list !== null) {
  3311. console.log('table数据', response.data.list)
  3312. this.seepartList = response.data.list
  3313. this.seepart.pageNum = response.data.pageNum
  3314. this.seepart.pageSize = response.data.pageSize
  3315. } else {
  3316. this.seepartList = []
  3317. }
  3318. this.seepart.total = response.data.total
  3319. setTimeout(() => {
  3320. this.seepart.listLoading = false
  3321. }, 100)
  3322. })
  3323. },
  3324. public_select(item) {
  3325. this.$set(item, 'myId', Date.parse(new Date()))
  3326. if (this.createTemp.providerId == '') {
  3327. if (this.listAdd.length > 0) {
  3328. if (this.listAdd.find((obj) => obj.partId == item.partId)) {
  3329. this.$message({
  3330. type: 'warning',
  3331. message: '此备件已存在,请重新选择备件'
  3332. })
  3333. } else {
  3334. this.getParmCreateAmount.parammaps.partCode = item.partCode
  3335. partslistSGv2(this.getParmCreateAmount).then((response) => {
  3336. this.$nextTick(() => {
  3337. console.log(
  3338. '新增根据编号获取备件库存数量',
  3339. response.data.list[0]
  3340. )
  3341. item = response.data.list[0]
  3342. this.$set(item, 'myId', Date.parse(new Date()))
  3343. if (
  3344. item.srcpath !== null &&
  3345. item.picpath !== null &&
  3346. item.srcpath !== undefined &&
  3347. item.picpath !== undefined
  3348. ) {
  3349. this.$set(
  3350. item,
  3351. 'srcpath',
  3352. process.env.VUE_APP_BASE_API + item.srcpath
  3353. )
  3354. this.$set(
  3355. item,
  3356. 'picpath',
  3357. process.env.VUE_APP_BASE_API + item.picpath
  3358. )
  3359. } else {
  3360. item.srcpath = ''
  3361. item.picpath = ''
  3362. }
  3363. this.$set(item, 'amount', '')
  3364. this.$set(item, 'purpose', '')
  3365. if (
  3366. this.dialogStatus === 'special' &&
  3367. this.createTemp.purchaseType == '2'
  3368. ) {
  3369. this.$set(item, 'price', '')
  3370. } else if (
  3371. this.dialogStatus === 'special' &&
  3372. this.createTemp.purchaseType == '3'
  3373. ) {
  3374. this.$set(item, 'price', '0')
  3375. this.$set(item, 'amount', '0')
  3376. }
  3377. if (item.price) {
  3378. var pricearr = item.price.split(',')
  3379. this.$set(item, 'pricearr', pricearr)
  3380. } else {
  3381. this.$set(item, 'pricearr', [])
  3382. }
  3383. if (item.contractId) {
  3384. var contractId = item.contractId
  3385. this.$set(item, 'contractId', contractId)
  3386. } else {
  3387. this.$set(item, 'contractId', 0)
  3388. }
  3389. if (item.lifeCycle) {
  3390. var lifeCyclearr = item.lifeCycle.split(',')
  3391. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  3392. }
  3393. if (item.contractVarianceItem) {
  3394. var contractVarianceItemarr =
  3395. item.contractVarianceItem.split(',')
  3396. this.$set(
  3397. item,
  3398. 'contractVarianceItemarr',
  3399. contractVarianceItemarr
  3400. )
  3401. }
  3402. this.listAdd.unshift(item)
  3403. this.$forceUpdate()
  3404. })
  3405. })
  3406. }
  3407. } else {
  3408. this.getParmCreateAmount.parammaps.partCode = item.partCode
  3409. partslistSGv2(this.getParmCreateAmount).then((response) => {
  3410. this.$nextTick(() => {
  3411. console.log('新增根据编号获取备件库存数量', response.data.list[0])
  3412. item = response.data.list[0]
  3413. this.$set(item, 'myId', Date.parse(new Date()))
  3414. if (
  3415. item.srcpath !== null &&
  3416. item.picpath !== null &&
  3417. item.srcpath !== undefined &&
  3418. item.picpath !== undefined
  3419. ) {
  3420. this.$set(
  3421. item,
  3422. 'srcpath',
  3423. process.env.VUE_APP_BASE_API + item.srcpath
  3424. )
  3425. this.$set(
  3426. item,
  3427. 'picpath',
  3428. process.env.VUE_APP_BASE_API + item.picpath
  3429. )
  3430. } else {
  3431. item.srcpath = ''
  3432. item.picpath = ''
  3433. }
  3434. this.$set(item, 'amount', '')
  3435. this.$set(item, 'purpose', '')
  3436. if (
  3437. this.dialogStatus === 'special' &&
  3438. this.createTemp.purchaseType == '2'
  3439. ) {
  3440. this.$set(item, 'price', '')
  3441. } else if (
  3442. this.dialogStatus === 'special' &&
  3443. this.createTemp.purchaseType == '3'
  3444. ) {
  3445. this.$set(item, 'price', '0')
  3446. this.$set(item, 'amount', '0')
  3447. }
  3448. if (item.price) {
  3449. var pricearr = item.price.split(',')
  3450. this.$set(item, 'pricearr', pricearr)
  3451. } else {
  3452. this.$set(item, 'pricearr', [])
  3453. }
  3454. if (item.lifeCycle) {
  3455. var lifeCyclearr = item.lifeCycle.split(',')
  3456. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  3457. }
  3458. if (item.contractVarianceItem) {
  3459. var contractVarianceItemarr =
  3460. item.contractVarianceItem.split(',')
  3461. this.$set(
  3462. item,
  3463. 'contractVarianceItemarr',
  3464. contractVarianceItemarr
  3465. )
  3466. }
  3467. if (item.contractId) {
  3468. var contractId = item.contractId
  3469. this.$set(item, 'contractId', contractId)
  3470. } else {
  3471. this.$set(item, 'contractId', 0)
  3472. }
  3473. this.listAdd.unshift(item)
  3474. this.$forceUpdate()
  3475. })
  3476. })
  3477. }
  3478. this.$forceUpdate()
  3479. } else {
  3480. if (this.listAdd.length > 0) {
  3481. if (this.listAdd.find((obj) => obj.partId == item.partId)) {
  3482. this.$message({
  3483. type: 'warning',
  3484. message: '此备件已存在,请重新选择备件'
  3485. })
  3486. } else {
  3487. if (
  3488. item.srcpath !== null &&
  3489. item.picpath !== null &&
  3490. item.srcpath !== undefined &&
  3491. item.picpath !== undefined
  3492. ) {
  3493. this.$set(
  3494. item,
  3495. 'srcpath',
  3496. process.env.VUE_APP_BASE_API + item.srcpath
  3497. )
  3498. this.$set(
  3499. item,
  3500. 'picpath',
  3501. process.env.VUE_APP_BASE_API + item.picpath
  3502. )
  3503. } else {
  3504. item.srcpath = ''
  3505. item.picpath = ''
  3506. }
  3507. this.$set(item, 'amount', '')
  3508. this.$set(item, 'purpose', '')
  3509. if (
  3510. this.dialogStatus === 'special' &&
  3511. this.createTemp.purchaseType == '3'
  3512. ) {
  3513. this.$set(item, 'price', '0')
  3514. this.$set(item, 'amount', '0')
  3515. }
  3516. if (item.price) {
  3517. var pricearr = item.price.split(',')
  3518. this.$set(item, 'pricearr', pricearr)
  3519. } else {
  3520. this.$set(item, 'pricearr', [])
  3521. }
  3522. if (item.lifeCycle) {
  3523. var lifeCyclearr = item.lifeCycle.split(',')
  3524. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  3525. }
  3526. if (item.contractVarianceItem) {
  3527. var contractVarianceItemarr = item.contractVarianceItem.split(',')
  3528. this.$set(
  3529. item,
  3530. 'contractVarianceItemarr',
  3531. contractVarianceItemarr
  3532. )
  3533. }
  3534. if (item.contractId) {
  3535. var contractId = item.contractId
  3536. this.$set(item, 'contractId', contractId)
  3537. } else {
  3538. this.$set(item, 'contractId', 0)
  3539. }
  3540. this.listAdd.unshift(item)
  3541. }
  3542. } else {
  3543. if (
  3544. item.srcpath !== null &&
  3545. item.picpath !== null &&
  3546. item.srcpath !== undefined &&
  3547. item.picpath !== undefined
  3548. ) {
  3549. this.$set(
  3550. item,
  3551. 'srcpath',
  3552. process.env.VUE_APP_BASE_API + item.srcpath
  3553. )
  3554. this.$set(
  3555. item,
  3556. 'picpath',
  3557. process.env.VUE_APP_BASE_API + item.picpath
  3558. )
  3559. } else {
  3560. item.srcpath = ''
  3561. item.picpath = ''
  3562. }
  3563. this.$set(item, 'amount', '')
  3564. this.$set(item, 'purpose', '')
  3565. if (
  3566. this.dialogStatus === 'special' &&
  3567. this.createTemp.purchaseType == '3'
  3568. ) {
  3569. this.$set(item, 'price', '0')
  3570. this.$set(item, 'amount', '0')
  3571. }
  3572. if (item.contractId) {
  3573. var contractId = item.contractId
  3574. this.$set(item, 'contractId', contractId)
  3575. } else {
  3576. this.$set(item, 'contractId', 0)
  3577. }
  3578. if (
  3579. this.dialogStatus !== 'special' &&
  3580. this.createTemp.providerId == ''
  3581. ) {
  3582. var pricearr = item.price.split(',')
  3583. this.$set(item, 'pricearr', pricearr)
  3584. var lifeCyclearr = item.lifeCycle.split(',')
  3585. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  3586. var contractVarianceItemarr = item.contractVarianceItem.split(',')
  3587. this.$set(item, 'contractVarianceItemarr', contractVarianceItemarr)
  3588. }
  3589. if (this.createTemp.providerId == '') {
  3590. if (item.price) {
  3591. var pricearr = item.price.split(',')
  3592. this.$set(item, 'pricearr', pricearr)
  3593. } else {
  3594. this.$set(item, 'pricearr', [])
  3595. }
  3596. if (item.lifeCycle) {
  3597. var lifeCyclearr = item.lifeCycle.split(',')
  3598. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  3599. }
  3600. if (item.contractVarianceItem) {
  3601. var contractVarianceItemarr = item.contractVarianceItem.split(',')
  3602. this.$set(
  3603. item,
  3604. 'contractVarianceItemarr',
  3605. contractVarianceItemarr
  3606. )
  3607. }
  3608. }
  3609. this.listAdd.unshift(item)
  3610. this.$forceUpdate()
  3611. }
  3612. this.$forceUpdate()
  3613. }
  3614. },
  3615. add_dialog_save() {
  3616. this.isokDisable = true
  3617. setTimeout(() => {
  3618. this.isokDisable = false
  3619. }, 1000)
  3620. this.$refs['createTemp'].validate((valid) => {
  3621. if (valid) {
  3622. console.log(this.listAdd)
  3623. if (
  3624. this.createTemp.orderNumber == '' ||
  3625. this.createTemp.orderNumber == null ||
  3626. this.createTemp.orderNumber == undefined
  3627. ) {
  3628. GetDataByName(this.getParmCreateNumber).then((response) => {
  3629. this.$nextTick(() => {
  3630. console.log('新增申购单号', response.data.list[0].orderCode)
  3631. this.createTemp.orderNumber = response.data.list[0].orderCode
  3632. this.$forceUpdate()
  3633. this.add_dialog_saveSave()
  3634. })
  3635. })
  3636. } else {
  3637. this.add_dialog_saveSave()
  3638. }
  3639. }
  3640. })
  3641. },
  3642. add_dialog_saveSave() {
  3643. if (this.listAdd.length !== 0) {
  3644. for (var j = 0; j < this.listAdd.length; j++) {
  3645. console.log(this.listAdd[j].amount)
  3646. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  3647. this.$message({
  3648. type: 'warning',
  3649. message: '请检查申购数量是否未填写',
  3650. duration: 2000
  3651. })
  3652. return false
  3653. } else {
  3654. var rulesAmount = /^[1-9]\d*$/
  3655. if (!rulesAmount.test(this.listAdd[j].amount)) {
  3656. this.$message({
  3657. type: 'error',
  3658. message: '申购数量请输入正整数',
  3659. duration: 2000
  3660. })
  3661. return false
  3662. }
  3663. }
  3664. }
  3665. if (this.createTemp.markBackend) {
  3666. console.log('有数据-走新保存')
  3667. const url = 'authdata/partpurchase/edit'
  3668. const dataArr = []
  3669. console.log(this.providerNames, 'hss')
  3670. for (let i = 0; i < this.listAdd.length; i++) {
  3671. // 若有合单,走/edit的接口 再次对价格做个校验判断;
  3672. if (parseFloat(this.listAdd[i].price) == 0 || this.listAdd[i].price == '') {
  3673. this.$message({
  3674. type: 'warning',
  3675. message: '价格请输入正数,最多保留小数点后五位',
  3676. duration: 2000
  3677. })
  3678. return false
  3679. }
  3680. if (this.listAdd[i].myId !== undefined) {
  3681. this.listAdd[i].id = 0
  3682. }
  3683. const obj = {
  3684. id: parseFloat(this.listAdd[i].id),
  3685. contractId: this.listAdd[i].contractId,
  3686. bigId: parseFloat(this.createTemp.bigId),
  3687. pastureId: parseFloat(this.listAdd[i].pastureId),
  3688. partId: parseFloat(this.listAdd[i].partId),
  3689. partCode: this.listAdd[i].partCode.toString(),
  3690. partName: this.listAdd[i].partName.toString(),
  3691. specification: this.listAdd[i].specification,
  3692. amount: parseFloat(this.listAdd[i].amount),
  3693. unit: this.listAdd[i].unit.toString(),
  3694. brandId: parseFloat(this.listAdd[i].brandId),
  3695. purpose: this.listAdd[i].purpose.toString(),
  3696. price: this.listAdd[i].price.toString(),
  3697. lifeCycle: this.listAdd[i].lifeCycle.toString(),
  3698. contractVarianceItem:
  3699. this.listAdd[i].contractVarianceItem.toString(),
  3700. departmentId: this.createTemp.departmentId.toString(),
  3701. date: parseTime(
  3702. this.createTemp.createTime,
  3703. '{y}-{m}-{d} {h}:{i}:{s}'
  3704. ).toString(),
  3705. employeId: parseFloat(this.createTemp.employeId)
  3706. }
  3707. if (this.listAdd[i].contractId) {
  3708. this.$set(
  3709. this.listAdd[i],
  3710. 'contractId',
  3711. this.listAdd[i].contractId.toString()
  3712. )
  3713. } else {
  3714. this.$set(this.listAdd[i], 'contractId', '')
  3715. }
  3716. if (this.listAdd[i].storageAmount) {
  3717. obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
  3718. } else {
  3719. obj.storageAmount = 0
  3720. }
  3721. if (this.listAdd[i].reject) {
  3722. obj.reject = this.listAdd[i].reject.toString()
  3723. } else {
  3724. obj.reject = ''
  3725. }
  3726. if (this.listAdd[i].explain) {
  3727. obj.explain = this.listAdd[i].explain.toString()
  3728. } else {
  3729. obj.explain = ''
  3730. }
  3731. dataArr.push(obj)
  3732. }
  3733. const data = dataArr
  3734. console.log(data, 'hss===1')
  3735. postJson(url, data).then((response) => {
  3736. if (response.msg !== 'fail') {
  3737. this.get_table_data()
  3738. this.dialogFormVisible = false
  3739. this.$notify({
  3740. title: '成功',
  3741. message: '保存成功',
  3742. type: 'success',
  3743. duration: 2000
  3744. })
  3745. } else {
  3746. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  3747. }
  3748. })
  3749. } else {
  3750. console.log('无数据-走原有保存')
  3751. for (var j = 0; j < this.listAdd.length; j++) {
  3752. console.log(this.listAdd[j].amount)
  3753. if (
  3754. this.listAdd[j].amount == null ||
  3755. this.listAdd[j].amount === ''
  3756. ) {
  3757. this.$message({
  3758. type: 'warning',
  3759. message: '请检查申购数量是否未填写',
  3760. duration: 2000
  3761. })
  3762. return false
  3763. } else {
  3764. var rulesAmount = /^[1-9]\d*$/
  3765. if (!rulesAmount.test(this.listAdd[j].amount)) {
  3766. this.$message({
  3767. type: 'error',
  3768. message: '申购数量请输入正整数',
  3769. duration: 2000
  3770. })
  3771. return false
  3772. }
  3773. }
  3774. if (this.listAdd[j].price == '') {
  3775. this.$message({
  3776. type: 'warning',
  3777. message: '请检查单价是否为空',
  3778. duration: 2000
  3779. })
  3780. return false
  3781. } else {
  3782. if (
  3783. this.listAdd[j].contractId == '' ||
  3784. this.listAdd[j].contractId == undefined ||
  3785. parseFloat(this.listAdd[j].contractId) == 0 ||
  3786. parseFloat(this.listAdd[j].contractId) < 0
  3787. ) {
  3788. if (parseFloat(this.listAdd[j].price) == 0) {
  3789. this.$message({
  3790. type: 'warning',
  3791. message: '价格请输入正数,最多保留小数点后五位',
  3792. duration: 2000
  3793. })
  3794. return false
  3795. } else {
  3796. if (
  3797. this.listAdd[j].contractId == '' ||
  3798. this.listAdd[j].contractId == undefined ||
  3799. parseFloat(this.listAdd[j].contractId) == 0 ||
  3800. parseFloat(this.listAdd[j].contractId) < 0
  3801. ) {
  3802. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  3803. var rulesPrice =
  3804. /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  3805. if (rulesPrice.test(this.listAdd[j].price) == false) {
  3806. this.$message({
  3807. type: 'error',
  3808. message: '价格请输入正数,最多保留小数点后五位',
  3809. duration: 2000
  3810. })
  3811. return false
  3812. }
  3813. }
  3814. }
  3815. }
  3816. }
  3817. }
  3818. for (let i = 0; i < this.listAdd.length; i++) {
  3819. this.$set(
  3820. this.listAdd[i],
  3821. 'date',
  3822. parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}')
  3823. )
  3824. this.$set(this.listAdd[i], 'employeId', this.createTemp.employeId)
  3825. if (this.listAdd[i].reject) {
  3826. this.$set(this.listAdd[i], 'reject', this.listAdd[i].reject)
  3827. } else {
  3828. this.$set(this.listAdd[i], 'reject', 0)
  3829. }
  3830. }
  3831. this.postDataPramas.common = { returnmap: '0' }
  3832. this.postDataPramas.data = []
  3833. this.postDataPramas.data[0] = {
  3834. name: 'insertBigPartpurchase',
  3835. type: 'e',
  3836. parammaps: {
  3837. pastureId: this.createTemp.pastureId,
  3838. departmentId: this.createTemp.departmentId,
  3839. orderNumber: this.createTemp.orderNumber,
  3840. useType: this.createTemp.useType,
  3841. createTime: parseTime(
  3842. this.createTemp.createTime,
  3843. '{y}-{m}-{d} {h}:{i}:{s}'
  3844. ),
  3845. employeId: this.createTemp.employeId,
  3846. providerId: this.createTemp.providerId
  3847. }
  3848. }
  3849. // eslint-disable-next-line no-irregular-whitespace
  3850. this.postDataPramas.data[1] = {
  3851. name: 'insertSpotList',
  3852. resultmaps: { list: this.listAdd }
  3853. }
  3854. this.postDataPramas.data[1].children = []
  3855. this.postDataPramas.data[1].children[0] = {
  3856. name: 'insertPartpurchase',
  3857. type: 'e',
  3858. parammaps: {
  3859. bigId: '@insertBigPartpurchase.LastInsertId',
  3860. pastureId: '@insertSpotList.pastureId',
  3861. partId: '@insertSpotList.partId',
  3862. partCode: '@insertSpotList.partCode',
  3863. partName: '@insertSpotList.partName',
  3864. specification: '@insertSpotList.specification',
  3865. unit: '@insertSpotList.unit',
  3866. brandId: '@insertSpotList.brandId',
  3867. storageAmount: '@insertSpotList.reportery',
  3868. purpose: '@insertSpotList.purpose',
  3869. amount: '@insertSpotList.amount',
  3870. price: '@insertSpotList.price',
  3871. contractId: '@insertSpotList.contractId',
  3872. lifeCycle: '@insertSpotList.lifeCycle',
  3873. date: '@insertSpotList.date',
  3874. employeId: '@insertSpotList.employeId',
  3875. reject: '@insertSpotList.reject',
  3876. departmentId: this.createTemp.departmentId,
  3877. contractVarianceItem: '@insertSpotList.contractVarianceItem',
  3878. contractId: '@insertSpotList.contractId'
  3879. }
  3880. }
  3881. ExecDataByConfig(this.postDataPramas).then((response) => {
  3882. console.log('新增保存发送参数', this.postDataPramas)
  3883. if (response.msg === 'fail') {
  3884. this.$notify({
  3885. title: '保存失败',
  3886. message: response.data,
  3887. type: 'warning',
  3888. duration: 2000
  3889. })
  3890. } else {
  3891. this.dialogFormVisible = false
  3892. this.getdataListParm.parammaps.inputDatetime = ''
  3893. this.get_table_data()
  3894. this.getPendingList()
  3895. this.$notify({
  3896. title: '',
  3897. message: '保存成功',
  3898. type: 'success',
  3899. duration: 2000
  3900. })
  3901. }
  3902. })
  3903. return true
  3904. }
  3905. } else {
  3906. this.$message({
  3907. title: '',
  3908. message: '请选择备件',
  3909. type: 'warning',
  3910. duration: 2000
  3911. })
  3912. return false
  3913. }
  3914. },
  3915. partDelete(row) {
  3916. console.log(this.listAdd)
  3917. MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
  3918. confirmButtonText: '确认',
  3919. cancelButtonText: '取消',
  3920. type: 'warning'
  3921. }).then(() => {
  3922. // console.log(this.list2)
  3923. for (var i = 0; i < this.listAdd.length; i++) {
  3924. console.log(this.listAdd[i])
  3925. if (this.listAdd[i].id === row.id) {
  3926. var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
  3927. }
  3928. if (listAddIndex > -1) {
  3929. this.listAdd.splice(listAddIndex, 1)
  3930. return
  3931. }
  3932. }
  3933. })
  3934. },
  3935. // 查看
  3936. form_see(row) {
  3937. // 查看/特殊申购
  3938. if (row.purchase_type == 1 || row.purchase_type == 3) {
  3939. this.textMap.see = '特殊申购'
  3940. } else {
  3941. this.textMap.see = '查看'
  3942. }
  3943. this.dialogStatus = 'see'
  3944. // this.dialogFormVisibleSee = true
  3945. this.dialogFormVisibleSee1 = true
  3946. this.seeTemp = Object.assign({}, row)
  3947. this.seeTemp.purchaseType = String(row.purchase_type)
  3948. console.log('查看上方数据(从table读取)', this.seeTemp)
  3949. this.listSee = []
  3950. this.getdataListSee.parammaps.id = this.seeTemp.id
  3951. this.getdataListSee.parammaps.empId = ''
  3952. this.isApplyEx4 = false
  3953. this.getSeeList()
  3954. },
  3955. getFlowPath() {
  3956. // 流程图
  3957. var reason = '未通过原因:' + this.seeTemp.workflowNote
  3958. if (this.seeTemp.purchase_type == 1) {
  3959. // 特殊申购-暂估
  3960. if (this.seeTemp.statue === 2) {
  3961. this.activeList = [
  3962. {
  3963. title: '备件申购',
  3964. date: this.seeTemp.inputTime,
  3965. name: this.seeTemp.empname
  3966. },
  3967. { title: '库管审核' },
  3968. { title: '设备主管审核' },
  3969. { title: '供应主管审核' },
  3970. { title: '场长审核' },
  3971. { title: '采购审核' },
  3972. { title: '财务审核' }
  3973. ]
  3974. this.active = 1
  3975. } else if (this.seeTemp.statue === 3) {
  3976. this.activeList = [
  3977. {
  3978. title: '备件申购',
  3979. date: this.seeTemp.inputTime,
  3980. name: this.seeTemp.empname
  3981. },
  3982. {
  3983. title: '库管审核',
  3984. date: this.seeTemp.KGChargedate,
  3985. name: this.seeTemp.KGChargePerson
  3986. },
  3987. { title: '设备主管审核' },
  3988. { title: '供应主管审核' },
  3989. { title: '场长审核' },
  3990. { title: '采购审核' },
  3991. { title: '财务审核' }
  3992. ]
  3993. this.active = 2
  3994. } else if (this.seeTemp.statue === 4) {
  3995. this.activeList = [
  3996. {
  3997. title: '备件申购',
  3998. date: this.seeTemp.inputTime,
  3999. name: this.seeTemp.empname
  4000. },
  4001. {
  4002. title: '库管审核',
  4003. date: this.seeTemp.KGChargedate,
  4004. name: this.seeTemp.KGChargePerson,
  4005. status: 'error',
  4006. reason: reason
  4007. },
  4008. { title: '设备主管审核' },
  4009. { title: '供应主管审核' },
  4010. { title: '场长审核' },
  4011. { title: '采购审核' },
  4012. { title: '财务审核' }
  4013. ]
  4014. this.active = 2
  4015. } else if (this.seeTemp.statue === 9) {
  4016. this.activeList = [
  4017. {
  4018. title: '备件申购',
  4019. date: this.seeTemp.inputTime,
  4020. name: this.seeTemp.empname
  4021. },
  4022. {
  4023. title: '库管审核',
  4024. date: this.seeTemp.KGChargedate,
  4025. name: this.seeTemp.KGChargePerson
  4026. },
  4027. {
  4028. title: '设备主管审核',
  4029. date: this.seeTemp.equipmentdate,
  4030. name: this.seeTemp.equipmentPerson
  4031. },
  4032. { title: '供应主管审核' },
  4033. { title: '场长审核' },
  4034. { title: '采购审核' },
  4035. { title: '财务审核' }
  4036. ]
  4037. this.active = 3
  4038. } else if (this.seeTemp.statue === 10) {
  4039. this.activeList = [
  4040. {
  4041. title: '备件申购',
  4042. date: this.seeTemp.inputTime,
  4043. name: this.seeTemp.empname
  4044. },
  4045. {
  4046. title: '库管审核',
  4047. date: this.seeTemp.KGChargedate,
  4048. name: this.seeTemp.KGChargePerson
  4049. },
  4050. {
  4051. title: '设备主管审核',
  4052. date: this.seeTemp.equipmentdate,
  4053. name: this.seeTemp.equipmentPerson,
  4054. status: 'error',
  4055. reason: reason
  4056. },
  4057. { title: '供应主管审核' },
  4058. { title: '场长审核' },
  4059. { title: '采购审核' },
  4060. { title: '财务审核' }
  4061. ]
  4062. this.active = 3
  4063. } else if (this.seeTemp.statue === 5) {
  4064. this.activeList = [
  4065. {
  4066. title: '备件申购',
  4067. date: this.seeTemp.inputTime,
  4068. name: this.seeTemp.empname
  4069. },
  4070. {
  4071. title: '库管审核',
  4072. date: this.seeTemp.KGChargedate,
  4073. name: this.seeTemp.KGChargePerson
  4074. },
  4075. {
  4076. title: '设备主管审核',
  4077. date: this.seeTemp.equipmentdate,
  4078. name: this.seeTemp.equipmentPerson
  4079. },
  4080. {
  4081. title: '供应主管审核',
  4082. date: this.seeTemp.chargeDate,
  4083. name: this.seeTemp.chargePerson
  4084. },
  4085. { title: '场长审核' },
  4086. { title: '采购审核' },
  4087. { title: '财务审核' }
  4088. ]
  4089. this.active = 4
  4090. } else if (this.seeTemp.statue === 6) {
  4091. this.activeList = [
  4092. {
  4093. title: '备件申购',
  4094. date: this.seeTemp.inputTime,
  4095. name: this.seeTemp.empname
  4096. },
  4097. {
  4098. title: '库管审核',
  4099. date: this.seeTemp.KGChargedate,
  4100. name: this.seeTemp.KGChargePerson
  4101. },
  4102. {
  4103. title: '设备主管审核',
  4104. date: this.seeTemp.equipmentdate,
  4105. name: this.seeTemp.equipmentPerson
  4106. },
  4107. {
  4108. title: '供应主管审核',
  4109. date: this.seeTemp.chargeDate,
  4110. name: this.seeTemp.chargePerson,
  4111. status: 'error',
  4112. reason: reason
  4113. },
  4114. { title: '场长审核' },
  4115. { title: '采购审核' },
  4116. { title: '财务审核' }
  4117. ]
  4118. this.active = 4
  4119. } else if (this.seeTemp.statue === 11) {
  4120. this.activeList = [
  4121. {
  4122. title: '备件申购',
  4123. date: this.seeTemp.inputTime,
  4124. name: this.seeTemp.empname
  4125. },
  4126. {
  4127. title: '库管审核',
  4128. date: this.seeTemp.KGChargedate,
  4129. name: this.seeTemp.KGChargePerson
  4130. },
  4131. {
  4132. title: '设备主管审核',
  4133. date: this.seeTemp.equipmentdate,
  4134. name: this.seeTemp.equipmentPerson
  4135. },
  4136. {
  4137. title: '供应主管审核',
  4138. date: this.seeTemp.chargeDate,
  4139. name: this.seeTemp.chargePerson
  4140. },
  4141. {
  4142. title: '场长审核',
  4143. date: this.seeTemp.fielddate,
  4144. name: this.seeTemp.fieldPerson
  4145. },
  4146. { title: '采购审核' },
  4147. { title: '财务审核' }
  4148. ]
  4149. this.active = 5
  4150. } else if (this.seeTemp.statue === 12) {
  4151. this.activeList = [
  4152. {
  4153. title: '备件申购',
  4154. date: this.seeTemp.inputTime,
  4155. name: this.seeTemp.empname
  4156. },
  4157. {
  4158. title: '库管审核',
  4159. date: this.seeTemp.KGChargedate,
  4160. name: this.seeTemp.KGChargePerson
  4161. },
  4162. {
  4163. title: '设备主管审核',
  4164. date: this.seeTemp.equipmentdate,
  4165. name: this.seeTemp.equipmentPerson
  4166. },
  4167. {
  4168. title: '供应主管审核',
  4169. date: this.seeTemp.chargeDate,
  4170. name: this.seeTemp.chargePerson
  4171. },
  4172. {
  4173. title: '场长审核',
  4174. date: this.seeTemp.fielddate,
  4175. name: this.seeTemp.fieldPerson,
  4176. status: 'error',
  4177. reason: reason
  4178. },
  4179. { title: '采购审核' },
  4180. { title: '财务审核' }
  4181. ]
  4182. this.active = 5
  4183. } else if (this.seeTemp.statue === 7) {
  4184. this.activeList = [
  4185. {
  4186. title: '备件申购',
  4187. date: this.seeTemp.inputTime,
  4188. name: this.seeTemp.empname
  4189. },
  4190. {
  4191. title: '库管审核',
  4192. date: this.seeTemp.KGChargedate,
  4193. name: this.seeTemp.KGChargePerson
  4194. },
  4195. {
  4196. title: '设备主管审核',
  4197. date: this.seeTemp.equipmentdate,
  4198. name: this.seeTemp.equipmentPerson
  4199. },
  4200. {
  4201. title: '供应主管审核',
  4202. date: this.seeTemp.chargeDate,
  4203. name: this.seeTemp.chargePerson
  4204. },
  4205. {
  4206. title: '场长审核',
  4207. date: this.seeTemp.fielddate,
  4208. name: this.seeTemp.fieldPerson
  4209. },
  4210. {
  4211. title: '采购审核',
  4212. date: this.seeTemp.CGChargedate,
  4213. name: this.seeTemp.CGChargePerson
  4214. },
  4215. { title: '财务审核' }
  4216. ]
  4217. this.active = 6
  4218. } else if (this.seeTemp.statue === 8) {
  4219. this.activeList = [
  4220. {
  4221. title: '备件申购',
  4222. date: this.seeTemp.inputTime,
  4223. name: this.seeTemp.empname
  4224. },
  4225. {
  4226. title: '库管审核',
  4227. date: this.seeTemp.KGChargedate,
  4228. name: this.seeTemp.KGChargePerson
  4229. },
  4230. {
  4231. title: '设备主管审核',
  4232. date: this.seeTemp.equipmentdate,
  4233. name: this.seeTemp.equipmentPerson
  4234. },
  4235. {
  4236. title: '供应主管审核',
  4237. date: this.seeTemp.chargeDate,
  4238. name: this.seeTemp.chargePerson
  4239. },
  4240. {
  4241. title: '场长审核',
  4242. date: this.seeTemp.fielddate,
  4243. name: this.seeTemp.fieldPerson
  4244. },
  4245. {
  4246. title: '采购审核',
  4247. date: this.seeTemp.CGChargedate,
  4248. name: this.seeTemp.CGChargePerson,
  4249. status: 'error',
  4250. reason: reason
  4251. },
  4252. { title: '财务审核' }
  4253. ]
  4254. this.active = 6
  4255. } else if (this.seeTemp.statue === 13) {
  4256. this.activeList = [
  4257. {
  4258. title: '备件申购',
  4259. date: this.seeTemp.inputTime,
  4260. name: this.seeTemp.empname
  4261. },
  4262. {
  4263. title: '库管审核',
  4264. date: this.seeTemp.KGChargedate,
  4265. name: this.seeTemp.KGChargePerson
  4266. },
  4267. {
  4268. title: '设备主管审核',
  4269. date: this.seeTemp.equipmentdate,
  4270. name: this.seeTemp.equipmentPerson
  4271. },
  4272. {
  4273. title: '供应主管审核',
  4274. date: this.seeTemp.chargeDate,
  4275. name: this.seeTemp.chargePerson
  4276. },
  4277. {
  4278. title: '场长审核',
  4279. date: this.seeTemp.fielddate,
  4280. name: this.seeTemp.fieldPerson
  4281. },
  4282. {
  4283. title: '采购审核',
  4284. date: this.seeTemp.CGChargedate,
  4285. name: this.seeTemp.CGChargePerson
  4286. },
  4287. {
  4288. title: '财务审核',
  4289. date: this.seeTemp.financedate,
  4290. name: this.seeTemp.financeName
  4291. }
  4292. ]
  4293. this.active = 7
  4294. } else if (this.seeTemp.statue === 14) {
  4295. this.activeList = [
  4296. {
  4297. title: '备件申购',
  4298. date: this.seeTemp.inputTime,
  4299. name: this.seeTemp.empname
  4300. },
  4301. {
  4302. title: '库管审核',
  4303. date: this.seeTemp.KGChargedate,
  4304. name: this.seeTemp.KGChargePerson
  4305. },
  4306. {
  4307. title: '设备主管审核',
  4308. date: this.seeTemp.equipmentdate,
  4309. name: this.seeTemp.equipmentPerson
  4310. },
  4311. {
  4312. title: '供应主管审核',
  4313. date: this.seeTemp.chargeDate,
  4314. name: this.seeTemp.chargePerson
  4315. },
  4316. {
  4317. title: '场长审核',
  4318. date: this.seeTemp.fielddate,
  4319. name: this.seeTemp.fieldPerson
  4320. },
  4321. {
  4322. title: '采购审核',
  4323. date: this.seeTemp.CGChargedate,
  4324. name: this.seeTemp.CGChargePerson
  4325. },
  4326. {
  4327. title: '财务审核',
  4328. date: this.seeTemp.financedate,
  4329. name: this.seeTemp.financeName,
  4330. status: 'error',
  4331. reason: reason
  4332. }
  4333. ]
  4334. this.active = 7
  4335. }
  4336. } else if (this.seeTemp.purchase_type == 3) {
  4337. // 赠品
  4338. this.activeList = [
  4339. {
  4340. title: '备件申购',
  4341. date: this.seeTemp.inputTime,
  4342. name: this.seeTemp.empname
  4343. }
  4344. ]
  4345. this.active = 1
  4346. } else if (
  4347. this.seeTemp.purchase_type < 0 ||
  4348. this.seeTemp.purchase_type == 0 ||
  4349. this.seeTemp.purchase_type == 4
  4350. ) {
  4351. if (this.seeTemp.departmentName == '挤奶处') {
  4352. // 奶厅申购审核流程
  4353. if (this.seeTemp.examine == 1) {
  4354. console.log(11111111111)
  4355. if (this.seeTemp.statue === 2) {
  4356. this.activeList = [
  4357. {
  4358. title: '备件申购',
  4359. date: this.seeTemp.inputTime,
  4360. name: this.seeTemp.empname
  4361. },
  4362. { title: '库管审核' },
  4363. { title: '设备主管审核' },
  4364. { title: '供应主管审核' },
  4365. { title: '场长审核' },
  4366. { title: '职能中心审核' },
  4367. { title: '采购审核' }
  4368. ]
  4369. this.active = 1
  4370. } else if (this.seeTemp.statue === 3) {
  4371. this.activeList = [
  4372. {
  4373. title: '备件申购',
  4374. date: this.seeTemp.inputTime,
  4375. name: this.seeTemp.empname
  4376. },
  4377. {
  4378. title: '库管审核',
  4379. date: this.seeTemp.KGChargedate,
  4380. name: this.seeTemp.KGChargePerson
  4381. },
  4382. { title: '设备主管审核' },
  4383. { title: '供应主管审核' },
  4384. { title: '场长审核' },
  4385. { title: '职能中心审核' },
  4386. { title: '采购审核' }
  4387. ]
  4388. this.active = 2
  4389. } else if (this.seeTemp.statue === 4) {
  4390. this.activeList = [
  4391. {
  4392. title: '备件申购',
  4393. date: this.seeTemp.inputTime,
  4394. name: this.seeTemp.empname
  4395. },
  4396. {
  4397. title: '库管审核',
  4398. date: this.seeTemp.KGChargedate,
  4399. name: this.seeTemp.KGChargePerson,
  4400. status: 'error',
  4401. reason: reason
  4402. },
  4403. { title: '设备主管审核' },
  4404. { title: '供应主管审核' },
  4405. { title: '场长审核' },
  4406. { title: '职能中心审核' },
  4407. { title: '采购审核' }
  4408. ]
  4409. this.active = 2
  4410. } else if (this.seeTemp.statue === 9) {
  4411. this.activeList = [
  4412. {
  4413. title: '备件申购',
  4414. date: this.seeTemp.inputTime,
  4415. name: this.seeTemp.empname
  4416. },
  4417. {
  4418. title: '库管审核',
  4419. date: this.seeTemp.KGChargedate,
  4420. name: this.seeTemp.KGChargePerson
  4421. },
  4422. {
  4423. title: '设备主管审核',
  4424. date: this.seeTemp.equipmentdate,
  4425. name: this.seeTemp.equipmentPerson
  4426. },
  4427. { title: '供应主管审核' },
  4428. { title: '场长审核' },
  4429. { title: '职能中心审核' },
  4430. { title: '采购审核' }
  4431. ]
  4432. this.active = 3
  4433. } else if (this.seeTemp.statue === 10) {
  4434. this.activeList = [
  4435. {
  4436. title: '备件申购',
  4437. date: this.seeTemp.inputTime,
  4438. name: this.seeTemp.empname
  4439. },
  4440. {
  4441. title: '库管审核',
  4442. date: this.seeTemp.KGChargedate,
  4443. name: this.seeTemp.KGChargePerson
  4444. },
  4445. {
  4446. title: '设备主管审核',
  4447. date: this.seeTemp.equipmentdate,
  4448. name: this.seeTemp.equipmentPerson,
  4449. status: 'error',
  4450. reason: reason
  4451. },
  4452. { title: '供应主管审核' },
  4453. { title: '场长审核' },
  4454. { title: '职能中心审核' },
  4455. { title: '采购审核' }
  4456. ]
  4457. this.active = 3
  4458. } else if (this.seeTemp.statue === 5) {
  4459. this.activeList = [
  4460. {
  4461. title: '备件申购',
  4462. date: this.seeTemp.inputTime,
  4463. name: this.seeTemp.empname
  4464. },
  4465. {
  4466. title: '库管审核',
  4467. date: this.seeTemp.KGChargedate,
  4468. name: this.seeTemp.KGChargePerson
  4469. },
  4470. {
  4471. title: '设备主管审核',
  4472. date: this.seeTemp.equipmentdate,
  4473. name: this.seeTemp.equipmentPerson
  4474. },
  4475. {
  4476. title: '供应主管审核',
  4477. date: this.seeTemp.chargeDate,
  4478. name: this.seeTemp.chargePerson
  4479. },
  4480. { title: '场长审核' },
  4481. { title: '职能中心审核' },
  4482. { title: '采购审核' }
  4483. ]
  4484. this.active = 4
  4485. } else if (this.seeTemp.statue === 6) {
  4486. this.activeList = [
  4487. {
  4488. title: '备件申购',
  4489. date: this.seeTemp.inputTime,
  4490. name: this.seeTemp.empname
  4491. },
  4492. {
  4493. title: '库管审核',
  4494. date: this.seeTemp.KGChargedate,
  4495. name: this.seeTemp.KGChargePerson
  4496. },
  4497. {
  4498. title: '设备主管审核',
  4499. date: this.seeTemp.equipmentdate,
  4500. name: this.seeTemp.equipmentPerson
  4501. },
  4502. {
  4503. title: '供应主管审核',
  4504. date: this.seeTemp.chargeDate,
  4505. name: this.seeTemp.chargePerson,
  4506. status: 'error',
  4507. reason: reason
  4508. },
  4509. { title: '场长审核' },
  4510. { title: '职能中心审核' },
  4511. { title: '采购审核' }
  4512. ]
  4513. this.active = 4
  4514. } else if (this.seeTemp.statue === 11) {
  4515. this.activeList = [
  4516. {
  4517. title: '备件申购',
  4518. date: this.seeTemp.inputTime,
  4519. name: this.seeTemp.empname
  4520. },
  4521. {
  4522. title: '库管审核',
  4523. date: this.seeTemp.KGChargedate,
  4524. name: this.seeTemp.KGChargePerson
  4525. },
  4526. {
  4527. title: '设备主管审核',
  4528. date: this.seeTemp.equipmentdate,
  4529. name: this.seeTemp.equipmentPerson
  4530. },
  4531. {
  4532. title: '供应主管审核',
  4533. date: this.seeTemp.chargeDate,
  4534. name: this.seeTemp.chargePerson
  4535. },
  4536. {
  4537. title: '场长审核',
  4538. date: this.seeTemp.fielddate,
  4539. name: this.seeTemp.fieldPerson
  4540. },
  4541. { title: '职能中心审核' },
  4542. { title: '采购审核' }
  4543. ]
  4544. this.active = 5
  4545. } else if (this.seeTemp.statue === 12) {
  4546. this.activeList = [
  4547. {
  4548. title: '备件申购',
  4549. date: this.seeTemp.inputTime,
  4550. name: this.seeTemp.empname
  4551. },
  4552. {
  4553. title: '库管审核',
  4554. date: this.seeTemp.KGChargedate,
  4555. name: this.seeTemp.KGChargePerson
  4556. },
  4557. {
  4558. title: '设备主管审核',
  4559. date: this.seeTemp.equipmentdate,
  4560. name: this.seeTemp.equipmentPerson
  4561. },
  4562. {
  4563. title: '供应主管审核',
  4564. date: this.seeTemp.chargeDate,
  4565. name: this.seeTemp.chargePerson
  4566. },
  4567. {
  4568. title: '场长审核',
  4569. date: this.seeTemp.fielddate,
  4570. name: this.seeTemp.fieldPerson,
  4571. status: 'error',
  4572. reason: reason
  4573. },
  4574. { title: '职能中心审核' },
  4575. { title: '采购审核' }
  4576. ]
  4577. this.active = 5
  4578. } else if (this.seeTemp.statue === 15) {
  4579. this.activeList = [
  4580. {
  4581. title: '备件申购',
  4582. date: this.seeTemp.inputTime,
  4583. name: this.seeTemp.empname
  4584. },
  4585. {
  4586. title: '库管审核',
  4587. date: this.seeTemp.KGChargedate,
  4588. name: this.seeTemp.KGChargePerson
  4589. },
  4590. {
  4591. title: '设备主管审核',
  4592. date: this.seeTemp.equipmentdate,
  4593. name: this.seeTemp.equipmentPerson
  4594. },
  4595. {
  4596. title: '供应主管审核',
  4597. date: this.seeTemp.chargeDate,
  4598. name: this.seeTemp.chargePerson
  4599. },
  4600. {
  4601. title: '场长审核',
  4602. date: this.seeTemp.fielddate,
  4603. name: this.seeTemp.fieldPerson
  4604. },
  4605. {
  4606. title: '职能中心审核',
  4607. name: this.seeTemp.positionName,
  4608. date: this.seeTemp.positiondate
  4609. },
  4610. { title: '采购审核' }
  4611. ]
  4612. this.active = 6
  4613. } else if (this.seeTemp.statue === 16) {
  4614. this.activeList = [
  4615. {
  4616. title: '备件申购',
  4617. date: this.seeTemp.inputTime,
  4618. name: this.seeTemp.empname
  4619. },
  4620. {
  4621. title: '库管审核',
  4622. date: this.seeTemp.KGChargedate,
  4623. name: this.seeTemp.KGChargePerson
  4624. },
  4625. {
  4626. title: '设备主管审核',
  4627. date: this.seeTemp.equipmentdate,
  4628. name: this.seeTemp.equipmentPerson
  4629. },
  4630. {
  4631. title: '供应主管审核',
  4632. date: this.seeTemp.chargeDate,
  4633. name: this.seeTemp.chargePerson
  4634. },
  4635. {
  4636. title: '场长审核',
  4637. date: this.seeTemp.fielddate,
  4638. name: this.seeTemp.fieldPerson
  4639. },
  4640. {
  4641. title: '职能中心审核',
  4642. name: this.seeTemp.positionName,
  4643. date: this.seeTemp.positiondate,
  4644. status: 'error',
  4645. reason: reason
  4646. },
  4647. { title: '采购审核' }
  4648. ]
  4649. this.active = 6
  4650. } else if (this.seeTemp.statue === 7) {
  4651. this.activeList = [
  4652. {
  4653. title: '备件申购',
  4654. date: this.seeTemp.inputTime,
  4655. name: this.seeTemp.empname
  4656. },
  4657. {
  4658. title: '库管审核',
  4659. date: this.seeTemp.KGChargedate,
  4660. name: this.seeTemp.KGChargePerson
  4661. },
  4662. {
  4663. title: '设备主管审核',
  4664. date: this.seeTemp.equipmentdate,
  4665. name: this.seeTemp.equipmentPerson
  4666. },
  4667. {
  4668. title: '供应主管审核',
  4669. date: this.seeTemp.chargeDate,
  4670. name: this.seeTemp.chargePerson
  4671. },
  4672. {
  4673. title: '场长审核',
  4674. date: this.seeTemp.fielddate,
  4675. name: this.seeTemp.fieldPerson
  4676. },
  4677. {
  4678. title: '职能中心审核',
  4679. name: this.seeTemp.positionName,
  4680. date: this.seeTemp.positiondate
  4681. },
  4682. {
  4683. title: '采购审核',
  4684. date: this.seeTemp.CGChargedate,
  4685. name: this.seeTemp.CGChargePerson
  4686. }
  4687. ]
  4688. this.active = 7
  4689. } else if (this.seeTemp.statue === 8) {
  4690. this.activeList = [
  4691. {
  4692. title: '备件申购',
  4693. date: this.seeTemp.inputTime,
  4694. name: this.seeTemp.empname
  4695. },
  4696. {
  4697. title: '库管审核',
  4698. date: this.seeTemp.KGChargedate,
  4699. name: this.seeTemp.KGChargePerson
  4700. },
  4701. {
  4702. title: '设备主管审核',
  4703. date: this.seeTemp.equipmentdate,
  4704. name: this.seeTemp.equipmentPerson
  4705. },
  4706. {
  4707. title: '供应主管审核',
  4708. date: this.seeTemp.chargeDate,
  4709. name: this.seeTemp.chargePerson
  4710. },
  4711. {
  4712. title: '场长审核',
  4713. date: this.seeTemp.fielddate,
  4714. name: this.seeTemp.fieldPerson
  4715. },
  4716. {
  4717. title: '职能中心审核',
  4718. name: this.seeTemp.positionName,
  4719. date: this.seeTemp.positiondate
  4720. },
  4721. {
  4722. title: '采购审核',
  4723. date: this.seeTemp.CGChargedate,
  4724. name: this.seeTemp.CGChargePerson,
  4725. status: 'error',
  4726. reason: reason
  4727. }
  4728. ]
  4729. this.active = 7
  4730. }
  4731. } else {
  4732. if (this.seeTemp.statue === 2) {
  4733. this.activeList = [
  4734. {
  4735. title: '备件申购',
  4736. date: this.seeTemp.inputTime,
  4737. name: this.seeTemp.empname
  4738. },
  4739. { title: '库管审核' },
  4740. { title: '设备主管审核' },
  4741. { title: '供应主管审核' },
  4742. { title: '职能中心审核' },
  4743. { title: '采购审核' }
  4744. ]
  4745. this.active = 1
  4746. } else if (this.seeTemp.statue === 3) {
  4747. this.activeList = [
  4748. {
  4749. title: '备件申购',
  4750. date: this.seeTemp.inputTime,
  4751. name: this.seeTemp.empname
  4752. },
  4753. {
  4754. title: '库管审核',
  4755. date: this.seeTemp.KGChargedate,
  4756. name: this.seeTemp.KGChargePerson
  4757. },
  4758. { title: '设备主管审核' },
  4759. { title: '供应主管审核' },
  4760. { title: '职能中心审核' },
  4761. { title: '采购审核' }
  4762. ]
  4763. this.active = 2
  4764. } else if (this.seeTemp.statue === 4) {
  4765. this.activeList = [
  4766. {
  4767. title: '备件申购',
  4768. date: this.seeTemp.inputTime,
  4769. name: this.seeTemp.empname
  4770. },
  4771. {
  4772. title: '库管审核',
  4773. date: this.seeTemp.KGChargedate,
  4774. name: this.seeTemp.KGChargePerson,
  4775. status: 'error',
  4776. reason: reason
  4777. },
  4778. { title: '设备主管审核' },
  4779. { title: '供应主管审核' },
  4780. { title: '职能中心审核' },
  4781. { title: '采购审核' }
  4782. ]
  4783. this.active = 2
  4784. } else if (this.seeTemp.statue === 9) {
  4785. this.activeList = [
  4786. {
  4787. title: '备件申购',
  4788. date: this.seeTemp.inputTime,
  4789. name: this.seeTemp.empname
  4790. },
  4791. {
  4792. title: '库管审核',
  4793. date: this.seeTemp.KGChargedate,
  4794. name: this.seeTemp.KGChargePerson
  4795. },
  4796. {
  4797. title: '设备主管审核',
  4798. date: this.seeTemp.equipmentdate,
  4799. name: this.seeTemp.equipmentPerson
  4800. },
  4801. { title: '供应主管审核' },
  4802. { title: '职能中心审核' },
  4803. { title: '采购审核' }
  4804. ]
  4805. this.active = 3
  4806. } else if (this.seeTemp.statue === 10) {
  4807. this.activeList = [
  4808. {
  4809. title: '备件申购',
  4810. date: this.seeTemp.inputTime,
  4811. name: this.seeTemp.empname
  4812. },
  4813. {
  4814. title: '库管审核',
  4815. date: this.seeTemp.KGChargedate,
  4816. name: this.seeTemp.KGChargePerson
  4817. },
  4818. {
  4819. title: '设备主管审核',
  4820. date: this.seeTemp.equipmentdate,
  4821. name: this.seeTemp.equipmentPerson,
  4822. status: 'error',
  4823. reason: reason
  4824. },
  4825. { title: '供应主管审核' },
  4826. { title: '职能中心审核' },
  4827. { title: '采购审核' }
  4828. ]
  4829. this.active = 3
  4830. } else if (this.seeTemp.statue === 5) {
  4831. this.activeList = [
  4832. {
  4833. title: '备件申购',
  4834. date: this.seeTemp.inputTime,
  4835. name: this.seeTemp.empname
  4836. },
  4837. {
  4838. title: '库管审核',
  4839. date: this.seeTemp.KGChargedate,
  4840. name: this.seeTemp.KGChargePerson
  4841. },
  4842. {
  4843. title: '设备主管审核',
  4844. date: this.seeTemp.equipmentdate,
  4845. name: this.seeTemp.equipmentPerson
  4846. },
  4847. {
  4848. title: '供应主管审核',
  4849. date: this.seeTemp.chargeDate,
  4850. name: this.seeTemp.chargePerson
  4851. },
  4852. { title: '职能中心审核' },
  4853. { title: '采购审核' }
  4854. ]
  4855. this.active = 4
  4856. } else if (this.seeTemp.statue === 6) {
  4857. this.activeList = [
  4858. {
  4859. title: '备件申购',
  4860. date: this.seeTemp.inputTime,
  4861. name: this.seeTemp.empname
  4862. },
  4863. {
  4864. title: '库管审核',
  4865. date: this.seeTemp.KGChargedate,
  4866. name: this.seeTemp.KGChargePerson
  4867. },
  4868. {
  4869. title: '设备主管审核',
  4870. date: this.seeTemp.equipmentdate,
  4871. name: this.seeTemp.equipmentPerson
  4872. },
  4873. {
  4874. title: '供应主管审核',
  4875. date: this.seeTemp.chargeDate,
  4876. name: this.seeTemp.chargePerson,
  4877. status: 'error',
  4878. reason: reason
  4879. },
  4880. { title: '职能中心审核' },
  4881. { title: '采购审核' }
  4882. ]
  4883. this.active = 4
  4884. } else if (this.seeTemp.statue === 15) {
  4885. this.activeList = [
  4886. {
  4887. title: '备件申购',
  4888. date: this.seeTemp.inputTime,
  4889. name: this.seeTemp.empname
  4890. },
  4891. {
  4892. title: '库管审核',
  4893. date: this.seeTemp.KGChargedate,
  4894. name: this.seeTemp.KGChargePerson
  4895. },
  4896. {
  4897. title: '设备主管审核',
  4898. date: this.seeTemp.equipmentdate,
  4899. name: this.seeTemp.equipmentPerson
  4900. },
  4901. {
  4902. title: '供应主管审核',
  4903. date: this.seeTemp.chargeDate,
  4904. name: this.seeTemp.chargePerson
  4905. },
  4906. {
  4907. title: '职能中心审核',
  4908. name: this.seeTemp.positionName,
  4909. date: this.seeTemp.positiondate
  4910. },
  4911. { title: '采购审核' }
  4912. ]
  4913. this.active = 5
  4914. } else if (this.seeTemp.statue === 16) {
  4915. this.activeList = [
  4916. {
  4917. title: '备件申购',
  4918. date: this.seeTemp.inputTime,
  4919. name: this.seeTemp.empname
  4920. },
  4921. {
  4922. title: '库管审核',
  4923. date: this.seeTemp.KGChargedate,
  4924. name: this.seeTemp.KGChargePerson
  4925. },
  4926. {
  4927. title: '设备主管审核',
  4928. date: this.seeTemp.equipmentdate,
  4929. name: this.seeTemp.equipmentPerson
  4930. },
  4931. {
  4932. title: '供应主管审核',
  4933. date: this.seeTemp.chargeDate,
  4934. name: this.seeTemp.chargePerson
  4935. },
  4936. {
  4937. title: '职能中心审核',
  4938. name: this.seeTemp.positionName,
  4939. date: this.seeTemp.positiondate,
  4940. status: 'error',
  4941. reason: reason
  4942. },
  4943. { title: '采购审核' }
  4944. ]
  4945. this.active = 5
  4946. } else if (this.seeTemp.statue === 7) {
  4947. this.activeList = [
  4948. {
  4949. title: '备件申购',
  4950. date: this.seeTemp.inputTime,
  4951. name: this.seeTemp.empname
  4952. },
  4953. {
  4954. title: '库管审核',
  4955. date: this.seeTemp.KGChargedate,
  4956. name: this.seeTemp.KGChargePerson
  4957. },
  4958. {
  4959. title: '设备主管审核',
  4960. date: this.seeTemp.equipmentdate,
  4961. name: this.seeTemp.equipmentPerson
  4962. },
  4963. {
  4964. title: '供应主管审核',
  4965. date: this.seeTemp.chargeDate,
  4966. name: this.seeTemp.chargePerson
  4967. },
  4968. {
  4969. title: '职能中心审核',
  4970. name: this.seeTemp.positionName,
  4971. date: this.seeTemp.positiondate
  4972. },
  4973. {
  4974. title: '采购审核',
  4975. date: this.seeTemp.CGChargedate,
  4976. name: this.seeTemp.CGChargePerson
  4977. }
  4978. ]
  4979. this.active = 6
  4980. } else if (this.seeTemp.statue === 8) {
  4981. this.activeList = [
  4982. {
  4983. title: '备件申购',
  4984. date: this.seeTemp.inputTime,
  4985. name: this.seeTemp.empname
  4986. },
  4987. {
  4988. title: '库管审核',
  4989. date: this.seeTemp.KGChargedate,
  4990. name: this.seeTemp.KGChargePerson
  4991. },
  4992. {
  4993. title: '设备主管审核',
  4994. date: this.seeTemp.equipmentdate,
  4995. name: this.seeTemp.equipmentPerson
  4996. },
  4997. {
  4998. title: '供应主管审核',
  4999. date: this.seeTemp.chargeDate,
  5000. name: this.seeTemp.chargePerson
  5001. },
  5002. {
  5003. title: '职能中心审核',
  5004. name: this.seeTemp.positionName,
  5005. date: this.seeTemp.positiondate
  5006. },
  5007. {
  5008. title: '采购审核',
  5009. date: this.seeTemp.CGChargedate,
  5010. name: this.seeTemp.CGChargePerson,
  5011. status: 'error',
  5012. reason: reason
  5013. }
  5014. ]
  5015. this.active = 6
  5016. }
  5017. }
  5018. } else {
  5019. // 申购合单审核流程
  5020. if (this.seeTemp.statue === 2) {
  5021. this.activeList = [
  5022. {
  5023. title: '备件申购',
  5024. date: this.seeTemp.inputTime,
  5025. name: this.seeTemp.empname
  5026. },
  5027. { title: '库管审核' },
  5028. { title: '设备主管审核' },
  5029. { title: '供应主管审核' },
  5030. { title: '场长审核' },
  5031. { title: '采购审核' }
  5032. ]
  5033. this.active = 1
  5034. } else if (this.seeTemp.statue === 3) {
  5035. this.activeList = [
  5036. {
  5037. title: '备件申购',
  5038. date: this.seeTemp.inputTime,
  5039. name: this.seeTemp.empname
  5040. },
  5041. {
  5042. title: '库管审核',
  5043. date: this.seeTemp.KGChargedate,
  5044. name: this.seeTemp.KGChargePerson
  5045. },
  5046. { title: '设备主管审核' },
  5047. { title: '供应主管审核' },
  5048. { title: '场长审核' },
  5049. { title: '采购审核' }
  5050. ]
  5051. this.active = 2
  5052. } else if (this.seeTemp.statue === 4) {
  5053. this.activeList = [
  5054. {
  5055. title: '备件申购',
  5056. date: this.seeTemp.inputTime,
  5057. name: this.seeTemp.empname
  5058. },
  5059. {
  5060. title: '库管审核',
  5061. date: this.seeTemp.KGChargedate,
  5062. name: this.seeTemp.KGChargePerson,
  5063. status: 'error',
  5064. reason: reason
  5065. },
  5066. { title: '设备主管审核' },
  5067. { title: '供应主管审核' },
  5068. { title: '场长审核' },
  5069. { title: '采购审核' }
  5070. ]
  5071. this.active = 2
  5072. } else if (this.seeTemp.statue === 9) {
  5073. this.activeList = [
  5074. {
  5075. title: '备件申购',
  5076. date: this.seeTemp.inputTime,
  5077. name: this.seeTemp.empname
  5078. },
  5079. {
  5080. title: '库管审核',
  5081. date: this.seeTemp.KGChargedate,
  5082. name: this.seeTemp.KGChargePerson
  5083. },
  5084. {
  5085. title: '设备主管审核',
  5086. date: this.seeTemp.equipmentdate,
  5087. name: this.seeTemp.equipmentPerson
  5088. },
  5089. { title: '供应主管审核' },
  5090. { title: '场长审核' },
  5091. { title: '采购审核' }
  5092. ]
  5093. this.active = 3
  5094. } else if (this.seeTemp.statue === 10) {
  5095. this.activeList = [
  5096. {
  5097. title: '备件申购',
  5098. date: this.seeTemp.inputTime,
  5099. name: this.seeTemp.empname
  5100. },
  5101. {
  5102. title: '库管审核',
  5103. date: this.seeTemp.KGChargedate,
  5104. name: this.seeTemp.KGChargePerson
  5105. },
  5106. {
  5107. title: '设备主管审核',
  5108. date: this.seeTemp.equipmentdate,
  5109. name: this.seeTemp.equipmentPerson,
  5110. status: 'error',
  5111. reason: reason
  5112. },
  5113. { title: '供应主管审核' },
  5114. { title: '场长审核' },
  5115. { title: '采购审核' }
  5116. ]
  5117. this.active = 3
  5118. } else if (this.seeTemp.statue === 5) {
  5119. this.activeList = [
  5120. {
  5121. title: '备件申购',
  5122. date: this.seeTemp.inputTime,
  5123. name: this.seeTemp.empname
  5124. },
  5125. {
  5126. title: '库管审核',
  5127. date: this.seeTemp.KGChargedate,
  5128. name: this.seeTemp.KGChargePerson
  5129. },
  5130. {
  5131. title: '设备主管审核',
  5132. date: this.seeTemp.equipmentdate,
  5133. name: this.seeTemp.equipmentPerson
  5134. },
  5135. {
  5136. title: '供应主管审核',
  5137. date: this.seeTemp.chargeDate,
  5138. name: this.seeTemp.chargePerson
  5139. },
  5140. { title: '场长审核' },
  5141. { title: '采购审核' }
  5142. ]
  5143. this.active = 4
  5144. } else if (this.seeTemp.statue === 6) {
  5145. this.activeList = [
  5146. {
  5147. title: '备件申购',
  5148. date: this.seeTemp.inputTime,
  5149. name: this.seeTemp.empname
  5150. },
  5151. {
  5152. title: '库管审核',
  5153. date: this.seeTemp.KGChargedate,
  5154. name: this.seeTemp.KGChargePerson
  5155. },
  5156. {
  5157. title: '设备主管审核',
  5158. date: this.seeTemp.equipmentdate,
  5159. name: this.seeTemp.equipmentPerson
  5160. },
  5161. {
  5162. title: '供应主管审核',
  5163. date: this.seeTemp.chargeDate,
  5164. name: this.seeTemp.chargePerson,
  5165. status: 'error',
  5166. reason: reason
  5167. },
  5168. { title: '场长审核' },
  5169. { title: '采购审核' }
  5170. ]
  5171. this.active = 4
  5172. } else if (this.seeTemp.statue === 11) {
  5173. this.activeList = [
  5174. {
  5175. title: '备件申购',
  5176. date: this.seeTemp.inputTime,
  5177. name: this.seeTemp.empname
  5178. },
  5179. {
  5180. title: '库管审核',
  5181. date: this.seeTemp.KGChargedate,
  5182. name: this.seeTemp.KGChargePerson
  5183. },
  5184. {
  5185. title: '设备主管审核',
  5186. date: this.seeTemp.equipmentdate,
  5187. name: this.seeTemp.equipmentPerson
  5188. },
  5189. {
  5190. title: '供应主管审核',
  5191. date: this.seeTemp.chargeDate,
  5192. name: this.seeTemp.chargePerson
  5193. },
  5194. {
  5195. title: '场长审核',
  5196. date: this.seeTemp.fielddate,
  5197. name: this.seeTemp.fieldPerson
  5198. },
  5199. { title: '采购审核' }
  5200. ]
  5201. this.active = 5
  5202. } else if (this.seeTemp.statue === 12) {
  5203. this.activeList = [
  5204. {
  5205. title: '备件申购',
  5206. date: this.seeTemp.inputTime,
  5207. name: this.seeTemp.empname
  5208. },
  5209. {
  5210. title: '库管审核',
  5211. date: this.seeTemp.KGChargedate,
  5212. name: this.seeTemp.KGChargePerson
  5213. },
  5214. {
  5215. title: '设备主管审核',
  5216. date: this.seeTemp.equipmentdate,
  5217. name: this.seeTemp.equipmentPerson
  5218. },
  5219. {
  5220. title: '供应主管审核',
  5221. date: this.seeTemp.chargeDate,
  5222. name: this.seeTemp.chargePerson
  5223. },
  5224. {
  5225. title: '场长审核',
  5226. date: this.seeTemp.fielddate,
  5227. name: this.seeTemp.fieldPerson,
  5228. status: 'error',
  5229. reason: reason
  5230. },
  5231. { title: '采购审核' }
  5232. ]
  5233. this.active = 5
  5234. } else if (this.seeTemp.statue === 7) {
  5235. this.activeList = [
  5236. {
  5237. title: '备件申购',
  5238. date: this.seeTemp.inputTime,
  5239. name: this.seeTemp.empname
  5240. },
  5241. {
  5242. title: '库管审核',
  5243. date: this.seeTemp.KGChargedate,
  5244. name: this.seeTemp.KGChargePerson
  5245. },
  5246. {
  5247. title: '设备主管审核',
  5248. date: this.seeTemp.equipmentdate,
  5249. name: this.seeTemp.equipmentPerson
  5250. },
  5251. {
  5252. title: '供应主管审核',
  5253. date: this.seeTemp.chargeDate,
  5254. name: this.seeTemp.chargePerson
  5255. },
  5256. {
  5257. title: '场长审核',
  5258. date: this.seeTemp.fielddate,
  5259. name: this.seeTemp.fieldPerson
  5260. },
  5261. {
  5262. title: '采购审核',
  5263. date: this.seeTemp.CGChargedate,
  5264. name: this.seeTemp.CGChargePerson
  5265. }
  5266. ]
  5267. this.active = 6
  5268. } else if (this.seeTemp.statue === 8) {
  5269. this.activeList = [
  5270. {
  5271. title: '备件申购',
  5272. date: this.seeTemp.inputTime,
  5273. name: this.seeTemp.empname
  5274. },
  5275. {
  5276. title: '库管审核',
  5277. date: this.seeTemp.KGChargedate,
  5278. name: this.seeTemp.KGChargePerson
  5279. },
  5280. {
  5281. title: '设备主管审核',
  5282. date: this.seeTemp.equipmentdate,
  5283. name: this.seeTemp.equipmentPerson
  5284. },
  5285. {
  5286. title: '供应主管审核',
  5287. date: this.seeTemp.chargeDate,
  5288. name: this.seeTemp.chargePerson
  5289. },
  5290. {
  5291. title: '场长审核',
  5292. date: this.seeTemp.fielddate,
  5293. name: this.seeTemp.fieldPerson
  5294. },
  5295. {
  5296. title: '采购审核',
  5297. date: this.seeTemp.CGChargedate,
  5298. name: this.seeTemp.CGChargePerson,
  5299. status: 'error',
  5300. reason: reason
  5301. }
  5302. ]
  5303. this.active = 6
  5304. }
  5305. }
  5306. }
  5307. },
  5308. getSeeList() {
  5309. this.listLoadingSee = true
  5310. console.log(this.dialogStatus, '======')
  5311. if (this.dialogStatus == 'create') {
  5312. console.log(this.dialogStatus, '======')
  5313. this.getdataListSee.parammaps.reject = 1
  5314. } else {
  5315. this.getdataListSee.parammaps.reject = 0
  5316. if (this.dialogStatus == 'special') {
  5317. if (
  5318. this.createTemp.purchaseType == '1' ||
  5319. this.createTemp.purchaseType == '3'
  5320. ) {
  5321. this.getdataListSee.parammaps.reject = 1
  5322. }
  5323. }
  5324. }
  5325. this.getdataListSee.parammaps.pastureId = Cookies.get('pastureid')
  5326. GetDataByName(this.getdataListSee).then((response) => {
  5327. if (response.data.list !== null) {
  5328. console.log('查看下方table数据', response.data.list)
  5329. response.data.list.forEach((item) => {
  5330. console.log(item, 'item')
  5331. var pricearr = item.price.split(',')
  5332. this.$set(item, 'pricearr', pricearr)
  5333. var lifeCyclearr = item.lifeCycle.split(',')
  5334. this.$set(item, 'lifeCyclearr', lifeCyclearr)
  5335. var contractVarianceItemarr = item.contractVarianceItem.split(',')
  5336. this.$set(item, 'contractVarianceItemarr', contractVarianceItemarr)
  5337. })
  5338. this.listSee = response.data.list
  5339. this.listAdd = response.data.list
  5340. this.modifylist = response.data.list
  5341. var sumPrices = 0
  5342. response.data.list.forEach(function(i, j) {
  5343. sumPrices = sumPrices + parseFloat(i.price1) * parseFloat(i.amount)
  5344. })
  5345. this.$set(this.seeTemp, 'sumPrices', sumPrices)
  5346. this.$set(this.modifyTemp, 'sumPrices', sumPrices)
  5347. console.log('总价sumPrices', sumPrices)
  5348. var priceObj = false
  5349. var priceArr = []
  5350. response.data.list.forEach(function(i, j) {
  5351. if (parseFloat(i.price1) >= 500) {
  5352. priceArr.push(true)
  5353. } else {
  5354. priceArr.push(false)
  5355. }
  5356. })
  5357. if (priceArr.includes(true)) {
  5358. priceObj = true
  5359. } else {
  5360. priceObj = false
  5361. }
  5362. console.log('priceObj', priceObj)
  5363. // 总价大于2000 或单价>500
  5364. if (sumPrices >= 2000 || priceObj) {
  5365. if (this.isMilk) {
  5366. this.isApplyEx4 = true
  5367. } else {
  5368. this.isApplyEx4 = false
  5369. }
  5370. this.getFlowPath()
  5371. } else {
  5372. this.isApplyEx4 = false
  5373. this.getFlowPath()
  5374. }
  5375. for (let i = 0; i < response.data.list.length; i++) {
  5376. if (
  5377. response.data.list[i].srcpath !== null &&
  5378. response.data.list[i].picpath !== null &&
  5379. response.data.list[i].srcpath !== undefined &&
  5380. response.data.list[i].picpath !== undefined
  5381. ) {
  5382. console.log(
  5383. process.env.VUE_APP_BASE_API + response.data.list[i].srcpath,
  5384. '=======1'
  5385. )
  5386. this.listSee[i].srcpath =
  5387. process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  5388. this.listSee[i].picpath =
  5389. process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  5390. this.listAdd[i].srcpath = this.listSee[i].srcpath
  5391. this.listAdd[i].picpath = this.listSee[i].picpath
  5392. // this.seeTemp.providerName = response.data.list.providerName
  5393. this.pageNumSee = response.data.pageNum
  5394. this.pageSizeSee = response.data.pageSize
  5395. } else {
  5396. this.listSee[i].srcpath = ''
  5397. this.listSee[i].picpath = ''
  5398. this.listAdd[i].srcpath = ''
  5399. this.listAdd[i].picpath = ''
  5400. }
  5401. }
  5402. }
  5403. if (response.data.total) {
  5404. this.totalSee = response.data.total
  5405. }
  5406. setTimeout(() => {
  5407. this.listLoadingSee = false
  5408. }, 100)
  5409. })
  5410. },
  5411. form_edit(row) {
  5412. this.isMilk = false
  5413. this.edit = 0
  5414. this.getDepartParam.parammaps.pastureId = row.pastureId
  5415. this.getCreateDepartDownList()
  5416. if (row.providerId == undefined) {
  5417. row.providerId = ''
  5418. row.providerName = ''
  5419. }
  5420. this.createTemp = Object.assign({}, row) // copy obj
  5421. this.createTemp.createTime = row.inputTime
  5422. this.dialogStatus = 'update'
  5423. this.dialogFormVisible = true
  5424. this.$nextTick(() => {
  5425. this.$refs['createTemp'].clearValidate()
  5426. })
  5427. this.getdataListSee.parammaps.id = this.createTemp.id
  5428. this.getSeeList()
  5429. },
  5430. edit_dialog_save() {
  5431. this.isokDisable = true
  5432. setTimeout(() => {
  5433. this.isokDisable = false
  5434. }, 1000)
  5435. this.$refs['createTemp'].validate((valid) => {
  5436. if (valid) {
  5437. this.edit_dialog_saveSave()
  5438. }
  5439. })
  5440. },
  5441. edit_dialog_saveSave() {
  5442. if (this.listAdd.length !== 0) {
  5443. for (var j = 0; j < this.listAdd.length; j++) {
  5444. console.log(this.listAdd[j].amount)
  5445. // eslint-disable-next-line use-isnan
  5446. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  5447. this.$message({
  5448. type: 'warning',
  5449. message: '请检查申购数量是否未填写',
  5450. duration: 2000
  5451. })
  5452. return false
  5453. } else {
  5454. var rulesAmount = /^[1-9]\d*$/
  5455. if (!rulesAmount.test(this.listAdd[j].amount)) {
  5456. this.$message({
  5457. type: 'error',
  5458. message: '申购数量请输入正整数',
  5459. duration: 2000
  5460. })
  5461. return false
  5462. }
  5463. }
  5464. if (this.listAdd[j].price == '') {
  5465. this.$message({
  5466. type: 'warning',
  5467. message: '请检查单价是否为空',
  5468. duration: 2000
  5469. })
  5470. return false
  5471. } else {
  5472. if (parseFloat(this.listAdd[j].price) == 0) {
  5473. this.$message({
  5474. type: 'warning',
  5475. message: '价格请输入正数,最多保留小数点后五位',
  5476. duration: 2000
  5477. })
  5478. return false
  5479. } else {
  5480. console.log(this.listAdd)
  5481. if (
  5482. this.listAdd[j].contractId == '' ||
  5483. this.listAdd[j].contractId == undefined ||
  5484. parseFloat(this.listAdd[j].contractId) == 0 ||
  5485. parseFloat(this.listAdd[j].contractId) < 0
  5486. ) {
  5487. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  5488. var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  5489. if (rulesPrice.test(this.listAdd[j].price) == false) {
  5490. this.$message({
  5491. type: 'error',
  5492. message: '价格请输入正数,最多保留小数点后五位',
  5493. duration: 2000
  5494. })
  5495. return false
  5496. }
  5497. }
  5498. }
  5499. }
  5500. }
  5501. for (let i = 0; i < this.listAdd.length; i++) {
  5502. this.$set(
  5503. this.listAdd[i],
  5504. 'date',
  5505. parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}')
  5506. )
  5507. this.$set(this.listAdd[i], 'employeId', this.createTemp.employeId)
  5508. if (this.listAdd[i].reject) {
  5509. this.$set(this.listAdd[i], 'reject', this.listAdd[i].reject)
  5510. } else {
  5511. this.$set(this.listAdd[i], 'reject', 0)
  5512. }
  5513. }
  5514. this.postDataPramas.common = { returnmap: '0' }
  5515. this.postDataPramas.data = []
  5516. this.postDataPramas.data[0] = {
  5517. name: 'updatepartpurchaseCharge',
  5518. type: 'e',
  5519. parammaps: {
  5520. id: this.createTemp.id
  5521. }
  5522. }
  5523. this.postDataPramas.data[1] = {
  5524. name: 'deletePartpurchase',
  5525. type: 'e',
  5526. parammaps: {
  5527. bigId: this.createTemp.id
  5528. }
  5529. }
  5530. // eslint-disable-next-line no-irregular-whitespace
  5531. this.postDataPramas.data[2] = {
  5532. name: 'insertSpotList',
  5533. resultmaps: { list: this.listAdd }
  5534. }
  5535. this.postDataPramas.data[2].children = []
  5536. this.postDataPramas.data[2].children[0] = {
  5537. name: 'insertPartpurchase',
  5538. type: 'e',
  5539. parammaps: {
  5540. bigId: this.createTemp.id,
  5541. pastureId: '@insertSpotList.pastureId',
  5542. partId: '@insertSpotList.partId',
  5543. partCode: '@insertSpotList.partCode',
  5544. partName: '@insertSpotList.partName',
  5545. specification: '@insertSpotList.specification',
  5546. unit: '@insertSpotList.unit',
  5547. brandId: '@insertSpotList.brandId',
  5548. storageAmount: '@insertSpotList.reportery',
  5549. purpose: '@insertSpotList.purpose',
  5550. amount: '@insertSpotList.amount',
  5551. price: '@insertSpotList.price',
  5552. contractId: '@insertSpotList.contractId',
  5553. lifeCycle: '@insertSpotList.lifeCycle',
  5554. reject: '@insertSpotList.reject',
  5555. departmentId: this.createTemp.departmentId,
  5556. date: this.createTemp.inputTime,
  5557. employeId: this.createTemp.employeId,
  5558. contractVarianceItem: '@insertSpotList.contractVarianceItem'
  5559. // partpurchase:''
  5560. }
  5561. }
  5562. ExecDataByConfig(this.postDataPramas).then((response) => {
  5563. console.log('编辑保存发送参数', this.postDataPramas)
  5564. if (response.msg === 'fail') {
  5565. this.$notify({
  5566. title: '保存失败',
  5567. message: response.data,
  5568. type: 'warning',
  5569. duration: 2000
  5570. })
  5571. } else {
  5572. this.dialogFormVisible = false
  5573. this.getdataListParm.parammaps.inputDatetime = ''
  5574. this.get_table_data()
  5575. this.$notify({
  5576. title: '',
  5577. message: '保存成功',
  5578. type: 'success',
  5579. duration: 2000
  5580. })
  5581. }
  5582. })
  5583. return true
  5584. } else {
  5585. this.$message({
  5586. title: '',
  5587. message: '请选择备件',
  5588. type: 'warning',
  5589. duration: 2000
  5590. })
  5591. return false
  5592. }
  5593. },
  5594. get_select_list() {
  5595. GetDataByNames(this.requestParams).then((response) => {
  5596. this.findAllProvider = response.data.findAllProvider.list
  5597. this.findAllPasture = response.data.findAllMainPasture.list
  5598. this.findAllEmploye = response.data.findAllEmploye.list
  5599. this.onlineSubscriptionList = response.data.getflexProviderList.list
  5600. this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
  5601. return item.name
  5602. })
  5603. this.getDepartDownList()
  5604. this.get_table_data()
  5605. })
  5606. },
  5607. getDepartDownList() {
  5608. this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
  5609. GetDataByName(this.getDepartParam).then((response) => {
  5610. this.findAllDepart = response.data.list
  5611. })
  5612. },
  5613. changePastureName(item) {
  5614. this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(
  5615. (obj) => obj.name == item
  5616. ).id
  5617. this.getdataListParm.parammaps.departmentId = ''
  5618. this.getDepartDownList()
  5619. },
  5620. getCreateDepartDownList() {
  5621. GetDataByName(this.getDepartParam).then((response) => {
  5622. this.createDepartList = response.data.list
  5623. if (this.edit == 1) {
  5624. if (
  5625. this.createDepartList.find(
  5626. (obj) => obj.id == Cookies.get('departmentid')
  5627. )
  5628. ) {
  5629. // 如果是新增并且在挤奶处 则申请部门名称和id为数组的第一个 TODO:
  5630. if (this.isDepartmentId) {
  5631. this.createTemp.departmentId = this.createDepartList[0].id
  5632. this.createTemp.departmentName = this.createDepartList[0].name
  5633. } else {
  5634. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  5635. this.createTemp.departmentName = this.createDepartList.find(
  5636. (obj) => obj.id == Cookies.get('departmentid')
  5637. ).name
  5638. }
  5639. } else {
  5640. this.createTemp.departmentId = response.data.list[0].id
  5641. this.createTemp.departmentName = response.data.list[0].name
  5642. }
  5643. if (this.isMilk) {
  5644. console.log('milk')
  5645. this.createTemp.departmentName = '挤奶处'
  5646. this.createTemp.departmentId = this.createDepartList.find(
  5647. (obj) => obj.name == this.createTemp.departmentName
  5648. ).id
  5649. }
  5650. }
  5651. })
  5652. },
  5653. changePasture(item) {
  5654. this.getDepartParam.parammaps.pastureId = item
  5655. this.edit = 1
  5656. this.getCreateDepartDownList()
  5657. },
  5658. changeDepart(item) {
  5659. this.createTemp.departmentName = this.createDepartList.find(
  5660. (obj) => obj.id == item
  5661. ).name
  5662. },
  5663. handleDownload() {
  5664. console.log('点击了下载')
  5665. this.$alert(
  5666. '备件申购正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
  5667. {}
  5668. )
  5669. this.isPercentage = true
  5670. this.percentage = 1
  5671. var timer = setInterval(() => {
  5672. this.percentage += 5
  5673. if (this.percentage > 95) {
  5674. this.percentage = 99
  5675. clearInterval(timer)
  5676. }
  5677. this.percentage = this.percentage
  5678. }, 1000)
  5679. this.downloadParam.name = 'downloadPartpurchaseList'
  5680. this.downloadParam.parammaps = this.getdataListParm.parammaps
  5681. GetAccount(this.downloadParam).then((response) => {
  5682. if (response.data.list !== '') {
  5683. this.percentage = 99
  5684. setTimeout(() => {
  5685. this.isPercentage = false
  5686. }, 2000)
  5687. }
  5688. this.$nextTick(() => {
  5689. const ExcelDatas = [
  5690. {
  5691. tHeader: [
  5692. '牧场',
  5693. '申购单号',
  5694. '申购时间',
  5695. '备件编号',
  5696. '备件名称',
  5697. '规格型号',
  5698. '品牌',
  5699. '单位',
  5700. '申购数量',
  5701. '申购部门',
  5702. '申购人',
  5703. '备注'
  5704. ],
  5705. filterVal: [
  5706. 'pastureName',
  5707. 'orderNumber',
  5708. 'inputTime',
  5709. 'partCode',
  5710. 'partName',
  5711. 'specification',
  5712. 'brandName',
  5713. 'unit',
  5714. 'amount',
  5715. 'departmentName',
  5716. 'empname',
  5717. 'purpose'
  5718. ],
  5719. tableDatas: response.data.list,
  5720. sheetName: '备件申购'
  5721. }
  5722. ]
  5723. json2excel(ExcelDatas, '备件申购', true, 'xlsx')
  5724. })
  5725. })
  5726. },
  5727. form_delete(row) {
  5728. console.log('点击了删除')
  5729. MessageBox.confirm('确认删除此条信息?', {
  5730. confirmButtonText: '确认',
  5731. cancelButtonText: '取消',
  5732. type: 'warning'
  5733. })
  5734. .then(() => {
  5735. this.postDataPramas.common = { returnmap: '0' }
  5736. this.postDataPramas.data = []
  5737. this.postDataPramas.data[0] = {
  5738. name: 'deleteBigPartpurchase',
  5739. type: 'e',
  5740. parammaps: {
  5741. id: row.id
  5742. }
  5743. }
  5744. this.postDataPramas.data[1] = {
  5745. name: 'deletePartpurchase',
  5746. type: 'e',
  5747. parammaps: {
  5748. bigId: row.id
  5749. }
  5750. }
  5751. ExecDataByConfig(this.postDataPramas).then((response) => {
  5752. this.get_table_data()
  5753. this.$notify({
  5754. title: '成功',
  5755. message: '删除成功',
  5756. type: 'success',
  5757. duration: 2000
  5758. })
  5759. })
  5760. })
  5761. .catch(() => {
  5762. this.$message({
  5763. type: 'info',
  5764. message: '已取消删除'
  5765. })
  5766. })
  5767. },
  5768. handleExamine1(row) {
  5769. console.log('点击了库管审核')
  5770. if (row == undefined) {
  5771. this.examineTemp = this.seeTemp
  5772. this.$set(this.seeTemp, 'statue', 1)
  5773. this.$set(this.seeTemp, 'workflowNote', '')
  5774. } else {
  5775. this.examineTemp = Object.assign({}, row)
  5776. this.$set(this.examineTemp, 'statue', 1)
  5777. this.$set(this.examineTemp, 'workflowNote', '')
  5778. }
  5779. this.dialogStatus = 'examine1'
  5780. this.dialogFormVisible_Examine = true
  5781. this.statueReason = false
  5782. },
  5783. changeStatue(val) {
  5784. if (val == 2) {
  5785. this.statueReason = true
  5786. } else {
  5787. this.statueReason = false
  5788. }
  5789. },
  5790. createExamineData1() {
  5791. console.log('点击了库管审核')
  5792. this.isokDisable = true
  5793. setTimeout(() => {
  5794. this.isokDisable = false
  5795. }, 1000)
  5796. this.$refs['examineTemp'].validate((valid) => {
  5797. if (valid) {
  5798. this.requestParam = {}
  5799. this.requestParam.name = 'partpurchaseCharge'
  5800. this.requestParam.parammaps = {}
  5801. this.requestParam.parammaps.id = this.examineTemp.id
  5802. if (this.examineTemp.statue == 1) {
  5803. this.requestParam.parammaps.statue = 3
  5804. } else if (this.examineTemp.statue == 2) {
  5805. this.requestParam.parammaps.statue = 4
  5806. }
  5807. this.requestParam.parammaps.empId = Cookies.get('employeid')
  5808. this.requestParam.parammaps.workflowNote =
  5809. this.examineTemp.workflowNote
  5810. PostDataByName(this.requestParam).then((response) => {
  5811. console.log('审核确认发送参数', this.requestParam)
  5812. this.isokDisable = false
  5813. if (response.msg !== 'fail') {
  5814. this.get_table_data()
  5815. this.dialogFormVisible_Examine = false
  5816. this.dialogFormVisible_See = false
  5817. this.statueReason = false
  5818. this.$notify({
  5819. title: '成功',
  5820. message: '审核成功',
  5821. type: 'success',
  5822. duration: 2000
  5823. })
  5824. } else {
  5825. failproccess(response, this.$notify, 1)
  5826. }
  5827. })
  5828. }
  5829. })
  5830. },
  5831. handleExamine2(row) {
  5832. console.log('点击了设备主管审核')
  5833. if (row == undefined) {
  5834. this.examineTemp = this.seeTemp
  5835. this.$set(this.seeTemp, 'statue', 1)
  5836. this.$set(this.seeTemp, 'workflowNote', '')
  5837. } else {
  5838. this.examineTemp = Object.assign({}, row)
  5839. this.$set(this.examineTemp, 'statue', 1)
  5840. this.$set(this.examineTemp, 'workflowNote', '')
  5841. }
  5842. this.dialogStatus = 'examine2'
  5843. this.dialogFormVisible_Examine = true
  5844. this.statueReason = false
  5845. },
  5846. createExamineData2() {
  5847. console.log('点击了设备主管审核')
  5848. this.isokDisable = true
  5849. setTimeout(() => {
  5850. this.isokDisable = false
  5851. }, 1000)
  5852. this.$refs['examineTemp'].validate((valid) => {
  5853. if (valid) {
  5854. this.requestParam = {}
  5855. this.requestParam.name = 'partpurchaseEquipment'
  5856. this.requestParam.parammaps = {}
  5857. this.requestParam.parammaps.id = this.examineTemp.id
  5858. if (this.examineTemp.statue == 1) {
  5859. this.requestParam.parammaps.statue = 9
  5860. } else if (this.examineTemp.statue == 2) {
  5861. this.requestParam.parammaps.statue = 10
  5862. }
  5863. this.requestParam.parammaps.empId = Cookies.get('employeid')
  5864. this.requestParam.parammaps.workflowNote =
  5865. this.examineTemp.workflowNote
  5866. PostDataByName(this.requestParam).then((response) => {
  5867. this.isokDisable = false
  5868. console.log('审核确认发送参数', this.requestParam)
  5869. if (response.msg !== 'fail') {
  5870. this.get_table_data()
  5871. this.dialogFormVisible_Examine = false
  5872. this.dialogFormVisible_See = false
  5873. this.statueReason = false
  5874. this.$notify({
  5875. title: '成功',
  5876. message: '审核成功',
  5877. type: 'success',
  5878. duration: 2000
  5879. })
  5880. } else {
  5881. failproccess(response, this.$notify)
  5882. }
  5883. })
  5884. }
  5885. })
  5886. },
  5887. handleExamine3(row) {
  5888. console.log('点击了供应主管审核')
  5889. if (row == undefined) {
  5890. this.examineTemp = this.seeTemp
  5891. this.$set(this.seeTemp, 'statue', 1)
  5892. this.$set(this.seeTemp, 'workflowNote', '')
  5893. this.getdataListSee.parammaps.id = this.seeTemp.id
  5894. } else {
  5895. this.examineTemp = Object.assign({}, row)
  5896. this.getdataListSee.parammaps.id = this.examineTemp.id
  5897. this.$set(this.examineTemp, 'statue', 1)
  5898. this.$set(this.examineTemp, 'workflowNote', '')
  5899. }
  5900. this.getSeeList()
  5901. this.dialogStatus = 'examine3'
  5902. this.dialogFormVisible_Examine = true
  5903. this.statueReason = false
  5904. },
  5905. createExamineData3() {
  5906. console.log('点击了供应主管审核', this.examineTemp.statue)
  5907. console.log(this.examineTemp.purchase_type, '=====')
  5908. console.log(this.isApplyEx4, '=====')
  5909. this.isokDisable = true
  5910. setTimeout(() => {
  5911. this.isokDisable = false
  5912. }, 1000)
  5913. this.$refs['examineTemp'].validate((valid) => {
  5914. if (valid) {
  5915. this.requestParam = {}
  5916. this.requestParam.name = 'partpurchaseCharge3'
  5917. this.requestParam.parammaps = {}
  5918. this.requestParam.parammaps.id = this.examineTemp.id
  5919. if (this.examineTemp.statue == 1) {
  5920. this.requestParam.parammaps.statue = 5
  5921. // if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
  5922. // console.log(this.isApplyEx4,'=====')
  5923. // if(this.isApplyEx4 == true){
  5924. // this.requestParam.parammaps.statue = 5
  5925. // }else{
  5926. // this.requestParam.parammaps.statue = 11
  5927. // }
  5928. // }else{
  5929. // this.requestParam.parammaps.statue = 5
  5930. // }
  5931. } else if (this.examineTemp.statue == 2) {
  5932. // if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
  5933. // if(this.isApplyEx4 == true){
  5934. // this.requestParam.parammaps.statue = 6
  5935. // }else{
  5936. // this.requestParam.parammaps.statue = 12
  5937. // }
  5938. // }else{
  5939. // this.requestParam.parammaps.statue = 6
  5940. // }
  5941. this.requestParam.parammaps.statue = 6
  5942. }
  5943. this.requestParam.parammaps.empId = Cookies.get('employeid')
  5944. this.requestParam.parammaps.workflowNote =
  5945. this.examineTemp.workflowNote
  5946. // return false
  5947. PostDataByName(this.requestParam).then((response) => {
  5948. console.log('审核确认发送参数', this.requestParam)
  5949. this.isokDisable = false
  5950. if (response.msg !== 'fail') {
  5951. this.get_table_data()
  5952. this.dialogFormVisible_Examine = false
  5953. this.dialogFormVisible_See = false
  5954. this.statueReason = false
  5955. this.$notify({
  5956. title: '成功',
  5957. message: '审核成功',
  5958. type: 'success',
  5959. duration: 2000
  5960. })
  5961. } else {
  5962. failproccess(response, this.$notify)
  5963. }
  5964. })
  5965. }
  5966. })
  5967. },
  5968. handleExamine4(row) {
  5969. console.log('点击了场长审核')
  5970. if (row == undefined) {
  5971. this.examineTemp = this.seeTemp
  5972. this.$set(this.seeTemp, 'statue', 1)
  5973. this.$set(this.seeTemp, 'workflowNote', '')
  5974. } else {
  5975. this.examineTemp = Object.assign({}, row)
  5976. this.$set(this.examineTemp, 'workflowNote', '')
  5977. this.$set(this.examineTemp, 'statue', 1)
  5978. }
  5979. this.dialogStatus = 'examine4'
  5980. this.dialogFormVisible_Examine = true
  5981. this.statueReason = false
  5982. },
  5983. createExamineData4() {
  5984. console.log('点击了场长审核')
  5985. this.isokDisable = true
  5986. setTimeout(() => {
  5987. this.isokDisable = false
  5988. }, 1000)
  5989. this.$refs['examineTemp'].validate((valid) => {
  5990. if (valid) {
  5991. this.requestParam = {}
  5992. this.requestParam.parammaps = {}
  5993. this.requestParam.common = { returnmap: '0' }
  5994. this.requestParam.data = []
  5995. // 通过
  5996. if (this.examineTemp.statue == 1) {
  5997. this.requestParam.data[0] = {
  5998. name: 'partpurchaseField',
  5999. type: 'e',
  6000. parammaps: {
  6001. id: this.examineTemp.id,
  6002. statue: 11,
  6003. field: Cookies.get('employeid'),
  6004. workflowNote: this.examineTemp.workflowNote
  6005. }
  6006. }
  6007. this.requestParam.data[1] = {
  6008. name: 'createBuydetailBySG',
  6009. type: 'e',
  6010. parammaps: {
  6011. id: this.examineTemp.id,
  6012. pastureId: this.examineTemp.pastureId
  6013. }
  6014. }
  6015. // 不通过
  6016. } else if (this.examineTemp.statue == 2) {
  6017. this.requestParam.data[0] = {
  6018. name: 'partpurchaseField',
  6019. type: 'e',
  6020. parammaps: {
  6021. id: this.examineTemp.id,
  6022. statue: 12,
  6023. field: Cookies.get('employeid'),
  6024. workflowNote: this.examineTemp.workflowNote
  6025. }
  6026. }
  6027. }
  6028. ExecDataByConfig(this.requestParam).then((response) => {
  6029. this.isokDisable = false
  6030. if (response.msg !== 'fail') {
  6031. this.get_table_data()
  6032. this.dialogFormVisible_Examine = false
  6033. this.dialogFormVisible_See = false
  6034. this.statueReason = false
  6035. this.$notify({
  6036. title: '成功',
  6037. message: '审核成功',
  6038. type: 'success',
  6039. duration: 2000
  6040. })
  6041. } else {
  6042. failproccess(response, this.$notify)
  6043. }
  6044. })
  6045. }
  6046. })
  6047. },
  6048. handleExamine5(row) {
  6049. console.log('点击了采购审核')
  6050. if (row == undefined) {
  6051. this.examineTemp = this.seeTemp
  6052. this.$set(this.seeTemp, 'statue', 1)
  6053. this.$set(this.seeTemp, 'workflowNote', '')
  6054. } else {
  6055. this.examineTemp = Object.assign({}, row)
  6056. this.$set(this.examineTemp, 'workflowNote', '')
  6057. this.$set(this.examineTemp, 'statue', 1)
  6058. }
  6059. this.dialogStatus = 'examine5'
  6060. this.dialogFormVisible_Examine = true
  6061. this.statueReason = false
  6062. },
  6063. createExamineData5() {
  6064. console.log('点击了采购审核')
  6065. this.isokDisable = true
  6066. setTimeout(() => {
  6067. this.isokDisable = false
  6068. }, 10000)
  6069. this.$refs['examineTemp'].validate((valid) => {
  6070. if (valid) {
  6071. this.requestParam = {}
  6072. this.requestParam.parammaps = {}
  6073. this.requestParam.common = { returnmap: '0' }
  6074. this.requestParam.data = []
  6075. if (this.examineTemp.purchase_type == 1) {
  6076. if (this.examineTemp.statue == 1) {
  6077. this.requestParam.data[0] = {
  6078. name: 'partpurchaseCharge1V2',
  6079. type: 'e',
  6080. parammaps: {
  6081. id: this.examineTemp.id,
  6082. statue: 7,
  6083. empId: Cookies.get('employeid'),
  6084. workflowNote: this.examineTemp.workflowNote
  6085. }
  6086. }
  6087. } else if (this.examineTemp.statue == 2) {
  6088. this.requestParam.data[0] = {
  6089. name: 'partpurchaseCharge1V2',
  6090. type: 'e',
  6091. parammaps: {
  6092. id: this.examineTemp.id,
  6093. statue: 8,
  6094. empId: Cookies.get('employeid'),
  6095. workflowNote: this.examineTemp.workflowNote
  6096. }
  6097. }
  6098. }
  6099. } else {
  6100. if (this.examineTemp.statue == 1) {
  6101. this.requestParam.data[0] = {
  6102. name: 'partpurchaseCharge1',
  6103. type: 'e',
  6104. parammaps: {
  6105. id: this.examineTemp.id,
  6106. statue: 7,
  6107. empId: Cookies.get('employeid'),
  6108. workflowNote: this.examineTemp.workflowNote
  6109. }
  6110. }
  6111. this.requestParam.data[1] = {
  6112. name: 'createBuydetailBySG',
  6113. type: 'e',
  6114. parammaps: {
  6115. id: this.examineTemp.id,
  6116. pastureId: this.examineTemp.pastureId
  6117. }
  6118. }
  6119. } else if (this.examineTemp.statue == 2) {
  6120. this.requestParam.data[0] = {
  6121. name: 'partpurchaseCharge1',
  6122. type: 'e',
  6123. parammaps: {
  6124. id: this.examineTemp.id,
  6125. statue: 8,
  6126. empId: Cookies.get('employeid'),
  6127. workflowNote: this.examineTemp.workflowNote
  6128. }
  6129. }
  6130. }
  6131. }
  6132. ExecDataByConfig(this.requestParam).then((response) => {
  6133. this.isokDisable = false
  6134. if (response.msg !== 'fail') {
  6135. this.get_table_data()
  6136. this.dialogFormVisible_Examine = false
  6137. this.dialogFormVisible_See = false
  6138. this.statueReason = false
  6139. this.$notify({
  6140. title: '成功',
  6141. message: '审核成功',
  6142. type: 'success',
  6143. duration: 2000
  6144. })
  6145. } else {
  6146. failproccess(response, this.$notify)
  6147. }
  6148. })
  6149. }
  6150. })
  6151. },
  6152. handleExamine6(row) {
  6153. console.log('点击了财务审核')
  6154. if (row == undefined) {
  6155. this.examineTemp = this.seeTemp
  6156. this.$set(this.seeTemp, 'statue', 1)
  6157. this.$set(this.seeTemp, 'workflowNote', '')
  6158. } else {
  6159. this.examineTemp = Object.assign({}, row)
  6160. this.$set(this.examineTemp, 'workflowNote', '')
  6161. this.$set(this.examineTemp, 'statue', 1)
  6162. }
  6163. this.dialogStatus = 'examine6'
  6164. this.dialogFormVisible_Examine = true
  6165. this.statueReason = false
  6166. },
  6167. createExamineData6() {
  6168. console.log('点击了财务审核')
  6169. this.isokDisable = true
  6170. setTimeout(() => {
  6171. this.isokDisable = false
  6172. }, 10000)
  6173. this.$refs['examineTemp'].validate((valid) => {
  6174. if (valid) {
  6175. this.requestParam = {}
  6176. this.requestParam.name = 'partpurchaseFinanceId1'
  6177. this.requestParam.parammaps = {}
  6178. this.requestParam.parammaps.id = this.examineTemp.id
  6179. if (this.examineTemp.statue == 1) {
  6180. this.requestParam.parammaps.statue = 13
  6181. } else if (this.examineTemp.statue == 2) {
  6182. this.requestParam.parammaps.statue = 14
  6183. }
  6184. this.requestParam.parammaps.financeId = Cookies.get('employeid')
  6185. this.requestParam.parammaps.workflowNote =
  6186. this.examineTemp.workflowNote
  6187. PostDataByName(this.requestParam).then((response) => {
  6188. console.log('审核确认发送参数', this.requestParam)
  6189. this.isokDisable = false
  6190. if (response.msg !== 'fail') {
  6191. this.get_table_data()
  6192. this.dialogFormVisible_Examine = false
  6193. this.dialogFormVisible_See = false
  6194. this.statueReason = false
  6195. this.$notify({
  6196. title: '成功',
  6197. message: '审核成功',
  6198. type: 'success',
  6199. duration: 2000
  6200. })
  6201. } else {
  6202. failproccess(response, this.$notify)
  6203. }
  6204. })
  6205. }
  6206. })
  6207. },
  6208. handleExamine7(row) {
  6209. console.log('点击了奶厅职能中心审核')
  6210. if (row == undefined) {
  6211. this.examineTemp = this.seeTemp
  6212. this.$set(this.seeTemp, 'statue', 1)
  6213. this.$set(this.seeTemp, 'workflowNote', '')
  6214. } else {
  6215. this.examineTemp = Object.assign({}, row)
  6216. this.$set(this.examineTemp, 'workflowNote', '')
  6217. this.$set(this.examineTemp, 'statue', 1)
  6218. }
  6219. this.dialogStatus = 'examine7'
  6220. this.dialogFormVisible_Examine = true
  6221. this.statueReason = false
  6222. },
  6223. createExamineData7() {
  6224. console.log('点击了奶厅职能中心审核')
  6225. this.isokDisable = true
  6226. setTimeout(() => {
  6227. this.isokDisable = false
  6228. }, 10000)
  6229. this.$refs['examineTemp'].validate((valid) => {
  6230. if (valid) {
  6231. this.requestParam = {}
  6232. this.requestParam.name = 'partpurchasePosition'
  6233. this.requestParam.parammaps = {}
  6234. this.requestParam.parammaps.id = this.examineTemp.id
  6235. if (this.examineTemp.statue == 1) {
  6236. this.requestParam.parammaps.statue = 15
  6237. } else if (this.examineTemp.statue == 2) {
  6238. this.requestParam.parammaps.statue = 16
  6239. }
  6240. this.requestParam.parammaps.empId = Cookies.get('employeid')
  6241. this.requestParam.parammaps.workflowNote =
  6242. this.examineTemp.workflowNote
  6243. PostDataByName(this.requestParam).then((response) => {
  6244. console.log('审核确认发送参数', this.requestParam)
  6245. this.isokDisable = false
  6246. if (response.msg !== 'fail') {
  6247. this.get_table_data()
  6248. this.dialogFormVisible_Examine = false
  6249. this.dialogFormVisible_See = false
  6250. this.statueReason = false
  6251. this.$notify({
  6252. title: '成功',
  6253. message: '审核成功',
  6254. type: 'success',
  6255. duration: 2000
  6256. })
  6257. } else {
  6258. failproccess(response, this.$notify)
  6259. }
  6260. })
  6261. }
  6262. })
  6263. },
  6264. handle_specialSubscription() {
  6265. this.getdataListSee.parammaps.id = ''
  6266. this.resetCreateTemp()
  6267. this.listAdd = []
  6268. this.createTemp.purchaseType = '1'
  6269. this.edit = 1
  6270. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  6271. this.getCreateDepartDownList()
  6272. this.dialogStatus = 'special'
  6273. this.createTemp.purchaseType = '3'
  6274. this.dialogFormVisible2 = true
  6275. this.$nextTick(() => {
  6276. this.$refs['createTemp'].clearValidate()
  6277. })
  6278. if (this.createTemp.purchaseType == 1) {
  6279. this.getBigPartpurchase(parseInt(this.createTemp.purchaseType))
  6280. } else {
  6281. this.getCreateNumber()
  6282. }
  6283. },
  6284. getProviderList() {
  6285. const data = {
  6286. name: 'getProviderList',
  6287. page: 1,
  6288. offset: 1,
  6289. pagecount: 0,
  6290. returntype: 'Map',
  6291. parammaps: { providerName: '' }
  6292. }
  6293. GetDataByName(data).then((response) => {
  6294. if (response.data.list !== null) {
  6295. this.providerList = response.data.list
  6296. } else {
  6297. this.providerList = []
  6298. }
  6299. })
  6300. },
  6301. changeType() {
  6302. if (this.createTemp.purchaseType == 1) {
  6303. // setTimeout(()=>{
  6304. this.getBigPartpurchase(parseInt(this.createTemp.purchaseType))
  6305. // },30000)
  6306. } else {
  6307. this.createTemp.orderNumber = ''
  6308. this.getCreateNumber()
  6309. }
  6310. this.listAdd = []
  6311. this.$set(this.createTemp, 'providerId', '')
  6312. this.$set(this.createTemp, 'providerName', '')
  6313. },
  6314. special_dialog_save() {
  6315. console.log('特殊申购保存')
  6316. this.isokDisable = true
  6317. setTimeout(() => {
  6318. this.isokDisable = false
  6319. }, 1000)
  6320. this.$refs['createTemp'].validate((valid) => {
  6321. if (valid) {
  6322. console.log(this.listAdd)
  6323. if (
  6324. this.createTemp.orderNumber == '' ||
  6325. this.createTemp.orderNumber == null ||
  6326. this.createTemp.orderNumber == undefined
  6327. ) {
  6328. GetDataByName(this.getParmCreateNumber).then((response) => {
  6329. this.$nextTick(() => {
  6330. console.log('新增申购单号', response.data.list[0].orderCode)
  6331. this.createTemp.orderNumber = response.data.list[0].orderCode
  6332. this.$forceUpdate()
  6333. this.special_dialog_saveSave()
  6334. })
  6335. })
  6336. } else {
  6337. this.special_dialog_saveSave()
  6338. }
  6339. }
  6340. })
  6341. },
  6342. special_dialog_saveSave() {
  6343. if (this.listAdd.length !== 0) {
  6344. for (var j = 0; j < this.listAdd.length; j++) {
  6345. console.log(this.listAdd[j].amount)
  6346. if (this.listAdd[j].amount == null || this.listAdd[j].amount === '') {
  6347. this.$message({
  6348. type: 'warning',
  6349. message: '请检查申购数量是否未填写',
  6350. duration: 2000
  6351. })
  6352. return false
  6353. } else {
  6354. var rulesAmount = /^[1-9]\d*$/
  6355. if (!rulesAmount.test(this.listAdd[j].amount)) {
  6356. this.$message({
  6357. type: 'error',
  6358. message: '申购数量请输入正整数',
  6359. duration: 2000
  6360. })
  6361. return false
  6362. }
  6363. }
  6364. if (this.createTemp.purchaseType == '2') {
  6365. if (this.listAdd[j].price == '') {
  6366. this.$message({
  6367. type: 'warning',
  6368. message: '请检查单价是否为空',
  6369. duration: 2000
  6370. })
  6371. return false
  6372. } else {
  6373. if (parseFloat(this.listAdd[j].price) == 0) {
  6374. this.$message({
  6375. type: 'warning',
  6376. message: '价格请输入正数,最多保留小数点后五位',
  6377. duration: 2000
  6378. })
  6379. return false
  6380. } else {
  6381. if (
  6382. this.listAdd[j].contractId == '' ||
  6383. this.listAdd[j].contractId == undefined ||
  6384. parseFloat(this.listAdd[j].contractId) == 0 ||
  6385. parseFloat(this.listAdd[j].contractId) < 0
  6386. ) {
  6387. // var rulesPrice = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/
  6388. var rulesPrice = /(^[1-9](\d+)?(\.\d{1,5})?$)|(^\d\.\d{1,5}$)/
  6389. if (rulesPrice.test(this.listAdd[j].price) == false) {
  6390. this.$message({
  6391. type: 'error',
  6392. message: '价格请输入正数,最多保留小数点后五位',
  6393. duration: 2000
  6394. })
  6395. return false
  6396. }
  6397. }
  6398. }
  6399. }
  6400. }
  6401. }
  6402. if (
  6403. this.createTemp.purchaseType == '1' ||
  6404. this.createTemp.purchaseType == '3'
  6405. ) {
  6406. if (this.createTemp.providerId == '') {
  6407. this.$message({
  6408. type: 'error',
  6409. message: '请选择供应商',
  6410. duration: 2000
  6411. })
  6412. return false
  6413. }
  6414. } else {
  6415. // if(this.createTemp.providerId == ''){
  6416. // this.$message({ type: 'error', message: '请选择供应商', duration: 2000 })
  6417. // return false
  6418. // }
  6419. if (this.createTemp.funderId == '') {
  6420. this.$message({
  6421. type: 'error',
  6422. message: '请选择垫付人',
  6423. duration: 2000
  6424. })
  6425. return false
  6426. }
  6427. }
  6428. if (this.createTemp.purchaseType == 1) {
  6429. if (this.createTemp.markBackend) {
  6430. console.log('有数据-走新保存', this.listAdd)
  6431. const url = 'authdata/partpurchase/edit'
  6432. this.providerNames = this.providerList.find(
  6433. (obj) => obj.id == this.createTemp.providerId
  6434. ).providerName
  6435. const dataArr = []
  6436. console.log(this.listAdd, 'hss===3//')
  6437. for (let i = 0; i < this.listAdd.length; i++) {
  6438. // 价格判断
  6439. if (parseFloat(this.listAdd[i].price) == 0 || this.listAdd[i].price == '') {
  6440. this.$message({
  6441. type: 'warning',
  6442. message: '价格请输入正数,最多保留小数点后五位',
  6443. duration: 2000
  6444. })
  6445. return false
  6446. }
  6447. if (this.listAdd[i].myId !== undefined) {
  6448. this.listAdd[i].id = 0
  6449. }
  6450. const obj = {
  6451. id: parseFloat(this.listAdd[i].id),
  6452. contractId: this.listAdd[i].contractId.toString(),
  6453. providerName: this.providerNames,
  6454. providerId: this.createTemp.providerId,
  6455. bigId: parseFloat(this.createTemp.bigId),
  6456. pastureId: parseFloat(this.listAdd[i].pastureId),
  6457. partId: parseFloat(this.listAdd[i].partId),
  6458. partCode: this.listAdd[i].partCode.toString(),
  6459. partName: this.listAdd[i].partName.toString(),
  6460. specification: this.listAdd[i].specification,
  6461. amount: parseFloat(this.listAdd[i].amount),
  6462. unit: this.listAdd[i].unit.toString(),
  6463. brandId: parseFloat(this.listAdd[i].brandId),
  6464. purpose: this.listAdd[i].purpose.toString(),
  6465. price: this.listAdd[i].price.toString(),
  6466. lifeCycle: this.listAdd[i].lifeCycle.toString(),
  6467. contractVarianceItem:
  6468. this.listAdd[i].contractVarianceItem.toString(),
  6469. departmentId: this.createTemp.departmentId.toString(),
  6470. date: parseTime(
  6471. this.createTemp.createTime,
  6472. '{y}-{m}-{d} {h}:{i}:{s}'
  6473. ).toString(),
  6474. employeId: parseFloat(this.createTemp.employeId)
  6475. }
  6476. // if (this.listAdd[i].contractId) {
  6477. // this.$set(
  6478. // this.listAdd[i],
  6479. // 'contractId',
  6480. // this.listAdd[i].contractId.toString()
  6481. // )
  6482. // } else {
  6483. // this.$set(this.listAdd[i], 'contractId', '')
  6484. // }
  6485. if (this.listAdd[i].storageAmount) {
  6486. obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
  6487. } else {
  6488. obj.storageAmount = 0
  6489. }
  6490. if (this.listAdd[i].reject) {
  6491. obj.reject = this.listAdd[i].reject.toString()
  6492. } else {
  6493. obj.reject = ''
  6494. }
  6495. if (this.listAdd[i].explain) {
  6496. obj.explain = this.listAdd[i].explain.toString()
  6497. } else {
  6498. obj.explain = ''
  6499. }
  6500. dataArr.push(obj)
  6501. }
  6502. const data = dataArr
  6503. console.log(data, 'hss===2//')
  6504. postJson(url, data).then((response) => {
  6505. if (response.msg !== 'fail') {
  6506. this.get_table_data()
  6507. this.dialogFormVisible2 = false
  6508. this.$notify({
  6509. title: '成功',
  6510. message: '保存成功',
  6511. type: 'success',
  6512. duration: 2000
  6513. })
  6514. } else {
  6515. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  6516. }
  6517. })
  6518. } else {
  6519. console.log('无数据-走原有保存')
  6520. this.special_saveSave()
  6521. }
  6522. } else {
  6523. console.log('赠品-走原有保存')
  6524. this.special_saveSave()
  6525. }
  6526. } else {
  6527. this.$message({
  6528. title: '',
  6529. message: '请选择备件',
  6530. type: 'warning',
  6531. duration: 2000
  6532. })
  6533. return false
  6534. }
  6535. },
  6536. special_saveSave() {
  6537. const url = 'authdata/spare/parts/requisitions'
  6538. for (let i = 0; i < this.listAdd.length; i++) {
  6539. this.$set(
  6540. this.listAdd[i],
  6541. 'contractId',
  6542. String(this.listAdd[i].contractId)
  6543. )
  6544. this.$set(
  6545. this.listAdd[i],
  6546. 'departmentId',
  6547. String(this.createTemp.departmentId)
  6548. )
  6549. this.$set(
  6550. this.listAdd[i],
  6551. 'date',
  6552. parseTime(this.createTemp.createTime, '{y}-{m}-{d} {h}:{i}:{s}')
  6553. )
  6554. this.$set(
  6555. this.listAdd[i],
  6556. 'employeId',
  6557. String(this.createTemp.employeId)
  6558. )
  6559. }
  6560. const data = {
  6561. pastureId: parseInt(this.createTemp.pastureId),
  6562. departmentId: parseInt(this.createTemp.departmentId),
  6563. departmentName: this.createTemp.departmentName,
  6564. orderNumber: this.createTemp.orderNumber,
  6565. createTime: parseTime(
  6566. this.createTemp.createTime,
  6567. '{y}-{m}-{d} {h}:{i}:{s}'
  6568. ),
  6569. employeId: this.createTemp.employeId,
  6570. providerName: this.createTemp.providerName,
  6571. purchaseType: parseInt(this.createTemp.purchaseType),
  6572. spot_list: this.listAdd
  6573. }
  6574. if (
  6575. this.createTemp.purchaseType == '1' ||
  6576. this.createTemp.purchaseType == '3'
  6577. ) {
  6578. data.providerId = this.createTemp.providerId
  6579. data.providerName = this.providerList.find(
  6580. (obj) => obj.id == this.createTemp.providerId
  6581. ).providerName
  6582. }
  6583. if (this.createTemp.funderId) {
  6584. data.funderId = this.createTemp.funderId
  6585. }
  6586. postJson(url, data).then((response) => {
  6587. if (response.msg !== 'fail') {
  6588. this.get_table_data()
  6589. this.dialogFormVisible2 = false
  6590. this.$notify({
  6591. title: '成功',
  6592. message: '保存成功',
  6593. type: 'success',
  6594. duration: 2000
  6595. })
  6596. } else {
  6597. failproccess(response, this.$notify)
  6598. }
  6599. })
  6600. return true
  6601. },
  6602. // 合单
  6603. form_edit1(row) {
  6604. this.modifyTemp = Object.assign({}, row) // copy obj
  6605. this.dialogStatus = 'update'
  6606. this.dialogFormVisible_modify = true
  6607. this.modifylist = []
  6608. this.getdataListSee.parammaps.id = row.id
  6609. this.getSeeList()
  6610. },
  6611. partReject(row) {
  6612. // 驳回
  6613. this.$prompt('请输入驳回原因:', '驳回', {
  6614. confirmButtonText: '确定',
  6615. cancelButtonText: '取消',
  6616. inputValidator: (value) => {
  6617. if (
  6618. value === 'null' ||
  6619. value === null ||
  6620. value === 'undefined' ||
  6621. value === undefined ||
  6622. value === ''
  6623. ) {
  6624. return false
  6625. }
  6626. },
  6627. // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
  6628. inputErrorMessage: '请输入驳回原因'
  6629. })
  6630. .then(({ value }) => {
  6631. const data = {
  6632. name: 'editPartpurchaseReject',
  6633. parammaps: {
  6634. reject: 1,
  6635. explain: value,
  6636. id: row.id
  6637. }
  6638. }
  6639. PostDataByName(data).then((response) => {
  6640. console.log('审核确认发送参数', this.requestParam)
  6641. this.isokDisable = false
  6642. if (response.msg !== 'fail') {
  6643. this.get_table_data()
  6644. this.$notify({
  6645. title: '成功',
  6646. message: '驳回成功',
  6647. type: 'success',
  6648. duration: 2000
  6649. })
  6650. this.getdataListSee.parammaps.id = this.modifyTemp.id
  6651. this.getSeeList()
  6652. } else {
  6653. failproccess(response, this.$notify)
  6654. }
  6655. })
  6656. })
  6657. .catch(() => {
  6658. this.$message({
  6659. type: 'info',
  6660. message: '取消输入'
  6661. })
  6662. })
  6663. },
  6664. form_modify() {
  6665. // 提交
  6666. console.log('点击了库管审核')
  6667. this.isokDisable = true
  6668. setTimeout(() => {
  6669. this.isokDisable = false
  6670. }, 1000)
  6671. this.requestParam = {}
  6672. this.requestParam.name = 'partpurchaseCharge'
  6673. this.requestParam.parammaps = {}
  6674. this.requestParam.parammaps.id = this.modifyTemp.id
  6675. this.requestParam.parammaps.statue = 3
  6676. this.requestParam.parammaps.empId = Cookies.get('employeid')
  6677. PostDataByName(this.requestParam).then((response) => {
  6678. console.log('提交确认发送参数', this.requestParam)
  6679. this.isokDisable = false
  6680. if (response.msg !== 'fail') {
  6681. this.get_table_data()
  6682. this.dialogFormVisible_modify = false
  6683. this.$notify({
  6684. title: '成功',
  6685. message: '成功',
  6686. type: 'success',
  6687. duration: 2000
  6688. })
  6689. } else {
  6690. failproccess(response, this.$notify)
  6691. }
  6692. })
  6693. },
  6694. form_modify1(row) {
  6695. // 提交
  6696. this.$confirm('确认提交吗?', '', {
  6697. confirmButtonText: '确定',
  6698. cancelButtonText: '取消',
  6699. type: 'warning'
  6700. })
  6701. .then(() => {
  6702. console.log('点击了库管审核')
  6703. this.isokDisable = true
  6704. setTimeout(() => {
  6705. this.isokDisable = false
  6706. }, 1000)
  6707. this.requestParam = {}
  6708. this.requestParam.name = 'partpurchaseCharge'
  6709. this.requestParam.parammaps = {}
  6710. this.requestParam.parammaps.id = row.id
  6711. this.requestParam.parammaps.statue = 3
  6712. this.requestParam.parammaps.empId = Cookies.get('employeid')
  6713. PostDataByName(this.requestParam).then((response) => {
  6714. console.log('提交确认发送参数', this.requestParam)
  6715. this.isokDisable = false
  6716. if (response.msg !== 'fail') {
  6717. this.get_table_data()
  6718. this.dialogFormVisible_modify = false
  6719. this.$notify({
  6720. title: '成功',
  6721. message: '成功',
  6722. type: 'success',
  6723. duration: 2000
  6724. })
  6725. } else {
  6726. failproccess(response, this.$notify)
  6727. }
  6728. })
  6729. })
  6730. .catch(() => {
  6731. this.$message({
  6732. type: 'info',
  6733. message: '已取消'
  6734. })
  6735. })
  6736. },
  6737. handle_milkSubscription() {
  6738. // 奶厅申购
  6739. this.textMap.create = '奶厅申购'
  6740. this.dialogStatus = 'create'
  6741. this.isMilk = true
  6742. this.seepart.getdataListParm.parammaps.partName = ''
  6743. this.resetCreateTemp()
  6744. this.edit = 1
  6745. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  6746. this.getCreateDepartDownList()
  6747. this.dialogStatus = 'create'
  6748. this.dialogFormVisible = true
  6749. this.dialogFormVisible_seepart = false
  6750. this.getCreateNumber()
  6751. this.createTemp.markBackend = false
  6752. this.$nextTick(() => {
  6753. this.$refs['createTemp'].clearValidate()
  6754. })
  6755. },
  6756. getRowClass({ row, index }) {
  6757. // 根据数据的不同返回不同的类名
  6758. if (row.explain1 !== undefined && row.explain1 !== '') {
  6759. console.log(row, 'row77')
  6760. return 'warning-aa'
  6761. } else {
  6762. console.log(row, 'row66')
  6763. return ''
  6764. }
  6765. }
  6766. }
  6767. }
  6768. </script>
  6769. <style lang="scss" scoped>
  6770. .pagination-container {
  6771. display: block !important;
  6772. }
  6773. /deep/ .el-badge__content.is-fixed {
  6774. z-index: 1;
  6775. }
  6776. </style>
  6777. <style lang="scss">
  6778. .el-step__head.is-success {
  6779. color: #409eff;
  6780. border-color: #409eff;
  6781. }
  6782. .el-step__title.is-success {
  6783. color: #409eff;
  6784. }
  6785. .el-step__head.is-process {
  6786. color: #409eff;
  6787. border-color: #409eff;
  6788. .el-step__icon.is-text {
  6789. background: #409eff;
  6790. color: #fff;
  6791. }
  6792. }
  6793. .step-row {
  6794. color: #000;
  6795. }
  6796. </style>
  6797. <style>
  6798. .el-table .warning-aa {
  6799. background: #ffd386;
  6800. }
  6801. </style>