AddOrUpdate.vue 141 KB

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