AddOrUpdate.vue 154 KB

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