index.vue 156 KB

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