AddOrUpdate.vue 149 KB

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