AddOrUpdate.vue 159 KB

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