index.vue 165 KB

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