AddOrUpdate.vue 157 KB

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