index.vue 188 KB

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