AddOrUpdate.vue 140 KB

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