index.vue 200 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="业务编号" prop="fBillno">
  11. <el-input
  12. v-model="queryParams.fBillno"
  13. placeholder="请输入业务编号"
  14. style="width:200px"
  15. clearable
  16. size="small"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="制单人" prop="createBy">
  21. <el-select
  22. v-model="queryParams.createBy"
  23. filterable
  24. remote
  25. clearable
  26. style="width:200px"
  27. :remote-method="userRemoteMethod"
  28. placeholder="请选择制单人"
  29. >
  30. <el-option
  31. v-for="(dict, index) in userOptions"
  32. :key="index.userName"
  33. :label="dict.nickName"
  34. :value="dict.userName"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="贸易方式" prop="fTrademodeid">
  39. <el-select
  40. v-model="queryParams.fTrademodeid"
  41. placeholder="请选择贸易方式"
  42. clearable
  43. style="width:200px"
  44. @keyup.enter.native="handleQuery"
  45. >
  46. <el-option
  47. v-for="(dict, index) in fTrademodeidOptions"
  48. :key="index.dictValue"
  49. :label="dict.dictLabel"
  50. :value="dict.dictValue"
  51. />
  52. </el-select>
  53. </el-form-item>
  54. <el-form-item label="货权方" prop="fCorpid">
  55. <el-select
  56. v-model="queryParams.fCorpid"
  57. filterable
  58. remote
  59. clearable
  60. style="width:200px"
  61. @keyup.enter.native="handleQuery"
  62. :remote-method="corpsRemoteMethod"
  63. placeholder="请选择货权方"
  64. >
  65. <el-option
  66. v-for="(dict, index) in fMblnoOptions"
  67. :key="index.fId"
  68. :label="dict.fName"
  69. :value="dict.fId"
  70. ></el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item label="提单号" prop="fMblno">
  74. <el-input
  75. v-model="queryParams.fMblno"
  76. placeholder="请输入提单号"
  77. clearable
  78. style="width:200px"
  79. size="small"
  80. @keyup.enter.native="handleQuery"
  81. />
  82. </el-form-item>
  83. <el-form-item label="经营单位" prop="fSbu">
  84. <el-select
  85. v-model="queryParams.fSbu"
  86. filterable
  87. remote
  88. clearable
  89. :remote-method="fSbuRemoteMethod"
  90. @keyup.enter.native="handleQuery"
  91. style="width:200px"
  92. placeholder="请选择经营单位"
  93. >
  94. <el-option
  95. v-for="(dict, index) in fSbuOptions"
  96. :key="index.fId"
  97. :label="dict.fName"
  98. :value="dict.fId"
  99. ></el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item label="货物名称" prop="fGoodsid">
  103. <el-select
  104. v-model="queryParams.fGoodsid"
  105. filterable
  106. remote
  107. clearable
  108. style="width:200px"
  109. :remote-method="goodsRemoteMethod"
  110. @keyup.enter.native="handleQuery"
  111. placeholder="请选择货物名称"
  112. >
  113. <el-option
  114. v-for="(dict, index) in goodsOptions"
  115. :key="index.fId"
  116. :label="dict.fName"
  117. :value="dict.fId"
  118. ></el-option>
  119. </el-select>
  120. </el-form-item>
  121. <el-form-item label="仓库" prop="fWarehouseid">
  122. <el-select
  123. v-model="queryParams.fWarehouseid"
  124. filterable
  125. remote
  126. @select="treeseLect"
  127. :disabled="browseStatus || formBrowseStatus"
  128. style="width:200px"
  129. @keyup.enter.native="handleQuery"
  130. placeholder="请选择"
  131. >
  132. <el-option
  133. v-for="(dict, index) in warehouseOptions"
  134. :key="index.fId"
  135. :label="dict.fName"
  136. :value="dict.fId"
  137. ></el-option>
  138. </el-select>
  139. </el-form-item>
  140. <el-form-item label="品牌" prop="fMarks">
  141. <el-input
  142. v-model="queryParams.fMarks"
  143. placeholder="请输入品牌"
  144. clearable
  145. size="small"
  146. style="width:200px"
  147. @keyup.enter.native="handleQuery"
  148. />
  149. </el-form-item>
  150. <el-form-item label="费用状态" prop="fBillstatus">
  151. <el-select
  152. style="width:200px"
  153. v-model="queryParams.fBillstatus"
  154. placeholder="请输入费用状态"
  155. >
  156. <el-option label="录入" value="1"></el-option>
  157. <el-option label="暂存" value="2"></el-option>
  158. <el-option label="驳回" value="3"></el-option>
  159. <el-option label="请核" value="4"></el-option>
  160. <el-option label="审核中" value="5"></el-option>
  161. <el-option label="全部入账" value="6"></el-option>
  162. </el-select>
  163. </el-form-item>
  164. <el-form-item label="调拨状态" prop="fItemsStatus">
  165. <el-select
  166. style="width:200px"
  167. v-model="queryParams.fItemsStatus"
  168. placeholder="请输出库状态"
  169. >
  170. <el-option label="计划" value="1"/>
  171. <el-option label="待调拨" value="2"/>
  172. <el-option label="调拨中" value="3"/>
  173. <el-option label="已调拨" value="4"/>
  174. </el-select>
  175. </el-form-item>
  176. <el-form-item label="调拨日期" prop="timeInterval">
  177. <el-date-picker
  178. v-model="queryParams.timeInterval"
  179. type="daterange"
  180. value-format="yyyy-MM-dd"
  181. clearable
  182. style="width: 240px"
  183. range-separator="至"
  184. start-placeholder="开始日期"
  185. end-placeholder="结束日期"
  186. @keyup.enter.native="handleQuery"
  187. >
  188. </el-date-picker>
  189. </el-form-item>
  190. <el-form-item>
  191. <el-button
  192. type="cyan"
  193. icon="el-icon-search"
  194. size="mini"
  195. @click="handleQuery"
  196. >搜索
  197. </el-button>
  198. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  199. >重置
  200. </el-button>
  201. </el-form-item>
  202. </el-form>
  203. <el-row :gutter="10" class="mb8">
  204. <el-col :span="1.5">
  205. <el-button
  206. type="primary"
  207. icon="el-icon-plus"
  208. size="mini"
  209. @click="handleAdd(false)"
  210. v-hasPermi="['warehouseBusiness:stockTransfer:add']"
  211. >新增
  212. </el-button>
  213. </el-col>
  214. <el-col :span="1.5">
  215. <el-button
  216. type="success"
  217. icon="el-icon-edit"
  218. size="mini"
  219. :disabled="single"
  220. @click="handleUpdate"
  221. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  222. >修改
  223. </el-button>
  224. </el-col>
  225. <el-col :span="1.5">
  226. <el-button
  227. type="warning"
  228. icon="el-icon-download"
  229. size="mini"
  230. @click="handleExport"
  231. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  232. >导出
  233. </el-button>
  234. </el-col>
  235. <el-col :span="1.5">
  236. <el-button
  237. type="warning"
  238. icon="el-icon-download"
  239. size="mini"
  240. @click="handleExport"
  241. :disabled="multiple"
  242. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  243. >导入
  244. </el-button>
  245. </el-col>
  246. <div class="tabSetting">
  247. <right-toolbar
  248. :showSearch.sync="showSearch"
  249. @queryTable="getList"
  250. ></right-toolbar>
  251. <div style="margin: 0 12px">
  252. <el-button
  253. icon="el-icon-setting"
  254. size="mini"
  255. circle
  256. @click="showSetting = !showSetting"
  257. ></el-button>
  258. </div>
  259. </div>
  260. </el-row>
  261. <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
  262. <template slot="title">
  263. <div class="avue-crud__dialog__header">
  264. <span class="el-dialog__title">
  265. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  266. </span>
  267. </div>
  268. </template>
  269. <div>配置排序列数据(拖动调整顺序)</div>
  270. <div style="margin-left: 17px">
  271. <el-checkbox
  272. v-model="allCheck"
  273. label="全选"
  274. @change="allChecked"
  275. ></el-checkbox>
  276. </div>
  277. <div style="padding: 4px; display: flex; justify-content: center">
  278. <draggable
  279. v-model="setRowList"
  280. group="site"
  281. animation="300"
  282. @start="onStart"
  283. @end="onEnd"
  284. handle=".indraggable"
  285. >
  286. <transition-group>
  287. <div
  288. v-for="item in setRowList"
  289. :key="item.surface"
  290. class="listStyle"
  291. >
  292. <div style="width: 500px" class="indraggable">
  293. <div class="progress" :style="{ width: item.width + 'px' }">
  294. <el-checkbox
  295. :label="item.name"
  296. v-model="item.checked"
  297. :true-label="0"
  298. :false-label="1"
  299. >{{ item.name }}
  300. </el-checkbox>
  301. </div>
  302. </div>
  303. <el-input-number
  304. v-model.number="item.width"
  305. controls-position="right"
  306. :min="1"
  307. :max="500"
  308. size="mini"
  309. ></el-input-number>
  310. </div>
  311. </transition-group>
  312. </draggable>
  313. </div>
  314. <span slot="footer" class="dialog-footer">
  315. <el-button @click="showSetting = false">取 消</el-button>
  316. <el-button type="primary" @click="save()">确 定</el-button>
  317. </span>
  318. </el-dialog>
  319. <el-table
  320. v-loading="loading"
  321. :data="warehousebillsList"
  322. show-summary :summary-method="getSum"
  323. @selection-change="handleSelectionChange"
  324. >
  325. <el-table-column type="selection" width="60" fixed align="center" />
  326. <el-table-column type="index" label="行号" fixed align="center" />
  327. <el-table-column
  328. v-for="(item, index) in getRowList"
  329. :key="index"
  330. :label="item.name"
  331. :width="item.width"
  332. :prop="item.label"
  333. align="center"
  334. />
  335. <!-- <el-table-column label="制单人" align="center" prop="createBy" fixed/>-->
  336. <!-- <el-table-column label="仓管员" width="100" align="center" sortable prop="fStorekeeper" fixed/>-->
  337. <!-- <el-table-column width="100" fixed sortable label="调拨状态" align="center" prop="fItemsStatus">-->
  338. <!-- <template slot-scope="scope">-->
  339. <!-- <span v-if="scope.row.fItemsStatus === 1">计划</span>-->
  340. <!-- <span v-if="scope.row.fItemsStatus === 2">待调拨</span>-->
  341. <!-- <span v-if="scope.row.fItemsStatus === 3">调拨中</span>-->
  342. <!-- <span v-if="scope.row.fItemsStatus === 4">已调拨</span>-->
  343. <!-- </template>-->
  344. <!-- </el-table-column>-->
  345. <!-- <el-table-column width="220" label="货权方" fixed sortable align="center" prop="fCorpid"/>-->
  346. <!-- <el-table-column label="提单号" sortable fixed width="216" align="center" prop="fMblno" show-overflow-tooltip/>-->
  347. <!-- <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />-->
  348. <!-- <el-table-column label="品牌" fixed align="center" prop="fMarks" />-->
  349. <!-- <el-table-column label="调拨日期" align="center" fixed sortable prop="createTime" width="100">-->
  350. <!-- <template slot-scope="scope">-->
  351. <!-- <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>-->
  352. <!-- </template>-->
  353. <!-- </el-table-column>-->
  354. <!-- <el-table-column label="调入仓库" sortable fixed align="center" prop="fWarehouseid" width="100"/>-->
  355. <!-- <el-table-column label="调出仓库" sortable fixed align="center" prop="fInwarehouseid" width="100"/>-->
  356. <!-- <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>-->
  357. <!-- <el-table-column label="调拨件数" align="center" prop="fQty" />-->
  358. <!-- <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>-->
  359. <!-- <el-table-column label="调拨净重(kg)" align="center" prop="fNetweight" width="100"/>-->
  360. <!-- <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>-->
  361. <!-- <el-table-column width="100" label="费用状态" align="center" prop="fBillstatus">-->
  362. <!-- <template slot-scope="scope">-->
  363. <!-- <span v-if="scope.row.fBillstatus === 1">录入</span>-->
  364. <!-- <span v-if="scope.row.fBillstatus === 2">暂存</span>-->
  365. <!-- <span v-if="scope.row.fBillstatus === 3">驳回</span>-->
  366. <!-- <span v-if="scope.row.fBillstatus === 4">请核</span>-->
  367. <!-- <span v-if="scope.row.fBillstatus === 5">审核中</span>-->
  368. <!-- <span v-if="scope.row.fBillstatus === 6">全部入账</span>-->
  369. <!-- </template>-->
  370. <!-- </el-table-column>-->
  371. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="180">
  372. <template slot-scope="scope">
  373. <el-button
  374. size="mini"
  375. type="text"
  376. icon="el-icon-edit"
  377. @click="check_s(scope.row, true)"
  378. v-hasPermi="['warehouseBusiness:stockTransfer:query']"
  379. >查看
  380. </el-button>
  381. <el-button
  382. size="mini"
  383. type="text"
  384. icon="el-icon-edit"
  385. v-if="scope.row.fBillstatus == '请核' || scope.row.fBillstatus == '审核中' "
  386. @click="check(scope.row, true)"
  387. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  388. >审批进度
  389. </el-button>
  390. <el-button
  391. size="mini"
  392. type="text"
  393. icon="el-icon-edit"
  394. v-if="
  395. scope.row.fBillstatus == '录入' ||
  396. scope.row.fBillstatus == '暂存' ||
  397. scope.row.fBillstatus == '驳回'
  398. "
  399. @click="handleUpdate(scope.row, false)"
  400. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  401. >修改
  402. </el-button>
  403. <el-button
  404. size="mini"
  405. type="text"
  406. icon="el-icon-delete"
  407. @click="handleDelete(scope.row)"
  408. v-if="scope.row.fItemsStatus == '计划'"
  409. v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
  410. >删除
  411. </el-button>
  412. </template>
  413. </el-table-column>
  414. </el-table>
  415. <pagination
  416. v-show="total > 0"
  417. :total="total"
  418. :page.sync="queryParams.pageNum"
  419. :limit.sync="queryParams.pageSize"
  420. @pagination="getList"
  421. />
  422. <!-- 新增或修改仓库主(出入库)对话框 -->
  423. <el-dialog
  424. v-dialogDrag
  425. :fullscreen="dialogFull"
  426. :visible.sync="open"
  427. :close-on-click-modal="false"
  428. @close='addCloseDialog'
  429. width="80%"
  430. append-to-body
  431. :show-close="colseButton"
  432. >
  433. <template slot="title">
  434. <div class="avue-crud__dialog__header">
  435. <span class="el-dialog__title">
  436. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  437. </span>
  438. <div class="avue-crud__dialog__menu enlarge" @click="full">
  439. <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
  440. </div>
  441. </div>
  442. </template>
  443. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  444. <el-row>
  445. <el-col :span="8">
  446. <el-form-item label="货权方" prop="fCorpid">
  447. <el-select
  448. v-model="form.fCorpid"
  449. filterable
  450. remote
  451. :disabled="browseStatus || formBrowseStatus"
  452. @change="changefCorpid(form)"
  453. style="width: 80%"
  454. :remote-method="corpsRemoteMethod"
  455. placeholder="请输入模糊查找"
  456. >
  457. <el-option
  458. v-for="(dict, index) in fMblnoOptions"
  459. :key="index.fId"
  460. :label="dict.fName"
  461. :value="dict.fId"
  462. ></el-option>
  463. </el-select>
  464. </el-form-item>
  465. </el-col>
  466. <el-col :span="8">
  467. <el-form-item label="结算方式" prop="fstltypeid">
  468. <el-select
  469. v-model="form.fStltypeid"
  470. placeholder="请选择结算方式"
  471. :disabled="browseStatus || formBrowseStatus"
  472. clearable
  473. style="width: 80%"
  474. >
  475. <el-option
  476. v-for="(dict, index) in fStltypeOptions"
  477. :key="index.dictValue"
  478. :label="dict.dictLabel"
  479. :value="dict.dictValue"
  480. />
  481. </el-select>
  482. </el-form-item>
  483. </el-col>
  484. <el-col :span="8">
  485. <el-form-item label="提单号" prop="fMblno">
  486. <el-input
  487. v-model="form.fMblno"
  488. style="width: 80%"
  489. disabled
  490. placeholder=""
  491. />
  492. </el-form-item>
  493. </el-col>
  494. </el-row>
  495. <el-row>
  496. <el-col :span="8">
  497. <el-form-item label="业务日期" prop="fBsdate">
  498. <el-date-picker
  499. v-model="form.fBsdate"
  500. style="width: 80%"
  501. type="date"
  502. :disabled="browseStatus || formBrowseStatus"
  503. @change="changefBsdate"
  504. value-format="timestamp"
  505. placeholder="业务日期"
  506. >
  507. </el-date-picker>
  508. </el-form-item>
  509. </el-col>
  510. <el-col :span="8">
  511. <el-form-item label="业务时间" prop="fBstime">
  512. <el-time-picker
  513. style="width: 80%"
  514. :disabled="browseStatus || formBrowseStatus"
  515. v-model="form.fBstime"
  516. :picker-options="{
  517. selectableRange: '00:00:01 - 23:59:59'
  518. }"
  519. placeholder="任意时间点">
  520. </el-time-picker>
  521. </el-form-item>
  522. </el-col>
  523. <el-col :span="8">
  524. <el-form-item label="仓管员" prop="fStorekeeper">
  525. <el-select
  526. v-model="form.fStorekeeper"
  527. filterable
  528. remote
  529. :disabled="browseStatus || formBrowseStatus"
  530. style="width: 80%"
  531. :remote-method="userRemoteMethod"
  532. placeholder="请输入模糊查找"
  533. >
  534. <el-option
  535. v-for="dict in userOptions"
  536. :key="dict.userName"
  537. :label="dict.nickName"
  538. :value="dict.userName"
  539. ></el-option>
  540. </el-select>
  541. </el-form-item>
  542. </el-col>
  543. <el-col :span="8">
  544. <el-form-item label="调入仓库" prop="fWarehouseid">
  545. <el-select
  546. v-model="form.fWarehouseid"
  547. filterable
  548. remote
  549. :disabled="browseStatus || formBrowseStatus"
  550. style="width: 80%"
  551. @keyup.enter.native="handleQuery"
  552. placeholder="请选择"
  553. >
  554. <el-option
  555. v-for="(dict, index) in warehouseOptions"
  556. :key="index.fId"
  557. :label="dict.fName"
  558. :value="dict.fId"
  559. ></el-option>
  560. </el-select>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8">
  564. <el-form-item label="调出仓库" prop="fInwarehouseid">
  565. <el-select
  566. v-model="form.fInwarehouseid"
  567. filterable
  568. remote
  569. @change="warwhouseTel"
  570. :disabled="browseStatus || formBrowseStatus"
  571. style="width: 80%"
  572. @keyup.enter.native="handleQuery"
  573. placeholder="请选择"
  574. >
  575. <el-option
  576. v-for="(dict, index) in warehouseOptions"
  577. :key="index.fId"
  578. :label="dict.fName"
  579. :value="dict.fId"
  580. ></el-option>
  581. </el-select>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="8">
  585. <el-form-item label="单据编号" prop="fBillno">
  586. <el-input
  587. v-model="form.fBillno"
  588. style="width: 80%"
  589. disabled
  590. placeholder="单据编号"
  591. />
  592. </el-form-item>
  593. </el-col>
  594. <!-- <el-col :span="8">
  595. <el-form-item label="破损" prop="fifdamage">
  596. <el-select
  597. v-model="form.fIfdamage"
  598. placeholder="请选择是否破损"
  599. :disabled="browseStatus || formBrowseStatus"
  600. clearable
  601. style="width: 80%"
  602. >
  603. <el-option
  604. v-for="dict in fIfdamageOptions"
  605. :key="dict.dictValue"
  606. :label="dict.dictLabel"
  607. :value="dict.dictValue"
  608. />
  609. </el-select>
  610. </el-form-item>
  611. </el-col>
  612. <el-col :span="8">
  613. <el-form-item label="过磅" prop="fifweigh">
  614. <el-select
  615. v-model="form.fIfweigh"
  616. placeholder="请选择是否过磅"
  617. :disabled="browseStatus || formBrowseStatus"
  618. clearable
  619. style="width: 80%"
  620. >
  621. <el-option
  622. v-for="dict in fIfweighOptions"
  623. :key="dict.dictValue"
  624. :label="dict.dictLabel"
  625. :value="dict.dictValue"
  626. />
  627. </el-select>
  628. </el-form-item>
  629. </el-col>
  630. </el-row>
  631. <el-row>
  632. <el-col :span="8">
  633. <el-form-item label="贸易方式" prop="fTrademodeid">
  634. <el-select
  635. v-model="form.fTrademodeid"
  636. placeholder="请选择贸易方式"
  637. :disabled="browseStatus || formBrowseStatus"
  638. clearable
  639. style="width: 80%"
  640. >
  641. <el-option
  642. v-for="dict in fTrademodeidOptions"
  643. :key="dict.dictValue"
  644. :label="dict.dictLabel"
  645. :value="dict.dictValue"
  646. />
  647. </el-select>
  648. </el-form-item>
  649. </el-col> -->
  650. <el-col :span="8">
  651. <el-form-item label="计划调拨件数">
  652. <el-input
  653. v-model="form.fPlanqty"
  654. style="width: 80%"
  655. :disabled="browseStatus || Operator !== Lander"
  656. placeholder="请输入计划调拨件数"
  657. />
  658. </el-form-item>
  659. </el-col>
  660. <el-col :span="8">
  661. <el-form-item label="计划调拨净重(kg)">
  662. <el-input
  663. v-model="form.fPlannetweight"
  664. style="width: 80%"
  665. :disabled="browseStatus || Operator !== Lander"
  666. placeholder="请输入计划调拨净重"
  667. />
  668. </el-form-item>
  669. </el-col>
  670. <el-col :span="8">
  671. <el-form-item label="计划调拨毛重(kg)">
  672. <el-input
  673. v-model="form.fPlangrossweight"
  674. style="width: 80%"
  675. :disabled="browseStatus || Operator !== Lander"
  676. placeholder="请输入计划调拨毛重"
  677. />
  678. </el-form-item>
  679. </el-col>
  680. <el-col :span="8">
  681. <el-form-item label="车号">
  682. <el-input
  683. v-model="form.fTruckno"
  684. style="width: 80%"
  685. :disabled="browseStatus || formBrowseStatus"
  686. placeholder="车号"
  687. />
  688. </el-form-item>
  689. </el-col>
  690. <el-col :span="8">
  691. <el-form-item label="司机姓名">
  692. <el-input
  693. v-model="form.fDriverName"
  694. style="width: 80%"
  695. :disabled="browseStatus || formBrowseStatus"
  696. placeholder="司机姓名"
  697. />
  698. </el-form-item>
  699. </el-col>
  700. <el-col :span="8">
  701. <el-form-item label="司机身份证">
  702. <el-input
  703. v-model="form.fDriverIdCar"
  704. style="width: 80%"
  705. :disabled="browseStatus || formBrowseStatus"
  706. placeholder="司机身份证"
  707. />
  708. </el-form-item>
  709. </el-col>
  710. <el-col :span="8">
  711. <el-form-item label="司机电话">
  712. <el-input
  713. v-model="form.fDriverTel"
  714. style="width: 80%"
  715. :disabled="browseStatus || formBrowseStatus"
  716. placeholder="司机电话"
  717. />
  718. </el-form-item>
  719. </el-col>
  720. <el-col :span="8">
  721. <el-form-item label="作业类型" prop="fBusinessType">
  722. <el-select
  723. style="width: 80%"
  724. v-model="form.fBusinessType"
  725. filterable
  726. @change="educationChange"
  727. :disabled="contrOl"
  728. >
  729. <el-option
  730. v-for="(dict, index) in businessTypeOption"
  731. :key="dict.dictValue"
  732. :label="dict.dictLabel"
  733. :value="dict.dictValue"
  734. ></el-option>
  735. </el-select>
  736. </el-form-item>
  737. </el-col>
  738. <el-col :span="8">
  739. <el-form-item label="劳务公司" prop="fLabour" :rules="{
  740. required: isrequired_l === 1 ? true : false,
  741. message: '请选择',
  742. trigger: ['blur', 'change']
  743. }">
  744. <el-select
  745. style="width: 80%"
  746. v-model="form.fLabour"
  747. @keyup.enter.native="handleQuery"
  748. :remote-method="flabourRemoteMethod"
  749. remote
  750. filterable
  751. :disabled="contrOl"
  752. placeholder="请输入劳务公司"
  753. >
  754. <el-option
  755. v-for="(dict, index) in fCompanyOptIons"
  756. :key="index.fId"
  757. :label="dict.fName"
  758. :value="dict.fId"
  759. ></el-option>
  760. </el-select>
  761. </el-form-item>
  762. </el-col>
  763. <el-col :span="8">
  764. <el-form-item label="车队" prop="fFleet"
  765. :rules="{
  766. required: isrequired === 1 ? true : false,
  767. message: '请选择',
  768. trigger: ['blur', 'change']
  769. }"
  770. >
  771. <el-select
  772. style="width: 80%"
  773. v-model="form.fFleet"
  774. filterable
  775. remote
  776. :remote-method="fleetRemoteMethod"
  777. :disabled="contrOl"
  778. placeholder="请输入车队">
  779. <el-option
  780. v-for="(dict, index) in fleetOptions"
  781. :key="index.fId"
  782. :label="dict.fName"
  783. :value="dict.fId"
  784. ></el-option>
  785. </el-select>
  786. </el-form-item>
  787. </el-col>
  788. </el-row>
  789. <el-row>
  790. <el-col :span="15">
  791. <el-form-item label="备注" prop="remark">
  792. <el-input
  793. v-model="form.remark"
  794. :disabled="browseStatus"
  795. type="textarea"
  796. placeholder="请输入内容"
  797. />
  798. </el-form-item>
  799. </el-col>
  800. <el-col :span="8">
  801. <el-form-item>
  802. <el-button @click="detailsHidden ? (detailsHidden = false) : (detailsHidden = true)">{{ detailsHidden ? '隐藏' : '展开' }}</el-button>
  803. </el-form-item>
  804. </el-col>
  805. </el-row>
  806. <div v-if="detailsHidden">
  807. <el-row style="margin-top: 30px">
  808. <el-col :span="8">
  809. <el-form-item label="仓库联系人" prop="fContacts">
  810. <el-input
  811. v-model="form.fContacts"
  812. :disabled="browseStatus || formBrowseStatus"
  813. style="width: 80%"
  814. placeholder="仓库联系人"
  815. />
  816. </el-form-item>
  817. </el-col>
  818. <el-col :span="8">
  819. <el-form-item label="仓库电话" prop="fTel">
  820. <el-input
  821. v-model="form.fTel"
  822. :disabled="browseStatus || formBrowseStatus"
  823. style="width: 80%"
  824. placeholder="请输仓库入电话"
  825. />
  826. </el-form-item>
  827. </el-col>
  828. </el-row>
  829. <el-row>
  830. <el-col :span="8">
  831. <el-form-item label="品牌" prop="fMarks">
  832. <el-input
  833. v-model="form.fMarks"
  834. style="width: 80%"
  835. disabled
  836. placeholder="品牌"
  837. />
  838. </el-form-item>
  839. </el-col>
  840. <el-col :span="8">
  841. <el-form-item label="品名" prop="fProductName">
  842. <el-input
  843. v-model="form.fProductName"
  844. style="width: 80%"
  845. disabled
  846. placeholder="品名"
  847. />
  848. </el-form-item>
  849. </el-col>
  850. </el-row>
  851. <el-row>
  852. <el-col :span="8">
  853. <el-form-item label="制单人" prop="createBy">
  854. <el-input
  855. disabled
  856. v-model="form.createBy"
  857. style="width: 80%"
  858. placeholder="制单人"
  859. />
  860. </el-form-item>
  861. </el-col>
  862. <el-col :span="8">
  863. <el-form-item label="制单部门" prop="fDeptid">
  864. <el-select
  865. v-model="form.fDeptid"
  866. filterable
  867. disabled
  868. style="width: 80%"
  869. remote
  870. >
  871. <el-option
  872. v-for="dict in deptOptions"
  873. :key="dict.deptId"
  874. :label="dict.deptName"
  875. :value="dict.deptId"
  876. ></el-option>
  877. </el-select>
  878. </el-form-item>
  879. </el-col>
  880. <el-col :span="8">
  881. <el-form-item disabled label="制单日期" prop="fbilldate">
  882. <el-date-picker
  883. v-model="form.createTime"
  884. size="large"
  885. type="date"
  886. disabled
  887. value-format="timestamp"
  888. placeholder="制单日期"
  889. >
  890. </el-date-picker>
  891. </el-form-item>
  892. </el-col>
  893. </el-row>
  894. </div>
  895. </el-form>
  896. <el-collapse v-model="activeNames">
  897. <el-collapse-item name="1">
  898. <template slot="title">
  899. <i class="el-icon-s-home"></i>调拨明细
  900. </template>
  901. <div style="
  902. display: flex;
  903. justify-content: space-between;
  904. align-items: center;
  905. margin: 10px 0;
  906. ">
  907. <div>
  908. <el-button
  909. type="primary"
  910. :disabled="browseStatus"
  911. @click.prevent="addRelevant"
  912. >新行
  913. </el-button>
  914. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  915. </div>
  916. <div style="display: flex">
  917. <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
  918. <el-button :disabled="printinglist.length <= 0 || browseStatus " @click="discharge">叫车进场</el-button>
  919. <el-button
  920. :disabled="dataListSelection.length <= 0 || browseStatus"
  921. @click.prevent="creditClick"
  922. >调拨确认
  923. </el-button>
  924. <el-button
  925. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  926. @click.prevent="withdrawClick"
  927. >撤回调拨
  928. </el-button
  929. >
  930. <el-button size="small" type="success" :disabled="browseStatus" prop="打印"
  931. >打印吊牌
  932. </el-button>
  933. <el-button size="small" type="success" :disabled="browseStatus" prop="打印" @click="showEditDialog_ss"
  934. >收货单
  935. </el-button>
  936. <el-button size="small" type="warning" :disabled="browseStatus" prop="打印" @click="showEditDialog_s"
  937. >入库单
  938. </el-button>
  939. <el-button
  940. style="background-color: #008000; color: #fff"
  941. @click="submitForm"
  942. :disabled="browseStatus"
  943. >请核
  944. </el-button
  945. >
  946. </div>
  947. <!--点击展开-->
  948. </div>
  949. <el-table
  950. :data="dataList"
  951. ref="tableList"
  952. tooltip-effect="dark"
  953. border
  954. stripe
  955. :summary-method="getSummaries"
  956. @selection-change="selectinventory"
  957. show-summary
  958. >
  959. <el-table-column type="selection" width="55" fixed align="center" />
  960. <el-table-column label="序号" type="index" fixed width="80"/>
  961. <el-table-column
  962. prop="fBillstatus"
  963. header-align="center"
  964. width="150px"
  965. fixed
  966. align="center"
  967. label="状态"
  968. >
  969. <template slot-scope="scope">
  970. <span v-if="scope.row.fBillstatus === 10">计划</span>
  971. <span v-if="scope.row.fBillstatus === 20">待入库</span>
  972. <span v-if="scope.row.fBillstatus === 30">入库中</span>
  973. <span v-if="scope.row.fBillstatus === 40">已入库</span>
  974. </template>
  975. </el-table-column>
  976. <el-table-column
  977. prop="fBsdate"
  978. header-align="center"
  979. align="center"
  980. width="150px"
  981. fixed
  982. label="入库日期"
  983. >
  984. <template slot-scope="scope">
  985. <el-date-picker
  986. v-model="scope.row.fBsdate"
  987. style="width: 138px"
  988. :disabled="
  989. browseStatus ||
  990. scope.row.fBillstatus === 20 ||
  991. scope.row.fBillstatus === 30 ||
  992. scope.row.fBillstatus === 40
  993. "
  994. type="date"
  995. value-format="timestamp"
  996. placeholder="入库日期"
  997. >
  998. </el-date-picker>
  999. </template>
  1000. </el-table-column>
  1001. <el-table-column
  1002. prop="fMblno"
  1003. header-align="center"
  1004. align="center"
  1005. width="140px"
  1006. label="提单号"
  1007. >
  1008. </el-table-column>
  1009. <el-table-column
  1010. prop="fGoodsids"
  1011. header-align="center"
  1012. align="center"
  1013. width="140px"
  1014. label="*品名"
  1015. >
  1016. </el-table-column>
  1017. <el-table-column
  1018. prop="fBusinessType"
  1019. header-align="center"
  1020. width="140px"
  1021. align="center"
  1022. label="*货物属性"
  1023. >
  1024. <template slot-scope="scope">
  1025. <el-select v-model="scope.row.fBusinessType"
  1026. filterable
  1027. disabled
  1028. placeholder="请选择商品属性"
  1029. >
  1030. <el-option
  1031. v-for="(dict, index) in fStorageTypeOptions"
  1032. :key="index.dictValue"
  1033. :label="dict.dictLabel"
  1034. :value="dict.dictValue"
  1035. />
  1036. </el-select>
  1037. </template>
  1038. </el-table-column>
  1039. <el-table-column
  1040. prop="fMarks"
  1041. header-align="center"
  1042. align="center"
  1043. width="140px"
  1044. label="*属性详情"
  1045. >
  1046. </el-table-column>
  1047. <el-table-column
  1048. prop="fMblno"
  1049. header-align="center"
  1050. align="center"
  1051. width="140px"
  1052. label="提单号"
  1053. >
  1054. </el-table-column>
  1055. <el-table-column
  1056. prop="fOrgwarehouseInformation"
  1057. header-align="center"
  1058. align="center"
  1059. label="库位"
  1060. >
  1061. </el-table-column>
  1062. <el-table-column
  1063. prop="fTransferWarehouselocid"
  1064. header-align="center"
  1065. width="240px"
  1066. align="center"
  1067. label="*调入库位"
  1068. >
  1069. <template slot-scope="scope">
  1070. <el-input
  1071. placeholder="请选择"
  1072. :disabled="!form.fWarehouseid || browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
  1073. v-model="scope.row.fWarehouseInformation"
  1074. @focus="getTreeselect(scope)"
  1075. >
  1076. </el-input>
  1077. </template>
  1078. </el-table-column>
  1079. <el-table-column
  1080. prop="fPlanqty"
  1081. header-align="center"
  1082. align="center"
  1083. width="180px"
  1084. label="*结余库存"
  1085. >
  1086. </el-table-column>
  1087. <el-table-column
  1088. prop="fPlangrossweight"
  1089. header-align="center"
  1090. align="center"
  1091. width="180px"
  1092. label="*结余毛重(kg)"
  1093. >
  1094. </el-table-column>
  1095. <el-table-column
  1096. prop="fPlannetweight"
  1097. header-align="center"
  1098. align="center"
  1099. width="180px"
  1100. label="*结余净重(kg)"
  1101. >
  1102. </el-table-column>
  1103. <el-table-column
  1104. prop="fQty"
  1105. header-align="center"
  1106. width="180px"
  1107. align="center"
  1108. label="*调拨件数"
  1109. >
  1110. <template slot-scope="scope">
  1111. <el-input
  1112. oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
  1113. @change="qtyChange(scope.row)"
  1114. v-model="scope.row.fQty"
  1115. :disabled="browseStatus || scope.row.fBillstatus === 40"
  1116. placeholder="调拨件数"
  1117. show-word-limit
  1118. />
  1119. </template>
  1120. </el-table-column>
  1121. <el-table-column
  1122. prop="fGrossweight"
  1123. header-align="center"
  1124. width="180px"
  1125. align="center"
  1126. label="*调拨毛重(kg)"
  1127. >
  1128. <template slot-scope="scope">
  1129. <el-input
  1130. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1131. :disabled="browseStatus || scope.row.fBillstatus === 40"
  1132. v-model="scope.row.fGrossweight"
  1133. @change="changeStock(scope.row)"
  1134. placeholder="调拨毛重"
  1135. show-word-limit
  1136. />
  1137. </template>
  1138. </el-table-column>
  1139. <el-table-column
  1140. prop="fNetweight"
  1141. header-align="center"
  1142. width="180px"
  1143. align="center"
  1144. label="*调拨净重(kg)"
  1145. >
  1146. <template slot-scope="scope">
  1147. <el-input
  1148. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1149. :disabled="browseStatus || scope.row.fBillstatus > 20"
  1150. v-model="scope.row.fNetweight"
  1151. @change="changeStock(scope.row)"
  1152. placeholder="调拨净重"
  1153. show-word-limit
  1154. />
  1155. </template>
  1156. </el-table-column>
  1157. <el-table-column
  1158. prop="fPackagespecs"
  1159. header-align="center"
  1160. width="180px"
  1161. align="center"
  1162. label="*包装规格"
  1163. >
  1164. <template slot-scope="scope">
  1165. <el-input
  1166. v-model="scope.row.fPackagespecs"
  1167. :disabled=" browseStatus ||
  1168. scope.row.fBillstatus === 20 ||
  1169. scope.row.fBillstatus === 30 ||
  1170. scope.row.fBillstatus === 40"
  1171. placeholder="包装规格"
  1172. show-word-limit
  1173. />
  1174. </template>
  1175. </el-table-column>
  1176. <el-table-column
  1177. prop="fTruckno"
  1178. header-align="center"
  1179. width="130px"
  1180. align="center"
  1181. label="*车号"
  1182. >
  1183. <template slot-scope="scope">
  1184. <el-input
  1185. v-model="scope.row.fTruckno"
  1186. placeholder="*车号"
  1187. :disabled="
  1188. browseStatus ||
  1189. scope.row.fBillstatus === 20 ||
  1190. scope.row.fBillstatus === 30 ||
  1191. scope.row.fBillstatus === 40
  1192. "
  1193. show-word-limit
  1194. />
  1195. </template>
  1196. </el-table-column>
  1197. <el-table-column
  1198. prop="fDriverName"
  1199. header-align="center"
  1200. width="130px"
  1201. align="center"
  1202. label="*司机名"
  1203. >
  1204. <template slot-scope="scope">
  1205. <el-input
  1206. v-model="scope.row.fDriverName"
  1207. placeholder="司机名"
  1208. :disabled="
  1209. browseStatus ||
  1210. scope.row.fBillstatus === 20 ||
  1211. scope.row.fBillstatus === 30 ||
  1212. scope.row.fBillstatus === 40
  1213. "
  1214. show-word-limit
  1215. />
  1216. </template>
  1217. </el-table-column>
  1218. <el-table-column
  1219. prop="fDriverTel"
  1220. header-align="center"
  1221. width="200px"
  1222. align="center"
  1223. label="*司机电话"
  1224. >
  1225. <template slot-scope="scope">
  1226. <el-input
  1227. v-model="scope.row.fDriverTel"
  1228. placeholder="司机电话"
  1229. :disabled="
  1230. browseStatus ||
  1231. scope.row.fBillstatus === 20 ||
  1232. scope.row.fBillstatus === 30 ||
  1233. scope.row.fBillstatus === 40
  1234. "
  1235. show-word-limit
  1236. />
  1237. </template>
  1238. </el-table-column>
  1239. <el-table-column
  1240. prop="fDriverIdCar"
  1241. header-align="center"
  1242. width="200px"
  1243. align="center"
  1244. label="*司机身份证"
  1245. >
  1246. <template slot-scope="scope">
  1247. <el-input
  1248. v-model="scope.row.fDriverIdCar"
  1249. placeholder="司机身份证"
  1250. :disabled="
  1251. browseStatus ||
  1252. scope.row.fBillstatus === 20 ||
  1253. scope.row.fBillstatus === 30 ||
  1254. scope.row.fBillstatus === 40
  1255. "
  1256. show-word-limit
  1257. />
  1258. </template>
  1259. </el-table-column>
  1260. <el-table-column
  1261. prop="fCntrtype"
  1262. header-align="center"
  1263. align="center"
  1264. width="140px"
  1265. label="箱型"
  1266. >
  1267. <template slot-scope="scope">
  1268. <el-input
  1269. v-model="scope.row.fCntrtype"
  1270. :disabled=" browseStatus ||
  1271. scope.row.fBillstatus === 20 ||
  1272. scope.row.fBillstatus === 30 ||
  1273. scope.row.fBillstatus === 40"
  1274. placeholder="箱型"
  1275. show-word-limit
  1276. />
  1277. </template>
  1278. </el-table-column>
  1279. <el-table-column
  1280. prop="fCntqty"
  1281. header-align="center"
  1282. align="center"
  1283. width="140px"
  1284. label="箱量"
  1285. >
  1286. <template slot-scope="scope">
  1287. <el-input
  1288. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1289. v-model="scope.row.fCntqty"
  1290. placeholder="箱量"
  1291. :disabled=" browseStatus ||
  1292. scope.row.fBillstatus === 20 ||
  1293. scope.row.fBillstatus === 30 ||
  1294. scope.row.fBillstatus === 40"
  1295. show-word-limit
  1296. />
  1297. </template>
  1298. </el-table-column>
  1299. <el-table-column
  1300. prop="fCntrno"
  1301. header-align="center"
  1302. width="150px"
  1303. align="center"
  1304. label="箱号"
  1305. >
  1306. <template slot-scope="scope">
  1307. <el-input
  1308. v-model="scope.row.fCntrno"
  1309. placeholder="箱号"
  1310. :disabled=" browseStatus ||
  1311. scope.row.fBillstatus === 20 ||
  1312. scope.row.fBillstatus === 30 ||
  1313. scope.row.fBillstatus === 40"
  1314. show-word-limit
  1315. />
  1316. </template>
  1317. </el-table-column>
  1318. <el-table-column
  1319. prop="fGoodsval"
  1320. header-align="center"
  1321. width="150px"
  1322. align="center"
  1323. label="货值"
  1324. >
  1325. <template slot-scope="scope">
  1326. <el-input
  1327. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1328. v-model="scope.row.fGoodsval"
  1329. placeholder="货值"
  1330. :disabled=" browseStatus ||
  1331. scope.row.fBillstatus === 20 ||
  1332. scope.row.fBillstatus === 30 ||
  1333. scope.row.fBillstatus === 40"
  1334. show-word-limit
  1335. />
  1336. </template>
  1337. </el-table-column>
  1338. <el-table-column
  1339. prop="fSerialNumber"
  1340. header-align="center"
  1341. width="160px"
  1342. align="center"
  1343. label="流水号"
  1344. >
  1345. </el-table-column>
  1346. <el-table-column
  1347. prop="remark"
  1348. header-align="center"
  1349. width="150px"
  1350. align="center"
  1351. label="备注"
  1352. >
  1353. <template slot-scope="scope">
  1354. <el-input
  1355. v-model="scope.row.remark"
  1356. placeholder="备注"
  1357. :disabled="browseStatus"
  1358. show-word-limit
  1359. />
  1360. </template>
  1361. </el-table-column>
  1362. <el-table-column
  1363. header-align="center"
  1364. align="center"
  1365. label="操作"
  1366. width="130PX"
  1367. >
  1368. <template slot-scope="scope">
  1369. <el-button
  1370. @click.native.prevent="deleteRow(scope.$index, dataList)"
  1371. size="small"
  1372. :disabled="browseStatus || scope.row.fBillstatus === 20
  1373. || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
  1374. >移除
  1375. </el-button>
  1376. </template>
  1377. </el-table-column>
  1378. </el-table>
  1379. </el-collapse-item>
  1380. <el-collapse-item>
  1381. <template slot="title">
  1382. <i class="el-icon-s-order"></i>附件明细
  1383. </template>
  1384. <div class="dialogTableTitle flex a-center jlr"
  1385. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1386. <div>
  1387. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  1388. >新行
  1389. </el-button>
  1390. </div>
  1391. </div>
  1392. <el-table
  1393. :data="relevantAttachments"
  1394. ref="table"
  1395. tooltip-effect="dark"
  1396. border
  1397. stripe
  1398. style="width: 100%"
  1399. height="150"
  1400. >
  1401. <el-table-column label="序号" type="index" width="80">
  1402. </el-table-column>
  1403. <el-table-column
  1404. prop="fName"
  1405. header-align="center"
  1406. align="center"
  1407. width="250px"
  1408. label="附件名称"
  1409. >
  1410. <template slot-scope="scope">
  1411. <el-input
  1412. v-model="scope.row.fName"
  1413. :disabled="browseStatus"
  1414. placeholder="附件名称"
  1415. show-word-limit
  1416. />
  1417. </template>
  1418. </el-table-column>
  1419. <el-table-column
  1420. prop="createBy"
  1421. header-align="center"
  1422. align="center"
  1423. width="250px"
  1424. label="上传人"
  1425. >
  1426. <template slot-scope="scope">
  1427. <el-input
  1428. v-model="scope.row.createBy"
  1429. disabled
  1430. placeholder="上传人"
  1431. show-word-limit
  1432. />
  1433. </template>
  1434. </el-table-column>
  1435. <el-table-column
  1436. prop="createTime"
  1437. header-align="center"
  1438. align="center"
  1439. width="200px"
  1440. label="上传时间"
  1441. >
  1442. <template slot-scope="scope">
  1443. <el-date-picker
  1444. v-model="scope.row.createTime"
  1445. type="date"
  1446. disabled
  1447. placeholder="上传时间"
  1448. format="yyyy-MM-dd HH:mm"
  1449. value-format="timestamp"
  1450. ></el-date-picker>
  1451. </template>
  1452. </el-table-column>
  1453. <el-table-column
  1454. prop="fUrl"
  1455. header-align="center"
  1456. align="center"
  1457. width="300px"
  1458. label="上传附件"
  1459. >
  1460. <template slot-scope="scope" >
  1461. <el-upload
  1462. class="upload-demo"
  1463. :action="uploadImgUrl"
  1464. :on-success="(res,file)=>{handleSucces(scope,res,file)}"
  1465. :headers="headers"
  1466. style="width:25%;float: left"
  1467. :disabled="browseStatus"
  1468. :show-file-list="false"
  1469. :limit="1"
  1470. >
  1471. <el-button size="small" type="primary" :disabled="browseStatus">点击上传</el-button>
  1472. </el-upload>
  1473. <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
  1474. <el-button size="small" type="primary" :disabled="browseStatus" @click="deleteFile(scope)">删除</el-button>
  1475. </template>
  1476. </el-table-column>
  1477. <el-table-column header-align="center" align="center" label="操作">
  1478. <template slot-scope="scope">
  1479. <el-button
  1480. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1481. :disabled="browseStatus"
  1482. size="small"
  1483. >移除
  1484. </el-button>
  1485. </template>
  1486. </el-table-column>
  1487. </el-table>
  1488. </el-collapse-item>
  1489. <el-collapse-item>
  1490. <template slot="title">
  1491. <i class="el-icon-circle-plus"></i>收款信息
  1492. </template>
  1493. <div class="dialogTableTitle flex a-center jlr"
  1494. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1495. <div>
  1496. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1497. >新行
  1498. </el-button>
  1499. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1500. <el-button type="danger"
  1501. :disabled="browseStatus"
  1502. @click.prevent="addAgreement('Dr',3)"
  1503. >作业费协议</el-button
  1504. >
  1505. </div>
  1506. </div>
  1507. <el-table
  1508. :data="warehouseDrList"
  1509. ref="tableDr"
  1510. tooltip-effect="dark"
  1511. border
  1512. stripe
  1513. show-summary
  1514. @selection-change="collectionoptions"
  1515. :summary-method="warehouseDrSummaries"
  1516. >
  1517. <el-table-column type="selection" width="55" align="center" />
  1518. <el-table-column label="序号" type="index" width="80">
  1519. </el-table-column>
  1520. <el-table-column
  1521. prop="fCorpid"
  1522. header-align="center"
  1523. align="center"
  1524. width="180px"
  1525. label="客户名称"
  1526. >
  1527. <template slot-scope="scope">
  1528. <el-select
  1529. v-model="scope.row.fCorpid"
  1530. filterable
  1531. remote
  1532. :disabled="browseStatus"
  1533. :remote-method="corpsRemoteMethod"
  1534. placeholder="客户名称"
  1535. >
  1536. <el-option
  1537. v-for="(dict, index) in KHblnoOptions"
  1538. :key="index.fId"
  1539. :label="dict.fName"
  1540. :value="dict.fId"
  1541. ></el-option>
  1542. </el-select>
  1543. </template>
  1544. </el-table-column>
  1545. <el-table-column
  1546. prop="fFeeid"
  1547. header-align="center"
  1548. align="center"
  1549. width="180px"
  1550. label="费用名称"
  1551. >
  1552. <template slot-scope="scope">
  1553. <el-select
  1554. v-model="scope.row.fFeeid"
  1555. filterable
  1556. remote
  1557. :disabled="browseStatus"
  1558. :remote-method="fWRemoteMethod"
  1559. @change="changeFeeId(scope.row)"
  1560. placeholder="费用名称"
  1561. >
  1562. <el-option
  1563. v-for="(dict, index) in fDNameOptions"
  1564. :key="index.fId"
  1565. :label="dict.fName"
  1566. :value="dict.fId"
  1567. ></el-option>
  1568. </el-select>
  1569. </template>
  1570. </el-table-column>
  1571. <el-table-column
  1572. prop="fBusinessType"
  1573. header-align="center"
  1574. align="center"
  1575. width="180px"
  1576. label="作业类型"
  1577. >
  1578. <template slot-scope="scope">
  1579. <el-select
  1580. style="width: 80%"
  1581. v-model="scope.row.fBusinessType"
  1582. filterable
  1583. disabled
  1584. >
  1585. <el-option
  1586. v-for="(dict,index) in businessTypeOption"
  1587. :key="dict.dictValue"
  1588. :label="dict.dictLabel"
  1589. :value="dict.dictValue"
  1590. ></el-option>
  1591. </el-select>
  1592. </template>
  1593. </el-table-column>
  1594. <el-table-column
  1595. prop="fFeeunitid"
  1596. header-align="center"
  1597. align="center"
  1598. width="180px"
  1599. label="计价单位"
  1600. >
  1601. <template slot-scope="scope">
  1602. <el-select
  1603. v-model="scope.row.fFeeunitid"
  1604. placeholder="请选择计费单位"
  1605. @change="changeFeeUnit(scope.row)"
  1606. :disabled="browseStatus"
  1607. clearable
  1608. >
  1609. <el-option
  1610. v-for="(dict, index) in jFeetunitOptions"
  1611. :key="index.dictValue"
  1612. :label="dict.dictLabel"
  1613. :value="dict.dictValue"
  1614. />
  1615. </el-select>
  1616. </template>
  1617. </el-table-column>
  1618. <el-table-column
  1619. prop="fQty"
  1620. header-align="center"
  1621. align="center"
  1622. width="150px"
  1623. label="数量"
  1624. >
  1625. <template slot-scope="scope">
  1626. <el-input
  1627. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1628. v-model="scope.row.fQty"
  1629. placeholder="数量"
  1630. :disabled="browseStatus"
  1631. @change="changeContractAmt(scope.row)"
  1632. show-word-limit
  1633. />
  1634. </template>
  1635. </el-table-column>
  1636. <el-table-column
  1637. prop="funitprice"
  1638. header-align="center"
  1639. align="center"
  1640. width="150px"
  1641. label="单价"
  1642. >
  1643. <template slot-scope="scope">
  1644. <el-input
  1645. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1646. v-model="scope.row.fUnitprice"
  1647. placeholder="单价"
  1648. :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
  1649. @change="changeContractAmt(scope.row)"
  1650. show-word-limit
  1651. />
  1652. </template>
  1653. </el-table-column>
  1654. <el-table-column
  1655. prop="fAmount"
  1656. header-align="center"
  1657. align="center"
  1658. width="150px"
  1659. label="金额"
  1660. >
  1661. <template slot-scope="scope">
  1662. <el-input
  1663. disabled
  1664. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1665. v-model="scope.row.fAmount"
  1666. placeholder="金额"
  1667. show-word-limit
  1668. />
  1669. </template>
  1670. </el-table-column>
  1671. <el-table-column
  1672. prop="fStltypeid"
  1673. header-align="center"
  1674. align="center"
  1675. width="130px"
  1676. label="结算方式"
  1677. >
  1678. <template slot-scope="scope">
  1679. <el-select
  1680. v-model="scope.row.fStltypeid"
  1681. placeholder="请选择结算表票结、月结"
  1682. :disabled="browseStatus"
  1683. >
  1684. <el-option
  1685. v-for="dict in fStltypeOptions"
  1686. :key="dict.dictValue"
  1687. :label="dict.dictLabel"
  1688. :value="parseInt(dict.dictValue)"
  1689. ></el-option>
  1690. </el-select>
  1691. </template>
  1692. </el-table-column>
  1693. <el-table-column
  1694. prop="fCurrency"
  1695. header-align="center"
  1696. align="center"
  1697. width="150px"
  1698. label="币别"
  1699. >
  1700. <template slot-scope="scope">
  1701. <el-input
  1702. v-model="scope.row.fCurrency"
  1703. :disabled="browseStatus"
  1704. placeholder="币别"
  1705. show-word-limit
  1706. />
  1707. </template>
  1708. </el-table-column>
  1709. <el-table-column
  1710. prop="fExrate"
  1711. header-align="center"
  1712. align="center"
  1713. width="150px"
  1714. label="汇率"
  1715. >
  1716. <template slot-scope="scope">
  1717. <el-input
  1718. v-model="scope.row.fExrate"
  1719. :disabled="browseStatus"
  1720. placeholder="汇率"
  1721. show-word-limit
  1722. />
  1723. </template>
  1724. </el-table-column>
  1725. <el-table-column
  1726. prop="fTaxrate"
  1727. header-align="center"
  1728. align="center"
  1729. width="150px"
  1730. label="税率"
  1731. >
  1732. <template slot-scope="scope">
  1733. <el-input
  1734. v-model="scope.row.fTaxrate"
  1735. :disabled="browseStatus"
  1736. placeholder="税率"
  1737. show-word-limit
  1738. />
  1739. </template>
  1740. </el-table-column>
  1741. <el-table-column
  1742. prop="fMblno"
  1743. header-align="center"
  1744. align="center"
  1745. width="130px"
  1746. label="提单号"
  1747. >
  1748. <template slot-scope="scope">
  1749. <el-input
  1750. v-model="scope.row.fMblno"
  1751. :disabled="browseStatus"
  1752. placeholder="提单号"
  1753. show-word-limit
  1754. />
  1755. </template>
  1756. </el-table-column>
  1757. <el-table-column
  1758. prop="fProductName"
  1759. header-align="center"
  1760. align="center"
  1761. width="140px"
  1762. label="品名"
  1763. >
  1764. <template slot-scope="scope">
  1765. <el-input
  1766. v-model="scope.row.fProductName"
  1767. :disabled="browseStatus"
  1768. placeholder="品名"
  1769. show-word-limit
  1770. />
  1771. </template>
  1772. </el-table-column>
  1773. <el-table-column
  1774. prop="fMarks"
  1775. header-align="center"
  1776. align="center"
  1777. width="130px"
  1778. label="品牌"
  1779. >
  1780. <template slot-scope="scope">
  1781. <el-input
  1782. v-model="scope.row.fMarks"
  1783. :disabled="browseStatus"
  1784. placeholder="品牌"
  1785. show-word-limit
  1786. />
  1787. </template>
  1788. </el-table-column>
  1789. <el-table-column
  1790. prop="fSrcTypeId"
  1791. header-align="center"
  1792. align="center"
  1793. width="130px"
  1794. label="来源"
  1795. >
  1796. <template slot-scope="scope">
  1797. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1798. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  1799. </template>
  1800. </el-table-column>
  1801. <el-table-column
  1802. prop="remarks"
  1803. header-align="center"
  1804. align="center"
  1805. width="150px"
  1806. label="备注"
  1807. >
  1808. <template slot-scope="scope">
  1809. <el-input
  1810. v-model="scope.row.remarks"
  1811. :disabled="browseStatus"
  1812. placeholder="备注"
  1813. show-word-limit
  1814. />
  1815. </template>
  1816. </el-table-column>
  1817. <el-table-column
  1818. header-align="center"
  1819. align="center"
  1820. label="操作"
  1821. width="200px"
  1822. >
  1823. <template slot-scope="scope">
  1824. <el-button
  1825. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1826. size="small"
  1827. :disabled="browseStatus"
  1828. >移除</el-button
  1829. >
  1830. </template>
  1831. </el-table-column>
  1832. </el-table>
  1833. </el-collapse-item>
  1834. <el-collapse-item>
  1835. <template slot="title">
  1836. <i class="el-icon-remove"></i>付款信息
  1837. </template>
  1838. <div class="dialogTableTitle flex a-center jlr"
  1839. style="display: flex;justify-content: space-between;align-items: center;margin: 10px 0;">
  1840. <div>
  1841. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1842. >新行
  1843. </el-button>
  1844. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1845. <el-button type="danger"
  1846. :disabled="browseStatus"
  1847. @click.prevent="addAgreement('Cr',1)"
  1848. >作业费协议</el-button>
  1849. </div>
  1850. </div>
  1851. <el-table
  1852. :data="warehouseCrList"
  1853. ref="table"
  1854. tooltip-effect="dark"
  1855. border
  1856. stripe
  1857. show-summary
  1858. @selection-change="collectionoptions"
  1859. :summary-method="warehouseDrSummaries"
  1860. >
  1861. <el-table-column type="selection" width="55" align="center" />
  1862. <el-table-column label="序号" type="index" width="80">
  1863. </el-table-column>
  1864. <el-table-column
  1865. prop="fCorpid"
  1866. header-align="center"
  1867. align="center"
  1868. width="180px"
  1869. label="客户名称"
  1870. >
  1871. <template slot-scope="scope">
  1872. <el-select
  1873. v-model="scope.row.fCorpid"
  1874. filterable
  1875. remote
  1876. :disabled="browseStatus"
  1877. :remote-method="corpsRemoteMethod"
  1878. placeholder="客户名称"
  1879. >
  1880. <el-option
  1881. v-for="(dict, index) in KHblnoOptions"
  1882. :key="index.fId"
  1883. :label="dict.fName"
  1884. :value="dict.fId"
  1885. ></el-option>
  1886. </el-select>
  1887. </template>
  1888. </el-table-column>
  1889. <el-table-column
  1890. prop="fFeeid"
  1891. header-align="center"
  1892. align="center"
  1893. width="180px"
  1894. label="费用名称"
  1895. >
  1896. <template slot-scope="scope">
  1897. <el-select
  1898. v-model="scope.row.fFeeid"
  1899. filterable
  1900. remote
  1901. :disabled="browseStatus"
  1902. :remote-method="fWRemoteMethod"
  1903. @change="changeFeeId(scope.row)"
  1904. placeholder="费用名称"
  1905. >
  1906. <el-option
  1907. v-for="(dict, index) in fCNameOptions"
  1908. :key="index.fId"
  1909. :label="dict.fName"
  1910. :value="dict.fId"
  1911. ></el-option>
  1912. </el-select>
  1913. </template>
  1914. </el-table-column>
  1915. <el-table-column
  1916. prop="fBusinessType"
  1917. header-align="center"
  1918. align="center"
  1919. width="180px"
  1920. label="作业类型"
  1921. >
  1922. <template slot-scope="scope">
  1923. <el-select
  1924. style="width: 80%"
  1925. v-model="scope.row.fBusinessType"
  1926. filterable
  1927. disabled
  1928. >
  1929. <el-option
  1930. v-for="(dict,index) in businessTypeOption"
  1931. :key="dict.dictValue"
  1932. :label="dict.dictLabel"
  1933. :value="dict.dictValue"
  1934. ></el-option>
  1935. </el-select>
  1936. </template>
  1937. </el-table-column>
  1938. <el-table-column
  1939. prop="fFeeunitid"
  1940. header-align="center"
  1941. align="center"
  1942. width="180px"
  1943. label="计价单位"
  1944. >
  1945. <template slot-scope="scope">
  1946. <el-select
  1947. v-model="scope.row.fFeeunitid"
  1948. placeholder="请选择计费单位"
  1949. @change="changeFeeUnit(scope.row)"
  1950. :disabled="browseStatus"
  1951. clearable
  1952. >
  1953. <el-option
  1954. v-for="(dict, index) in jFeetunitOptions"
  1955. :key="index.dictValue"
  1956. :label="dict.dictLabel"
  1957. :value="dict.dictValue"
  1958. ></el-option>
  1959. </el-select>
  1960. </template>
  1961. </el-table-column>
  1962. <el-table-column
  1963. prop="fQty"
  1964. header-align="center"
  1965. align="center"
  1966. width="150px"
  1967. label="数量"
  1968. >
  1969. <template slot-scope="scope">
  1970. <el-input
  1971. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1972. v-model="scope.row.fQty"
  1973. @change="changeContractAmt(scope.row)"
  1974. :disabled="browseStatus"
  1975. placeholder="数量"
  1976. show-word-limit
  1977. />
  1978. </template>
  1979. </el-table-column>
  1980. <el-table-column
  1981. prop="funitprice"
  1982. header-align="center"
  1983. align="center"
  1984. width="150px"
  1985. label="单价"
  1986. >
  1987. <template slot-scope="scope">
  1988. <el-input
  1989. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1990. v-model="scope.row.fUnitprice"
  1991. @change="changeContractAmt(scope.row)"
  1992. :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
  1993. placeholder="单价"
  1994. show-word-limit
  1995. />
  1996. </template>
  1997. </el-table-column>
  1998. <el-table-column
  1999. prop="fAmount"
  2000. header-align="center"
  2001. align="center"
  2002. width="150px"
  2003. label="金额"
  2004. >
  2005. <template slot-scope="scope">
  2006. <el-input
  2007. disabled
  2008. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  2009. v-model="scope.row.fAmount"
  2010. placeholder="金额"
  2011. show-word-limit
  2012. />
  2013. </template>
  2014. </el-table-column>
  2015. <el-table-column
  2016. prop="fStltypeid"
  2017. header-align="center"
  2018. align="center"
  2019. width="130px"
  2020. label="结算方式"
  2021. >
  2022. <template slot-scope="scope">
  2023. <el-select
  2024. v-model="scope.row.fStltypeid"
  2025. placeholder="请选择结算表票结、月结"
  2026. :disabled="browseStatus"
  2027. >
  2028. <el-option
  2029. v-for="dict in fStltypeOptions"
  2030. :key="dict.dictValue"
  2031. :label="dict.dictLabel"
  2032. :value="parseInt(dict.dictValue)"
  2033. ></el-option>
  2034. </el-select>
  2035. </template>
  2036. </el-table-column>
  2037. <el-table-column
  2038. prop="fCurrency"
  2039. header-align="center"
  2040. align="center"
  2041. width="150px"
  2042. label="币别"
  2043. >
  2044. <template slot-scope="scope">
  2045. <el-input
  2046. v-model="scope.row.fCurrency"
  2047. :disabled="browseStatus"
  2048. placeholder="币别"
  2049. show-word-limit
  2050. />
  2051. </template>
  2052. </el-table-column>
  2053. <el-table-column
  2054. prop="fExrate"
  2055. header-align="center"
  2056. align="center"
  2057. width="150px"
  2058. label="汇率"
  2059. >
  2060. <template slot-scope="scope">
  2061. <el-input
  2062. v-model="scope.row.fExrate"
  2063. :disabled="browseStatus"
  2064. placeholder="汇率"
  2065. show-word-limit
  2066. />
  2067. </template>
  2068. </el-table-column>
  2069. <el-table-column
  2070. prop="fTaxrate"
  2071. header-align="center"
  2072. align="center"
  2073. width="150px"
  2074. label="税率"
  2075. >
  2076. <template slot-scope="scope">
  2077. <el-input
  2078. v-model="scope.row.fTaxrate"
  2079. :disabled="browseStatus"
  2080. placeholder="税率"
  2081. show-word-limit
  2082. />
  2083. </template>
  2084. </el-table-column>
  2085. <el-table-column
  2086. prop="fMblno"
  2087. header-align="center"
  2088. align="center"
  2089. width="130px"
  2090. label="提单号"
  2091. >
  2092. <template slot-scope="scope">
  2093. <el-input
  2094. v-model="scope.row.fMblno"
  2095. :disabled="browseStatus"
  2096. placeholder="提单号"
  2097. show-word-limit
  2098. />
  2099. </template>
  2100. </el-table-column>
  2101. <el-table-column
  2102. prop="fProductName"
  2103. header-align="center"
  2104. align="center"
  2105. width="140px"
  2106. label="品名"
  2107. >
  2108. <template slot-scope="scope">
  2109. <el-input
  2110. v-model="scope.row.fProductName"
  2111. :disabled="browseStatus"
  2112. placeholder="品名"
  2113. show-word-limit
  2114. />
  2115. </template>
  2116. </el-table-column>
  2117. <el-table-column
  2118. prop="fMarks"
  2119. header-align="center"
  2120. align="center"
  2121. width="130px"
  2122. label="品牌"
  2123. >
  2124. <template slot-scope="scope">
  2125. <el-input
  2126. v-model="scope.row.fMarks"
  2127. :disabled="browseStatus"
  2128. placeholder="品牌"
  2129. show-word-limit
  2130. />
  2131. </template>
  2132. </el-table-column>
  2133. <el-table-column
  2134. prop="fSrcTypeId"
  2135. header-align="center"
  2136. align="center"
  2137. width="130px"
  2138. label="来源"
  2139. >
  2140. <template slot-scope="scope">
  2141. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  2142. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  2143. </template>
  2144. </el-table-column>
  2145. <el-table-column
  2146. prop="remarks"
  2147. header-align="center"
  2148. align="center"
  2149. width="150px"
  2150. label="备注"
  2151. >
  2152. <template slot-scope="scope">
  2153. <el-input
  2154. v-model="scope.row.remarks"
  2155. :disabled="browseStatus"
  2156. placeholder="备注"
  2157. show-word-limit
  2158. />
  2159. </template>
  2160. </el-table-column>
  2161. <el-table-column
  2162. header-align="center"
  2163. align="center"
  2164. width="200px"
  2165. label="操作"
  2166. >
  2167. <template slot-scope="scope">
  2168. <el-button
  2169. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  2170. size="small"
  2171. :disabled="browseStatus"
  2172. >移除</el-button
  2173. >
  2174. </template>
  2175. </el-table-column>
  2176. </el-table>
  2177. </el-collapse-item>
  2178. </el-collapse>
  2179. <div slot="footer" class="dialog-footer">
  2180. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  2181. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  2182. <el-button type="primary" :disabled="approvalStatus" v-if="form.fBillstatus > 3" @click="addOrUpdateHandle()">查看审批流</el-button>
  2183. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  2184. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
  2185. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  2186. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  2187. <el-button
  2188. style="background-color: #008000; color: #fff"
  2189. @click="submitForm"
  2190. :disabled="browseStatus"
  2191. >请核</el-button
  2192. >
  2193. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  2194. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  2195. </div>
  2196. <!-- 选择库存总账数据 -->
  2197. <el-dialog
  2198. title="库存总账"
  2199. :modal="false"
  2200. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2201. :visible.sync="whgenlegVisible"
  2202. width="70%"
  2203. >
  2204. <el-table
  2205. :data="whgenlegList"
  2206. ref="table"
  2207. tooltip-effect="dark"
  2208. width="100%"
  2209. border
  2210. stripe
  2211. @selection-change="whgenlegSelectionChange"
  2212. >
  2213. <el-table-column type="selection" width="55"> </el-table-column>
  2214. <el-table-column
  2215. prop="fMblno"
  2216. header-align="center"
  2217. align="center"
  2218. label="提单号"
  2219. >
  2220. </el-table-column>
  2221. <el-table-column
  2222. prop="createTime"
  2223. header-align="center"
  2224. align="center"
  2225. width="180px"
  2226. label="入库日期"
  2227. >
  2228. </el-table-column>
  2229. <el-table-column
  2230. prop="fGoodsids"
  2231. header-align="center"
  2232. align="center"
  2233. label="品名"
  2234. >
  2235. </el-table-column>
  2236. <el-table-column
  2237. prop="fQtyblc"
  2238. header-align="center"
  2239. align="center"
  2240. label="结余数量"
  2241. >
  2242. </el-table-column>
  2243. <el-table-column
  2244. prop="fWarehouseids"
  2245. header-align="center"
  2246. align="center"
  2247. label="仓库"
  2248. >
  2249. </el-table-column>
  2250. <el-table-column
  2251. prop="fMarks"
  2252. header-align="center"
  2253. align="center"
  2254. label="品牌"
  2255. >
  2256. </el-table-column>
  2257. </el-table>
  2258. <pagination
  2259. v-show="whgenlegTotal > 0"
  2260. :total="whgenlegTotal"
  2261. :page.sync="whgenlegParams.pageNum"
  2262. :limit.sync="whgenlegParams.pageSize"
  2263. @pagination="getWhgenlegList"
  2264. />
  2265. <div slot="footer" class="dialog-footer">
  2266. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  2267. <el-button @click="whgenlegVisible = false">取 消</el-button>
  2268. </div>
  2269. </el-dialog>
  2270. <!-- 选择作业费协议数据 -->
  2271. <el-dialog
  2272. title="作业费协议"
  2273. :modal="false"
  2274. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2275. :visible.sync="warehousingagreements"
  2276. width="70%"
  2277. v-dialogDrag
  2278. >
  2279. <template slot="作业费协议">
  2280. <div class="avue-crud__dialog__header">
  2281. <span class="el-dialog__title">
  2282. <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
  2283. </span>
  2284. </div>
  2285. </template>
  2286. <el-menu :default-active="activeIndex" v-if="Navigation === true" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  2287. <el-menu-item index="1">车队作业费</el-menu-item>
  2288. <el-menu-item index="2">劳务作业费</el-menu-item>
  2289. </el-menu>
  2290. <el-table
  2291. :data="tasklegList"
  2292. ref="table"
  2293. tooltip-effect="dark"
  2294. width="100%"
  2295. border
  2296. stripe
  2297. @selection-change="whgenlegSelectionChange"
  2298. >
  2299. <el-table-column type="selection" width="55"> </el-table-column>
  2300. <el-table-column label="行号" type="index" width="80">
  2301. </el-table-column>
  2302. <el-table-column
  2303. prop="fCorpname"
  2304. header-align="center"
  2305. align="center"
  2306. label="客户名称"
  2307. >
  2308. </el-table-column>
  2309. <el-table-column
  2310. prop="fName"
  2311. header-align="center"
  2312. align="center"
  2313. width="180px"
  2314. label="费用名称"
  2315. >
  2316. </el-table-column>
  2317. <el-table-column
  2318. prop="fFeeUnitid"
  2319. header-align="center"
  2320. align="center"
  2321. label="计价单位"
  2322. >
  2323. <template slot-scope="scope">
  2324. <span v-if="scope.row.fFeeUnitid === 1">件数</span>
  2325. <span v-if="scope.row.fFeeUnitid === 2">毛重</span>
  2326. <span v-if="scope.row.fFeeUnitid === 3">净重</span>
  2327. <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
  2328. <span v-if="scope.row.fFeeUnitid === 5">固定</span>
  2329. <span v-if="scope.row.fFeeUnitid === 6">其它</span>
  2330. <span v-if="scope.row.fFeeUnitid === 7">箱量</span>
  2331. </template>
  2332. </el-table-column>
  2333. <el-table-column
  2334. prop="fPrice"
  2335. header-align="center"
  2336. align="center"
  2337. label="单价"
  2338. >
  2339. </el-table-column>
  2340. </el-table>
  2341. <pagination
  2342. v-show="whgenlegTotal > 0"
  2343. :total="whgenlegTotal"
  2344. :page.sync="queryParams.pageNum"
  2345. :limit.sync="queryParams.pageSize"
  2346. :page-sizes="[100, 200, 300, 400]"
  2347. @pagination="getWhgenlegList"
  2348. />
  2349. <div slot="footer" class="dialog-footer">
  2350. <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
  2351. <el-button @click="warehousingagreements = false;Navigation = false">取 消</el-button>
  2352. </div>
  2353. </el-dialog>
  2354. <el-dialog
  2355. title="调拨作业单打印"
  2356. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2357. :visible.sync="openPrintJobSheet"
  2358. :close-on-click-modal="false"
  2359. width="70%"
  2360. :modal="false"
  2361. >
  2362. <table
  2363. id="print_area1"
  2364. class="biaoge zzss"
  2365. border="1"
  2366. style="border-collapse: collapse; border: none"
  2367. >
  2368. <tr>
  2369. <td
  2370. width="1400"
  2371. colspan="6"
  2372. class="zzss"
  2373. style="font-size: 20px; font-weight: bold; border: none"
  2374. >
  2375. {{company}}有限公司作业单
  2376. </td>
  2377. </tr>
  2378. <tr>
  2379. <td colspan="5"
  2380. style="font-size: 20px; font-weight: bold; border: none"
  2381. ></td>
  2382. <td v-if="!fSerialNumber"
  2383. style="font-size: 20px; font-weight: bold; border: none"
  2384. >流水号:</td>
  2385. <td v-else
  2386. style="font-size: 20px; font-weight: bold; border: none"
  2387. >流水号:{{fSerialNumber.slice(8,11)}}</td>
  2388. </tr>
  2389. <tr>
  2390. <td
  2391. width="900"
  2392. colspan="4"
  2393. class="zzss"
  2394. style="padding: 6px;font-weight: bold"
  2395. >
  2396. 作业类型:{{businessType}}
  2397. </td>
  2398. <td width="500"v-if="this.printinglist.length === 0 || !fBstime" colspan="2" style="padding-bottom: 0; font-weight: bold;">入库时间:111</td>
  2399. <td
  2400. v-else
  2401. width="500"
  2402. colspan="2"
  2403. style="padding: 6px; font-weight: bold;"
  2404. class="zzss"
  2405. >
  2406. 调拨日期:{{ parseTime(this.printinglist[0].fBsdate,"{y}-{m}-{d}") }} {{ fBstime.slice(11,19) }}
  2407. </td>
  2408. </tr>
  2409. <!-- <tr v-for="(item, index) in printinglist" :key="index">-->
  2410. <!-- <td width="200">车号</td>-->
  2411. <!-- <td width="200">{{ item.fTruckno }}</td>-->
  2412. <!-- <td width="200">货物品名</td>-->
  2413. <!-- <td width="200" class="zzss">-->
  2414. <!-- {{ item.fGoodsids }}-->
  2415. <!-- </td>-->
  2416. <!-- <td width="200">{{item.fBusinessTypes}}</td>-->
  2417. <!-- <td width="200">{{item.fMarks}}</td>-->
  2418. <!-- </tr>-->
  2419. <tr>
  2420. <td width="200">车号</td>
  2421. <td width="200">货物品名</td>
  2422. <td width="200">提单号</td>
  2423. <td width="200">品牌/规格/产地</td>
  2424. <td width="200">净重(kg)</td>
  2425. <td width="200">件数/规格</td>
  2426. </tr>
  2427. <tr v-for="(item, index) in printinglist" :key="index">
  2428. <td width="200">{{ item.fTruckno }}</td>
  2429. <td width="200">{{ item.fGoodsids }}</td>
  2430. <td width="200">{{ item.fMblno }}</td>
  2431. <td width="200">{{item.fBusinessTypes}}/{{item.fMarks}}</td>
  2432. <td width="200">{{item.fNetweight}}</td>
  2433. <td width="200">{{ item.fQty }}/{{item.fPackagespecs}}</td>
  2434. </tr>
  2435. <tr>
  2436. <td width="1400" colspan="6">&nbsp;</td>
  2437. </tr>
  2438. <tr>
  2439. <td>备注:</td>
  2440. <td colspan="5">{{ form.remark }}</td>
  2441. </tr>
  2442. <tr v-for="(item, indexe) in collectionoptionss" :key="indexe + 'index'">
  2443. <td>收费</td>
  2444. <td>{{ item.fFeeids }}</td>
  2445. <td>{{ item.fAmount }} 元</td>
  2446. <!-- <td colspan="4">办单费:5元,过磅费自理</td> -->
  2447. </tr>
  2448. <tr>
  2449. <td>司机签字:</td>
  2450. <td></td>
  2451. <td>电话</td>
  2452. <td>{{ form.fDriverTel }}</td>
  2453. <td colspan="2" rowspan="2">
  2454. 确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2455. </td>
  2456. </tr>
  2457. <tr>
  2458. <td>制表:</td>
  2459. <td>{{ form.createBy }}</td>
  2460. <td>机械/人工:</td>
  2461. <td></td>
  2462. </tr>
  2463. <!-- <tr>-->
  2464. <!-- <td colspan="6" class="zzss">&nbsp;</td>-->
  2465. <!-- </tr>-->
  2466. <tr>
  2467. <td width="290" class="zzss" colspan="2">地址:{{ fAddr }}</td>
  2468. <td width="290" class="zzss" colspan="2">电话:{{ form.fTel }}</td>
  2469. <td width="280" class="zzss"></td>
  2470. <td width="280" class="zzss"></td>
  2471. </tr>
  2472. </table>
  2473. <div>
  2474. <el-button
  2475. type="primary"
  2476. :disabled="browseStatus"
  2477. @click="addList">打印作业费
  2478. </el-button>
  2479. <el-button @click="openPrintJobSheet = false">取消 </el-button>
  2480. </div>
  2481. </el-dialog>
  2482. </el-dialog>
  2483. <el-dialog
  2484. title="调拨收货单打印"
  2485. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2486. :visible.sync="editDialogVisible_ss"
  2487. :close-on-click-modal="false"
  2488. width="70%"
  2489. :modal="false"
  2490. >
  2491. <table
  2492. id="print_area3"
  2493. class="biaoge zzss"
  2494. border="1"
  2495. style="border-collapse: collapse; border: none;"
  2496. >
  2497. <tr>
  2498. <td
  2499. width="1400"
  2500. colspan="6"
  2501. class="zzss"
  2502. style="font-size: 26px; font-weight: bold; border: none"
  2503. >
  2504. {{company}}有限公司收货单
  2505. </td>
  2506. </tr>
  2507. <!-- <div v-for="{{}}" :key="index"> -->
  2508. <tr>
  2509. <td width="400">车号:</td>
  2510. <td width="400" v-if="printinglist.length === 0"></td>
  2511. <td width="400" v-else>{{ printinglist[0].fTruckno }}</td>
  2512. <td
  2513. width="500"
  2514. colspan="4"
  2515. style="padding-bottom: 0px; font-weight: bold;"
  2516. class="zzss"
  2517. v-if="this.printinglist.length === 0"
  2518. >
  2519. 日期:11
  2520. </td>
  2521. <td
  2522. width="500"
  2523. colspan="4"
  2524. style="padding-bottom: 0px; font-weight: bold;"
  2525. class="zzss"
  2526. v-else
  2527. >
  2528. 日期:{{ parseTime(this.printinglist[0].fBsdate,"{y}-{m}-{d}") }} {{ fBstime.slice(11,19) }}
  2529. </td>
  2530. <!-- <td
  2531. width="500"
  2532. colspan="2"
  2533. style="padding-bottom: 0px; font-weight: bold; border: none"
  2534. class="zzss"
  2535. >
  2536. </td> -->
  2537. </tr>
  2538. <tr v-for="(item, index) in printinglist" :key="index">
  2539. <td width="250">货物品名:</td>
  2540. <td width="200" colspan="">{{ item.fGoodsids }}</td>
  2541. <!-- <td width="200" colspan="2">件数: 161件</td> -->
  2542. <!-- <td width="200"></td> -->
  2543. <td width="200" colspan="4" class="zzss">
  2544. 件数: {{ item.fQty }}件
  2545. </td>
  2546. </tr>
  2547. <!-- <tr>
  2548. <td width="1400" colspan="6">&nbsp;</td>
  2549. </tr> -->
  2550. <tr>
  2551. <td>备注:</td>
  2552. <td colspan="5">{{ form.remark }}</td>
  2553. </tr>
  2554. <tr>
  2555. <td>司机签字:</td>
  2556. <td></td>
  2557. <td colspan="2">司机电话:</td>
  2558. <td colspan="2" v-if="dataList.length !== 0">{{ dataList[0].fDriverTel }}</td>
  2559. <td colspan="2" v-else>1</td>
  2560. </tr>
  2561. <tr>
  2562. <td>制单人:</td>
  2563. <td>{{ form.createBy }}</td>
  2564. <td colspan="2">收货人:</td>
  2565. <td colspan="2">{{ form.fContacts }}</td>
  2566. </tr>
  2567. <!-- <tr>
  2568. <td colspan="6" class="zzss">&nbsp;</td>
  2569. </tr> -->
  2570. <tr>
  2571. <td width="280" class="zzss"></td>
  2572. <td width="280" class="zzss"></td>
  2573. <td width="280" class="zzss"></td>
  2574. <td width="280" class="zzss"></td>
  2575. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2576. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  2577. </tr>
  2578. <!-- </div> -->
  2579. </table>
  2580. <el-button @click="printSomething2">打印</el-button>
  2581. <el-button @click="editDialogVisible_ss = false">取消 </el-button>
  2582. </el-dialog>
  2583. <el-dialog
  2584. title="调拨进仓单打印"
  2585. :modal="false"
  2586. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  2587. :visible.sync="editDialogVisible_s"
  2588. :close-on-click-modal="false"
  2589. @close="closeDialog"
  2590. width="70%"
  2591. >
  2592. <table
  2593. id="print_area2"
  2594. class="biaoge zzss"
  2595. border="1"
  2596. style="border-collapse: collapse; border: none"
  2597. >
  2598. <tr>
  2599. <td
  2600. width="100"
  2601. colspan="7"
  2602. class="zzss"
  2603. style="font-size: 28px; font-weight: bold; border: none"
  2604. >
  2605. {{company}}进仓单
  2606. </td>
  2607. </tr>
  2608. <tr>
  2609. <td
  2610. width="100"
  2611. colspan="7"
  2612. class="zzss"
  2613. style="font-size: 28px; font-weight: bold; border: none"
  2614. >
  2615. &nbsp;
  2616. </td>
  2617. </tr>
  2618. <tr>
  2619. <td width="450" colspan="2" class="zzss">
  2620. 货权方:{{ form.fCorpidName }}
  2621. </td>
  2622. <td width="450" colspan="2" class="zzss">
  2623. 仓库:{{ form.fWarehouseid }}
  2624. </td>
  2625. <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
  2626. </tr>
  2627. <tr>
  2628. <td width="200" colspan="2" class="zzss">保管方:{{company}}有限公司</td>
  2629. <td width="200" colspan="2" class="zzss">
  2630. 联系人:{{ form.fContacts }}
  2631. </td>
  2632. <td width="200" colspan="3" class="zzss">电话:{{ form.fTel }}</td>
  2633. </tr>
  2634. <tr>
  2635. <td width="100" border="1">提单号</td>
  2636. <td width="100">品名</td>
  2637. <td width="100">箱型</td>
  2638. <td width="100">品牌</td>
  2639. <td width="100">件数</td>
  2640. <td width="100">重量</td>
  2641. <td width="100">包装规格</td>
  2642. </tr>
  2643. <tr>
  2644. <td width="100">{{ form.fMblno }}</td>
  2645. <td width="100">{{ form.fProductName }}</td>
  2646. <td width="100">{{ fCntrtype }}</td>
  2647. <td width="100">{{ form.fMarks }}</td>
  2648. <td width="100">包</td>
  2649. <td width="100">吨</td>
  2650. <td width="100">{{ fPackagespecs }}</td>
  2651. </tr>
  2652. <tr>
  2653. <td width="100">序号</td>
  2654. <td width="100">入货日期</td>
  2655. <td width="100">箱量(20GP)</td>
  2656. <td width="100">重量</td>
  2657. <td width="100">件数</td>
  2658. <td width="100">入库重量</td>
  2659. <td width="100">入库件数</td>
  2660. </tr>
  2661. <tr v-for="(item, indexx) in printinglist" :key="indexx">
  2662. <td width="100">{{ indexx + 1 }}</td>
  2663. <td width="100">{{ item.fBsdate }}</td>
  2664. <td width="100">{{ item.fCntqty }}</td>
  2665. <td width="100">{{ (item.fGrossweight / 1000).toFixed(2) }}</td>
  2666. <td width="100">{{ item.fPlanqty }}</td>
  2667. <td width="100">{{ (item.fNetweight / 1000).toFixed(2) }}</td>
  2668. <td width="100">{{ item.fQty }}</td>
  2669. </tr>
  2670. <tr>
  2671. <td width="100" colspan="2">合计:</td>
  2672. <td width="100">{{ fCntqty }}</td>
  2673. <td width="100">{{ form.sumFGrossweight }}</td>
  2674. <td width="100">{{ fPlanqty }}</td>
  2675. <td width="100">{{ form.sumFNetweight}}</td>
  2676. <td width="100">{{ fQty }}</td>
  2677. </tr>
  2678. <tr>
  2679. <td width="100">备注:</td>
  2680. <td width="100" colspan="6"></td>
  2681. </tr>
  2682. <tr>
  2683. <td width="100" colspan="7" class="zzss">
  2684. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  2685. </td>
  2686. </tr>
  2687. <tr style="border: none">
  2688. <td width="100" colspan="2" class="zzss" style="border: none">
  2689. 开单员:
  2690. </td>
  2691. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2692. <td width="100" colspan="2" class="zzss" style="border: none">
  2693. 仓管员:
  2694. </td>
  2695. </tr>
  2696. <tr style="border: none">
  2697. <td width="100" colspan="2" class="zzss" style="border: none">
  2698. 开单时间:
  2699. </td>
  2700. <td width="100" colspan="3" class="zzss" style="border: none"></td>
  2701. <td width="100" colspan="2" class="zzss" style="border: none">
  2702. (盖章)
  2703. </td>
  2704. </tr>
  2705. </table>
  2706. <el-button @click="printSomething1">打印</el-button>
  2707. <el-button @click="editDialogVisible_s = false">取消 </el-button>
  2708. </el-dialog>
  2709. <el-dialog
  2710. title="选择库位"
  2711. :data="treeselectList"
  2712. :visible.sync="choiceWarehouse"
  2713. width="30%"
  2714. :before-close="hanDleclose">
  2715. <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions" :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
  2716. <div>{{Warehouse}}</div>
  2717. <span slot="footer" class="dialog-footer">
  2718. <el-button @click="choiceWarehouse = false">取 消</el-button>
  2719. <el-button type="primary" @click="confirm">确 定</el-button>
  2720. </span>
  2721. </el-dialog>
  2722. </div>
  2723. </template>
  2724. <script>
  2725. import print from "print-js";
  2726. import {
  2727. backFee,
  2728. RevocationApproval,
  2729. addWhgenleg,
  2730. getStockTransferList,
  2731. getStockTransfer,
  2732. delStockTransfer,
  2733. updateCredit,
  2734. addJoblist,
  2735. disChargelist,
  2736. addStockTransfer,
  2737. warehouseSubmission,
  2738. updateStockTransfer,
  2739. exportStockTransfer,
  2740. delstockTransfer_s,
  2741. serialNumber
  2742. } from "@/api/warehouseBusiness/stockTransfer";
  2743. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2744. import { listAgreements } from "@/api/warehouseBusiness/agreement";
  2745. import { listCorps } from "@/api/basicdata/corps";
  2746. import { listFees, getFees } from "@/api/basicdata/fees";
  2747. import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
  2748. import { listArea } from "@/api/basicdata/area";
  2749. import { listGoods } from "@/api/basicdata/goods";
  2750. import { listUser, queryUserVal } from "@/api/system/user";
  2751. import UploadFile from "@/components/Uploadfile";
  2752. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  2753. import Global from '@/layout/components/global'
  2754. import AddOrUpdate from '@/views/viewApproval'
  2755. import ApprovalComments from '@/views/startApproval'
  2756. import Treeselect from '@riophae/vue-treeselect'
  2757. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  2758. import { getToken } from '@/utils/auth'
  2759. import Cookies from 'js-cookie'
  2760. import { addSet, select } from '@/api/system/set'
  2761. import draggable from "vuedraggable";
  2762. import Vue from 'vue'
  2763. Vue.directive('dialogDrag', {
  2764. bind(el, binding, vnode, oldVnode) {
  2765. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  2766. const dragDom = el.querySelector('.el-dialog')
  2767. const enlarge = el.querySelector('.enlarge')
  2768. dialogHeaderEl.style.cursor = 'move'
  2769. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  2770. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  2771. if(enlarge){
  2772. enlarge.onclick = (e) => {
  2773. dragDom.style.top = '0px'
  2774. dragDom.style.left = '0px'
  2775. }
  2776. }
  2777. dialogHeaderEl.onmousedown = (e) => {
  2778. // 鼠标按下,计算当前元素距离可视区的距离
  2779. const disX = e.clientX - dialogHeaderEl.offsetLeft
  2780. const disY = e.clientY - dialogHeaderEl.offsetTop
  2781. // 获取到的值带px 正则匹配替换
  2782. let styL, styT
  2783. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  2784. if (sty.left.includes('%')) {
  2785. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  2786. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  2787. } else {
  2788. styL = +sty.left.replace(/\px/g, '')
  2789. styT = +sty.top.replace(/\px/g, '')
  2790. }
  2791. document.onmousemove = function(e) {
  2792. // 通过事件委托,计算移动的距离
  2793. const l = e.clientX - disX
  2794. const t = e.clientY - disY
  2795. // 移动当前元素
  2796. if ((t + styT) >= 0){
  2797. dragDom.style.top = `${t + styT}px`
  2798. }
  2799. dragDom.style.left = `${l + styL}px`
  2800. // 将此时的位置传出去
  2801. // binding.value({x:e.pageX,y:e.pageY})
  2802. }
  2803. document.onmouseup = function(e) {
  2804. document.onmousemove = null
  2805. document.onmouseup = null
  2806. }
  2807. }
  2808. }
  2809. })
  2810. export default {
  2811. name: "Warehousebills",
  2812. components: {
  2813. draggable,
  2814. UploadFile,
  2815. AddOrUpdate,
  2816. ApprovalComments,
  2817. Treeselect
  2818. },
  2819. data() {
  2820. return {
  2821. //全屏放大
  2822. dialogFull:false,
  2823. drag: false,
  2824. setRowList: [
  2825. {
  2826. surface: "1",
  2827. label: "createBy",
  2828. name: "制单人",
  2829. checked: 0,
  2830. width: 100,
  2831. },
  2832. {
  2833. surface: "2",
  2834. label: "fStorekeeper",
  2835. name: "仓管员",
  2836. checked: 0,
  2837. width: 100,
  2838. },
  2839. {
  2840. surface: "3",
  2841. label: "fItemsStatus",
  2842. name: "调拨状态",
  2843. checked: 0,
  2844. width: 100,
  2845. },
  2846. {
  2847. surface: "4",
  2848. label: "fCorpid",
  2849. name: "货权方",
  2850. checked: 0,
  2851. width: 100,
  2852. },
  2853. {
  2854. surface: "5",
  2855. label: "fMblno",
  2856. name: "提单号",
  2857. checked: 0,
  2858. width: 100,
  2859. },
  2860. {
  2861. surface: "6",
  2862. label: "fProductName",
  2863. name: "品名",
  2864. checked: 0,
  2865. width: 100,
  2866. },
  2867. {
  2868. surface: "7",
  2869. label: "fMarks",
  2870. name: "品牌",
  2871. checked: 0,
  2872. width: 100,
  2873. },
  2874. {
  2875. surface: "8",
  2876. label: "fBsdate",
  2877. name: "调拨日期",
  2878. checked: 0,
  2879. width: 100,
  2880. },
  2881. {
  2882. surface: "9",
  2883. label: "fWarehouseid",
  2884. name: "调入仓库",
  2885. checked: 0,
  2886. width: 100,
  2887. },
  2888. {
  2889. surface: "10",
  2890. label: "fInwarehouseid",
  2891. name: "调出仓库",
  2892. checked: 0,
  2893. width: 100,
  2894. },
  2895. {
  2896. surface: "11",
  2897. label: "fPlanqty",
  2898. name: "计划调拨件数",
  2899. checked: 0,
  2900. width: 100,
  2901. },
  2902. {
  2903. surface: "12",
  2904. label: "fQty",
  2905. name: "调拨件数",
  2906. checked: 0,
  2907. width: 100,
  2908. },
  2909. {
  2910. surface: "13",
  2911. label: "fGrossweight",
  2912. name: "调拨毛重(KG)",
  2913. checked: 0,
  2914. width: 100,
  2915. },
  2916. {
  2917. surface: "14",
  2918. label: "fNetweight",
  2919. name: "调拨净重(kg)",
  2920. checked: 0,
  2921. width: 100,
  2922. },
  2923. {
  2924. surface: "15",
  2925. label: "fBusinessType",
  2926. name: "业务类别",
  2927. checked: 0,
  2928. width: 100,
  2929. },
  2930. {
  2931. surface: "16",
  2932. label: "fBillstatus",
  2933. name: "费用状态",
  2934. checked: 0,
  2935. width: 100,
  2936. },
  2937. ],
  2938. getRowList: [
  2939. {
  2940. surface: "1",
  2941. label: "createBy",
  2942. name: "制单人",
  2943. checked: 0,
  2944. width: 100,
  2945. },
  2946. {
  2947. surface: "2",
  2948. label: "fStorekeeper",
  2949. name: "仓管员",
  2950. checked: 0,
  2951. width: 100,
  2952. },
  2953. {
  2954. surface: "3",
  2955. label: "fItemsStatus",
  2956. name: "调拨状态",
  2957. checked: 0,
  2958. width: 100,
  2959. },
  2960. {
  2961. surface: "4",
  2962. label: "fCorpid",
  2963. name: "货权方",
  2964. checked: 0,
  2965. width: 100,
  2966. },
  2967. {
  2968. surface: "5",
  2969. label: "fMblno",
  2970. name: "提单号",
  2971. checked: 0,
  2972. width: 100,
  2973. },
  2974. {
  2975. surface: "6",
  2976. label: "fProductName",
  2977. name: "品名",
  2978. checked: 0,
  2979. width: 100,
  2980. },
  2981. {
  2982. surface: "7",
  2983. label: "fMarks",
  2984. name: "品牌",
  2985. checked: 0,
  2986. width: 100,
  2987. },
  2988. {
  2989. surface: "8",
  2990. label: "fBsdate",
  2991. name: "调拨日期",
  2992. checked: 0,
  2993. width: 100,
  2994. },
  2995. {
  2996. surface: "9",
  2997. label: "fWarehouseid",
  2998. name: "调入仓库",
  2999. checked: 0,
  3000. width: 100,
  3001. },
  3002. {
  3003. surface: "10",
  3004. label: "fInwarehouseid",
  3005. name: "调出仓库",
  3006. checked: 0,
  3007. width: 100,
  3008. },
  3009. {
  3010. surface: "11",
  3011. label: "fPlanqty",
  3012. name: "计划调拨件数",
  3013. checked: 0,
  3014. width: 100,
  3015. },
  3016. {
  3017. surface: "12",
  3018. label: "fQty",
  3019. name: "调拨件数",
  3020. checked: 0,
  3021. width: 100,
  3022. },
  3023. {
  3024. surface: "13",
  3025. label: "fGrossweight",
  3026. name: "调拨毛重(KG)",
  3027. checked: 0,
  3028. width: 100,
  3029. },
  3030. {
  3031. surface: "14",
  3032. label: "fNetweight",
  3033. name: "调拨净重(kg)",
  3034. checked: 0,
  3035. width: 100,
  3036. },
  3037. {
  3038. surface: "15",
  3039. label: "fBusinessType",
  3040. name: "业务类别",
  3041. checked: 0,
  3042. width: 100,
  3043. },
  3044. {
  3045. surface: "16",
  3046. label: "fBillstatus",
  3047. name: "费用状态",
  3048. checked: 0,
  3049. width: 100,
  3050. },
  3051. ],
  3052. allCheck: false,
  3053. showSetting:false,
  3054. headers: {
  3055. Authorization: 'Bearer ' + getToken()
  3056. },
  3057. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  3058. company:'',
  3059. fSerialNumber:'',
  3060. fCNameOptions:[],
  3061. fDNameOptions:[],
  3062. businessType:'',
  3063. fBstime:'',
  3064. fPackagespecs: "",
  3065. editDialogVisible_s: false,
  3066. editDialogVisible_ss: false,
  3067. fCompanyOptIons:[],
  3068. fleetOptions:[],
  3069. activeIndex: '1',
  3070. activeIndex2: '1',
  3071. //控制选择库位弹出
  3072. choiceWarehouse:false,
  3073. information:'',
  3074. informationId:'',
  3075. inDex:'',
  3076. Warehouse:'',
  3077. //树状下来库位表
  3078. treeselectList:{
  3079. fWarehouselocid:null
  3080. },
  3081. //仓库树状图
  3082. fWarehouseidOptions:[],
  3083. fWarehouseidOption:[],
  3084. activeNames:['1'],
  3085. //作业类型校验
  3086. isrequired:2,
  3087. Navigation:false,
  3088. isrequired_s:2,
  3089. isrequired_l:2,
  3090. contrOl:false,
  3091. //作业类型字典表
  3092. businessTypeOption:[],
  3093. approvalStatus:false,
  3094. Lander:'',
  3095. Operator:'',
  3096. cancelButton:true,
  3097. approve:false,
  3098. disappear:false,
  3099. colseButton:true,
  3100. addOrUpdateVisible: false,
  3101. addOrUpdateVisib:false,
  3102. stockTransferId:140,
  3103. notChange:false,
  3104. index: 0,
  3105. fFeeUnitid: null,
  3106. fFeeUnitids: null,
  3107. formBrowseStatus: false,
  3108. detailsHidden: false,
  3109. warehousingagreements: false,
  3110. fTruckno: null,
  3111. fBsdate: null,
  3112. fCntrtype: null,
  3113. fGoodsids: null,
  3114. fPlanqty: null,
  3115. fPlannetweight: null,
  3116. fPlanvolumn: null,
  3117. fGrossweight: 0,
  3118. fCntqty: 0,
  3119. fNetweight: 0,
  3120. fVolumn: 0,
  3121. fid: 0,
  3122. fQty: 0,
  3123. fSbu: 0,
  3124. // 遮罩层
  3125. loading: true,
  3126. // 打印地址
  3127. fAddr: "",
  3128. // 税率
  3129. fTaxrate: null,
  3130. // 选中数组
  3131. ids: [],
  3132. // userVal: {
  3133. // userName: null,
  3134. // nickName: null,
  3135. // deptId: null,
  3136. // },
  3137. queryForm: {},
  3138. // 费用状态
  3139. costStatus: 'Dr',
  3140. // 库存总账表
  3141. whgenlegList: [],
  3142. whgenlegTotal: 0,
  3143. // 弹窗库存总账数据
  3144. dialogWhgenlegList: [],
  3145. // 库存总账对话框
  3146. whgenlegVisible: false,
  3147. // 收费多选框
  3148. feelDrSelection: [],
  3149. openPrintJobSheet: false,
  3150. editDialogClosed_ss: false,
  3151. dataList: [],
  3152. warehouseCrList: [],
  3153. warehouseDrList: [],
  3154. printinglist: [],
  3155. browseStatus: false,
  3156. collectionoptionss: [],
  3157. relevantAttachments: [],
  3158. // 非单个禁用
  3159. single: true,
  3160. // 非多个禁用
  3161. multiple: true,
  3162. // 显示搜索条件
  3163. showSearch: true,
  3164. // 总条数
  3165. total: 0,
  3166. // 仓库主(出入库)表格数据
  3167. warehousebillsList: [],
  3168. // 弹出层标题
  3169. title: "",
  3170. // 是否显示弹出层
  3171. open: false,
  3172. // 货权方(客户数据)
  3173. fMblnoOptions: [],
  3174. // 货权方(客户数据)
  3175. // 客户名称
  3176. KHblnoOptions: [],
  3177. // 作业费协议
  3178. tasklegList: [],
  3179. fSbuOptions: [],
  3180. // 操作员
  3181. userOptions: [],
  3182. // 操作员
  3183. goodsOptions: [],
  3184. // 制单部门
  3185. deptOptions: [],
  3186. // 仓库(仓库数据)
  3187. warehouseOptions: [],
  3188. // 库存明细入账数组
  3189. dataListSelection: [],
  3190. // 库存明细撤回入账数组
  3191. dataWithdrawList: [],
  3192. kqhouseOptions: [],
  3193. // 贸易方式(数据字典),对应t_trademodels 字典
  3194. fTrademodeidOptions: [],
  3195. // 结算方式(数据字典),下拉选择字典
  3196. fStltypeOptions: [],
  3197. // 仓储类型 入库时选择 产地 规格 品牌 所用,对应storage_type 字典
  3198. fStorageTypeOptions: [],
  3199. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  3200. fIfweighOptions: [],
  3201. // 是否破损(数据字典),默认F否则T字典
  3202. fIfdamageOptions: [],
  3203. // 单据类型(数据字典)SJRK字典
  3204. fBilltypeOptions: [],
  3205. // 状态(数据字典),N 入字典
  3206. fBillstatusOptions: [],
  3207. //结算方式对应字典表
  3208. fStltypeidOptions:[],
  3209. // 费用名称
  3210. fWbuOptions: [],
  3211. // 计价单位
  3212. jFeetunitOptions: [
  3213. /*{dictLabel: "件数",dictValue: 1},
  3214. {dictLabel: "毛重",dictValue: 2},
  3215. {dictLabel: "净重",dictValue: 3},
  3216. {dictLabel: "尺码",dictValue: 4},
  3217. {dictLabel: "固定",dictValue: 5},*/
  3218. ],
  3219. // 查询参数
  3220. queryParams: {
  3221. pageNum: 1,
  3222. pageSize: 50,
  3223. type:1,
  3224. fBillno: null,
  3225. createBy: null,
  3226. createTime: null,
  3227. fCustomsdeclartion: null,
  3228. fOriginalbillno: null,
  3229. fDeptid: null,
  3230. fBsdeptid: null,
  3231. fContacts: null,
  3232. fTel: null,
  3233. fCorpid: null,
  3234. fTocorpid: null,
  3235. fStltypeid: null,
  3236. fBscorpno: null,
  3237. fWarehouseid: null,
  3238. fStorekeeper: null,
  3239. fBsdate: null,
  3240. fPlanqty: null,
  3241. fPlangrossweight: null,
  3242. fPlannetweight: null,
  3243. fPlanvolumn: null,
  3244. fQty: null,
  3245. fGrossweight: null,
  3246. fNetweight: null,
  3247. fVolumn: null,
  3248. fTrademodeid: null,
  3249. fSbu: null,
  3250. fFeetunit: null,
  3251. fMblno: null,
  3252. fVslvoy: null,
  3253. fEta: null,
  3254. fCustomno: null,
  3255. fIfweigh: null,
  3256. fIfpledge: null,
  3257. fIfdamage: null,
  3258. fBankcorpid: null,
  3259. fBilltype: null,
  3260. fBillstatus: null,
  3261. fCreateby: null,
  3262. fCreatetime: null,
  3263. fGoodsid: null,
  3264. fCntrtype: null,
  3265. fCntqty: null,
  3266. },
  3267. // 库存总账参数
  3268. whgenlegParams: {
  3269. pageNum: 1,
  3270. pageSize: 10,
  3271. fMblno: null,
  3272. fCorpid: null,
  3273. fWarehouseid: null,
  3274. fInwarehouseid:null,
  3275. },
  3276. // 表单参数
  3277. form: {
  3278. fMblno: null,
  3279. fCorpid: null,
  3280. fBsdate: null,
  3281. fBsdates: null,
  3282. fTrademodeid: null,
  3283. fWarehouseid: null,
  3284. fBstime:'',
  3285. },
  3286. // 表单校验
  3287. rules: {
  3288. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  3289. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  3290. fCorpid: [{ required: true, message: " ", trigger: "blur"},],
  3291. fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
  3292. fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
  3293. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  3294. fBillingway: [{ required: true, message: " ", trigger: "blur" }],
  3295. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  3296. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  3297. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  3298. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  3299. fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
  3300. fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
  3301. fBusinessType: [{ required: true, message: " ", trigger: "blur"},],
  3302. fInwarehouseid: [{ required: true, message: " ", trigger: "blur"},],
  3303. fbillingway: [
  3304. {
  3305. required: true,
  3306. message: " ",
  3307. trigger: "blur",
  3308. },
  3309. ],
  3310. fTocorpid: [
  3311. {
  3312. required: true,
  3313. message: " ",
  3314. trigger: "blur",
  3315. },
  3316. ],
  3317. },
  3318. };
  3319. },
  3320. created() {
  3321. this.getList();
  3322. this.getDicts("data_trademodes").then((response) => {
  3323. this.fTrademodeidOptions = response.data;
  3324. });
  3325. this.getDicts("data_stltype_type").then((response) => {
  3326. this.fStltypeOptions = response.data;
  3327. });
  3328. this.getDicts("storage_type").then((response) => {
  3329. this.fStorageTypeOptions = response.data;
  3330. });
  3331. this.getDicts("tax_rate").then((response) => {
  3332. this.fTaxrate = response.data[0].dictValue
  3333. });
  3334. this.getDicts("data_ifweigh_status").then((response) => {
  3335. this.fIfweighOptions = response.data;
  3336. });
  3337. this.getDicts("data_ifdamage_status").then((response) => {
  3338. this.fIfdamageOptions = response.data;
  3339. });
  3340. this.getDicts("data_billtype_type").then((response) => {
  3341. this.fBilltypeOptions = response.data;
  3342. });
  3343. this.getDicts("sys_common_status").then((response) => {
  3344. this.fBillstatusOptions = response.data;
  3345. });
  3346. this.getDicts("data_unitfees").then((response) => {
  3347. this.jFeetunitOptions = response.data;
  3348. });
  3349. this.getDicts("st_trans_type").then((response) => {
  3350. this.businessTypeOption = response.data;
  3351. });
  3352. treeselect().then(response => {
  3353. this.warehouseOptions = response.data
  3354. })
  3355. this.warehousesssMethod()
  3356. this.register()
  3357. this.company = localStorage.getItem('companyName')
  3358. this.getRow();
  3359. },
  3360. activated(){
  3361. this.Jump()
  3362. },
  3363. methods: {
  3364. //全屏放大
  3365. full(){
  3366. this.dialogFull = !this.dialogFull
  3367. },
  3368. //列设置全选
  3369. allChecked() {
  3370. if (this.allCheck == true) {
  3371. this.setRowList.map((e) => {
  3372. return (e.checked = 0);
  3373. });
  3374. } else {
  3375. this.setRowList.map((e) => {
  3376. return (e.checked = 1);
  3377. });
  3378. }
  3379. },
  3380. //查询列数据
  3381. getRow() {
  3382. let that = this;
  3383. this.data = {
  3384. tableName: "调拨",
  3385. userId: Cookies.get("userName"),
  3386. };
  3387. select(this.data).then((res) => {
  3388. if (res.data.length != 0) {
  3389. this.getRowList = res.data.filter((e) => e.checked == 0);
  3390. this.setRowList = res.data;
  3391. this.setRowList = this.setRowList.reduce((res, item) => {
  3392. res.push({
  3393. surface: item.surface,
  3394. label: item.label,
  3395. name: item.name,
  3396. checked: item.checked,
  3397. width: item.width,
  3398. fixed: item.fixed,
  3399. });
  3400. return res;
  3401. }, []);
  3402. }
  3403. });
  3404. },
  3405. //保存列设置
  3406. save() {
  3407. this.showSetting = false;
  3408. this.data = {
  3409. tableName: "调拨",
  3410. userId: Cookies.get("userName"),
  3411. sysTableSetList: this.setRowList,
  3412. };
  3413. addSet(this.data).then((res) => {
  3414. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  3415. });
  3416. },
  3417. //开始拖拽事件
  3418. onStart() {
  3419. this.drag = true;
  3420. },
  3421. //拖拽结束事件
  3422. onEnd() {
  3423. this.drag = false;
  3424. },
  3425. //附件删除
  3426. deleteFile(scope){
  3427. this.relevantAttachments[scope.$index].fName = ''
  3428. this.relevantAttachments[scope.$index].fUrl = ''
  3429. if(this.relevantAttachments[scope.$index].fUrl === ''){
  3430. this.$message.success("删除成功")
  3431. }else{
  3432. this.$message.error("未知错误,删除失败")
  3433. }
  3434. },
  3435. //附件查看
  3436. checkFile(scope){
  3437. if(this.relevantAttachments[scope.$index].fUrl){
  3438. window.open(this.relevantAttachments[scope.$index].fUrl)
  3439. }else{
  3440. this.$message.error("请上传附件")
  3441. }
  3442. },
  3443. //上传附件
  3444. handleSucces(scope,res,file){
  3445. this.relevantAttachments[scope.$index].fName = res.fileName
  3446. this.relevantAttachments[scope.$index].fUrl = res.url
  3447. if(this.relevantAttachments[scope.$index].fUrl === ''){
  3448. this.$message.error('上传失败')
  3449. }{
  3450. this.$message.success("上传成功")
  3451. }
  3452. },
  3453. //合计
  3454. getSum(param){
  3455. const { columns, data } = param
  3456. const sums = []
  3457. columns.forEach((column, index) => {
  3458. if (index === 0) {
  3459. sums[index] = '总计'
  3460. } else if (index ===13 || index ===14 || index ===11 || index ===12 ) {
  3461. const values = data.map(item => Number(item[column.property]))
  3462. if (!values.every(value => isNaN(value))) {
  3463. sums[index] = values.reduce((prev, curr) => {
  3464. const value = Number(curr)
  3465. if (!isNaN(value)) {
  3466. return prev + curr
  3467. } else {
  3468. return prev
  3469. }
  3470. }, 0)
  3471. if(index ===13 || index ===14){
  3472. sums[index] = (sums[index]/1000).toFixed(2) + '(吨)'
  3473. }
  3474. }
  3475. }
  3476. })
  3477. return sums
  3478. },
  3479. closeDialog() {
  3480. for (let aorp in this.Printinglist) {
  3481. this.$set(
  3482. this.Printinglist[aorp],
  3483. "fBsdate",
  3484. Date.parse(this.Printinglist[aorp].fBsdate)
  3485. );
  3486. }
  3487. },
  3488. //入库单打印
  3489. showEditDialog_s() {
  3490. if (this.printinglist.length > 0) {
  3491. this.editDialogVisible_s = true;
  3492. let sumFNetweight = 0
  3493. let sumFGrossweight = 0
  3494. for (let aorp in this.printinglist) {
  3495. sumFNetweight = Number(sumFNetweight) + Number(this.printinglist[aorp].fNetweight)
  3496. sumFGrossweight = Number(sumFGrossweight) + Number(this.printinglist[aorp].fGrossweight)
  3497. var date = new Date(this.printinglist[aorp].fBsdate);
  3498. var Y = date.getFullYear() + "-";
  3499. var M =
  3500. (date.getMonth() + 1 < 10
  3501. ? "0" + (date.getMonth() + 1)
  3502. : date.getMonth() + 1) + "-";
  3503. var D =
  3504. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  3505. this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
  3506. }
  3507. this.fCntrtype = this.printinglist[0].fCntrtype
  3508. this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
  3509. this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
  3510. for (let corp in this.fMblnoOptions) {
  3511. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  3512. this.$set(this.form, "fCorpidName", this.fMblnoOptions[corp].fName);
  3513. }
  3514. }
  3515. for (let sorp in this.warehouseOptions) {
  3516. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  3517. this.$set(this.form, "fWarehouseid", this.warehouseOptions[sorp].fName);
  3518. }
  3519. }
  3520. } else {
  3521. this.$message.error("请选择需要打印的明细!");
  3522. }
  3523. },
  3524. printSomething1() {
  3525. // 此处的style即为打印时的样式
  3526. const style =
  3527. "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3528. print({
  3529. printable: "print_area2",
  3530. type: "html",
  3531. style: style, // 亦可使用引入的外部css;
  3532. scanStyles: false,
  3533. });
  3534. },
  3535. //收货单打印
  3536. showEditDialog_ss() {
  3537. if (this.printinglist.length > 0) {
  3538. for (let warehouseCr in this.printinglist) {
  3539. if (!this.printinglist[warehouseCr].fWarehouseInformation) {
  3540. this.$message.error('请选择调入库位')
  3541. return false
  3542. // } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== this.printinglist[0].fDriverName) {
  3543. // this.$message.error('请选择相同司机名')
  3544. // return false
  3545. // } else if (!this.printinglist[warehouseCr].fDriverTel || this.printinglist[warehouseCr].fDriverTel !== this.printinglist[0].fDriverTel) {
  3546. // this.$message.error('请选择相同司机电话')
  3547. // return false
  3548. } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== this.printinglist[0].fTruckno) {
  3549. this.$message.error('请选择相同车号')
  3550. return false
  3551. }
  3552. this.fBstime = this.form.fBstime
  3553. }
  3554. this.editDialogVisible_ss = true
  3555. } else {
  3556. this.$message.error('请选择需要打印的明细!')
  3557. }
  3558. },
  3559. printSomething2() {
  3560. // 此处的style即为打印时的样式
  3561. const style =
  3562. "@media print { .print-div{ border:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3563. print({
  3564. printable: "print_area3",
  3565. type: "html",
  3566. style: style, // 亦可使用引入的外部css;
  3567. scanStyles: false,
  3568. });
  3569. },
  3570. //仓库电话、仓库联系人带入
  3571. warwhouseTel(){
  3572. for(let item in this.warehouseOptions){
  3573. if(this.form.fInwarehouseid == this.warehouseOptions[item].fId){
  3574. this.form.fTel = this.warehouseOptions[item].fTel
  3575. this.form.fContacts = this.warehouseOptions[item].fContacts
  3576. }
  3577. }
  3578. },
  3579. handleSelect(key, keyPath) {
  3580. this.addAgreements(key)
  3581. this.getWhgenlegListt(key)
  3582. },
  3583. // 新增付款作业费协议
  3584. addAgreements(kye) {
  3585. if (!this.form.fCorpid) {
  3586. this.$message({
  3587. message: "请维护货权方",
  3588. type: "warning",
  3589. });
  3590. }else if(this.form.fProductName == undefined) {
  3591. this.$message({
  3592. message: "请维护入库明细品名",
  3593. type: "warning",
  3594. });
  3595. } else {
  3596. this.whgenlegList = [];
  3597. this.dialogWhgenlegList = [];
  3598. this.whgenlegTotal = 0;
  3599. this.warehousingagreements = true;
  3600. this.getWhgenlegList(kye);
  3601. }
  3602. },
  3603. /** 查询部门下拉树结构 */
  3604. treeseLect(tree){
  3605. this.queryParams.fWarehouselocid = tree.id
  3606. },
  3607. getTreeselect(row) {
  3608. this.treeselectList.fWarehouselocid = null
  3609. this.inDex = row.$index
  3610. this.choiceWarehouse = true
  3611. treeselect(this.form.fWarehouseid).then(response => {
  3612. this.fWarehouseidOptions = response.data;
  3613. // this.dataList[this.inDex].fTransferWarehouselocid
  3614. })
  3615. this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
  3616. },
  3617. getAlltree(tree){
  3618. this.information = tree.fWarehouseInformation
  3619. this.informationId = tree.id
  3620. },
  3621. confirm(){
  3622. this.$set(this.dataList[this.inDex], 'fWarehouseInformation', this.information)
  3623. this.$set(this.dataList[this.inDex], 'fTransferWarehouselocid', this.informationId)
  3624. this.choiceWarehouse = false
  3625. this.dataList.fTransferWarehouselocid = this.informationId
  3626. },
  3627. // 撤销审核
  3628. backrRconciliation(){
  3629. this.form.fBillstatus = '1'
  3630. backFee(this.form.fId).then(response=>{
  3631. this.msgSuccess("撤回成功")
  3632. this.getList()
  3633. this.open = false
  3634. })
  3635. this.getList()
  3636. },
  3637. // 默认录入人
  3638. register() {
  3639. queryUserVal().then((response)=>{
  3640. this.Lander = response.user.userName
  3641. })
  3642. },
  3643. // 审批按钮
  3644. goApproval(){
  3645. this.addOrUpdateVisib = true
  3646. this.$nextTick(() => {
  3647. this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
  3648. })
  3649. },
  3650. Jump(){
  3651. this.approval = this.$route.query.data
  3652. if(this.approval){
  3653. let queryParams = { pageNum: 1, fDc:'C'};
  3654. listFees(queryParams).then((response) => {
  3655. this.fCNameOptions = response.rows;
  3656. });
  3657. let query = { pageNum: 1, fDc:'D'};
  3658. listFees(query).then((response) => {
  3659. this.fDNameOptions = response.rows;
  3660. });
  3661. this.reset()
  3662. this.colseButton = false
  3663. this.approval = JSON.parse(this.approval)
  3664. this.hide = false
  3665. this.open = true
  3666. this.browseStatus = true
  3667. this.contrOl = true
  3668. this.notChange = true
  3669. this.approve = true
  3670. this.disappear = true
  3671. this.cancelButton = false
  3672. getStockTransfer(this.approval.billId).then((response) => {
  3673. if (response.data.warehousebills) {
  3674. this.form = response.data.warehousebills;
  3675. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3676. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3677. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3678. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3679. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3680. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3681. }
  3682. if (response.data.corps) {
  3683. this.fMblnoOptions = response.data.corps;
  3684. this.KHblnoOptions = response.data.corps;
  3685. this.fCompanyOptIons = response.data.corps;
  3686. }
  3687. if (response.data.feesList) {
  3688. this.fWbuOptions = response.data.feesList;
  3689. }
  3690. if (response.data.warehouse) {
  3691. this.warehouseOptions = response.data.warehouse;
  3692. }
  3693. if (response.data.warehouseBillsItem) {
  3694. this.dataList = response.data.warehouseBillsItem;
  3695. for (let list in this.dataList) {
  3696. if (!this.form.fMblno) {
  3697. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3698. }
  3699. if (this.dataList[list].fBillstatus >= 6) {
  3700. this.formBrowseStatus = true;
  3701. }
  3702. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3703. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  3704. }
  3705. }
  3706. if (response.data.enclosures) {
  3707. this.relevantAttachments = response.data.enclosures;
  3708. }
  3709. if (response.data.warehouse) {
  3710. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3711. }
  3712. if (response.data.warehousebillsfeesDr) {
  3713. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3714. for (let dr in this.warehouseDrList) {
  3715. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  3716. }
  3717. }
  3718. if (response.data.warehousebillsfeesCr) {
  3719. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3720. for (let cr in this.warehouseCrList) {
  3721. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  3722. }
  3723. }
  3724. // if (response.data.sysUser) {
  3725. // // this.userVal = response.data.sysUser
  3726. // this.userOptions = response.data.sysUser;
  3727. // }
  3728. if (response.data.dept) {
  3729. this.deptOptions = []
  3730. this.deptOptions.push(response.data.dept)
  3731. }
  3732. if (response.data.feesList) {
  3733. this.fWbuOptions = response.data.feesList;
  3734. }
  3735. if (response.data.goodsList) {
  3736. this.goodsOptions = response.data.goodsList;
  3737. }
  3738. if (response.data.warehouse) {
  3739. this.warehouseOptions = response.data.warehouse;
  3740. }
  3741. if (response.data.warehouseAreas) {
  3742. this.kqhouseOptions = response.data.warehouseAreas;
  3743. }
  3744. this.open = true;
  3745. this.title = "修改调拨";
  3746. });
  3747. }
  3748. },
  3749. //树状库位下拉关闭询问
  3750. hanDleclose(done){
  3751. this.$confirm('确认关闭?')
  3752. .then(_ => {
  3753. done();
  3754. })
  3755. .catch(_ => {});
  3756. },
  3757. homepaGe(){
  3758. let view = {
  3759. fullPath: "/business/stockTransfer",
  3760. hash: "",
  3761. matched: Array(2),
  3762. meta: Object,
  3763. name: "StockTransfer",
  3764. params: Object,
  3765. path: "/business/stockTransfer",
  3766. query: Object,
  3767. title: "调拨"
  3768. }
  3769. this.$router.push({ path: '/index'})
  3770. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  3771. if (this.isActive(view)) {
  3772. this.toLastView(visitedViews, view)
  3773. }
  3774. })
  3775. Global.$emit("removeCache", "closeSelectedTag", view);
  3776. },
  3777. homePage() {
  3778. this.open = false
  3779. let view = {
  3780. fullPath: "/business/stockTransfer",
  3781. hash: "",
  3782. matched: Array(2),
  3783. meta: Object,
  3784. name: "StockTransfer",
  3785. params: Object,
  3786. path: "/business/stockTransfer",
  3787. query: Object,
  3788. title: "调拨"
  3789. }
  3790. this.$router.push({ path: '/index' })
  3791. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  3792. if (this.isActive(view)) {
  3793. this.toLastView(visitedViews, view)
  3794. }
  3795. })
  3796. Global.$emit("removeCache", "closeSelectedTag", view);
  3797. },
  3798. // 撤销审批
  3799. backApproval(){
  3800. let data = {
  3801. id:this.form.fId,
  3802. actId:this.stockTransferId,
  3803. billId:this.form.fId
  3804. }
  3805. RevocationApproval(data).then(response => {
  3806. this.msgSuccess("撤销审批成功")
  3807. this.disappear = true
  3808. this.open = false
  3809. this.getList()
  3810. })
  3811. },
  3812. returnData(){
  3813. this.addOrUpdateVisib = false
  3814. this.open = false
  3815. this.homepaGe()
  3816. },
  3817. getDataList(){
  3818. this.addOrUpdateVisible = false
  3819. },
  3820. // 查看审批流
  3821. addOrUpdateHandle(){
  3822. this.approvalStatus = false
  3823. this.addOrUpdateVisible = true
  3824. this.addOrUpdateVisib = false
  3825. let id = '448'
  3826. let actId = '110'
  3827. this.$nextTick(() => {
  3828. this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
  3829. })
  3830. },
  3831. //关闭弹框的事件
  3832. addCloseDialog(){
  3833. this.getList()
  3834. },
  3835. // 上传成功返回数据
  3836. showFile(row) {
  3837. for(let list in this.relevantAttachments) {
  3838. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  3839. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  3840. }
  3841. },
  3842. // 打印作业费
  3843. printSomething() {
  3844. // 此处的style即为打印时的样式
  3845. const style =
  3846. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  3847. print({
  3848. printable: "print_area1",
  3849. type: "html",
  3850. style: style, // 亦可使用引入的外部css;
  3851. scanStyles: false,
  3852. });
  3853. this.openPrintJobSheet = false;
  3854. },
  3855. // 新增附件上传
  3856. addRelevt() {
  3857. this.relevantAttachments.push({
  3858. fUrl: null,
  3859. fName: null,
  3860. createBy: this.form.createBy,
  3861. createTime: Date.parse(new Date()),
  3862. });
  3863. },
  3864. // 新增作业费协议
  3865. addAgreement(status,kye) {
  3866. this.costStatus = status
  3867. if (this.dataList.length === 0 || !this.dataList[0].fGoodsid) {
  3868. this.$message({ message: "请维护库存明细,或第一行品名", type: "warning", });
  3869. return false
  3870. }
  3871. if (!this.form.fCorpid) {
  3872. this.$message({ message: "请维护货权方", type: "warning", });
  3873. return false
  3874. }
  3875. this.whgenlegList = []
  3876. this.dialogWhgenlegList = []
  3877. this.whgenlegTotal = 0
  3878. this.warehousingagreements = true
  3879. this.getWhgenlegListt(kye)
  3880. },
  3881. // 新增仓储费协议
  3882. addStorages() {
  3883. if (!this.form.fCorpid) {
  3884. this.$message({ message: "请维护货权方", type: "warning", });
  3885. return false
  3886. }
  3887. this.whgenlegList = [];
  3888. this.dialogWhgenlegList = [];
  3889. this.whgenlegTotal = 0;
  3890. this.storageAgreements = true;
  3891. this.getAgreement();
  3892. },
  3893. // 查询仓储费协议
  3894. getAgreement() {
  3895. this.queryParams.fCorpid = this.form.fCorpid;
  3896. listAgreements(this.queryParams).then((response) => {
  3897. this.tasklegList = response.rows;
  3898. this.whgenlegTotal = response.total;
  3899. });
  3900. },
  3901. // 查询作业费信息
  3902. getWhgenlegListt(kye) {
  3903. let daTa = []
  3904. let fTaskType = kye
  3905. if (kye == 2){
  3906. this.Navigation = true
  3907. daTa = {
  3908. pageNum:1,
  3909. pageSize:10,
  3910. fTaskType:Number(fTaskType),
  3911. fLabour:this.form.fLabour
  3912. }
  3913. this.ueryTO(daTa)
  3914. }else if (kye == 1) {
  3915. this.Navigation = true
  3916. daTa = {
  3917. pageNum:1,
  3918. pageSize:10,
  3919. fTaskType:Number(fTaskType),
  3920. fFleet:this.form.fFleet,
  3921. fBilltype:'CKDB'
  3922. }
  3923. this.ueryTO(daTa)
  3924. }else {
  3925. this.Navigation = false
  3926. daTa = {
  3927. pageNum:1,
  3928. pageSize:10,
  3929. fCorpid:this.form.fCorpid
  3930. }
  3931. this.ueryTO(daTa)
  3932. }
  3933. },
  3934. ueryTO(daTa){
  3935. operationAgreement(daTa).then((response) => {
  3936. this.tasklegList = response.rows;
  3937. this.whgenlegTotal = response.total;
  3938. });
  3939. },
  3940. // 导入付款信息
  3941. whgenlegDatas() {
  3942. if (this.dialogWhgenlegList.length === 0) {
  3943. this.$message({
  3944. message: "请选择需要导入的数据",
  3945. type: "warning",
  3946. });
  3947. } else {
  3948. for (let whgen in this.dialogWhgenlegList) {
  3949. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  3950. getFees(feeId).then((response) => {
  3951. this.fWbuOptions.push(response.data);
  3952. });
  3953. this.warehouseDrList.push({
  3954. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  3955. fFeeid: feeId,
  3956. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  3957. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  3958. fCurrency: "RMB",
  3959. fExrate: 1,
  3960. fTaxrate: this.fTaxrate
  3961. });
  3962. }
  3963. this.warehousingagreements = false;
  3964. }
  3965. },
  3966. // 导出作业费
  3967. zhgenlegData() {
  3968. if (this.dialogWhgenlegList.length === 0) {
  3969. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  3970. return false
  3971. }
  3972. for (let zhgen in this.dialogWhgenlegList) {
  3973. let haveGoods = false
  3974. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  3975. if (this.fWbuOptions.length !== 0) {
  3976. for (let wbu in this.fWbuOptions) {
  3977. if (this.fWbuOptions[wbu].fId === feeId) {
  3978. haveGoods = true
  3979. break
  3980. }
  3981. }
  3982. }
  3983. getFees(feeId).then((response) => {
  3984. this.fWbuOptions = []
  3985. let queryParams = { pageNum: 1,};
  3986. listFees(queryParams).then((response) => {
  3987. this.fWbuOptions = response.rows;
  3988. });
  3989. })
  3990. // if (!haveGoods) {
  3991. // getFees(feeId).then((response) => {
  3992. // this.fWbuOptions.push(response.data)
  3993. // })
  3994. // }
  3995. let qty = 1;
  3996. if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
  3997. qty = this.fQty
  3998. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
  3999. qty = (this.fGrossweight/1000).toFixed(2)
  4000. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
  4001. qty = (this.fNetweight/1000).toFixed(2)
  4002. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
  4003. qty = this.fVolumn
  4004. }
  4005. // qty=(qty/1000).toFixed(2);
  4006. let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
  4007. if (this.costStatus === 'Cr') {
  4008. this.warehouseCrList.push({
  4009. fQty: qty,
  4010. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  4011. fFeeid: feeId,
  4012. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
  4013. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  4014. fCurrency: 'RMB',
  4015. fExrate: 1,
  4016. fAmount: fAmount,
  4017. fTaxrate: this.fTaxrate,
  4018. fMblno:this.form.fMblno,
  4019. fProductName:this.form.fProductName,
  4020. fMarks:this.form.fMarks,
  4021. fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType),
  4022. fSrcTypeId:this.dialogWhgenlegList[zhgen].fId
  4023. })
  4024. let queryParams = { pageNum: 1, fDc:'C'};
  4025. listFees(queryParams).then((response) => {
  4026. this.fCNameOptions = response.rows;
  4027. });
  4028. } else {
  4029. this.warehouseDrList.push({
  4030. fQty: qty,
  4031. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  4032. fFeeid: feeId,
  4033. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid + '',
  4034. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  4035. fCurrency: 'RMB',
  4036. fExrate: 1,
  4037. fAmount: fAmount,
  4038. fTaxrate: this.fTaxrate,
  4039. fMblno:this.form.fMblno,
  4040. fProductName:this.form.fProductName,
  4041. fMarks:this.form.fMarks,
  4042. fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType),
  4043. fSrcTypeId:this.dialogWhgenlegList[zhgen].fId
  4044. })
  4045. let queryParams = { pageNum: 1, fDc:'D'};
  4046. listFees(queryParams).then((response) => {
  4047. this.fDNameOptions = response.rows;
  4048. });
  4049. }
  4050. }
  4051. this.warehousingagreements = false
  4052. },
  4053. // 新增list
  4054. addRelevant() {
  4055. this.$refs['form'].validate((valid) => {
  4056. if (valid) {
  4057. this.whgenlegList = [];
  4058. this.dialogWhgenlegList = [];
  4059. this.whgenlegTotal = 0;
  4060. this.whgenlegVisible = true;
  4061. this.getWhgenlegList();
  4062. }
  4063. })
  4064. },
  4065. // 库存总账导出数据
  4066. whgenlegData() {
  4067. if (this.dialogWhgenlegList.length === 0) {
  4068. this.$message({ message: "未勾选信息", type: "warning" });
  4069. return false;
  4070. }
  4071. for (let whgen in this.dialogWhgenlegList) {
  4072. if (!this.form.fMblno || this.form.fMblno === "") {
  4073. this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
  4074. }
  4075. let fTruckno = null
  4076. let fDriverTel = null
  4077. let fDriverName = null
  4078. let fDriverIdCar = null
  4079. if (this.form.fTruckno) {
  4080. fTruckno = this.form.fTruckno
  4081. }
  4082. if (this.form.fDriverTel) {
  4083. fDriverTel = this.form.fDriverTel
  4084. }
  4085. if (this.form.fDriverName) {
  4086. fDriverName = this.form.fDriverName
  4087. }
  4088. if (this.form.fDriverIdCar) {
  4089. fDriverIdCar = this.form.fDriverIdCar
  4090. }
  4091. this.dataList.push({
  4092. fBsdate: this.form.fBsdate,
  4093. fId: null,
  4094. fCntrtype: null,
  4095. fGrossweight: 0,
  4096. fNetweight: 0,
  4097. fQty: 0,
  4098. fCntqty: 1,
  4099. fIsPass: 'F',
  4100. fGoodsval: null,
  4101. fBillstatus: 10,
  4102. fTruckno: fTruckno,
  4103. fDriverTel: fDriverTel,
  4104. fDriverName: fDriverName,
  4105. fDriverIdCar: fDriverIdCar,
  4106. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  4107. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  4108. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  4109. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  4110. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  4111. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  4112. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  4113. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  4114. fChargedate: this.dialogWhgenlegList[whgen].fChargedate,
  4115. fOrgwarehouseInformation: this.dialogWhgenlegList[whgen].fWarehouseids,
  4116. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  4117. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  4118. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  4119. fBusinessType: this.dialogWhgenlegList[whgen].fBusinessType + '',
  4120. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  4121. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  4122. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  4123. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  4124. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  4125. fTransferWarehouselocid: null,
  4126. remark: null,
  4127. });
  4128. }
  4129. this.updateDeduplication()
  4130. this.whgenlegVisible = false;
  4131. },
  4132. // 作业单打印
  4133. printJobSheet() {
  4134. if (this.printinglist.length <= 0) {
  4135. this.$message.error("请维护出库明细!");
  4136. return false;
  4137. }
  4138. let fTruckno = this.printinglist[0].fTruckno
  4139. let fDriverName = this.printinglist[0].fDriverName
  4140. for (let warehouseCr in this.printinglist) {
  4141. if(!this.printinglist[warehouseCr].fId) {
  4142. this.$message.error("请先保存!");
  4143. return false;
  4144. } else if (this.printinglist[warehouseCr].fTransferWarehouselocid === this.printinglist[warehouseCr].fWarehouselocid) {
  4145. this.$message.error('调拨库区不得与原库区相同')
  4146. return false
  4147. } else if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== fTruckno) {
  4148. this.$message.error('请填写车号或选择车相同车号')
  4149. return false
  4150. // } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
  4151. // this.$message.error('请填写司机姓名选择相同司机姓名')
  4152. // return false
  4153. // } else if (!this.printinglist[warehouseCr].fDriverTel) {
  4154. // this.$message.error('请选填写司机电话')
  4155. // return false
  4156. // } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
  4157. // this.$message.error('请选填写司机身份证')
  4158. // return false
  4159. } else if (!this.printinglist[warehouseCr].fTransferWarehouselocid) {
  4160. this.$message.error('请输入调入库位')
  4161. return false
  4162. }
  4163. for (let opt in this.fStorageTypeOptions) {
  4164. if (this.fStorageTypeOptions[opt].dictValue === this.printinglist[warehouseCr].fBusinessType) {
  4165. this.$set(this.printinglist[warehouseCr], 'fBusinessTypes', this.fStorageTypeOptions[opt].dictLabel)
  4166. break
  4167. }
  4168. }
  4169. }
  4170. if (this.dataWithdrawList.length > 0 || this.dataListSelection.length > 0) {
  4171. for (let item in this.warehouseOptions) {
  4172. if (this.form.fInwarehouseid == this.warehouseOptions[item].fId) {
  4173. this.fAddr = this.warehouseOptions[item].fAddr
  4174. }
  4175. }
  4176. }
  4177. // 获取业务日期
  4178. var date = new Date(this.form.fBsdate)
  4179. var Y = date.getFullYear() + '-'
  4180. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
  4181. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
  4182. this.form.fBsdates = Y + M + D
  4183. if (this.feelDrSelection.length !== 0) {
  4184. for (let dr in this.feelDrSelection) {
  4185. for (let opt in this.fWbuOptions) {
  4186. if (this.fWbuOptions[opt].fId === this.feelDrSelection[dr].fFeeid) {
  4187. this.$set(this.feelDrSelection[dr], 'fFeeName', this.fWbuOptions[opt].fName)
  4188. break
  4189. }
  4190. }
  4191. }
  4192. }
  4193. setTimeout(() => {
  4194. this.openPrintJobSheet = true
  4195. this.fBstime = this.form.fBstime
  4196. }, 200);
  4197. for(let item in this.businessTypeOption){
  4198. if(this.form.fBusinessType == this.businessTypeOption[item].dictValue){
  4199. this.businessType = this.businessTypeOption[item].dictLabel
  4200. }
  4201. }
  4202. this.fSerialNumber = this.printinglist[0].fSerialNumber
  4203. },
  4204. // 收款信息
  4205. addCollection() {
  4206. this.$refs['form'].validate((valid) => {
  4207. if (valid) {
  4208. if (this.form.fBusinessType == null) {
  4209. this.$message.error("请维护作业类型")
  4210. return false
  4211. } else {
  4212. this.warehouseDrList.push({
  4213. fcorpid: this.form.fCorpid,
  4214. ffeeid: null,
  4215. fFeeunitid: '',
  4216. fQty: '',
  4217. funitprice: '',
  4218. fAmount: 0,
  4219. fCurrency: "RMB",
  4220. fExrate: 1,
  4221. fTaxrate: this.fTaxrate,
  4222. remarks: null,
  4223. fMblno: this.form.fMblno,
  4224. fProductName: this.form.fProductName,
  4225. fMarks: this.form.fMarks,
  4226. fBusinessType: this.form.fBusinessType,
  4227. fSrcTypeId: 0
  4228. });
  4229. this.fWbuOptions = []
  4230. let queryParams = { pageNum: 1, fDc: 'D' };
  4231. listFees(queryParams).then((response) => {
  4232. this.fDNameOptions = response.rows;
  4233. });
  4234. }
  4235. }
  4236. })
  4237. },
  4238. addpayment() {
  4239. this.$refs['form'].validate((valid) => {
  4240. if (valid) {
  4241. if (this.form.fBusinessType == null) {
  4242. this.$message.error("请维护作业类型")
  4243. return false
  4244. } else {
  4245. this.warehouseCrList.push({
  4246. fcorpid: this.form.fCorpid,
  4247. ffeeid: null,
  4248. fFeeunitid: '',
  4249. fQty: '',
  4250. funitprice: '',
  4251. fAmount: 0,
  4252. fCurrency: "RMB",
  4253. fExrate: 1,
  4254. fTaxrate: this.fTaxrate,
  4255. remarks: null,
  4256. fMblno: this.form.fMblno,
  4257. fProductName: this.form.fProductName,
  4258. fMarks: this.form.fMarks,
  4259. fBusinessType: this.form.fBusinessType,
  4260. fSrcTypeId: 0
  4261. });
  4262. this.fWbuOptions = []
  4263. let queryParams = { pageNum: 1, fDc: 'C' };
  4264. listFees(queryParams).then((response) => {
  4265. this.fCNameOptions = response.rows;
  4266. });
  4267. }
  4268. }
  4269. })
  4270. },
  4271. queryUser() {
  4272. queryUserVal().then((response) => {
  4273. if (response.user !== null) {
  4274. this.userVal = response.user;
  4275. this.$set(this.form, "fDeptid", this.userVal.deptId);
  4276. this.$set(this.form, "createBy", this.userVal.userName);
  4277. this.$set(this.form,"fStorekeeper",this.userVal.nickName)
  4278. this.$set(this.form, "fIfdamage", "1");
  4279. this.$set(this.form, "fIfweigh", "1");
  4280. this.$set(this.form, "fTrademodeid", "1");
  4281. this.$set(this.form, "createTime", Date.parse(new Date()));
  4282. }
  4283. if (response.dept !== null) {
  4284. this.deptOptions = [];
  4285. this.deptOptions.push(response.dept);
  4286. }
  4287. });
  4288. },
  4289. /** 查询仓库主(出入库)列表 */
  4290. getList() {
  4291. let queryParams = { pageNum: 1, fTypeid: 6}
  4292. listCorps(queryParams).then((response) => {
  4293. this.fCompanyOptIons = response.rows;
  4294. });
  4295. let params = { pageNum: 1, fTypeid: 2}
  4296. listCorps(params).then((response) => {
  4297. this.fleetOptions = response.rows;
  4298. });
  4299. this.loading = true;
  4300. getStockTransferList(this.queryParams).then((response) => {
  4301. this.warehousebillsList = response.rows;
  4302. this.total = response.total;
  4303. this.loading = false;
  4304. });
  4305. },
  4306. // 查询库存总账信息
  4307. getWhgenlegList() {
  4308. this.whgenlegParams.fMblno = this.form.fMblno;
  4309. this.whgenlegParams.fCorpid = this.form.fCorpid;
  4310. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  4311. this.whgenlegParams.fWarehouseid = this.form.fInwarehouseid
  4312. listWhgenleg(this.whgenlegParams).then((response) => {
  4313. this.whgenlegList = response.rows;
  4314. this.whgenlegTotal = response.total;
  4315. });
  4316. },
  4317. // 作业类型(数据字典),对应st_in_type 字典翻译
  4318. fBusinessTypeFormat(row,column){
  4319. return this.selectDictLabel(this.businessTypeOption, row.fBusinessType);
  4320. },
  4321. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  4322. fTrademodeidFormat(row, column) {
  4323. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  4324. },
  4325. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  4326. fIfweighFormat(row, column) {
  4327. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  4328. },
  4329. // 是否破损(数据字典),默认F否则T字典翻译
  4330. fIfdamageFormat(row, column) {
  4331. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  4332. },
  4333. // 单据类型(数据字典)SJRK字典翻译
  4334. fBilltypeFormat(row, column) {
  4335. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  4336. },
  4337. // 状态(数据字典),N 入字典翻译
  4338. fBillstatusFormat(row, column) {
  4339. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  4340. },
  4341. // 取消按钮
  4342. cancel() {
  4343. this.open = false;
  4344. this.reset();
  4345. },
  4346. // 表单重置
  4347. reset() {
  4348. this.form = {
  4349. fId: null,
  4350. fBillno: null,
  4351. fCustomsdeclartion: null,
  4352. fOriginalbillno: null,
  4353. fDeptid: null,
  4354. fBsdeptid: null,
  4355. fContacts: null,
  4356. fTel: null,
  4357. fCorpid: null,
  4358. fTocorpid: null,
  4359. fStltypeid: null,
  4360. fBscorpno: null,
  4361. fWarehouseid: null,
  4362. fStorekeeper: null,
  4363. fBsdate: null,
  4364. fPlanqty: null,
  4365. fPlangrossweight: null,
  4366. fPlannetweight: null,
  4367. fPlanvolumn: null,
  4368. fQty: null,
  4369. fGrossweight: null,
  4370. fNetweight: null,
  4371. fVolumn: null,
  4372. fTrademodeid: null,
  4373. fSbu: null,
  4374. fFeetunit: null,
  4375. fMblno: null,
  4376. fVslvoy: null,
  4377. fEta: null,
  4378. fCustomno: null,
  4379. fIfweigh: null,
  4380. fIfpledge: null,
  4381. fIfdamage: null,
  4382. fBankcorpid: null,
  4383. fBilltype: null,
  4384. fBillstatus: null,
  4385. delFlag: null,
  4386. createBy: null,
  4387. createTime: null,
  4388. updateBy: null,
  4389. updateTime: null,
  4390. remark: null,
  4391. fCreateby: null,
  4392. fCreatetime: null,
  4393. fGoodsid: null,
  4394. fCntrtype: null,
  4395. fCntqty: null,
  4396. };
  4397. this.deptOptions = [];
  4398. this.userOptions = [];
  4399. this.fSbuOptions = [];
  4400. this.fWbuOptions = [];
  4401. this.goodsOptions = [];
  4402. this.KHblnoOptions = [];
  4403. this.fMblnoOptions = [];
  4404. this.kqhouseOptions = [];
  4405. this.approve = false
  4406. this.disappear = false
  4407. this.addOrUpdateVisible = false
  4408. this.addOrUpdateVisib = false
  4409. this.formBrowseStatus = false
  4410. this.detailsHidden = false
  4411. this.warehousingagreements = false
  4412. this.browseStatus = false
  4413. this.editDialogClosed_ss = false
  4414. this.openPrintJobSheet = false
  4415. this.whgenlegVisible = false
  4416. this.resetForm("form");
  4417. },
  4418. /** 搜索按钮操作 */
  4419. handleQuery() {
  4420. this.queryParams.pageNum = 1;
  4421. this.getList();
  4422. },
  4423. /** 重置按钮操作 */
  4424. resetQuery() {
  4425. this.queryParams = {
  4426. fBillno:null,
  4427. createBy:null,
  4428. timeInterval:null,
  4429. fTrademodeid:null,
  4430. fCorpid:null,
  4431. fMblno:null,
  4432. fSbu:null,
  4433. fGoodsid:null,
  4434. fWarehouseid:null,
  4435. fMarks:null,
  4436. fBillstatus:null
  4437. }
  4438. this.resetForm("queryForm");
  4439. this.handleQuery();
  4440. },
  4441. // 多选框选中数据
  4442. handleSelectionChange(selection) {
  4443. this.ids = selection;
  4444. // this.ids = selection.map((item) => item.fId);
  4445. this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6 || selection.map((item) => item.fBillstatus) == 4;
  4446. this.multiple = !selection.length;
  4447. },
  4448. // 库存总账多选框
  4449. whgenlegSelectionChange(selection) {
  4450. this.dialogWhgenlegList = selection;
  4451. },
  4452. /** 新增按钮操作 */
  4453. handleAdd(status) {
  4454. this.Operator = '',
  4455. this.Lander = ''
  4456. this.warehousesssMethod()
  4457. this.reset();
  4458. this.browseStatus = status;
  4459. this.contrOl = status;
  4460. this.notChange = false
  4461. this.queryUser();
  4462. this.open = true;
  4463. this.detailsHidden = false;
  4464. this.dataList = [];
  4465. this.warehouseCrList = [];
  4466. this.warehouseDrList = [];
  4467. this.relevantAttachments = [];
  4468. this.title = "调拨单";
  4469. this.formBrowseStatus = false;
  4470. this.form = {
  4471. fBstime:new Date()
  4472. }
  4473. console.log(this.Operator,this.Lander)
  4474. },
  4475. check_s(row,status){
  4476. let queryParams = { pageNum: 1, fDc:'C'};
  4477. listFees(queryParams).then((response) => {
  4478. this.fCNameOptions = response.rows;
  4479. });
  4480. let query = { pageNum: 1, fDc:'D'};
  4481. listFees(query).then((response) => {
  4482. this.fDNameOptions = response.rows;
  4483. });
  4484. // this.disappear = true
  4485. // this.notChange = true
  4486. this.reset();
  4487. this.contrOl = true
  4488. this.browseStatus = status;
  4489. this.detailsHidden = false;
  4490. let data = row || this.ids;
  4491. getStockTransfer(data.fId).then((response) => {
  4492. this.Operator = response.data.corps[0].createBy
  4493. if (response.data.warehousebills) {
  4494. this.form = response.data.warehousebills;
  4495. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4496. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4497. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4498. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4499. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  4500. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4501. }
  4502. if (response.data.corps) {
  4503. this.fMblnoOptions = response.data.corps;
  4504. this.KHblnoOptions = response.data.corps;
  4505. this.fSbuOptions = response.data.corps;
  4506. }
  4507. if (response.data.feesList) {
  4508. this.fWbuOptions = response.data.feesList;
  4509. }
  4510. if (response.data.warehouse) {
  4511. this.warehouseOptions = response.data.warehouse;
  4512. }
  4513. if (response.data.warehouseBillsItem) {
  4514. this.dataList = response.data.warehouseBillsItem;
  4515. for (let list in this.dataList) {
  4516. if (!this.form.fMblno) {
  4517. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4518. }
  4519. if (this.dataList[list].fBillstatus >= 6) {
  4520. this.formBrowseStatus = true;
  4521. }
  4522. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4523. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4524. }
  4525. }
  4526. if (response.data.enclosures) {
  4527. this.relevantAttachments = response.data.enclosures;
  4528. }
  4529. if (response.data.warehouse) {
  4530. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4531. for (let dr in this.warehouseDrList) {
  4532. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4533. }
  4534. }
  4535. if (response.data.warehousebillsfeesCr) {
  4536. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4537. for (let cr in this.warehouseCrList) {
  4538. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
  4539. }
  4540. }
  4541. // if (response.data.sysUser) {
  4542. // // this.userVal = response.data.sysUser
  4543. // this.userOptions = response.data.sysUser;
  4544. // console.log(response.data.sysUser)
  4545. // console.log(response.data.sysUser)
  4546. // }
  4547. if (response.data.dept) {
  4548. this.deptOptions = []
  4549. this.deptOptions.push(response.data.dept)
  4550. }
  4551. if (response.data.feesList) {
  4552. this.fWbuOptions = response.data.feesList;
  4553. }
  4554. if (response.data.goodsList) {
  4555. this.goodsOptions = response.data.goodsList;
  4556. }
  4557. if (response.data.warehouse) {
  4558. this.warehouseOptions = response.data.warehouse;
  4559. }
  4560. if (response.data.warehouseAreas) {
  4561. this.kqhouseOptions = response.data.warehouseAreas;
  4562. }
  4563. this.open = true;
  4564. this.title = "修改调拨";
  4565. });
  4566. },
  4567. check(row,status,res){
  4568. let queryParams = { pageNum: 1, fDc:'C'};
  4569. listFees(queryParams).then((response) => {
  4570. this.fCNameOptions = response.rows;
  4571. });
  4572. let query = { pageNum: 1, fDc:'D'};
  4573. listFees(query).then((response) => {
  4574. this.fDNameOptions = response.rows;
  4575. });
  4576. this.reset();
  4577. this.contrOl = true
  4578. this.disappear = false
  4579. this.notChange = true
  4580. this.browseStatus = status;
  4581. this.detailsHidden = false;
  4582. let data = row || this.ids;
  4583. getStockTransfer(data.fId).then((response) => {
  4584. this.Operator = response.data.corps[0].createBy
  4585. if (response.data.warehousebills) {
  4586. this.form = response.data.warehousebills;
  4587. if (this.form.fBillstatus > 2) {
  4588. this.approvalStatus = false;
  4589. }
  4590. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4591. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4592. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4593. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4594. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  4595. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4596. }
  4597. if (response.data.corps) {
  4598. this.fMblnoOptions = response.data.corps;
  4599. this.KHblnoOptions = response.data.corps;
  4600. this.fSbuOptions = response.data.corps;
  4601. }
  4602. if (response.data.feesList) {
  4603. this.fWbuOptions = response.data.feesList;
  4604. }
  4605. if (response.data.warehouse) {
  4606. this.warehouseOptions = response.data.warehouse;
  4607. }
  4608. if (response.data.warehouseBillsItem) {
  4609. this.dataList = response.data.warehouseBillsItem;
  4610. for (let list in this.dataList) {
  4611. if (!this.form.fMblno) {
  4612. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4613. }
  4614. if (this.dataList[list].fBillstatus >= 6) {
  4615. this.formBrowseStatus = true;
  4616. }
  4617. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4618. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4619. }
  4620. }
  4621. if (response.data.enclosures) {
  4622. this.relevantAttachments = response.data.enclosures;
  4623. }
  4624. if (response.data.warehouse) {
  4625. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4626. }
  4627. if (response.data.warehousebillsfeesDr) {
  4628. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4629. for (let dr in this.warehouseDrList) {
  4630. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4631. }
  4632. }
  4633. if (response.data.warehousebillsfeesCr) {
  4634. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4635. for (let cr in this.warehouseCrList) {
  4636. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  4637. }
  4638. }
  4639. if (response.data.sysUser) {
  4640. this.userVal = response.data.sysUser
  4641. // this.userOptions = response.data.sysUser;
  4642. }
  4643. if (response.data.dept) {
  4644. this.deptOptions = []
  4645. this.deptOptions.push(response.data.dept)
  4646. }
  4647. if (response.data.feesList) {
  4648. this.fWbuOptions = response.data.feesList;
  4649. }
  4650. if (response.data.goodsList) {
  4651. this.goodsOptions = response.data.goodsList;
  4652. }
  4653. if (response.data.warehouse) {
  4654. this.warehouseOptions = response.data.warehouse;
  4655. }
  4656. if (response.data.warehouseAreas) {
  4657. this.kqhouseOptions = response.data.warehouseAreas;
  4658. }
  4659. this.open = true;
  4660. this.title = "修改调拨";
  4661. });
  4662. },
  4663. /** 修改按钮操作 */
  4664. handleUpdate(row, status) {
  4665. let queryParams = { pageNum: 1, fDc:'C'};
  4666. listFees(queryParams).then((response) => {
  4667. this.fCNameOptions = response.rows;
  4668. });
  4669. let query = { pageNum: 1, fDc:'D'};
  4670. listFees(query).then((response) => {
  4671. this.fDNameOptions = response.rows;
  4672. });
  4673. this.reset();
  4674. this.browseStatus = status;
  4675. this.contrOl = status
  4676. this.detailsHidden = false;
  4677. this.formBrowseStatus = false;
  4678. let fId = row.fId || this.ids;
  4679. if (fId.length === 1){
  4680. fId = fId[0].fId
  4681. }
  4682. this.dataList = [];
  4683. getStockTransfer(fId).then((response) => {
  4684. if (response.data.warehousebills) {
  4685. this.form = response.data.warehousebills;
  4686. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  4687. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  4688. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  4689. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  4690. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  4691. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  4692. if(this.form.fBillstatus > 2){
  4693. this.approvalStatus = false
  4694. }else{
  4695. this.approvalStatus = true
  4696. }
  4697. }
  4698. if (response.data.corps) {
  4699. this.flabourOptions = response.data.corps;
  4700. this.fMblnoOptions = response.data.corps;
  4701. this.KHblnoOptions = response.data.corps;
  4702. this.fCompanyOptIons = response.data.corps;
  4703. this.fleetOptions = response.data.corps;
  4704. this.Operator = response.data.corps[0].createBy
  4705. }
  4706. if (response.data.feesList) {
  4707. this.fWbuOptions = response.data.feesList;
  4708. }
  4709. if (response.data.warehouse) {
  4710. this.warehouseOptions = response.data.warehouse;
  4711. }
  4712. if (response.data.warehouseBillsItem) {
  4713. this.dataList = response.data.warehouseBillsItem;
  4714. for (let list in this.dataList) {
  4715. if (!this.form.fMblno) {
  4716. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  4717. }
  4718. if (this.dataList[list].fBillstatus > 10) {
  4719. this.formBrowseStatus = true;
  4720. }
  4721. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  4722. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  4723. }
  4724. }
  4725. if (response.data.enclosures) {
  4726. this.relevantAttachments = response.data.enclosures;
  4727. }
  4728. if (response.data.warehouse) {
  4729. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4730. }
  4731. if (response.data.warehousebillsfeesDr) {
  4732. this.warehouseDrList = response.data.warehousebillsfeesDr;
  4733. for (let dr in this.warehouseDrList) {
  4734. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  4735. }
  4736. }
  4737. if (response.data.warehousebillsfeesCr) {
  4738. this.warehouseCrList = response.data.warehousebillsfeesCr;
  4739. for (let cr in this.warehouseCrList) {
  4740. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  4741. }
  4742. }
  4743. // if (response.data.sysUser) {
  4744. // // this.userVal = response.data.sysUser
  4745. // this.userOptions = response.data.sysUser;
  4746. //
  4747. // }
  4748. if (response.data.dept) {
  4749. this.deptOptions = []
  4750. this.deptOptions.push(response.data.dept)
  4751. }
  4752. if (response.data.feesList) {
  4753. this.fWbuOptions = response.data.feesList;
  4754. }
  4755. if (response.data.goodsList) {
  4756. this.goodsOptions = response.data.goodsList;
  4757. }
  4758. if (response.data.warehouse) {
  4759. this.warehouseOptions = response.data.warehouse;
  4760. }
  4761. if (response.data.warehouseAreas) {
  4762. this.kqhouseOptions = response.data.warehouseAreas;
  4763. }
  4764. this.open = true;
  4765. this.title = "修改调拨";
  4766. this.warehousesssMethod()
  4767. this.fWbuOptions = []
  4768. let queryParams = { pageNum: 1, };
  4769. listFees(queryParams).then((response) => {
  4770. this.fWbuOptions = response.rows;
  4771. });
  4772. this.register()
  4773. });
  4774. },
  4775. // 数量计算
  4776. changeContractAmt(row) {
  4777. let fQty = 0
  4778. let fUnitprice = 0
  4779. if (row.fUnitprice) {
  4780. fUnitprice = row.fUnitprice
  4781. }
  4782. if (row.fQty) {
  4783. fQty = row.fQty
  4784. }
  4785. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  4786. },
  4787. changefBsdate(row) {
  4788. if (this.dataList.length > 0) {
  4789. for (var i = 0; i < this.dataList.length; i++) {
  4790. this.$set(this.dataList[i], "fBsdate", row);
  4791. }
  4792. }
  4793. },
  4794. // change仓库
  4795. changefWarehouseid(row) {
  4796. for (let corp in this.warehouseOptions) {
  4797. if (row.fWarehouseid === this.warehouseOptions[corp].fId) {
  4798. this.fAddr = this.warehouseOptions[corp].fAddr;
  4799. this.$set(this.form, "fTel", this.warehouseOptions[corp].fTel);
  4800. this.$set(this.form, "fContacts", this.warehouseOptions[corp].fContacts);
  4801. }
  4802. }
  4803. },
  4804. // 选择按钮
  4805. collectionoptions(selection) {
  4806. this.feelDrSelection = selection
  4807. },
  4808. changefCorpid(row) {
  4809. this.$set(row, "fSbu", row.fCorpid);
  4810. for (let corp in this.fMblnoOptions) {
  4811. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  4812. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + "");
  4813. }
  4814. }
  4815. },
  4816. // 合计
  4817. getSummaries(param) {
  4818. const { columns, data } = param;
  4819. const sums = [];
  4820. var values = [];
  4821. columns.forEach((column, index) => {
  4822. if (index === 0) {
  4823. sums[index] = "合计";
  4824. return;
  4825. }
  4826. if (column.property === "fGrossweight") {
  4827. values = data.map((item) => Number(item["fGrossweight"]));
  4828. }
  4829. if (column.property === "fNetweight") {
  4830. values = data.map((item) => Number(item["fNetweight"]));
  4831. }
  4832. if (column.property === "fQty") {
  4833. values = data.map((item) => Number(item["fQty"]));
  4834. }
  4835. if (column.property === "fCntqty") {
  4836. values = data.map((item) => Number(item["fCntqty"]));
  4837. } // const values = data.map(item => Number(item[column.property]))
  4838. if (
  4839. column.property === "fGrossweight" ||
  4840. column.property === "fNetweight" ||
  4841. column.property === "fQty" ||
  4842. column.property === "fCntqty"
  4843. ) {
  4844. sums[index] = values.reduce((prev, curr) => {
  4845. const value = Number(curr);
  4846. if (!isNaN(value)) {
  4847. if (column.property === "fGrossweight") {
  4848. this.form.fGrossweight = prev + curr;
  4849. this.fGrossweight = prev + curr;
  4850. }
  4851. if (column.property === "fNetweight") {
  4852. this.form.fNetweight = prev + curr;
  4853. this.fNetweight = prev + curr;
  4854. }
  4855. if (column.property === "fVolumn") {
  4856. this.fVolumn = prev + curr;
  4857. }
  4858. if (column.property === "fQty") {
  4859. this.form.fQty = prev + curr;
  4860. this.fQty = prev + curr;
  4861. }
  4862. if (column.property === "fCntqty") {
  4863. this.fCntqty = prev + curr;
  4864. }
  4865. return prev + curr;
  4866. } else {
  4867. return prev;
  4868. }
  4869. }, 0);
  4870. sums[index] = sums[index].toFixed(2);
  4871. }
  4872. });
  4873. this.sums = sums;
  4874. return sums;
  4875. },
  4876. // 付款合计
  4877. warehouseDrSummaries(param) {
  4878. const { columns, data } = param;
  4879. const sums = [];
  4880. columns.forEach((column, index) => {
  4881. if (index === 0) {
  4882. sums[index] = "合计";
  4883. return;
  4884. }
  4885. const values = data.map((item) => Number(item[column.property]));
  4886. if (
  4887. column.property === "fUnitprice" ||
  4888. column.property === "fAmount" ||
  4889. column.property === "fQty" ||
  4890. column.property === "fQty"
  4891. ) {
  4892. sums[index] = values.reduce((prev, curr) => {
  4893. const value = Number(curr);
  4894. if (!isNaN(value)) {
  4895. return prev + curr;
  4896. } else {
  4897. return prev;
  4898. }
  4899. }, 0); // sums[index]
  4900. sums[index] = sums[index].toFixed(2);
  4901. }
  4902. });
  4903. return sums;
  4904. },
  4905. // 库存明细多选框结果
  4906. dataListChange(row) {
  4907. this.dataListSelection = row;
  4908. },
  4909. // 变更计价单位
  4910. changeFeeUnit(row) {
  4911. if (!row.fFeeunitid) {
  4912. return false
  4913. }
  4914. let fQty = 0;
  4915. let fGrossweight = 0;
  4916. let fNetweight = 0;
  4917. let fCntqty = 0;
  4918. let fixed = 1;
  4919. for (let li in this.dataList) {
  4920. if (this.dataList[li].fQty) {
  4921. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  4922. }
  4923. if (this.dataList[li].fGrossweight) {
  4924. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  4925. }
  4926. if (this.dataList[li].fNetweight) {
  4927. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  4928. }
  4929. if (this.dataList[li].fCntqty) {
  4930. fCntqty = parseFloat(Number(fCntqty) + Number(this.dataList[li].fCntqty)).toFixed(2)
  4931. }
  4932. }
  4933. if (row.fFeeunitid == "1") {
  4934. this.$set(row, 'fQty', fQty)
  4935. } else if (row.fFeeunitid == "2") {
  4936. this.$set(row, 'fQty', (fNetweight/1000).toFixed(2))
  4937. }else if (row.fFeeunitid == "3") {
  4938. this.$set(row, 'fQty', (fGrossweight/1000).toFixed(2))
  4939. }else if (row.fFeeunitid == "7") {
  4940. this.$set(row, 'fQty', fCntqty)
  4941. }else {
  4942. this.$set(row, "fQty", 0);
  4943. }
  4944. if (row.fUnitprice) {
  4945. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  4946. }
  4947. },
  4948. // 调拨确认
  4949. creditClick() {
  4950. this.$refs["form"].validate((valid) => {
  4951. for (let warehouse in this.dataListSelection) {
  4952. if (!this.dataListSelection[warehouse].fId) {
  4953. this.$message.error("请先保存");
  4954. return false;
  4955. }
  4956. if (!this.dataListSelection[warehouse].fGrossweight) {
  4957. this.$message.error("请选择调拨毛重(kg)");
  4958. return false;
  4959. } else if (!this.dataListSelection[warehouse].fWarehouseInformation) {
  4960. this.$message.error("请选择调入库位");
  4961. return false;
  4962. } else if (this.dataListSelection[warehouse].fWarehouseInformation === this.dataListSelection[warehouse].fWarehouselocids) {
  4963. this.$message.error("调拨库区不得与原库区相同");
  4964. return false;
  4965. } else if (!this.dataListSelection[warehouse].fNetweight) {
  4966. this.$message.error("请选择调拨净重(kg)");
  4967. return false;
  4968. }
  4969. // else if (!this.dataListSelection[warehouse].fQty) {
  4970. // this.$message.error("请维护调拨件数");
  4971. // return false;
  4972. // }
  4973. }
  4974. if (valid) {
  4975. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  4976. let formData = new window.FormData();
  4977. formData.append("type", '1');
  4978. formData.append("warehouseBills", JSON.stringify(this.form));
  4979. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  4980. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  4981. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  4982. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  4983. addWhgenleg(formData).then((response) => {
  4984. this.fid = response.data.fPid
  4985. this.dataWithdrawList = []
  4986. this.dataListSelection = []
  4987. this.msgSuccess('调拨成功')
  4988. this.$refs.tableList.clearSelection()
  4989. this.formBrowseStatus = true
  4990. for (let li in listSelection) {
  4991. for (let i in this.dataList) {
  4992. if (listSelection[li].fId === this.dataList[i].fId) {
  4993. this.$set(this.dataList[i], 'fBillstatus', 40)
  4994. break
  4995. }
  4996. }
  4997. }
  4998. getStockTransfer(this.form.fId).then((response) => {
  4999. if (response.data.warehousebills) {
  5000. this.form = response.data.warehousebills;
  5001. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  5002. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  5003. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5004. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  5005. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  5006. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5007. if(this.form.fBillstatus > 2){
  5008. this.approvalStatus = false
  5009. }else{
  5010. this.approvalStatus = true
  5011. }
  5012. }
  5013. if (response.data.corps) {
  5014. this.flabourOptions = response.data.corps;
  5015. this.fMblnoOptions = response.data.corps;
  5016. this.KHblnoOptions = response.data.corps;
  5017. this.fCompanyOptIons = response.data.corps;
  5018. this.fleetOptions = response.data.corps;
  5019. }
  5020. if (response.data.feesList) {
  5021. this.fWbuOptions = response.data.feesList;
  5022. }
  5023. if (response.data.warehouse) {
  5024. this.warehouseOptions = response.data.warehouse;
  5025. }
  5026. if (response.data.warehouseBillsItem) {
  5027. this.dataList = response.data.warehouseBillsItem;
  5028. for (let list in this.dataList) {
  5029. if (!this.form.fMblno) {
  5030. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  5031. }
  5032. if (this.dataList[list].fBillstatus > 10) {
  5033. this.formBrowseStatus = true;
  5034. }
  5035. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  5036. this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
  5037. }
  5038. }
  5039. if (response.data.enclosures) {
  5040. this.relevantAttachments = response.data.enclosures;
  5041. }
  5042. if (response.data.warehouse) {
  5043. this.warehouseDrList = response.data.warehousebillsfeesDr;
  5044. }
  5045. if (response.data.warehousebillsfeesDr) {
  5046. this.warehouseDrList = response.data.warehousebillsfeesDr;
  5047. for (let dr in this.warehouseDrList) {
  5048. this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
  5049. }
  5050. }
  5051. if (response.data.warehousebillsfeesCr) {
  5052. this.warehouseCrList = response.data.warehousebillsfeesCr;
  5053. for (let cr in this.warehouseCrList) {
  5054. this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
  5055. }
  5056. }
  5057. // if (response.data.sysUser) {
  5058. // // this.userVal = response.data.sysUser
  5059. // this.userOptions = response.data.sysUser;
  5060. // }
  5061. if (response.data.dept) {
  5062. this.deptOptions = []
  5063. this.deptOptions.push(response.data.dept)
  5064. }
  5065. if (response.data.feesList) {
  5066. this.fWbuOptions = response.data.feesList;
  5067. }
  5068. if (response.data.goodsList) {
  5069. this.goodsOptions = response.data.goodsList;
  5070. }
  5071. if (response.data.warehouse) {
  5072. this.warehouseOptions = response.data.warehouse;
  5073. }
  5074. if (response.data.warehouseAreas) {
  5075. this.kqhouseOptions = response.data.warehouseAreas;
  5076. }
  5077. this.open = true;
  5078. this.title = "修改调拨";
  5079. this.warehousesssMethod()
  5080. });
  5081. //保存
  5082. this.$refs['form'].validate((valid) => {
  5083. // if (this.dataList.length === 0) {
  5084. // this.$message.error('请添加库存明细!')
  5085. // return false
  5086. // }
  5087. for (let list in this.dataList) {
  5088. this.changeStock(this.dataList[list])
  5089. }
  5090. if (valid) {
  5091. setTimeout(() => {
  5092. let formData = new window.FormData()
  5093. this.form.fItemsStatus = 4
  5094. formData.append("type", '1');
  5095. // this.dataList.fTransferWarehouselocid = this.treeselectList.fWarehouselocid
  5096. formData.append("warehouseBills", JSON.stringify(this.form));
  5097. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5098. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5099. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5100. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5101. addStockTransfer(formData).then((response) => {
  5102. this.form = response.data.warehouseBills
  5103. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  5104. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  5105. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  5106. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5107. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  5108. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5109. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  5110. this.dataList = response.data.warehousebillsitems
  5111. for (let li in this.dataList) {
  5112. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  5113. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  5114. }
  5115. })
  5116. }, 200);
  5117. }
  5118. })
  5119. })
  5120. }
  5121. });
  5122. },
  5123. // 打印作业单
  5124. addList() {
  5125. this.$refs["form"].validate((valid) => {
  5126. if (valid) {
  5127. let dataList = []
  5128. for (let se in this.dataListSelection) {
  5129. if (Number(this.dataListSelection[se].fBillstatus) <= 10) {
  5130. dataList.push(this.dataListSelection[se])
  5131. }
  5132. }
  5133. if (dataList.length !== 0) {
  5134. let formData = new window.FormData();
  5135. formData.append("type", "1");
  5136. formData.append("warehouseBills", JSON.stringify(this.form));
  5137. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5138. formData.append("warehousebillsitems", JSON.stringify(dataList));
  5139. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5140. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5141. addJoblist(formData).then((response) => {
  5142. if (response.code == 200){
  5143. for (let li in response.data.warehousebillsitems) {
  5144. for (let item in this.printinglist) {
  5145. // if (this.Printinglist[item].fId == response.data.warehousebillsitems[li].fId) {
  5146. // this.Printinglist[item] = response.data.warehousebillsitems[li]
  5147. // }
  5148. if (!this.printinglist[0].fSerialNumber){
  5149. this.fSerialNumber = response.data.warehousebillsitems[0].fSerialNumber
  5150. }else {
  5151. this.fSerialNumber = this.printinglist[0].fSerialNumber
  5152. }
  5153. }
  5154. for(let index in this.dataList){
  5155. if(response.data.warehousebillsitems[li].fId == this.dataList[index].fId){
  5156. this.dataList[index].fSerialNumber = response.data.warehousebillsitems[li].fSerialNumber
  5157. this.dataList[index].fBillstatus = response.data.warehousebillsitems[li].fBillstatus
  5158. }
  5159. }
  5160. }
  5161. setTimeout(function(){
  5162. const style =
  5163. "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
  5164. print({
  5165. printable: "print_area1",
  5166. type: "html",
  5167. style: style, // 亦可使用引入的外部css;
  5168. scanStyles: false,
  5169. });
  5170. this.openPrintJobSheet = false;
  5171. },100);
  5172. }else {
  5173. return
  5174. }
  5175. })
  5176. }else {
  5177. this.printSomething()
  5178. }
  5179. }
  5180. });
  5181. },
  5182. // 撤回调拨
  5183. withdrawClick() {
  5184. for (let li in this.dataWithdrawList) {
  5185. if (this.dataWithdrawList[li].fBillstatus < 6) {
  5186. this.$message.error("所选信息中存在未调拨数据!");
  5187. return false
  5188. }
  5189. }
  5190. let formData = new window.FormData();
  5191. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  5192. formData.append("warehouseBills", JSON.stringify(this.form));
  5193. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5194. formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
  5195. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5196. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5197. updateCredit(formData).then((response) => {
  5198. this.fid = response.data;
  5199. this.formBrowseStatus = false;
  5200. this.msgSuccess("撤销入账成功");
  5201. this.$refs.tableList.clearSelection();
  5202. let mun = 0;
  5203. for (let i in this.dataList) {
  5204. for (let li in withdrawList) {
  5205. if (withdrawList[li].fId === this.dataList[i].fId) {
  5206. this.$set(this.dataList[i], 'fBillstatus', 10)
  5207. }
  5208. }
  5209. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus > 10) {
  5210. mun ++;
  5211. }
  5212. }
  5213. if (mun > 0) {
  5214. this.formBrowseStatus = true
  5215. } else {
  5216. this.formBrowseStatus = false
  5217. }
  5218. });
  5219. },
  5220. // 装货按钮
  5221. discharge() {
  5222. if (this.printinglist.length <= 0) {
  5223. this.$message.error("请选择需要装货的明细!");
  5224. return false
  5225. }
  5226. if(this.printinglist.length > 0){
  5227. if(this.dataListSelection) {
  5228. for (let li in this.dataListSelection) {
  5229. if (!this.dataListSelection[li].fId) {
  5230. this.$message.error('请先保存!')
  5231. return false
  5232. } else if (this.dataListSelection[li].fBillstatus === 10) {
  5233. this.$message.error('请先打印')
  5234. return false
  5235. }
  5236. if (this.dataListSelection[li].fBillstatus >= 30) {
  5237. this.$message.error('请勿重复装货')
  5238. return false
  5239. }
  5240. }
  5241. }
  5242. if(this.dataWithdrawList){
  5243. for(let li in this.dataWithdrawList){
  5244. if (this.dataWithdrawList[li].fBillstatus >= 30) {
  5245. this.$message.error('请勿重复装货')
  5246. return false
  5247. }
  5248. }
  5249. }
  5250. }
  5251. this.$refs['form'].validate((valid) => {
  5252. if (valid) {
  5253. let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
  5254. let formData = new window.FormData()
  5255. formData.append("warehouseBills", JSON.stringify(this.form));
  5256. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5257. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  5258. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5259. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5260. for (let li in this.dataListSelection) {
  5261. this.dataListSelection[li].fBillstatus = 30
  5262. }
  5263. this.formBrowseStatus = true
  5264. this.$refs.tableList.clearSelection()
  5265. disChargelist(formData).then((response) => {
  5266. for (let li in withdrawList) {
  5267. for (let i in this.dataList) {
  5268. if (withdrawList[li].fId === this.dataList[i].fId) {
  5269. this.$set(this.dataList[i], 'fBillstatus', 30)
  5270. break
  5271. }
  5272. }
  5273. }
  5274. this.msgSuccess('装货成功')
  5275. })
  5276. }
  5277. })
  5278. },
  5279. // 付款信息计价单位合计
  5280. getwarehouseCrList(param) {
  5281. const { columns, data } = param
  5282. const sums = []
  5283. var values = []
  5284. columns.forEach((column, index) => {
  5285. if (index === 0) {
  5286. sums[index] = "合计";
  5287. return;
  5288. }
  5289. if (index === 3) {
  5290. // values = data.map((item) => Number(item["fFeeUnitid"]));
  5291. sums[index] = this.fFeeUnitids;
  5292. return;
  5293. }
  5294. });
  5295. this.sums = sums;
  5296. return sums;
  5297. },
  5298. // 库存明细多选
  5299. selectinventory(selection) {
  5300. for(let item in selection){
  5301. if(selection[item].fBillstatus > '20'){
  5302. this.browseStatu = true
  5303. }else{
  5304. this.browseStatu = false
  5305. }
  5306. }
  5307. this.dataWithdrawList = [];
  5308. this.dataListSelection = [];
  5309. this.printinglist = selection;
  5310. if (!selection || selection.length === 0) {
  5311. return false
  5312. }
  5313. for (let se in selection) {
  5314. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
  5315. this.dataListSelection.push(selection[se])
  5316. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 40) {
  5317. this.dataWithdrawList.push(selection[se])
  5318. }
  5319. }
  5320. this.fTruckno = selection[0].fTruckno
  5321. this.fCntrtype = selection[0].fCntrtype
  5322. this.fGoodsids = selection[0].fGoodsids
  5323. },
  5324. // 更新主表品名并去重
  5325. updateDeduplication: function() {
  5326. if (this.dataList.length === 0) {
  5327. return false
  5328. }
  5329. let fMarks = []
  5330. let fProductName = []
  5331. let fMblno = []
  5332. for (let li in this.dataList) {
  5333. fMarks.push(this.dataList[li].fMarks)
  5334. fProductName.push(this.dataList[li].fGoodsids)
  5335. fMblno.push(this.dataList[li].fMblno)
  5336. }
  5337. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  5338. this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
  5339. this.$set(this.form, 'fMblno', Array.from(new Set(fMblno)).join(","))
  5340. },
  5341. // 保存
  5342. saveForm () {
  5343. this.$refs['form'].validate((valid) => {
  5344. // if (this.dataList.length === 0) {
  5345. // this.$message.error('请添加库存明细!')
  5346. // return false
  5347. // }
  5348. for (let list in this.dataList) {
  5349. this.changeStock(this.dataList[list])
  5350. }
  5351. if (valid) {
  5352. setTimeout(() => {
  5353. this.form.fBillstatus = 2
  5354. let formData = new window.FormData()
  5355. formData.append("type", '1');
  5356. formData.append("warehouseBills", JSON.stringify(this.form));
  5357. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5358. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5359. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5360. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5361. addStockTransfer(formData).then((response) => {
  5362. this.msgSuccess('保存成功')
  5363. this.form = response.data.warehouseBills
  5364. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  5365. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  5366. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  5367. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  5368. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  5369. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  5370. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  5371. this.dataList = response.data.warehousebillsitems
  5372. for (let li in this.dataList) {
  5373. this.$set(this.dataList[li], 'fBsdate', Date.parse(this.dataList[li].fBsdate))
  5374. this.$set(this.dataList[li], 'fBusinessType', this.dataList[li].fBusinessType + '')
  5375. }
  5376. })
  5377. }, 200);
  5378. }
  5379. })
  5380. },
  5381. //作业类型校验
  5382. educationChange() {
  5383. if (this.form.fBusinessType === '0') {
  5384. this.isrequired = 1
  5385. this.isrequired_l = 2
  5386. }else if(this.form.fBusinessType === '1' || this.form.fBusinessType === '3'){
  5387. this.isrequired_l = 1
  5388. this.isrequired = 2
  5389. }else if(this.form.fBusinessType === '2'){
  5390. this.isrequired_l = 1
  5391. this.isrequired = 1
  5392. }
  5393. },
  5394. /** 提交按钮 */
  5395. submitForm() {
  5396. this.updateDeduplication()
  5397. this.$refs['form'].validate((valid) => {
  5398. if (this.dataList.length === 0) {
  5399. this.$message.error('请新增库存明细!')
  5400. return false
  5401. }
  5402. for (let list in this.dataList) {
  5403. this.changeStock(this.dataList[list])
  5404. if (!this.dataList[list].fQty || this.dataList[list].fQty === 0) {
  5405. this.$message.error('请输入调拨件数!')
  5406. return false
  5407. }
  5408. if (!this.dataList[list].fNetweight || this.dataList[list].fNetweight === 0) {
  5409. this.$message.error('请输入调拨净重!')
  5410. return false
  5411. }
  5412. if (!this.dataList[list].fGrossweight || this.dataList[list].fGrossweight === 0) {
  5413. this.$message.error('请输入调拨毛重!')
  5414. return false
  5415. }
  5416. if (!this.dataList[list].fWarehouseInformation || this.dataList[list].fWarehouseInformation === 0) {
  5417. this.$message.error('请选择调拨仓库!')
  5418. return false
  5419. }
  5420. if (this.dataList[list].fBillstatus !== 40) {
  5421. this.$message.error('请入账库存明细!')
  5422. return false
  5423. }
  5424. }
  5425. for(let item in this.warehouseDrList) {
  5426. if (!this.warehouseDrList[item].fCorpid) {
  5427. if (item === 'fBusinessType') {
  5428. } else {
  5429. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行客户名称")
  5430. return false
  5431. }
  5432. }
  5433. if (!this.warehouseDrList[item].fFeeid) {
  5434. if (item === 'fBusinessType') {
  5435. } else {
  5436. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行费用名称")
  5437. return false
  5438. }
  5439. }
  5440. if (!this.warehouseDrList[item].fFeeunitid) {
  5441. if (item === 'fBusinessType') {
  5442. } else {
  5443. this.$message.error("请维护收款信息第" + (Number(item) + 1) + "行计价单位")
  5444. return false
  5445. }
  5446. }
  5447. }
  5448. for(let item in this.warehouseCrList) {
  5449. if (!this.warehouseCrList[item].fCorpid) {
  5450. if (item === 'fBusinessType') {
  5451. } else {
  5452. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行客户名称")
  5453. return false
  5454. }
  5455. }
  5456. if (!this.warehouseCrList[item].fFeeid) {
  5457. if (item === 'fBusinessType') {
  5458. } else {
  5459. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行费用名称")
  5460. return false
  5461. }
  5462. }
  5463. if (!this.warehouseCrList[item].fFeeunitid) {
  5464. if (item === 'fBusinessType') {
  5465. } else {
  5466. this.$message.error("请维护付款信息第" + (Number(item) + 1) + "行计价单位")
  5467. return false
  5468. }
  5469. }
  5470. }
  5471. if (valid) {
  5472. setTimeout(() => {
  5473. this.form.fBillstatus = status
  5474. this.form.fNetweight = this.fNetweight
  5475. this.form.fPlangrossweight = this.fPlangrossweight
  5476. this.form.fPlannetweight = this.fPlannetweight
  5477. this.form.fPlanvolumn = this.fPlanvolumn
  5478. this.form.fPlanqty = this.fPlanqty
  5479. this.form.fGrossweight = this.fGrossweight
  5480. this.form.fQty = this.fQty
  5481. if (!this.form.fId) {
  5482. this.form.fId = this.fid
  5483. }
  5484. let formData = new window.FormData()
  5485. formData.append("type", '1');
  5486. formData.append("warehouseBills", JSON.stringify(this.form));
  5487. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  5488. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  5489. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  5490. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  5491. warehouseSubmission(formData).then((response) => {
  5492. this.msgSuccess('提交成功')
  5493. this.cancel()
  5494. this.getList()
  5495. })
  5496. }, 200);
  5497. }
  5498. })
  5499. },
  5500. /** 删除按钮操作 */
  5501. handleDelete(row) {
  5502. const fIds = row.fId || this.ids.fId;
  5503. let tips = ''
  5504. delstockTransfer_s(fIds).then( data =>{
  5505. switch (data.msg) {
  5506. case '0': {
  5507. this.$message.error('当前数据已被其他操作员操作请刷新页面')
  5508. break
  5509. }
  5510. case '1': {
  5511. tips = '当前主表有数据从表无数据是否删除'
  5512. this.delete_S(fIds, tips)
  5513. break
  5514. }
  5515. case '2': {
  5516. tips = '当前主表有数据从表有数据是否删除'
  5517. this.delete_S(fIds, tips)
  5518. break
  5519. }
  5520. default:{
  5521. return this.$message.error('未知错误,无状态')
  5522. }
  5523. }
  5524. })
  5525. },
  5526. delete_S(fIds, tips){
  5527. this.$confirm(
  5528. tips,
  5529. "警告",
  5530. {
  5531. confirmButtonText: "确定",
  5532. cancelButtonText: "取消",
  5533. type: "warning",
  5534. }
  5535. )
  5536. .then(function () {
  5537. return delStockTransfer(fIds);
  5538. })
  5539. .then(() => {
  5540. this.getList();
  5541. this.msgSuccess("删除成功");
  5542. });
  5543. },
  5544. /** 导出按钮操作 */
  5545. handleExport() {
  5546. const queryParams = this.queryParams;
  5547. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  5548. confirmButtonText: "确定",
  5549. cancelButtonText: "取消",
  5550. type: "warning",
  5551. })
  5552. .then(function () {
  5553. return exportStockTransfer(queryParams);
  5554. })
  5555. .then((response) => {
  5556. this.download(response.msg);
  5557. });
  5558. },
  5559. // 修改毛重净重
  5560. changeStock (row) {
  5561. let fNetweight = 0;
  5562. let fGrossweight = 0;
  5563. if (row.fNetweight) {
  5564. fNetweight = row.fNetweight
  5565. }
  5566. if (row.fGrossweight) {
  5567. fGrossweight = row.fGrossweight
  5568. }
  5569. if (row.fPlannetweight < fNetweight) {
  5570. this.$message({ message: '调拨净重超出结余净重', type: 'warning' })
  5571. return false
  5572. }
  5573. if (row.fPlangrossweight < fGrossweight) {
  5574. this.$message({ message: '调拨毛重超出结余毛重', type: 'warning' })
  5575. return false
  5576. }
  5577. },
  5578. // 调拨件数的计算
  5579. qtyChange(row) {
  5580. if (!row.fQty || row.fQty === "") {
  5581. this.$set(row, "fNetweight", 0);
  5582. this.$set(row, "fGrossweight", 0);
  5583. return false;
  5584. }
  5585. if (row.fPlanqty < row.fQty) {
  5586. this.$message.error("出库件数超出结余件数!");
  5587. this.$set(row, 'fQty', 0)
  5588. this.$set(row, 'fNetweight', 0)
  5589. this.$set(row, 'fGrossweight', 0)
  5590. return false;
  5591. }
  5592. let fVolumn = parseFloat(Number(row.fVolumn) / Number(row.fPlanqty)).toFixed(2);
  5593. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2);
  5594. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2);
  5595. this.$set(row, "fVolumn", parseFloat(Number(fVolumn) * Number(row.fQty)).toFixed(2));
  5596. this.$set(row, "fNetweight", parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2));
  5597. this.$set(row, "fGrossweight", parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2));
  5598. },
  5599. deleteRow(index, rows) {
  5600. rows.splice(index, 1);
  5601. if (this.dataList.length === 0) {
  5602. this.form.fMblno = ''
  5603. this.formBrowseStatus = false
  5604. return false
  5605. }else {
  5606. let fMblno = []
  5607. for(let item in this.dataList){
  5608. fMblno.push(this.dataList[item].fMblno)
  5609. this.$set(this.form,'fMblno',Array.from(new Set(fMblno)).join(","))
  5610. this.form.fMblno = this.form.fMblno.substring(0,this.form.fMblno.length-1)
  5611. }
  5612. }
  5613. let sum = 0
  5614. for (let li in this.dataList) {
  5615. if (this.dataList[li].fBillstatus > 10) {
  5616. this.formBrowseStatus = true
  5617. return false
  5618. }
  5619. }
  5620. },
  5621. /* 获取所有仓库信息 */
  5622. warehousesssMethod() {
  5623. let queryParams = { pageNum: 1, fStatus: 0, delFlag: 0 };
  5624. listWarehousesss(queryParams).then((response) => {
  5625. this.warehouseOptions = response.rows;
  5626. });
  5627. },
  5628. /* 远程模糊查询劳务公司 */
  5629. flabourRemoteMethod(name) {
  5630. if (name == null || name === "") {
  5631. return false;
  5632. }
  5633. let queryParams = { pageNum: 1, fName: name, fTypeid: 6};
  5634. listCorps(queryParams).then((response) => {
  5635. this.fCompanyOptIons = response.rows;
  5636. });
  5637. },
  5638. /* 远程模糊查询车队 */
  5639. fleetRemoteMethod(name) {
  5640. if (name == null || name === "") {
  5641. return false;
  5642. }
  5643. let queryParams = { pageNum: 1, fName: name, fTypeid: 2 };
  5644. listCorps(queryParams).then((response) => {
  5645. this.fleetOptions = response.rows;
  5646. });
  5647. },
  5648. /* 远程模糊查询用户 */
  5649. corpsRemoteMethod(name) {
  5650. if (name == null || name === "") {
  5651. return false;
  5652. }
  5653. let queryParams = { pageNum: 1, fName: name };
  5654. listCorps(queryParams).then((response) => {
  5655. this.fMblnoOptions = response.rows;
  5656. this.KHblnoOptions = response.rows;
  5657. });
  5658. },
  5659. /* 远程模糊查询商品 */
  5660. goodsRemoteMethod(name) {
  5661. if (name == null || name === "") {
  5662. return false;
  5663. }
  5664. let queryParams = { pageNum: 1, fName: name };
  5665. listGoods(queryParams).then((response) => {
  5666. this.goodsOptions = response.rows;
  5667. });
  5668. },
  5669. // 选择费用信息时获取计价单位
  5670. changeFeeId (row) {
  5671. for (let li in this.fWbuOptions) {
  5672. if (row.fFeeid === this.fWbuOptions[li].fId) {
  5673. this.$set(row, 'fFeeUnitid', this.fWbuOptions[li].fFeeunitid + '')
  5674. this.changeFeeUnit(row)
  5675. break
  5676. }
  5677. }
  5678. },
  5679. // 远程模糊查询费用名称
  5680. fWRemoteMethod(name) {
  5681. if (name == null || name === "") {
  5682. return false;
  5683. }
  5684. let queryParams = { pageNum: 1, fName: name };
  5685. listFees(queryParams).then((response) => {
  5686. this.fWbuOptions = response.rows;
  5687. this.fCNameOptions = response.rows;
  5688. this.fDNameOptions = response.rows;
  5689. });
  5690. },
  5691. /* 远程模糊查询经营单位 */
  5692. fSbuRemoteMethod(name) {
  5693. if (name == null || name === "") {
  5694. return false;
  5695. }
  5696. let queryParams = { pageNum: 1, fName: name };
  5697. listCorps(queryParams).then((response) => {
  5698. this.fSbuOptions = response.rows;
  5699. });
  5700. },
  5701. /* 远程模糊查询仓库 */
  5702. warehouseRemoteMethod(name) {
  5703. if (!name) {
  5704. return false;
  5705. }
  5706. let queryParams = { pageNum: 1, fName: name };
  5707. listWarehouse(queryParams).then((response) => {
  5708. this.warehouseOptions = response.rows;
  5709. });
  5710. },
  5711. /* 远程模糊查询库区 */
  5712. kqhouseRemoteMethod(name) {
  5713. if (!name) {
  5714. return false;
  5715. }
  5716. let queryParams = {
  5717. pageNum: 1,
  5718. fWarehouseid: this.form.fWarehouseid,
  5719. fName: name
  5720. };
  5721. listArea(queryParams).then((response) => {
  5722. this.kqhouseOptions = response.rows;
  5723. });
  5724. },
  5725. /* 远程模糊查询操作用户 */
  5726. userRemoteMethod(name) {
  5727. if (name == null || name === "") {
  5728. return false;
  5729. }
  5730. let queryParams = { pageNum: 1, userName: name };
  5731. listUser(queryParams).then((response) => {
  5732. this.userOptions = response.rows;
  5733. });
  5734. },
  5735. },
  5736. };
  5737. </script>
  5738. <style lang="scss">
  5739. .juzhong > th {
  5740. text-align: center;
  5741. }
  5742. .biaoge > tr > td {
  5743. height: 50px;
  5744. text-align: center;
  5745. border-right: 1px solid #dfe6ec !important;
  5746. order-bottom: 1px solid #dfe6ec !important;
  5747. border-bottom: 1px solid #dfe6ec !important;
  5748. }
  5749. .el-table thead th {
  5750. background: #1890ff;
  5751. color: #fff;
  5752. }
  5753. .upload-demo {
  5754. margin-left: 50px;
  5755. }
  5756. .el-form-item {
  5757. margin-bottom: 5px !important;
  5758. }
  5759. .el-form-item__label {
  5760. font-size: 12px !important;
  5761. }
  5762. .el-collapse-item__header{
  5763. font-size: 16px;
  5764. font-weight: bolder;
  5765. padding-left: 5px;
  5766. }
  5767. .el-icon-s-home,.el-icon-s-order,.el-icon-circle-plus,.el-icon-remove{
  5768. padding-right: 5px;
  5769. }
  5770. .el-table {
  5771. .el-table__body-wrapper {
  5772. z-index: 2;
  5773. }
  5774. }
  5775. .avue-crud__dialog__header {
  5776. display: -webkit-box;
  5777. display: -ms-flexbox;
  5778. display: flex;
  5779. -webkit-box-align: center;
  5780. -ms-flex-align: center;
  5781. align-items: center;
  5782. -webkit-box-pack: justify;
  5783. -ms-flex-pack: justify;
  5784. justify-content: space-between;
  5785. }
  5786. .el-dialog__title {
  5787. color: rgba(0,0,0,.85);
  5788. font-weight: 500;
  5789. word-wrap: break-word;
  5790. }
  5791. .tabSetting {
  5792. display: flex;
  5793. justify-content: flex-end;
  5794. }
  5795. .listStyle {
  5796. display: flex;
  5797. border-top: 1px solid #dcdfe6;
  5798. border-left: 1px solid #dcdfe6;
  5799. border-right: 1px solid #dcdfe6;
  5800. }
  5801. .listStyle:last-child {
  5802. border-bottom: 1px solid #dcdfe6;
  5803. }
  5804. .progress {
  5805. display: flex;
  5806. align-items: center;
  5807. padding: 2px;
  5808. background-color: rgba(0, 0, 0, 0.05);
  5809. height: 100%;
  5810. }
  5811. .avue-crud__dialog__header {
  5812. display: -webkit-box;
  5813. display: -ms-flexbox;
  5814. display: flex;
  5815. -webkit-box-align: center;
  5816. -ms-flex-align: center;
  5817. align-items: center;
  5818. -webkit-box-pack: justify;
  5819. -ms-flex-pack: justify;
  5820. justify-content: space-between;
  5821. }
  5822. .el-dialog__title {
  5823. color: rgba(0,0,0,.85);
  5824. font-weight: 500;
  5825. word-wrap: break-word;
  5826. }
  5827. .avue-crud__dialog__menu {
  5828. padding-right: 20px;
  5829. float: left;
  5830. }
  5831. .avue-crud__dialog__menu i {
  5832. color: #909399;
  5833. font-size: 15px;
  5834. }
  5835. .el-icon-full-screen{
  5836. cursor: pointer;
  5837. }
  5838. .el-icon-full-screen:before {
  5839. content: "\e719";
  5840. }
  5841. </style>