index.vue 142 KB

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