AddOrUpdate.vue 150 KB

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