index.vue 135 KB

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