AddOrUpdate.vue 158 KB

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