index.vue 142 KB

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