AddOrUpdate.vue 153 KB

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