AddOrUpdate.vue 187 KB

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