index.vue 141 KB

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