index.vue 165 KB

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