AddOrUpdate.vue 172 KB

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