index.vue 139 KB

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