AddOrUpdate.vue 162 KB

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