AddOrUpdate.vue 168 KB

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