index.vue 163 KB

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