index.vue 179 KB

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