index.vue 158 KB

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