AddOrUpdate.vue 138 KB

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