index.vue 157 KB

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