index.vue 141 KB

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