index.vue 169 KB

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