AddOrUpdate.vue 162 KB

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