index.vue 227 KB

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