index.vue 139 KB

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