index.vue 167 KB

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