AddOrUpdate.vue 150 KB

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