AddOrUpdate.vue 163 KB

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