AddOrUpdate.vue 157 KB

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