index.vue 156 KB

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